predictQApp method

Future<PredictQAppOutput> predictQApp({
  1. required String instanceId,
  2. PredictQAppInputOptions? options,
})

Generates an Amazon Q App definition based on either a conversation or a problem statement provided as input.The resulting app definition can be used to call CreateQApp. This API doesn't create Amazon Q Apps directly.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw UnauthorizedException. May throw ValidationException.

Parameter instanceId : The unique identifier of the Amazon Q Business application environment instance.

Parameter options : The input to generate the Q App definition from, either a conversation or problem statement.

Implementation

Future<PredictQAppOutput> predictQApp({
  required String instanceId,
  PredictQAppInputOptions? options,
}) async {
  final headers = <String, String>{
    'instance-id': instanceId.toString(),
  };
  final $payload = <String, dynamic>{
    if (options != null) 'options': options,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/apps.predictQApp',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return PredictQAppOutput.fromJson(response);
}