All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.s3control.model.JobManifestSpec Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS S3 Control module holds the client classes that are used for communicating with AWS S3 Control Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 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.s3control.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Describes the format of a manifest. If the manifest is in CSV format, also describes the columns contained within the * manifest. *

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

* Indicates which of the available formats the specified manifest uses. *

*/ private String format; /** *

* If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this element * describes which columns contain the required data. *

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

* Indicates which of the available formats the specified manifest uses. *

* * @param format * Indicates which of the available formats the specified manifest uses. * @see JobManifestFormat */ public void setFormat(String format) { this.format = format; } /** *

* Indicates which of the available formats the specified manifest uses. *

* * @return Indicates which of the available formats the specified manifest uses. * @see JobManifestFormat */ public String getFormat() { return this.format; } /** *

* Indicates which of the available formats the specified manifest uses. *

* * @param format * Indicates which of the available formats the specified manifest uses. * @return Returns a reference to this object so that method calls can be chained together. * @see JobManifestFormat */ public JobManifestSpec withFormat(String format) { setFormat(format); return this; } /** *

* Indicates which of the available formats the specified manifest uses. *

* * @param format * Indicates which of the available formats the specified manifest uses. * @return Returns a reference to this object so that method calls can be chained together. * @see JobManifestFormat */ public JobManifestSpec withFormat(JobManifestFormat format) { this.format = format.toString(); return this; } /** *

* If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this element * describes which columns contain the required data. *

* * @return If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this * element describes which columns contain the required data. * @see JobManifestFieldName */ public java.util.List getFields() { return fields; } /** *

* If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this element * describes which columns contain the required data. *

* * @param fields * If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this * element describes which columns contain the required data. * @see JobManifestFieldName */ public void setFields(java.util.Collection fields) { if (fields == null) { this.fields = null; return; } this.fields = new java.util.ArrayList(fields); } /** *

* If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this element * describes which columns contain the required data. *

*

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

* * @param fields * If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this * element describes which columns contain the required data. * @return Returns a reference to this object so that method calls can be chained together. * @see JobManifestFieldName */ public JobManifestSpec withFields(String... fields) { if (this.fields == null) { setFields(new java.util.ArrayList(fields.length)); } for (String ele : fields) { this.fields.add(ele); } return this; } /** *

* If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this element * describes which columns contain the required data. *

* * @param fields * If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this * element describes which columns contain the required data. * @return Returns a reference to this object so that method calls can be chained together. * @see JobManifestFieldName */ public JobManifestSpec withFields(java.util.Collection fields) { setFields(fields); return this; } /** *

* If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this element * describes which columns contain the required data. *

* * @param fields * If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this * element describes which columns contain the required data. * @return Returns a reference to this object so that method calls can be chained together. * @see JobManifestFieldName */ public JobManifestSpec withFields(JobManifestFieldName... fields) { java.util.ArrayList fieldsCopy = new java.util.ArrayList(fields.length); for (JobManifestFieldName value : fields) { fieldsCopy.add(value.toString()); } if (getFields() == null) { setFields(fieldsCopy); } else { getFields().addAll(fieldsCopy); } 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 (getFormat() != null) sb.append("Format: ").append(getFormat()).append(","); if (getFields() != null) sb.append("Fields: ").append(getFields()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof JobManifestSpec == false) return false; JobManifestSpec other = (JobManifestSpec) obj; if (other.getFormat() == null ^ this.getFormat() == null) return false; if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == false) return false; if (other.getFields() == null ^ this.getFields() == null) return false; if (other.getFields() != null && other.getFields().equals(this.getFields()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode()); hashCode = prime * hashCode + ((getFields() == null) ? 0 : getFields().hashCode()); return hashCode; } @Override public JobManifestSpec clone() { try { return (JobManifestSpec) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy