/* * 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.iotsitewise.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateBulkImportJobRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The unique name that helps identify the job request. *

*/ private String jobName; /** *

* The ARN of the IAM role * that allows IoT SiteWise to read Amazon S3 data. *

*/ private String jobRoleArn; /** *

* The files in the specified Amazon S3 bucket that contain your data. *

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

* The Amazon S3 destination where errors associated with the job creation request are saved. *

*/ private ErrorReportLocation errorReportLocation; /** *

* Contains the configuration information of a job, such as the file format used to save data in Amazon S3. *

*/ private JobConfiguration jobConfiguration; /** *

* The unique name that helps identify the job request. *

* * @param jobName * The unique name that helps identify the job request. */ public void setJobName(String jobName) { this.jobName = jobName; } /** *

* The unique name that helps identify the job request. *

* * @return The unique name that helps identify the job request. */ public String getJobName() { return this.jobName; } /** *

* The unique name that helps identify the job request. *

* * @param jobName * The unique name that helps identify the job request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBulkImportJobRequest withJobName(String jobName) { setJobName(jobName); return this; } /** *

* The ARN of the IAM role * that allows IoT SiteWise to read Amazon S3 data. *

* * @param jobRoleArn * The ARN of the * IAM role that allows IoT SiteWise to read Amazon S3 data. */ public void setJobRoleArn(String jobRoleArn) { this.jobRoleArn = jobRoleArn; } /** *

* The ARN of the IAM role * that allows IoT SiteWise to read Amazon S3 data. *

* * @return The ARN of the * IAM role that allows IoT SiteWise to read Amazon S3 data. */ public String getJobRoleArn() { return this.jobRoleArn; } /** *

* The ARN of the IAM role * that allows IoT SiteWise to read Amazon S3 data. *

* * @param jobRoleArn * The ARN of the * IAM role that allows IoT SiteWise to read Amazon S3 data. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBulkImportJobRequest withJobRoleArn(String jobRoleArn) { setJobRoleArn(jobRoleArn); return this; } /** *

* The files in the specified Amazon S3 bucket that contain your data. *

* * @return The files in the specified Amazon S3 bucket that contain your data. */ public java.util.List getFiles() { return files; } /** *

* The files in the specified Amazon S3 bucket that contain your data. *

* * @param files * The files in the specified Amazon S3 bucket that contain your data. */ public void setFiles(java.util.Collection files) { if (files == null) { this.files = null; return; } this.files = new java.util.ArrayList(files); } /** *

* The files in the specified Amazon S3 bucket that contain your data. *

*

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

* * @param files * The files in the specified Amazon S3 bucket that contain your data. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBulkImportJobRequest withFiles(File... files) { if (this.files == null) { setFiles(new java.util.ArrayList(files.length)); } for (File ele : files) { this.files.add(ele); } return this; } /** *

* The files in the specified Amazon S3 bucket that contain your data. *

* * @param files * The files in the specified Amazon S3 bucket that contain your data. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBulkImportJobRequest withFiles(java.util.Collection files) { setFiles(files); return this; } /** *

* The Amazon S3 destination where errors associated with the job creation request are saved. *

* * @param errorReportLocation * The Amazon S3 destination where errors associated with the job creation request are saved. */ public void setErrorReportLocation(ErrorReportLocation errorReportLocation) { this.errorReportLocation = errorReportLocation; } /** *

* The Amazon S3 destination where errors associated with the job creation request are saved. *

* * @return The Amazon S3 destination where errors associated with the job creation request are saved. */ public ErrorReportLocation getErrorReportLocation() { return this.errorReportLocation; } /** *

* The Amazon S3 destination where errors associated with the job creation request are saved. *

* * @param errorReportLocation * The Amazon S3 destination where errors associated with the job creation request are saved. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBulkImportJobRequest withErrorReportLocation(ErrorReportLocation errorReportLocation) { setErrorReportLocation(errorReportLocation); return this; } /** *

* Contains the configuration information of a job, such as the file format used to save data in Amazon S3. *

* * @param jobConfiguration * Contains the configuration information of a job, such as the file format used to save data in Amazon S3. */ public void setJobConfiguration(JobConfiguration jobConfiguration) { this.jobConfiguration = jobConfiguration; } /** *

* Contains the configuration information of a job, such as the file format used to save data in Amazon S3. *

* * @return Contains the configuration information of a job, such as the file format used to save data in Amazon S3. */ public JobConfiguration getJobConfiguration() { return this.jobConfiguration; } /** *

* Contains the configuration information of a job, such as the file format used to save data in Amazon S3. *

* * @param jobConfiguration * Contains the configuration information of a job, such as the file format used to save data in Amazon S3. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBulkImportJobRequest withJobConfiguration(JobConfiguration jobConfiguration) { setJobConfiguration(jobConfiguration); 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 (getJobName() != null) sb.append("JobName: ").append(getJobName()).append(","); if (getJobRoleArn() != null) sb.append("JobRoleArn: ").append(getJobRoleArn()).append(","); if (getFiles() != null) sb.append("Files: ").append(getFiles()).append(","); if (getErrorReportLocation() != null) sb.append("ErrorReportLocation: ").append(getErrorReportLocation()).append(","); if (getJobConfiguration() != null) sb.append("JobConfiguration: ").append(getJobConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateBulkImportJobRequest == false) return false; CreateBulkImportJobRequest other = (CreateBulkImportJobRequest) obj; if (other.getJobName() == null ^ this.getJobName() == null) return false; if (other.getJobName() != null && other.getJobName().equals(this.getJobName()) == false) return false; if (other.getJobRoleArn() == null ^ this.getJobRoleArn() == null) return false; if (other.getJobRoleArn() != null && other.getJobRoleArn().equals(this.getJobRoleArn()) == false) return false; if (other.getFiles() == null ^ this.getFiles() == null) return false; if (other.getFiles() != null && other.getFiles().equals(this.getFiles()) == false) return false; if (other.getErrorReportLocation() == null ^ this.getErrorReportLocation() == null) return false; if (other.getErrorReportLocation() != null && other.getErrorReportLocation().equals(this.getErrorReportLocation()) == false) return false; if (other.getJobConfiguration() == null ^ this.getJobConfiguration() == null) return false; if (other.getJobConfiguration() != null && other.getJobConfiguration().equals(this.getJobConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobName() == null) ? 0 : getJobName().hashCode()); hashCode = prime * hashCode + ((getJobRoleArn() == null) ? 0 : getJobRoleArn().hashCode()); hashCode = prime * hashCode + ((getFiles() == null) ? 0 : getFiles().hashCode()); hashCode = prime * hashCode + ((getErrorReportLocation() == null) ? 0 : getErrorReportLocation().hashCode()); hashCode = prime * hashCode + ((getJobConfiguration() == null) ? 0 : getJobConfiguration().hashCode()); return hashCode; } @Override public CreateBulkImportJobRequest clone() { return (CreateBulkImportJobRequest) super.clone(); } }