
com.amazonaws.services.iot.model.CreateDomainConfigurationRequest Maven / Gradle / Ivy
/*
* 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.iot.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateDomainConfigurationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the domain configuration. This value must be unique to a region.
*
*/
private String domainConfigurationName;
/**
*
* The name of the domain.
*
*/
private String domainName;
/**
*
* The ARNs of the certificates that AWS IoT passes to the device during the TLS handshake. Currently you can
* specify only one certificate ARN. This value is not required for AWS-managed domains.
*
*/
private java.util.List serverCertificateArns;
/**
*
* The certificate used to validate the server certificate and prove domain name ownership. This certificate must be
* signed by a public certificate authority. This value is not required for AWS-managed domains.
*
*/
private String validationCertificateArn;
/**
*
* An object that specifies the authorization service for a domain.
*
*/
private AuthorizerConfig authorizerConfig;
/**
*
* The type of service delivered by the endpoint.
*
*
*
* AWS IoT Core currently supports only the DATA
service type.
*
*
*/
private String serviceType;
/**
*
* Metadata which can be used to manage the domain configuration.
*
*
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*
*
*/
private java.util.List tags;
/**
*
* The name of the domain configuration. This value must be unique to a region.
*
*
* @param domainConfigurationName
* The name of the domain configuration. This value must be unique to a region.
*/
public void setDomainConfigurationName(String domainConfigurationName) {
this.domainConfigurationName = domainConfigurationName;
}
/**
*
* The name of the domain configuration. This value must be unique to a region.
*
*
* @return The name of the domain configuration. This value must be unique to a region.
*/
public String getDomainConfigurationName() {
return this.domainConfigurationName;
}
/**
*
* The name of the domain configuration. This value must be unique to a region.
*
*
* @param domainConfigurationName
* The name of the domain configuration. This value must be unique to a region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDomainConfigurationRequest withDomainConfigurationName(String domainConfigurationName) {
setDomainConfigurationName(domainConfigurationName);
return this;
}
/**
*
* The name of the domain.
*
*
* @param domainName
* The name of the domain.
*/
public void setDomainName(String domainName) {
this.domainName = domainName;
}
/**
*
* The name of the domain.
*
*
* @return The name of the domain.
*/
public String getDomainName() {
return this.domainName;
}
/**
*
* The name of the domain.
*
*
* @param domainName
* The name of the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDomainConfigurationRequest withDomainName(String domainName) {
setDomainName(domainName);
return this;
}
/**
*
* The ARNs of the certificates that AWS IoT passes to the device during the TLS handshake. Currently you can
* specify only one certificate ARN. This value is not required for AWS-managed domains.
*
*
* @return The ARNs of the certificates that AWS IoT passes to the device during the TLS handshake. Currently you
* can specify only one certificate ARN. This value is not required for AWS-managed domains.
*/
public java.util.List getServerCertificateArns() {
return serverCertificateArns;
}
/**
*
* The ARNs of the certificates that AWS IoT passes to the device during the TLS handshake. Currently you can
* specify only one certificate ARN. This value is not required for AWS-managed domains.
*
*
* @param serverCertificateArns
* The ARNs of the certificates that AWS IoT passes to the device during the TLS handshake. Currently you can
* specify only one certificate ARN. This value is not required for AWS-managed domains.
*/
public void setServerCertificateArns(java.util.Collection serverCertificateArns) {
if (serverCertificateArns == null) {
this.serverCertificateArns = null;
return;
}
this.serverCertificateArns = new java.util.ArrayList(serverCertificateArns);
}
/**
*
* The ARNs of the certificates that AWS IoT passes to the device during the TLS handshake. Currently you can
* specify only one certificate ARN. This value is not required for AWS-managed domains.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setServerCertificateArns(java.util.Collection)} or
* {@link #withServerCertificateArns(java.util.Collection)} if you want to override the existing values.
*
*
* @param serverCertificateArns
* The ARNs of the certificates that AWS IoT passes to the device during the TLS handshake. Currently you can
* specify only one certificate ARN. This value is not required for AWS-managed domains.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDomainConfigurationRequest withServerCertificateArns(String... serverCertificateArns) {
if (this.serverCertificateArns == null) {
setServerCertificateArns(new java.util.ArrayList(serverCertificateArns.length));
}
for (String ele : serverCertificateArns) {
this.serverCertificateArns.add(ele);
}
return this;
}
/**
*
* The ARNs of the certificates that AWS IoT passes to the device during the TLS handshake. Currently you can
* specify only one certificate ARN. This value is not required for AWS-managed domains.
*
*
* @param serverCertificateArns
* The ARNs of the certificates that AWS IoT passes to the device during the TLS handshake. Currently you can
* specify only one certificate ARN. This value is not required for AWS-managed domains.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDomainConfigurationRequest withServerCertificateArns(java.util.Collection serverCertificateArns) {
setServerCertificateArns(serverCertificateArns);
return this;
}
/**
*
* The certificate used to validate the server certificate and prove domain name ownership. This certificate must be
* signed by a public certificate authority. This value is not required for AWS-managed domains.
*
*
* @param validationCertificateArn
* The certificate used to validate the server certificate and prove domain name ownership. This certificate
* must be signed by a public certificate authority. This value is not required for AWS-managed domains.
*/
public void setValidationCertificateArn(String validationCertificateArn) {
this.validationCertificateArn = validationCertificateArn;
}
/**
*
* The certificate used to validate the server certificate and prove domain name ownership. This certificate must be
* signed by a public certificate authority. This value is not required for AWS-managed domains.
*
*
* @return The certificate used to validate the server certificate and prove domain name ownership. This certificate
* must be signed by a public certificate authority. This value is not required for AWS-managed domains.
*/
public String getValidationCertificateArn() {
return this.validationCertificateArn;
}
/**
*
* The certificate used to validate the server certificate and prove domain name ownership. This certificate must be
* signed by a public certificate authority. This value is not required for AWS-managed domains.
*
*
* @param validationCertificateArn
* The certificate used to validate the server certificate and prove domain name ownership. This certificate
* must be signed by a public certificate authority. This value is not required for AWS-managed domains.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDomainConfigurationRequest withValidationCertificateArn(String validationCertificateArn) {
setValidationCertificateArn(validationCertificateArn);
return this;
}
/**
*
* An object that specifies the authorization service for a domain.
*
*
* @param authorizerConfig
* An object that specifies the authorization service for a domain.
*/
public void setAuthorizerConfig(AuthorizerConfig authorizerConfig) {
this.authorizerConfig = authorizerConfig;
}
/**
*
* An object that specifies the authorization service for a domain.
*
*
* @return An object that specifies the authorization service for a domain.
*/
public AuthorizerConfig getAuthorizerConfig() {
return this.authorizerConfig;
}
/**
*
* An object that specifies the authorization service for a domain.
*
*
* @param authorizerConfig
* An object that specifies the authorization service for a domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDomainConfigurationRequest withAuthorizerConfig(AuthorizerConfig authorizerConfig) {
setAuthorizerConfig(authorizerConfig);
return this;
}
/**
*
* The type of service delivered by the endpoint.
*
*
*
* AWS IoT Core currently supports only the DATA
service type.
*
*
*
* @param serviceType
* The type of service delivered by the endpoint.
*
* AWS IoT Core currently supports only the DATA
service type.
*
* @see ServiceType
*/
public void setServiceType(String serviceType) {
this.serviceType = serviceType;
}
/**
*
* The type of service delivered by the endpoint.
*
*
*
* AWS IoT Core currently supports only the DATA
service type.
*
*
*
* @return The type of service delivered by the endpoint.
*
* AWS IoT Core currently supports only the DATA
service type.
*
* @see ServiceType
*/
public String getServiceType() {
return this.serviceType;
}
/**
*
* The type of service delivered by the endpoint.
*
*
*
* AWS IoT Core currently supports only the DATA
service type.
*
*
*
* @param serviceType
* The type of service delivered by the endpoint.
*
* AWS IoT Core currently supports only the DATA
service type.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ServiceType
*/
public CreateDomainConfigurationRequest withServiceType(String serviceType) {
setServiceType(serviceType);
return this;
}
/**
*
* The type of service delivered by the endpoint.
*
*
*
* AWS IoT Core currently supports only the DATA
service type.
*
*
*
* @param serviceType
* The type of service delivered by the endpoint.
*
* AWS IoT Core currently supports only the DATA
service type.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ServiceType
*/
public CreateDomainConfigurationRequest withServiceType(ServiceType serviceType) {
this.serviceType = serviceType.toString();
return this;
}
/**
*
* Metadata which can be used to manage the domain configuration.
*
*
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*
*
*
* @return Metadata which can be used to manage the domain configuration.
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*
*/
public java.util.List getTags() {
return tags;
}
/**
*
* Metadata which can be used to manage the domain configuration.
*
*
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*
*
*
* @param tags
* Metadata which can be used to manage the domain configuration.
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* Metadata which can be used to manage the domain configuration.
*
*
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*
*
*
* 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
* Metadata which can be used to manage the domain configuration.
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDomainConfigurationRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* Metadata which can be used to manage the domain configuration.
*
*
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*
*
*
* @param tags
* Metadata which can be used to manage the domain configuration.
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDomainConfigurationRequest withTags(java.util.Collection tags) {
setTags(tags);
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 (getDomainConfigurationName() != null)
sb.append("DomainConfigurationName: ").append(getDomainConfigurationName()).append(",");
if (getDomainName() != null)
sb.append("DomainName: ").append(getDomainName()).append(",");
if (getServerCertificateArns() != null)
sb.append("ServerCertificateArns: ").append(getServerCertificateArns()).append(",");
if (getValidationCertificateArn() != null)
sb.append("ValidationCertificateArn: ").append(getValidationCertificateArn()).append(",");
if (getAuthorizerConfig() != null)
sb.append("AuthorizerConfig: ").append(getAuthorizerConfig()).append(",");
if (getServiceType() != null)
sb.append("ServiceType: ").append(getServiceType()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateDomainConfigurationRequest == false)
return false;
CreateDomainConfigurationRequest other = (CreateDomainConfigurationRequest) obj;
if (other.getDomainConfigurationName() == null ^ this.getDomainConfigurationName() == null)
return false;
if (other.getDomainConfigurationName() != null && other.getDomainConfigurationName().equals(this.getDomainConfigurationName()) == false)
return false;
if (other.getDomainName() == null ^ this.getDomainName() == null)
return false;
if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false)
return false;
if (other.getServerCertificateArns() == null ^ this.getServerCertificateArns() == null)
return false;
if (other.getServerCertificateArns() != null && other.getServerCertificateArns().equals(this.getServerCertificateArns()) == false)
return false;
if (other.getValidationCertificateArn() == null ^ this.getValidationCertificateArn() == null)
return false;
if (other.getValidationCertificateArn() != null && other.getValidationCertificateArn().equals(this.getValidationCertificateArn()) == false)
return false;
if (other.getAuthorizerConfig() == null ^ this.getAuthorizerConfig() == null)
return false;
if (other.getAuthorizerConfig() != null && other.getAuthorizerConfig().equals(this.getAuthorizerConfig()) == false)
return false;
if (other.getServiceType() == null ^ this.getServiceType() == null)
return false;
if (other.getServiceType() != null && other.getServiceType().equals(this.getServiceType()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDomainConfigurationName() == null) ? 0 : getDomainConfigurationName().hashCode());
hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
hashCode = prime * hashCode + ((getServerCertificateArns() == null) ? 0 : getServerCertificateArns().hashCode());
hashCode = prime * hashCode + ((getValidationCertificateArn() == null) ? 0 : getValidationCertificateArn().hashCode());
hashCode = prime * hashCode + ((getAuthorizerConfig() == null) ? 0 : getAuthorizerConfig().hashCode());
hashCode = prime * hashCode + ((getServiceType() == null) ? 0 : getServiceType().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateDomainConfigurationRequest clone() {
return (CreateDomainConfigurationRequest) super.clone();
}
}