/* * Copyright 2010-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.iot.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* Updates values stored in the domain configuration. Domain configurations for * default endpoints can't be updated. *
** Requires permission to access the UpdateDomainConfiguration action. *
*/ public class UpdateDomainConfigurationRequest extends AmazonWebServiceRequest implements Serializable { /** ** The name of the domain configuration to be updated. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [\w.:-]+
*/
private String domainConfigurationName;
/**
*
* An object that specifies the authorization service for a domain. *
*/ private AuthorizerConfig authorizerConfig; /** ** The status to which the domain configuration should be updated. *
*
* Constraints:
* Allowed Values: ENABLED, DISABLED
*/
private String domainConfigurationStatus;
/**
*
* Removes the authorization configuration from a domain. *
*/ private Boolean removeAuthorizerConfig; /** ** An object that specifies the TLS configuration for a domain. *
*/ private TlsConfig tlsConfig; /** ** The name of the domain configuration to be updated. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [\w.:-]+
*
* @return
* The name of the domain configuration to be updated. *
*/ public String getDomainConfigurationName() { return domainConfigurationName; } /** ** The name of the domain configuration to be updated. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [\w.:-]+
*
* @param domainConfigurationName
* The name of the domain configuration to be updated. *
*/ public void setDomainConfigurationName(String domainConfigurationName) { this.domainConfigurationName = domainConfigurationName; } /** ** The name of the domain configuration to be updated. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 128
* Pattern: [\w.:-]+
*
* @param domainConfigurationName
* The name of the domain configuration to be updated. *
* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateDomainConfigurationRequest withDomainConfigurationName( String domainConfigurationName) { this.domainConfigurationName = domainConfigurationName; return this; } /** ** 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 authorizerConfig; } /** ** 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. *
** Returns a reference to this object so that method calls can be chained * together. * * @param authorizerConfig
* An object that specifies the authorization service for a * domain. *
* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateDomainConfigurationRequest withAuthorizerConfig(AuthorizerConfig authorizerConfig) { this.authorizerConfig = authorizerConfig; return this; } /** ** The status to which the domain configuration should be updated. *
*
* Constraints:
* Allowed Values: ENABLED, DISABLED
*
* @return
* The status to which the domain configuration should be updated. *
* @see DomainConfigurationStatus */ public String getDomainConfigurationStatus() { return domainConfigurationStatus; } /** ** The status to which the domain configuration should be updated. *
*
* Constraints:
* Allowed Values: ENABLED, DISABLED
*
* @param domainConfigurationStatus
* The status to which the domain configuration should be * updated. *
* @see DomainConfigurationStatus */ public void setDomainConfigurationStatus(String domainConfigurationStatus) { this.domainConfigurationStatus = domainConfigurationStatus; } /** ** The status to which the domain configuration should be updated. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: ENABLED, DISABLED
*
* @param domainConfigurationStatus
* The status to which the domain configuration should be * updated. *
* @return A reference to this updated object so that method calls can be * chained together. * @see DomainConfigurationStatus */ public UpdateDomainConfigurationRequest withDomainConfigurationStatus( String domainConfigurationStatus) { this.domainConfigurationStatus = domainConfigurationStatus; return this; } /** ** The status to which the domain configuration should be updated. *
*
* Constraints:
* Allowed Values: ENABLED, DISABLED
*
* @param domainConfigurationStatus
* The status to which the domain configuration should be * updated. *
* @see DomainConfigurationStatus */ public void setDomainConfigurationStatus(DomainConfigurationStatus domainConfigurationStatus) { this.domainConfigurationStatus = domainConfigurationStatus.toString(); } /** ** The status to which the domain configuration should be updated. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: ENABLED, DISABLED
*
* @param domainConfigurationStatus
* The status to which the domain configuration should be * updated. *
* @return A reference to this updated object so that method calls can be * chained together. * @see DomainConfigurationStatus */ public UpdateDomainConfigurationRequest withDomainConfigurationStatus( DomainConfigurationStatus domainConfigurationStatus) { this.domainConfigurationStatus = domainConfigurationStatus.toString(); return this; } /** ** Removes the authorization configuration from a domain. *
* * @return* Removes the authorization configuration from a domain. *
*/ public Boolean isRemoveAuthorizerConfig() { return removeAuthorizerConfig; } /** ** Removes the authorization configuration from a domain. *
* * @return* Removes the authorization configuration from a domain. *
*/ public Boolean getRemoveAuthorizerConfig() { return removeAuthorizerConfig; } /** ** Removes the authorization configuration from a domain. *
* * @param removeAuthorizerConfig* Removes the authorization configuration from a domain. *
*/ public void setRemoveAuthorizerConfig(Boolean removeAuthorizerConfig) { this.removeAuthorizerConfig = removeAuthorizerConfig; } /** ** Removes the authorization configuration from a domain. *
** Returns a reference to this object so that method calls can be chained * together. * * @param removeAuthorizerConfig
* Removes the authorization configuration from a domain. *
* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateDomainConfigurationRequest withRemoveAuthorizerConfig( Boolean removeAuthorizerConfig) { this.removeAuthorizerConfig = removeAuthorizerConfig; return this; } /** ** An object that specifies the TLS configuration for a domain. *
* * @return* An object that specifies the TLS configuration for a domain. *
*/ public TlsConfig getTlsConfig() { return tlsConfig; } /** ** An object that specifies the TLS configuration for a domain. *
* * @param tlsConfig* An object that specifies the TLS configuration for a domain. *
*/ public void setTlsConfig(TlsConfig tlsConfig) { this.tlsConfig = tlsConfig; } /** ** An object that specifies the TLS configuration for a domain. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tlsConfig
* An object that specifies the TLS configuration for a domain. *
* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateDomainConfigurationRequest withTlsConfig(TlsConfig tlsConfig) { this.tlsConfig = tlsConfig; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @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: " + getDomainConfigurationName() + ","); if (getAuthorizerConfig() != null) sb.append("authorizerConfig: " + getAuthorizerConfig() + ","); if (getDomainConfigurationStatus() != null) sb.append("domainConfigurationStatus: " + getDomainConfigurationStatus() + ","); if (getRemoveAuthorizerConfig() != null) sb.append("removeAuthorizerConfig: " + getRemoveAuthorizerConfig() + ","); if (getTlsConfig() != null) sb.append("tlsConfig: " + getTlsConfig()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDomainConfigurationName() == null) ? 0 : getDomainConfigurationName() .hashCode()); hashCode = prime * hashCode + ((getAuthorizerConfig() == null) ? 0 : getAuthorizerConfig().hashCode()); hashCode = prime * hashCode + ((getDomainConfigurationStatus() == null) ? 0 : getDomainConfigurationStatus() .hashCode()); hashCode = prime * hashCode + ((getRemoveAuthorizerConfig() == null) ? 0 : getRemoveAuthorizerConfig() .hashCode()); hashCode = prime * hashCode + ((getTlsConfig() == null) ? 0 : getTlsConfig().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateDomainConfigurationRequest == false) return false; UpdateDomainConfigurationRequest other = (UpdateDomainConfigurationRequest) obj; if (other.getDomainConfigurationName() == null ^ this.getDomainConfigurationName() == null) return false; if (other.getDomainConfigurationName() != null && other.getDomainConfigurationName().equals(this.getDomainConfigurationName()) == 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.getDomainConfigurationStatus() == null ^ this.getDomainConfigurationStatus() == null) return false; if (other.getDomainConfigurationStatus() != null && other.getDomainConfigurationStatus().equals(this.getDomainConfigurationStatus()) == false) return false; if (other.getRemoveAuthorizerConfig() == null ^ this.getRemoveAuthorizerConfig() == null) return false; if (other.getRemoveAuthorizerConfig() != null && other.getRemoveAuthorizerConfig().equals(this.getRemoveAuthorizerConfig()) == false) return false; if (other.getTlsConfig() == null ^ this.getTlsConfig() == null) return false; if (other.getTlsConfig() != null && other.getTlsConfig().equals(this.getTlsConfig()) == false) return false; return true; } }