listFoundationModelAgreementOffers method

Future<ListFoundationModelAgreementOffersResponse> listFoundationModelAgreementOffers({
  1. required String modelId,
  2. OfferType? offerType,
})

Get the offers associated with the specified model.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter modelId : Model Id of the foundation model.

Parameter offerType : Type of offer associated with the model.

Implementation

Future<ListFoundationModelAgreementOffersResponse>
    listFoundationModelAgreementOffers({
  required String modelId,
  OfferType? offerType,
}) async {
  final $query = <String, List<String>>{
    if (offerType != null) 'offerType': [offerType.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/list-foundation-model-agreement-offers/${Uri.encodeComponent(modelId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListFoundationModelAgreementOffersResponse.fromJson(response);
}