/* * Copyright 2018-2023 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.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Specifies the configuration for notifications of inference results for asynchronous inference. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AsyncInferenceNotificationConfig implements Serializable, Cloneable, StructuredPojo { /** ** Amazon SNS topic to post a notification to when inference completes successfully. If no topic is provided, no * notification is sent on success. *
*/ private String successTopic; /** ** Amazon SNS topic to post a notification to when inference fails. If no topic is provided, no notification is sent * on failure. *
*/ private String errorTopic; /** ** The Amazon SNS topics where you want the inference response to be included. *
** The inference response is included only if the response size is less than or equal to 128 KB. *
** Amazon SNS topic to post a notification to when inference completes successfully. If no topic is provided, no * notification is sent on success. *
* * @param successTopic * Amazon SNS topic to post a notification to when inference completes successfully. If no topic is provided, * no notification is sent on success. */ public void setSuccessTopic(String successTopic) { this.successTopic = successTopic; } /** ** Amazon SNS topic to post a notification to when inference completes successfully. If no topic is provided, no * notification is sent on success. *
* * @return Amazon SNS topic to post a notification to when inference completes successfully. If no topic is * provided, no notification is sent on success. */ public String getSuccessTopic() { return this.successTopic; } /** ** Amazon SNS topic to post a notification to when inference completes successfully. If no topic is provided, no * notification is sent on success. *
* * @param successTopic * Amazon SNS topic to post a notification to when inference completes successfully. If no topic is provided, * no notification is sent on success. * @return Returns a reference to this object so that method calls can be chained together. */ public AsyncInferenceNotificationConfig withSuccessTopic(String successTopic) { setSuccessTopic(successTopic); return this; } /** ** Amazon SNS topic to post a notification to when inference fails. If no topic is provided, no notification is sent * on failure. *
* * @param errorTopic * Amazon SNS topic to post a notification to when inference fails. If no topic is provided, no notification * is sent on failure. */ public void setErrorTopic(String errorTopic) { this.errorTopic = errorTopic; } /** ** Amazon SNS topic to post a notification to when inference fails. If no topic is provided, no notification is sent * on failure. *
* * @return Amazon SNS topic to post a notification to when inference fails. If no topic is provided, no notification * is sent on failure. */ public String getErrorTopic() { return this.errorTopic; } /** ** Amazon SNS topic to post a notification to when inference fails. If no topic is provided, no notification is sent * on failure. *
* * @param errorTopic * Amazon SNS topic to post a notification to when inference fails. If no topic is provided, no notification * is sent on failure. * @return Returns a reference to this object so that method calls can be chained together. */ public AsyncInferenceNotificationConfig withErrorTopic(String errorTopic) { setErrorTopic(errorTopic); return this; } /** ** The Amazon SNS topics where you want the inference response to be included. *
** The inference response is included only if the response size is less than or equal to 128 KB. *
** The inference response is included only if the response size is less than or equal to 128 KB. *
* @see AsyncNotificationTopicTypes */ public java.util.List* The Amazon SNS topics where you want the inference response to be included. *
** The inference response is included only if the response size is less than or equal to 128 KB. *
** The inference response is included only if the response size is less than or equal to 128 KB. *
* @see AsyncNotificationTopicTypes */ public void setIncludeInferenceResponseIn(java.util.Collection* The Amazon SNS topics where you want the inference response to be included. *
** The inference response is included only if the response size is less than or equal to 128 KB. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setIncludeInferenceResponseIn(java.util.Collection)} or * {@link #withIncludeInferenceResponseIn(java.util.Collection)} if you want to override the existing values. *
* * @param includeInferenceResponseIn * The Amazon SNS topics where you want the inference response to be included.* The inference response is included only if the response size is less than or equal to 128 KB. *
* @return Returns a reference to this object so that method calls can be chained together. * @see AsyncNotificationTopicTypes */ public AsyncInferenceNotificationConfig withIncludeInferenceResponseIn(String... includeInferenceResponseIn) { if (this.includeInferenceResponseIn == null) { setIncludeInferenceResponseIn(new java.util.ArrayList* The Amazon SNS topics where you want the inference response to be included. *
** The inference response is included only if the response size is less than or equal to 128 KB. *
** The inference response is included only if the response size is less than or equal to 128 KB. *
* @return Returns a reference to this object so that method calls can be chained together. * @see AsyncNotificationTopicTypes */ public AsyncInferenceNotificationConfig withIncludeInferenceResponseIn(java.util.Collection* The Amazon SNS topics where you want the inference response to be included. *
** The inference response is included only if the response size is less than or equal to 128 KB. *
** The inference response is included only if the response size is less than or equal to 128 KB. *
* @return Returns a reference to this object so that method calls can be chained together. * @see AsyncNotificationTopicTypes */ public AsyncInferenceNotificationConfig withIncludeInferenceResponseIn(AsyncNotificationTopicTypes... includeInferenceResponseIn) { java.util.ArrayList