/* * 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; /** *

* The configuration for the payload for a recommendation job. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RecommendationJobPayloadConfig implements Serializable, Cloneable, StructuredPojo { /** *

* The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a * single gzip compressed tar archive (.tar.gz suffix). *

*/ private String samplePayloadUrl; /** *

* The supported MIME types for the input data. *

*/ private java.util.List supportedContentTypes; /** *

* The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a * single gzip compressed tar archive (.tar.gz suffix). *

* * @param samplePayloadUrl * The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must * point to a single gzip compressed tar archive (.tar.gz suffix). */ public void setSamplePayloadUrl(String samplePayloadUrl) { this.samplePayloadUrl = samplePayloadUrl; } /** *

* The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a * single gzip compressed tar archive (.tar.gz suffix). *

* * @return The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must * point to a single gzip compressed tar archive (.tar.gz suffix). */ public String getSamplePayloadUrl() { return this.samplePayloadUrl; } /** *

* The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a * single gzip compressed tar archive (.tar.gz suffix). *

* * @param samplePayloadUrl * The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must * point to a single gzip compressed tar archive (.tar.gz suffix). * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationJobPayloadConfig withSamplePayloadUrl(String samplePayloadUrl) { setSamplePayloadUrl(samplePayloadUrl); return this; } /** *

* The supported MIME types for the input data. *

* * @return The supported MIME types for the input data. */ public java.util.List getSupportedContentTypes() { return supportedContentTypes; } /** *

* The supported MIME types for the input data. *

* * @param supportedContentTypes * The supported MIME types for the input data. */ public void setSupportedContentTypes(java.util.Collection supportedContentTypes) { if (supportedContentTypes == null) { this.supportedContentTypes = null; return; } this.supportedContentTypes = new java.util.ArrayList(supportedContentTypes); } /** *

* The supported MIME types for the input data. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSupportedContentTypes(java.util.Collection)} or * {@link #withSupportedContentTypes(java.util.Collection)} if you want to override the existing values. *

* * @param supportedContentTypes * The supported MIME types for the input data. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationJobPayloadConfig withSupportedContentTypes(String... supportedContentTypes) { if (this.supportedContentTypes == null) { setSupportedContentTypes(new java.util.ArrayList(supportedContentTypes.length)); } for (String ele : supportedContentTypes) { this.supportedContentTypes.add(ele); } return this; } /** *

* The supported MIME types for the input data. *

* * @param supportedContentTypes * The supported MIME types for the input data. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationJobPayloadConfig withSupportedContentTypes(java.util.Collection supportedContentTypes) { setSupportedContentTypes(supportedContentTypes); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSamplePayloadUrl() != null) sb.append("SamplePayloadUrl: ").append(getSamplePayloadUrl()).append(","); if (getSupportedContentTypes() != null) sb.append("SupportedContentTypes: ").append(getSupportedContentTypes()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RecommendationJobPayloadConfig == false) return false; RecommendationJobPayloadConfig other = (RecommendationJobPayloadConfig) obj; if (other.getSamplePayloadUrl() == null ^ this.getSamplePayloadUrl() == null) return false; if (other.getSamplePayloadUrl() != null && other.getSamplePayloadUrl().equals(this.getSamplePayloadUrl()) == false) return false; if (other.getSupportedContentTypes() == null ^ this.getSupportedContentTypes() == null) return false; if (other.getSupportedContentTypes() != null && other.getSupportedContentTypes().equals(this.getSupportedContentTypes()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSamplePayloadUrl() == null) ? 0 : getSamplePayloadUrl().hashCode()); hashCode = prime * hashCode + ((getSupportedContentTypes() == null) ? 0 : getSupportedContentTypes().hashCode()); return hashCode; } @Override public RecommendationJobPayloadConfig clone() { try { return (RecommendationJobPayloadConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.sagemaker.model.transform.RecommendationJobPayloadConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }