/* * Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.sagemakerruntime.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* After you deploy a model into production using Amazon SageMaker hosting * services, your client applications use this API to get inferences from the * model hosted at the specified endpoint. *
** For an overview of Amazon SageMaker, see How * It Works. *
** Amazon SageMaker strips all POST headers except those supported by the API. * Amazon SageMaker might add additional headers. You should not rely on the * behavior of headers outside those enumerated in the request syntax. *
*
* Cals to InvokeEndpoint
are authenticated by using AWS Signature
* Version 4. For information, see Authenticating Requests (AWS Signature Version 4) in the Amazon S3
* API Reference.
*
* Endpoints are scoped to an individual account, and are not public. The URL * does not contain the account ID, but Amazon SageMaker determines the account * ID from the authentication token that is supplied by the caller. *
** The name of the endpoint that you specified when you created the endpoint * using the CreateEndpoint API. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*
*/
private String endpointName;
/**
*
* Provides input data, in the format specified in the
* ContentType
request header. Amazon SageMaker passes all of
* the data in the body to the model.
*
* For information about the format of the request body, see Common Data Formats—Inference. *
*
* Constraints:
* Length: - 5242880
*/
private java.nio.ByteBuffer body;
/**
*
* The MIME type of the input data in the request body. *
*
* Constraints:
* Length: - 1024
*/
private String contentType;
/**
*
* The desired MIME type of the inference in the response. *
*
* Constraints:
* Length: - 1024
*/
private String accept;
/**
*
* Constraints:
* Length: - 1024
*/
private String customAttributes;
/**
*
* The name of the endpoint that you specified when you created the endpoint * using the CreateEndpoint API. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*
*
* @return
* The name of the endpoint that you specified when you created the * endpoint using the CreateEndpoint API. *
*/ public String getEndpointName() { return endpointName; } /** ** The name of the endpoint that you specified when you created the endpoint * using the CreateEndpoint API. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*
*
* @param endpointName
* The name of the endpoint that you specified when you created * the endpoint using the CreateEndpoint API. *
*/ public void setEndpointName(String endpointName) { this.endpointName = endpointName; } /** ** The name of the endpoint that you specified when you created the endpoint * using the CreateEndpoint API. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*
*
* @param endpointName
* The name of the endpoint that you specified when you created * the endpoint using the CreateEndpoint API. *
* @return A reference to this updated object so that method calls can be * chained together. */ public InvokeEndpointRequest withEndpointName(String endpointName) { this.endpointName = endpointName; return this; } /** *
* Provides input data, in the format specified in the
* ContentType
request header. Amazon SageMaker passes all of
* the data in the body to the model.
*
* For information about the format of the request body, see Common Data Formats—Inference. *
*
* Constraints:
* Length: - 5242880
*
* @return
* Provides input data, in the format specified in the
* ContentType
request header. Amazon SageMaker passes
* all of the data in the body to the model.
*
* For information about the format of the request body, see Common Data Formats—Inference. *
*/ public java.nio.ByteBuffer getBody() { return body; } /** *
* Provides input data, in the format specified in the
* ContentType
request header. Amazon SageMaker passes all of
* the data in the body to the model.
*
* For information about the format of the request body, see Common Data Formats—Inference. *
*
* Constraints:
* Length: - 5242880
*
* @param body
* Provides input data, in the format specified in the
* ContentType
request header. Amazon SageMaker
* passes all of the data in the body to the model.
*
* For information about the format of the request body, see Common Data Formats—Inference. *
*/ public void setBody(java.nio.ByteBuffer body) { this.body = body; } /** *
* Provides input data, in the format specified in the
* ContentType
request header. Amazon SageMaker passes all of
* the data in the body to the model.
*
* For information about the format of the request body, see Common Data Formats—Inference. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 5242880
*
* @param body
* Provides input data, in the format specified in the
* ContentType
request header. Amazon SageMaker
* passes all of the data in the body to the model.
*
* For information about the format of the request body, see Common Data Formats—Inference. *
* @return A reference to this updated object so that method calls can be * chained together. */ public InvokeEndpointRequest withBody(java.nio.ByteBuffer body) { this.body = body; return this; } /** ** The MIME type of the input data in the request body. *
*
* Constraints:
* Length: - 1024
*
* @return
* The MIME type of the input data in the request body. *
*/ public String getContentType() { return contentType; } /** ** The MIME type of the input data in the request body. *
*
* Constraints:
* Length: - 1024
*
* @param contentType
* The MIME type of the input data in the request body. *
*/ public void setContentType(String contentType) { this.contentType = contentType; } /** ** The MIME type of the input data in the request body. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 1024
*
* @param contentType
* The MIME type of the input data in the request body. *
* @return A reference to this updated object so that method calls can be * chained together. */ public InvokeEndpointRequest withContentType(String contentType) { this.contentType = contentType; return this; } /** ** The desired MIME type of the inference in the response. *
*
* Constraints:
* Length: - 1024
*
* @return
* The desired MIME type of the inference in the response. *
*/ public String getAccept() { return accept; } /** ** The desired MIME type of the inference in the response. *
*
* Constraints:
* Length: - 1024
*
* @param accept
* The desired MIME type of the inference in the response. *
*/ public void setAccept(String accept) { this.accept = accept; } /** ** The desired MIME type of the inference in the response. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 1024
*
* @param accept
* The desired MIME type of the inference in the response. *
* @return A reference to this updated object so that method calls can be * chained together. */ public InvokeEndpointRequest withAccept(String accept) { this.accept = accept; return this; } /** * *
* Constraints:
* Length: - 1024
*
* @return
* Constraints:
* Length: - 1024
*
* @param customAttributes
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 1024
*
* @param customAttributes