com.amazonaws.services.pinpointsmsvoicev2.model.UpdateProtectConfigurationCountryRuleSetResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-pinpointsmsvoicev2 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.pinpointsmsvoicev2.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateProtectConfigurationCountryRuleSetResult extends com.amazonaws.AmazonWebServiceResult implements
Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the protect configuration.
*
*/
private String protectConfigurationArn;
/**
*
* The unique identifier for the protect configuration.
*
*/
private String protectConfigurationId;
/**
*
* The number capability that was updated
*
*/
private String numberCapability;
/**
*
* An array of ProtectConfigurationCountryRuleSetInformation containing the rules for the NumberCapability.
*
*/
private java.util.Map countryRuleSet;
/**
*
* The Amazon Resource Name (ARN) of the protect configuration.
*
*
* @param protectConfigurationArn
* The Amazon Resource Name (ARN) of the protect configuration.
*/
public void setProtectConfigurationArn(String protectConfigurationArn) {
this.protectConfigurationArn = protectConfigurationArn;
}
/**
*
* The Amazon Resource Name (ARN) of the protect configuration.
*
*
* @return The Amazon Resource Name (ARN) of the protect configuration.
*/
public String getProtectConfigurationArn() {
return this.protectConfigurationArn;
}
/**
*
* The Amazon Resource Name (ARN) of the protect configuration.
*
*
* @param protectConfigurationArn
* The Amazon Resource Name (ARN) of the protect configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProtectConfigurationCountryRuleSetResult withProtectConfigurationArn(String protectConfigurationArn) {
setProtectConfigurationArn(protectConfigurationArn);
return this;
}
/**
*
* The unique identifier for the protect configuration.
*
*
* @param protectConfigurationId
* The unique identifier for the protect configuration.
*/
public void setProtectConfigurationId(String protectConfigurationId) {
this.protectConfigurationId = protectConfigurationId;
}
/**
*
* The unique identifier for the protect configuration.
*
*
* @return The unique identifier for the protect configuration.
*/
public String getProtectConfigurationId() {
return this.protectConfigurationId;
}
/**
*
* The unique identifier for the protect configuration.
*
*
* @param protectConfigurationId
* The unique identifier for the protect configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProtectConfigurationCountryRuleSetResult withProtectConfigurationId(String protectConfigurationId) {
setProtectConfigurationId(protectConfigurationId);
return this;
}
/**
*
* The number capability that was updated
*
*
* @param numberCapability
* The number capability that was updated
* @see NumberCapability
*/
public void setNumberCapability(String numberCapability) {
this.numberCapability = numberCapability;
}
/**
*
* The number capability that was updated
*
*
* @return The number capability that was updated
* @see NumberCapability
*/
public String getNumberCapability() {
return this.numberCapability;
}
/**
*
* The number capability that was updated
*
*
* @param numberCapability
* The number capability that was updated
* @return Returns a reference to this object so that method calls can be chained together.
* @see NumberCapability
*/
public UpdateProtectConfigurationCountryRuleSetResult withNumberCapability(String numberCapability) {
setNumberCapability(numberCapability);
return this;
}
/**
*
* The number capability that was updated
*
*
* @param numberCapability
* The number capability that was updated
* @return Returns a reference to this object so that method calls can be chained together.
* @see NumberCapability
*/
public UpdateProtectConfigurationCountryRuleSetResult withNumberCapability(NumberCapability numberCapability) {
this.numberCapability = numberCapability.toString();
return this;
}
/**
*
* An array of ProtectConfigurationCountryRuleSetInformation containing the rules for the NumberCapability.
*
*
* @return An array of ProtectConfigurationCountryRuleSetInformation containing the rules for the NumberCapability.
*/
public java.util.Map getCountryRuleSet() {
return countryRuleSet;
}
/**
*
* An array of ProtectConfigurationCountryRuleSetInformation containing the rules for the NumberCapability.
*
*
* @param countryRuleSet
* An array of ProtectConfigurationCountryRuleSetInformation containing the rules for the NumberCapability.
*/
public void setCountryRuleSet(java.util.Map countryRuleSet) {
this.countryRuleSet = countryRuleSet;
}
/**
*
* An array of ProtectConfigurationCountryRuleSetInformation containing the rules for the NumberCapability.
*
*
* @param countryRuleSet
* An array of ProtectConfigurationCountryRuleSetInformation containing the rules for the NumberCapability.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProtectConfigurationCountryRuleSetResult withCountryRuleSet(java.util.Map countryRuleSet) {
setCountryRuleSet(countryRuleSet);
return this;
}
/**
* Add a single CountryRuleSet entry
*
* @see UpdateProtectConfigurationCountryRuleSetResult#withCountryRuleSet
* @returns a reference to this object so that method calls can be chained together.
*/
public UpdateProtectConfigurationCountryRuleSetResult addCountryRuleSetEntry(String key, ProtectConfigurationCountryRuleSetInformation value) {
if (null == this.countryRuleSet) {
this.countryRuleSet = new java.util.HashMap();
}
if (this.countryRuleSet.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.countryRuleSet.put(key, value);
return this;
}
/**
* Removes all the entries added into CountryRuleSet.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProtectConfigurationCountryRuleSetResult clearCountryRuleSetEntries() {
this.countryRuleSet = null;
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 (getProtectConfigurationArn() != null)
sb.append("ProtectConfigurationArn: ").append(getProtectConfigurationArn()).append(",");
if (getProtectConfigurationId() != null)
sb.append("ProtectConfigurationId: ").append(getProtectConfigurationId()).append(",");
if (getNumberCapability() != null)
sb.append("NumberCapability: ").append(getNumberCapability()).append(",");
if (getCountryRuleSet() != null)
sb.append("CountryRuleSet: ").append(getCountryRuleSet());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateProtectConfigurationCountryRuleSetResult == false)
return false;
UpdateProtectConfigurationCountryRuleSetResult other = (UpdateProtectConfigurationCountryRuleSetResult) obj;
if (other.getProtectConfigurationArn() == null ^ this.getProtectConfigurationArn() == null)
return false;
if (other.getProtectConfigurationArn() != null && other.getProtectConfigurationArn().equals(this.getProtectConfigurationArn()) == false)
return false;
if (other.getProtectConfigurationId() == null ^ this.getProtectConfigurationId() == null)
return false;
if (other.getProtectConfigurationId() != null && other.getProtectConfigurationId().equals(this.getProtectConfigurationId()) == false)
return false;
if (other.getNumberCapability() == null ^ this.getNumberCapability() == null)
return false;
if (other.getNumberCapability() != null && other.getNumberCapability().equals(this.getNumberCapability()) == false)
return false;
if (other.getCountryRuleSet() == null ^ this.getCountryRuleSet() == null)
return false;
if (other.getCountryRuleSet() != null && other.getCountryRuleSet().equals(this.getCountryRuleSet()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getProtectConfigurationArn() == null) ? 0 : getProtectConfigurationArn().hashCode());
hashCode = prime * hashCode + ((getProtectConfigurationId() == null) ? 0 : getProtectConfigurationId().hashCode());
hashCode = prime * hashCode + ((getNumberCapability() == null) ? 0 : getNumberCapability().hashCode());
hashCode = prime * hashCode + ((getCountryRuleSet() == null) ? 0 : getCountryRuleSet().hashCode());
return hashCode;
}
@Override
public UpdateProtectConfigurationCountryRuleSetResult clone() {
try {
return (UpdateProtectConfigurationCountryRuleSetResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}