// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`InvokeGlobalInferenceGateway`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`gateway_id(impl Into<String>)`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::gateway_id) / [`set_gateway_id(Option<String>)`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::set_gateway_id):<br>required: **true**<br>The ID of the Global Inference Gateway to invoke. IAM policies refer to the gateway by its ARN, `arn:<partition> :sagemaker: <region> : <account> :global-inference-gateway/ <id> `. </id> </account> </region> </partition><br>
/// - [`accept(impl Into<String>)`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::accept) / [`set_accept(Option<String>)`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::set_accept):<br>required: **false**<br>The MIME type you want for the response. It is passed to the model server.<br>
/// - [`content_type(impl Into<String>)`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::content_type) / [`set_content_type(Option<String>)`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::set_content_type):<br>required: **true**<br>The MIME type of the request body. Pass `application/json` (parameters such as `charset=utf-8` are allowed): the body is one OpenAI JSON object. The Global Inference Gateway rejects other content types with a 415 error.<br>
/// - [`customer_identity_token(impl Into<String>)`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::customer_identity_token) / [`set_customer_identity_token(Option<String>)`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::set_customer_identity_token):<br>required: **false**<br>Per-caller customer identity token (a JWT), forwarded unchanged to the inference gateway, which validates it. The gateway does not use it to authorize the request. Include it in the SigV4 signed headers so it cannot be altered in transit. Redacted from logs, metrics and traces.<br>
/// - [`body(Blob)`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::body) / [`set_body(Option<Blob>)`](crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::set_body):<br>required: **true**<br>The inference request body: one OpenAI JSON object, at most 10 MiB. Its content is passed to the model server unchanged, except that the request is always sent with `"stream": false`: this operation returns one JSON document, so a `"stream": true` in the body is overridden (use InvokeGlobalInferenceGatewayWithResponseStream to stream). A body that is not one JSON object, or that repeats the top-level `model` key with different values, is rejected with a 400 validation error. A body larger than 10 MiB is rejected with PayloadTooLargeException (413). The gateway reads only `model` and `stream`, and does not store the body.<br>
/// - On success, responds with [`InvokeGlobalInferenceGatewayOutput`](crate::operation::invoke_global_inference_gateway::InvokeGlobalInferenceGatewayOutput) with field(s):
/// - [`body(Option<Blob>)`](crate::operation::invoke_global_inference_gateway::InvokeGlobalInferenceGatewayOutput::body): The model server's OpenAI completion JSON, returned unchanged. A response larger than 10 MiB fails with BadGatewayException (502).
/// - On failure, responds with [`SdkError<InvokeGlobalInferenceGatewayError>`](crate::operation::invoke_global_inference_gateway::InvokeGlobalInferenceGatewayError)
pub fn invoke_global_inference_gateway(
&self,
) -> crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder {
crate::operation::invoke_global_inference_gateway::builders::InvokeGlobalInferenceGatewayFluentBuilder::new(self.handle.clone())
}
}