/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace SageMakerRuntime { namespace Model { class InvokeEndpointResult { public: AWS_SAGEMAKERRUNTIME_API InvokeEndpointResult(); //We have to define these because Microsoft doesn't auto generate them AWS_SAGEMAKERRUNTIME_API InvokeEndpointResult(InvokeEndpointResult&&); AWS_SAGEMAKERRUNTIME_API InvokeEndpointResult& operator=(InvokeEndpointResult&&); //we delete these because Microsoft doesn't handle move generation correctly //and we therefore don't trust them to get it right here either. InvokeEndpointResult(const InvokeEndpointResult&) = delete; InvokeEndpointResult& operator=(const InvokeEndpointResult&) = delete; AWS_SAGEMAKERRUNTIME_API InvokeEndpointResult(Aws::AmazonWebServiceResult&& result); AWS_SAGEMAKERRUNTIME_API InvokeEndpointResult& operator=(Aws::AmazonWebServiceResult&& result); /** *

Includes the inference provided by the model.

For information about * the format of the response body, see Common * Data Formats-Inference.

If the explainer is activated, the body * includes the explanations provided by the model. For more information, see the * Response section under Invoke * the Endpoint in the Developer Guide.

*/ inline Aws::IOStream& GetBody() const { return m_body.GetUnderlyingStream(); } /** *

Includes the inference provided by the model.

For information about * the format of the response body, see Common * Data Formats-Inference.

If the explainer is activated, the body * includes the explanations provided by the model. For more information, see the * Response section under Invoke * the Endpoint in the Developer Guide.

*/ inline void ReplaceBody(Aws::IOStream* body) { m_body = Aws::Utils::Stream::ResponseStream(body); } /** *

The MIME type of the inference returned in the response body.

*/ inline const Aws::String& GetContentType() const{ return m_contentType; } /** *

The MIME type of the inference returned in the response body.

*/ inline void SetContentType(const Aws::String& value) { m_contentType = value; } /** *

The MIME type of the inference returned in the response body.

*/ inline void SetContentType(Aws::String&& value) { m_contentType = std::move(value); } /** *

The MIME type of the inference returned in the response body.

*/ inline void SetContentType(const char* value) { m_contentType.assign(value); } /** *

The MIME type of the inference returned in the response body.

*/ inline InvokeEndpointResult& WithContentType(const Aws::String& value) { SetContentType(value); return *this;} /** *

The MIME type of the inference returned in the response body.

*/ inline InvokeEndpointResult& WithContentType(Aws::String&& value) { SetContentType(std::move(value)); return *this;} /** *

The MIME type of the inference returned in the response body.

*/ inline InvokeEndpointResult& WithContentType(const char* value) { SetContentType(value); return *this;} /** *

Identifies the production variant that was invoked.

*/ inline const Aws::String& GetInvokedProductionVariant() const{ return m_invokedProductionVariant; } /** *

Identifies the production variant that was invoked.

*/ inline void SetInvokedProductionVariant(const Aws::String& value) { m_invokedProductionVariant = value; } /** *

Identifies the production variant that was invoked.

*/ inline void SetInvokedProductionVariant(Aws::String&& value) { m_invokedProductionVariant = std::move(value); } /** *

Identifies the production variant that was invoked.

*/ inline void SetInvokedProductionVariant(const char* value) { m_invokedProductionVariant.assign(value); } /** *

Identifies the production variant that was invoked.

*/ inline InvokeEndpointResult& WithInvokedProductionVariant(const Aws::String& value) { SetInvokedProductionVariant(value); return *this;} /** *

Identifies the production variant that was invoked.

*/ inline InvokeEndpointResult& WithInvokedProductionVariant(Aws::String&& value) { SetInvokedProductionVariant(std::move(value)); return *this;} /** *

Identifies the production variant that was invoked.

*/ inline InvokeEndpointResult& WithInvokedProductionVariant(const char* value) { SetInvokedProductionVariant(value); return *this;} /** *

Provides additional information in the response about the inference returned * by a model hosted at an Amazon SageMaker endpoint. The information is an opaque * value that is forwarded verbatim. You could use this value, for example, to * return an ID received in the CustomAttributes header of a request * or other metadata that a service endpoint was programmed to produce. The value * must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field * Value Components of the Hypertext Transfer Protocol (HTTP/1.1). If the * customer wants the custom attribute returned, the model must set the custom * attribute to be included on the way back.

The code in your model is * responsible for setting or updating any custom attributes in the response. If * your code does not set this value in the response, an empty value is returned. * For example, if a custom attribute represents the trace ID, your model can * prepend the custom attribute with Trace ID: in your post-processing * function.

This feature is currently supported in the Amazon Web Services * SDKs but not in the Amazon SageMaker Python SDK.

*/ inline const Aws::String& GetCustomAttributes() const{ return m_customAttributes; } /** *

Provides additional information in the response about the inference returned * by a model hosted at an Amazon SageMaker endpoint. The information is an opaque * value that is forwarded verbatim. You could use this value, for example, to * return an ID received in the CustomAttributes header of a request * or other metadata that a service endpoint was programmed to produce. The value * must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field * Value Components of the Hypertext Transfer Protocol (HTTP/1.1). If the * customer wants the custom attribute returned, the model must set the custom * attribute to be included on the way back.

The code in your model is * responsible for setting or updating any custom attributes in the response. If * your code does not set this value in the response, an empty value is returned. * For example, if a custom attribute represents the trace ID, your model can * prepend the custom attribute with Trace ID: in your post-processing * function.

This feature is currently supported in the Amazon Web Services * SDKs but not in the Amazon SageMaker Python SDK.

*/ inline void SetCustomAttributes(const Aws::String& value) { m_customAttributes = value; } /** *

Provides additional information in the response about the inference returned * by a model hosted at an Amazon SageMaker endpoint. The information is an opaque * value that is forwarded verbatim. You could use this value, for example, to * return an ID received in the CustomAttributes header of a request * or other metadata that a service endpoint was programmed to produce. The value * must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field * Value Components of the Hypertext Transfer Protocol (HTTP/1.1). If the * customer wants the custom attribute returned, the model must set the custom * attribute to be included on the way back.

The code in your model is * responsible for setting or updating any custom attributes in the response. If * your code does not set this value in the response, an empty value is returned. * For example, if a custom attribute represents the trace ID, your model can * prepend the custom attribute with Trace ID: in your post-processing * function.

This feature is currently supported in the Amazon Web Services * SDKs but not in the Amazon SageMaker Python SDK.

*/ inline void SetCustomAttributes(Aws::String&& value) { m_customAttributes = std::move(value); } /** *

Provides additional information in the response about the inference returned * by a model hosted at an Amazon SageMaker endpoint. The information is an opaque * value that is forwarded verbatim. You could use this value, for example, to * return an ID received in the CustomAttributes header of a request * or other metadata that a service endpoint was programmed to produce. The value * must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field * Value Components of the Hypertext Transfer Protocol (HTTP/1.1). If the * customer wants the custom attribute returned, the model must set the custom * attribute to be included on the way back.

The code in your model is * responsible for setting or updating any custom attributes in the response. If * your code does not set this value in the response, an empty value is returned. * For example, if a custom attribute represents the trace ID, your model can * prepend the custom attribute with Trace ID: in your post-processing * function.

This feature is currently supported in the Amazon Web Services * SDKs but not in the Amazon SageMaker Python SDK.

*/ inline void SetCustomAttributes(const char* value) { m_customAttributes.assign(value); } /** *

Provides additional information in the response about the inference returned * by a model hosted at an Amazon SageMaker endpoint. The information is an opaque * value that is forwarded verbatim. You could use this value, for example, to * return an ID received in the CustomAttributes header of a request * or other metadata that a service endpoint was programmed to produce. The value * must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field * Value Components of the Hypertext Transfer Protocol (HTTP/1.1). If the * customer wants the custom attribute returned, the model must set the custom * attribute to be included on the way back.

The code in your model is * responsible for setting or updating any custom attributes in the response. If * your code does not set this value in the response, an empty value is returned. * For example, if a custom attribute represents the trace ID, your model can * prepend the custom attribute with Trace ID: in your post-processing * function.

This feature is currently supported in the Amazon Web Services * SDKs but not in the Amazon SageMaker Python SDK.

*/ inline InvokeEndpointResult& WithCustomAttributes(const Aws::String& value) { SetCustomAttributes(value); return *this;} /** *

Provides additional information in the response about the inference returned * by a model hosted at an Amazon SageMaker endpoint. The information is an opaque * value that is forwarded verbatim. You could use this value, for example, to * return an ID received in the CustomAttributes header of a request * or other metadata that a service endpoint was programmed to produce. The value * must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field * Value Components of the Hypertext Transfer Protocol (HTTP/1.1). If the * customer wants the custom attribute returned, the model must set the custom * attribute to be included on the way back.

The code in your model is * responsible for setting or updating any custom attributes in the response. If * your code does not set this value in the response, an empty value is returned. * For example, if a custom attribute represents the trace ID, your model can * prepend the custom attribute with Trace ID: in your post-processing * function.

This feature is currently supported in the Amazon Web Services * SDKs but not in the Amazon SageMaker Python SDK.

*/ inline InvokeEndpointResult& WithCustomAttributes(Aws::String&& value) { SetCustomAttributes(std::move(value)); return *this;} /** *

Provides additional information in the response about the inference returned * by a model hosted at an Amazon SageMaker endpoint. The information is an opaque * value that is forwarded verbatim. You could use this value, for example, to * return an ID received in the CustomAttributes header of a request * or other metadata that a service endpoint was programmed to produce. The value * must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field * Value Components of the Hypertext Transfer Protocol (HTTP/1.1). If the * customer wants the custom attribute returned, the model must set the custom * attribute to be included on the way back.

The code in your model is * responsible for setting or updating any custom attributes in the response. If * your code does not set this value in the response, an empty value is returned. * For example, if a custom attribute represents the trace ID, your model can * prepend the custom attribute with Trace ID: in your post-processing * function.

This feature is currently supported in the Amazon Web Services * SDKs but not in the Amazon SageMaker Python SDK.

*/ inline InvokeEndpointResult& WithCustomAttributes(const char* value) { SetCustomAttributes(value); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline InvokeEndpointResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline InvokeEndpointResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline InvokeEndpointResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::Utils::Stream::ResponseStream m_body; Aws::String m_contentType; Aws::String m_invokedProductionVariant; Aws::String m_customAttributes; Aws::String m_requestId; }; } // namespace Model } // namespace SageMakerRuntime } // namespace Aws