getDiscoveredSchema method
Get the discovered schema that was generated based on sampled events.
May throw BadRequestException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw ServiceUnavailableException.
May throw UnauthorizedException.
Parameter events :
An array of strings where each string is a JSON event. These are the
events that were used to generate the schema. The array includes a single
type of event and has a maximum size of 10 events.
Parameter type :
The type of event.
Implementation
Future<GetDiscoveredSchemaResponse> getDiscoveredSchema({
required List<String> events,
required Type type,
}) async {
final $payload = <String, dynamic>{
'Events': events,
'Type': type.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/discover',
exceptionFnMap: _exceptionFns,
);
return GetDiscoveredSchemaResponse.fromJson(response);
}