com.amazonaws.services.forecast.model.UpdateDatasetGroupRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-forecast Show documentation
/*
* Copyright 2015-2020 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.forecast.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 UpdateDatasetGroupRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ARN of the dataset group.
*
*/
private String datasetGroupArn;
/**
*
* An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.
*
*/
private java.util.List datasetArns;
/**
*
* The ARN of the dataset group.
*
*
* @param datasetGroupArn
* The ARN of the dataset group.
*/
public void setDatasetGroupArn(String datasetGroupArn) {
this.datasetGroupArn = datasetGroupArn;
}
/**
*
* The ARN of the dataset group.
*
*
* @return The ARN of the dataset group.
*/
public String getDatasetGroupArn() {
return this.datasetGroupArn;
}
/**
*
* The ARN of the dataset group.
*
*
* @param datasetGroupArn
* The ARN of the dataset group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDatasetGroupRequest withDatasetGroupArn(String datasetGroupArn) {
setDatasetGroupArn(datasetGroupArn);
return this;
}
/**
*
* An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.
*
*
* @return An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.
*/
public java.util.List getDatasetArns() {
return datasetArns;
}
/**
*
* An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.
*
*
* @param datasetArns
* An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.
*/
public void setDatasetArns(java.util.Collection datasetArns) {
if (datasetArns == null) {
this.datasetArns = null;
return;
}
this.datasetArns = new java.util.ArrayList(datasetArns);
}
/**
*
* An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDatasetArns(java.util.Collection)} or {@link #withDatasetArns(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param datasetArns
* An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDatasetGroupRequest withDatasetArns(String... datasetArns) {
if (this.datasetArns == null) {
setDatasetArns(new java.util.ArrayList(datasetArns.length));
}
for (String ele : datasetArns) {
this.datasetArns.add(ele);
}
return this;
}
/**
*
* An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.
*
*
* @param datasetArns
* An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDatasetGroupRequest withDatasetArns(java.util.Collection datasetArns) {
setDatasetArns(datasetArns);
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 (getDatasetGroupArn() != null)
sb.append("DatasetGroupArn: ").append(getDatasetGroupArn()).append(",");
if (getDatasetArns() != null)
sb.append("DatasetArns: ").append(getDatasetArns());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateDatasetGroupRequest == false)
return false;
UpdateDatasetGroupRequest other = (UpdateDatasetGroupRequest) obj;
if (other.getDatasetGroupArn() == null ^ this.getDatasetGroupArn() == null)
return false;
if (other.getDatasetGroupArn() != null && other.getDatasetGroupArn().equals(this.getDatasetGroupArn()) == false)
return false;
if (other.getDatasetArns() == null ^ this.getDatasetArns() == null)
return false;
if (other.getDatasetArns() != null && other.getDatasetArns().equals(this.getDatasetArns()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDatasetGroupArn() == null) ? 0 : getDatasetGroupArn().hashCode());
hashCode = prime * hashCode + ((getDatasetArns() == null) ? 0 : getDatasetArns().hashCode());
return hashCode;
}
@Override
public UpdateDatasetGroupRequest clone() {
return (UpdateDatasetGroupRequest) super.clone();
}
}