com.amazonaws.services.chimesdkvoice.model.SipRuleTargetApplication Maven / Gradle / Ivy
Show all versions of aws-java-sdk-chimesdkvoice Show documentation
/*
* Copyright 2018-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.chimesdkvoice.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A target SIP media application and other details, such as priority and AWS Region, to be specified in the SIP rule.
* Only one SIP rule per AWS Region can be provided.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SipRuleTargetApplication implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of a rule's target SIP media application.
*
*/
private String sipMediaApplicationId;
/**
*
* The priority setting of a rule's target SIP media application.
*
*/
private Integer priority;
/**
*
* The AWS Region of a rule's target SIP media application.
*
*/
private String awsRegion;
/**
*
* The ID of a rule's target SIP media application.
*
*
* @param sipMediaApplicationId
* The ID of a rule's target SIP media application.
*/
public void setSipMediaApplicationId(String sipMediaApplicationId) {
this.sipMediaApplicationId = sipMediaApplicationId;
}
/**
*
* The ID of a rule's target SIP media application.
*
*
* @return The ID of a rule's target SIP media application.
*/
public String getSipMediaApplicationId() {
return this.sipMediaApplicationId;
}
/**
*
* The ID of a rule's target SIP media application.
*
*
* @param sipMediaApplicationId
* The ID of a rule's target SIP media application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SipRuleTargetApplication withSipMediaApplicationId(String sipMediaApplicationId) {
setSipMediaApplicationId(sipMediaApplicationId);
return this;
}
/**
*
* The priority setting of a rule's target SIP media application.
*
*
* @param priority
* The priority setting of a rule's target SIP media application.
*/
public void setPriority(Integer priority) {
this.priority = priority;
}
/**
*
* The priority setting of a rule's target SIP media application.
*
*
* @return The priority setting of a rule's target SIP media application.
*/
public Integer getPriority() {
return this.priority;
}
/**
*
* The priority setting of a rule's target SIP media application.
*
*
* @param priority
* The priority setting of a rule's target SIP media application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SipRuleTargetApplication withPriority(Integer priority) {
setPriority(priority);
return this;
}
/**
*
* The AWS Region of a rule's target SIP media application.
*
*
* @param awsRegion
* The AWS Region of a rule's target SIP media application.
*/
public void setAwsRegion(String awsRegion) {
this.awsRegion = awsRegion;
}
/**
*
* The AWS Region of a rule's target SIP media application.
*
*
* @return The AWS Region of a rule's target SIP media application.
*/
public String getAwsRegion() {
return this.awsRegion;
}
/**
*
* The AWS Region of a rule's target SIP media application.
*
*
* @param awsRegion
* The AWS Region of a rule's target SIP media application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SipRuleTargetApplication withAwsRegion(String awsRegion) {
setAwsRegion(awsRegion);
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 (getSipMediaApplicationId() != null)
sb.append("SipMediaApplicationId: ").append(getSipMediaApplicationId()).append(",");
if (getPriority() != null)
sb.append("Priority: ").append(getPriority()).append(",");
if (getAwsRegion() != null)
sb.append("AwsRegion: ").append(getAwsRegion());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SipRuleTargetApplication == false)
return false;
SipRuleTargetApplication other = (SipRuleTargetApplication) obj;
if (other.getSipMediaApplicationId() == null ^ this.getSipMediaApplicationId() == null)
return false;
if (other.getSipMediaApplicationId() != null && other.getSipMediaApplicationId().equals(this.getSipMediaApplicationId()) == false)
return false;
if (other.getPriority() == null ^ this.getPriority() == null)
return false;
if (other.getPriority() != null && other.getPriority().equals(this.getPriority()) == false)
return false;
if (other.getAwsRegion() == null ^ this.getAwsRegion() == null)
return false;
if (other.getAwsRegion() != null && other.getAwsRegion().equals(this.getAwsRegion()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSipMediaApplicationId() == null) ? 0 : getSipMediaApplicationId().hashCode());
hashCode = prime * hashCode + ((getPriority() == null) ? 0 : getPriority().hashCode());
hashCode = prime * hashCode + ((getAwsRegion() == null) ? 0 : getAwsRegion().hashCode());
return hashCode;
}
@Override
public SipRuleTargetApplication clone() {
try {
return (SipRuleTargetApplication) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.chimesdkvoice.model.transform.SipRuleTargetApplicationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}