com.amazonaws.services.datasync.model.AddStorageSystemRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-datasync Show documentation
/*
* 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.datasync.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 AddStorageSystemRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* Specifies the server name and network port required to connect with the management interface of your on-premises
* storage system.
*
*/
private DiscoveryServerConfiguration serverConfiguration;
/**
*
* Specifies the type of on-premises storage system that you want DataSync Discovery to collect information about.
*
*
*
* DataSync Discovery currently supports NetApp Fabric-Attached Storage (FAS) and All Flash FAS (AFF) systems
* running ONTAP 9.7 or later.
*
*
*/
private String systemType;
/**
*
* Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads from your on-premises
* storage system's management interface. You can only specify one ARN.
*
*/
private java.util.List agentArns;
/**
*
* Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.
*
*/
private String cloudWatchLogGroupArn;
/**
*
* Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We
* recommend creating at least a name tag for your on-premises storage system.
*
*/
private java.util.List tags;
/**
*
* Specifies a familiar name for your on-premises storage system.
*
*/
private String name;
/**
*
* Specifies a client token to make sure requests with this API operation are idempotent. If you don't specify a
* client token, DataSync generates one for you automatically.
*
*/
private String clientToken;
/**
*
* Specifies the user name and password for accessing your on-premises storage system's management interface.
*
*/
private Credentials credentials;
/**
*
* Specifies the server name and network port required to connect with the management interface of your on-premises
* storage system.
*
*
* @param serverConfiguration
* Specifies the server name and network port required to connect with the management interface of your
* on-premises storage system.
*/
public void setServerConfiguration(DiscoveryServerConfiguration serverConfiguration) {
this.serverConfiguration = serverConfiguration;
}
/**
*
* Specifies the server name and network port required to connect with the management interface of your on-premises
* storage system.
*
*
* @return Specifies the server name and network port required to connect with the management interface of your
* on-premises storage system.
*/
public DiscoveryServerConfiguration getServerConfiguration() {
return this.serverConfiguration;
}
/**
*
* Specifies the server name and network port required to connect with the management interface of your on-premises
* storage system.
*
*
* @param serverConfiguration
* Specifies the server name and network port required to connect with the management interface of your
* on-premises storage system.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddStorageSystemRequest withServerConfiguration(DiscoveryServerConfiguration serverConfiguration) {
setServerConfiguration(serverConfiguration);
return this;
}
/**
*
* Specifies the type of on-premises storage system that you want DataSync Discovery to collect information about.
*
*
*
* DataSync Discovery currently supports NetApp Fabric-Attached Storage (FAS) and All Flash FAS (AFF) systems
* running ONTAP 9.7 or later.
*
*
*
* @param systemType
* Specifies the type of on-premises storage system that you want DataSync Discovery to collect information
* about.
*
* DataSync Discovery currently supports NetApp Fabric-Attached Storage (FAS) and All Flash FAS (AFF) systems
* running ONTAP 9.7 or later.
*
* @see DiscoverySystemType
*/
public void setSystemType(String systemType) {
this.systemType = systemType;
}
/**
*
* Specifies the type of on-premises storage system that you want DataSync Discovery to collect information about.
*
*
*
* DataSync Discovery currently supports NetApp Fabric-Attached Storage (FAS) and All Flash FAS (AFF) systems
* running ONTAP 9.7 or later.
*
*
*
* @return Specifies the type of on-premises storage system that you want DataSync Discovery to collect information
* about.
*
* DataSync Discovery currently supports NetApp Fabric-Attached Storage (FAS) and All Flash FAS (AFF)
* systems running ONTAP 9.7 or later.
*
* @see DiscoverySystemType
*/
public String getSystemType() {
return this.systemType;
}
/**
*
* Specifies the type of on-premises storage system that you want DataSync Discovery to collect information about.
*
*
*
* DataSync Discovery currently supports NetApp Fabric-Attached Storage (FAS) and All Flash FAS (AFF) systems
* running ONTAP 9.7 or later.
*
*
*
* @param systemType
* Specifies the type of on-premises storage system that you want DataSync Discovery to collect information
* about.
*
* DataSync Discovery currently supports NetApp Fabric-Attached Storage (FAS) and All Flash FAS (AFF) systems
* running ONTAP 9.7 or later.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DiscoverySystemType
*/
public AddStorageSystemRequest withSystemType(String systemType) {
setSystemType(systemType);
return this;
}
/**
*
* Specifies the type of on-premises storage system that you want DataSync Discovery to collect information about.
*
*
*
* DataSync Discovery currently supports NetApp Fabric-Attached Storage (FAS) and All Flash FAS (AFF) systems
* running ONTAP 9.7 or later.
*
*
*
* @param systemType
* Specifies the type of on-premises storage system that you want DataSync Discovery to collect information
* about.
*
* DataSync Discovery currently supports NetApp Fabric-Attached Storage (FAS) and All Flash FAS (AFF) systems
* running ONTAP 9.7 or later.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DiscoverySystemType
*/
public AddStorageSystemRequest withSystemType(DiscoverySystemType systemType) {
this.systemType = systemType.toString();
return this;
}
/**
*
* Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads from your on-premises
* storage system's management interface. You can only specify one ARN.
*
*
* @return Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads from your
* on-premises storage system's management interface. You can only specify one ARN.
*/
public java.util.List getAgentArns() {
return agentArns;
}
/**
*
* Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads from your on-premises
* storage system's management interface. You can only specify one ARN.
*
*
* @param agentArns
* Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads from your
* on-premises storage system's management interface. You can only specify one ARN.
*/
public void setAgentArns(java.util.Collection agentArns) {
if (agentArns == null) {
this.agentArns = null;
return;
}
this.agentArns = new java.util.ArrayList(agentArns);
}
/**
*
* Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads from your on-premises
* storage system's management interface. You can only specify one ARN.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAgentArns(java.util.Collection)} or {@link #withAgentArns(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param agentArns
* Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads from your
* on-premises storage system's management interface. You can only specify one ARN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddStorageSystemRequest withAgentArns(String... agentArns) {
if (this.agentArns == null) {
setAgentArns(new java.util.ArrayList(agentArns.length));
}
for (String ele : agentArns) {
this.agentArns.add(ele);
}
return this;
}
/**
*
* Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads from your on-premises
* storage system's management interface. You can only specify one ARN.
*
*
* @param agentArns
* Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads from your
* on-premises storage system's management interface. You can only specify one ARN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddStorageSystemRequest withAgentArns(java.util.Collection agentArns) {
setAgentArns(agentArns);
return this;
}
/**
*
* Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.
*
*
* @param cloudWatchLogGroupArn
* Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.
*/
public void setCloudWatchLogGroupArn(String cloudWatchLogGroupArn) {
this.cloudWatchLogGroupArn = cloudWatchLogGroupArn;
}
/**
*
* Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.
*
*
* @return Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.
*/
public String getCloudWatchLogGroupArn() {
return this.cloudWatchLogGroupArn;
}
/**
*
* Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.
*
*
* @param cloudWatchLogGroupArn
* Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddStorageSystemRequest withCloudWatchLogGroupArn(String cloudWatchLogGroupArn) {
setCloudWatchLogGroupArn(cloudWatchLogGroupArn);
return this;
}
/**
*
* Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We
* recommend creating at least a name tag for your on-premises storage system.
*
*
* @return Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We
* recommend creating at least a name tag for your on-premises storage system.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We
* recommend creating at least a name tag for your on-premises storage system.
*
*
* @param tags
* Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We
* recommend creating at least a name tag for your on-premises storage system.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We
* recommend creating at least a name tag for your on-premises storage system.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We
* recommend creating at least a name tag for your on-premises storage system.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddStorageSystemRequest withTags(TagListEntry... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (TagListEntry ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We
* recommend creating at least a name tag for your on-premises storage system.
*
*
* @param tags
* Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We
* recommend creating at least a name tag for your on-premises storage system.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddStorageSystemRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* Specifies a familiar name for your on-premises storage system.
*
*
* @param name
* Specifies a familiar name for your on-premises storage system.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* Specifies a familiar name for your on-premises storage system.
*
*
* @return Specifies a familiar name for your on-premises storage system.
*/
public String getName() {
return this.name;
}
/**
*
* Specifies a familiar name for your on-premises storage system.
*
*
* @param name
* Specifies a familiar name for your on-premises storage system.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddStorageSystemRequest withName(String name) {
setName(name);
return this;
}
/**
*
* Specifies a client token to make sure requests with this API operation are idempotent. If you don't specify a
* client token, DataSync generates one for you automatically.
*
*
* @param clientToken
* Specifies a client token to make sure requests with this API operation are idempotent. If you don't
* specify a client token, DataSync generates one for you automatically.
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* Specifies a client token to make sure requests with this API operation are idempotent. If you don't specify a
* client token, DataSync generates one for you automatically.
*
*
* @return Specifies a client token to make sure requests with this API operation are idempotent. If you don't
* specify a client token, DataSync generates one for you automatically.
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* Specifies a client token to make sure requests with this API operation are idempotent. If you don't specify a
* client token, DataSync generates one for you automatically.
*
*
* @param clientToken
* Specifies a client token to make sure requests with this API operation are idempotent. If you don't
* specify a client token, DataSync generates one for you automatically.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddStorageSystemRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
*
* Specifies the user name and password for accessing your on-premises storage system's management interface.
*
*
* @param credentials
* Specifies the user name and password for accessing your on-premises storage system's management interface.
*/
public void setCredentials(Credentials credentials) {
this.credentials = credentials;
}
/**
*
* Specifies the user name and password for accessing your on-premises storage system's management interface.
*
*
* @return Specifies the user name and password for accessing your on-premises storage system's management
* interface.
*/
public Credentials getCredentials() {
return this.credentials;
}
/**
*
* Specifies the user name and password for accessing your on-premises storage system's management interface.
*
*
* @param credentials
* Specifies the user name and password for accessing your on-premises storage system's management interface.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddStorageSystemRequest withCredentials(Credentials credentials) {
setCredentials(credentials);
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 (getServerConfiguration() != null)
sb.append("ServerConfiguration: ").append(getServerConfiguration()).append(",");
if (getSystemType() != null)
sb.append("SystemType: ").append(getSystemType()).append(",");
if (getAgentArns() != null)
sb.append("AgentArns: ").append(getAgentArns()).append(",");
if (getCloudWatchLogGroupArn() != null)
sb.append("CloudWatchLogGroupArn: ").append(getCloudWatchLogGroupArn()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).append(",");
if (getCredentials() != null)
sb.append("Credentials: ").append(getCredentials());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AddStorageSystemRequest == false)
return false;
AddStorageSystemRequest other = (AddStorageSystemRequest) obj;
if (other.getServerConfiguration() == null ^ this.getServerConfiguration() == null)
return false;
if (other.getServerConfiguration() != null && other.getServerConfiguration().equals(this.getServerConfiguration()) == false)
return false;
if (other.getSystemType() == null ^ this.getSystemType() == null)
return false;
if (other.getSystemType() != null && other.getSystemType().equals(this.getSystemType()) == false)
return false;
if (other.getAgentArns() == null ^ this.getAgentArns() == null)
return false;
if (other.getAgentArns() != null && other.getAgentArns().equals(this.getAgentArns()) == false)
return false;
if (other.getCloudWatchLogGroupArn() == null ^ this.getCloudWatchLogGroupArn() == null)
return false;
if (other.getCloudWatchLogGroupArn() != null && other.getCloudWatchLogGroupArn().equals(this.getCloudWatchLogGroupArn()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
if (other.getCredentials() == null ^ this.getCredentials() == null)
return false;
if (other.getCredentials() != null && other.getCredentials().equals(this.getCredentials()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getServerConfiguration() == null) ? 0 : getServerConfiguration().hashCode());
hashCode = prime * hashCode + ((getSystemType() == null) ? 0 : getSystemType().hashCode());
hashCode = prime * hashCode + ((getAgentArns() == null) ? 0 : getAgentArns().hashCode());
hashCode = prime * hashCode + ((getCloudWatchLogGroupArn() == null) ? 0 : getCloudWatchLogGroupArn().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getCredentials() == null) ? 0 : getCredentials().hashCode());
return hashCode;
}
@Override
public AddStorageSystemRequest clone() {
return (AddStorageSystemRequest) super.clone();
}
}