com.amazonaws.services.chimesdkvoice.model.CreateSipMediaApplicationCallRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-chimesdkvoice 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.chimesdkvoice.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 CreateSipMediaApplicationCallRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The phone number that a user calls from. This is a phone number in your Amazon Chime SDK phone number inventory.
*
*/
private String fromPhoneNumber;
/**
*
* The phone number that the service should call.
*
*/
private String toPhoneNumber;
/**
*
* The ID of the SIP media application.
*
*/
private String sipMediaApplicationId;
/**
*
* The SIP headers added to an outbound call leg.
*
*/
private java.util.Map sipHeaders;
/**
*
* Context passed to a CreateSipMediaApplication API call. For example, you could pass key-value pairs such as:
* "FirstName": "John", "LastName": "Doe"
*
*/
private java.util.Map argumentsMap;
/**
*
* The phone number that a user calls from. This is a phone number in your Amazon Chime SDK phone number inventory.
*
*
* @param fromPhoneNumber
* The phone number that a user calls from. This is a phone number in your Amazon Chime SDK phone number
* inventory.
*/
public void setFromPhoneNumber(String fromPhoneNumber) {
this.fromPhoneNumber = fromPhoneNumber;
}
/**
*
* The phone number that a user calls from. This is a phone number in your Amazon Chime SDK phone number inventory.
*
*
* @return The phone number that a user calls from. This is a phone number in your Amazon Chime SDK phone number
* inventory.
*/
public String getFromPhoneNumber() {
return this.fromPhoneNumber;
}
/**
*
* The phone number that a user calls from. This is a phone number in your Amazon Chime SDK phone number inventory.
*
*
* @param fromPhoneNumber
* The phone number that a user calls from. This is a phone number in your Amazon Chime SDK phone number
* inventory.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSipMediaApplicationCallRequest withFromPhoneNumber(String fromPhoneNumber) {
setFromPhoneNumber(fromPhoneNumber);
return this;
}
/**
*
* The phone number that the service should call.
*
*
* @param toPhoneNumber
* The phone number that the service should call.
*/
public void setToPhoneNumber(String toPhoneNumber) {
this.toPhoneNumber = toPhoneNumber;
}
/**
*
* The phone number that the service should call.
*
*
* @return The phone number that the service should call.
*/
public String getToPhoneNumber() {
return this.toPhoneNumber;
}
/**
*
* The phone number that the service should call.
*
*
* @param toPhoneNumber
* The phone number that the service should call.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSipMediaApplicationCallRequest withToPhoneNumber(String toPhoneNumber) {
setToPhoneNumber(toPhoneNumber);
return this;
}
/**
*
* The ID of the SIP media application.
*
*
* @param sipMediaApplicationId
* The ID of the SIP media application.
*/
public void setSipMediaApplicationId(String sipMediaApplicationId) {
this.sipMediaApplicationId = sipMediaApplicationId;
}
/**
*
* The ID of the SIP media application.
*
*
* @return The ID of the SIP media application.
*/
public String getSipMediaApplicationId() {
return this.sipMediaApplicationId;
}
/**
*
* The ID of the SIP media application.
*
*
* @param sipMediaApplicationId
* The ID of the SIP media application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSipMediaApplicationCallRequest withSipMediaApplicationId(String sipMediaApplicationId) {
setSipMediaApplicationId(sipMediaApplicationId);
return this;
}
/**
*
* The SIP headers added to an outbound call leg.
*
*
* @return The SIP headers added to an outbound call leg.
*/
public java.util.Map getSipHeaders() {
return sipHeaders;
}
/**
*
* The SIP headers added to an outbound call leg.
*
*
* @param sipHeaders
* The SIP headers added to an outbound call leg.
*/
public void setSipHeaders(java.util.Map sipHeaders) {
this.sipHeaders = sipHeaders;
}
/**
*
* The SIP headers added to an outbound call leg.
*
*
* @param sipHeaders
* The SIP headers added to an outbound call leg.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSipMediaApplicationCallRequest withSipHeaders(java.util.Map sipHeaders) {
setSipHeaders(sipHeaders);
return this;
}
/**
* Add a single SipHeaders entry
*
* @see CreateSipMediaApplicationCallRequest#withSipHeaders
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateSipMediaApplicationCallRequest addSipHeadersEntry(String key, String value) {
if (null == this.sipHeaders) {
this.sipHeaders = new java.util.HashMap();
}
if (this.sipHeaders.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.sipHeaders.put(key, value);
return this;
}
/**
* Removes all the entries added into SipHeaders.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSipMediaApplicationCallRequest clearSipHeadersEntries() {
this.sipHeaders = null;
return this;
}
/**
*
* Context passed to a CreateSipMediaApplication API call. For example, you could pass key-value pairs such as:
* "FirstName": "John", "LastName": "Doe"
*
*
* @return Context passed to a CreateSipMediaApplication API call. For example, you could pass key-value pairs such
* as: "FirstName": "John", "LastName": "Doe"
*/
public java.util.Map getArgumentsMap() {
return argumentsMap;
}
/**
*
* Context passed to a CreateSipMediaApplication API call. For example, you could pass key-value pairs such as:
* "FirstName": "John", "LastName": "Doe"
*
*
* @param argumentsMap
* Context passed to a CreateSipMediaApplication API call. For example, you could pass key-value pairs such
* as: "FirstName": "John", "LastName": "Doe"
*/
public void setArgumentsMap(java.util.Map argumentsMap) {
this.argumentsMap = argumentsMap;
}
/**
*
* Context passed to a CreateSipMediaApplication API call. For example, you could pass key-value pairs such as:
* "FirstName": "John", "LastName": "Doe"
*
*
* @param argumentsMap
* Context passed to a CreateSipMediaApplication API call. For example, you could pass key-value pairs such
* as: "FirstName": "John", "LastName": "Doe"
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSipMediaApplicationCallRequest withArgumentsMap(java.util.Map argumentsMap) {
setArgumentsMap(argumentsMap);
return this;
}
/**
* Add a single ArgumentsMap entry
*
* @see CreateSipMediaApplicationCallRequest#withArgumentsMap
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateSipMediaApplicationCallRequest addArgumentsMapEntry(String key, String value) {
if (null == this.argumentsMap) {
this.argumentsMap = new java.util.HashMap();
}
if (this.argumentsMap.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.argumentsMap.put(key, value);
return this;
}
/**
* Removes all the entries added into ArgumentsMap.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSipMediaApplicationCallRequest clearArgumentsMapEntries() {
this.argumentsMap = 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 (getFromPhoneNumber() != null)
sb.append("FromPhoneNumber: ").append("***Sensitive Data Redacted***").append(",");
if (getToPhoneNumber() != null)
sb.append("ToPhoneNumber: ").append("***Sensitive Data Redacted***").append(",");
if (getSipMediaApplicationId() != null)
sb.append("SipMediaApplicationId: ").append(getSipMediaApplicationId()).append(",");
if (getSipHeaders() != null)
sb.append("SipHeaders: ").append("***Sensitive Data Redacted***").append(",");
if (getArgumentsMap() != null)
sb.append("ArgumentsMap: ").append("***Sensitive Data Redacted***");
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateSipMediaApplicationCallRequest == false)
return false;
CreateSipMediaApplicationCallRequest other = (CreateSipMediaApplicationCallRequest) obj;
if (other.getFromPhoneNumber() == null ^ this.getFromPhoneNumber() == null)
return false;
if (other.getFromPhoneNumber() != null && other.getFromPhoneNumber().equals(this.getFromPhoneNumber()) == false)
return false;
if (other.getToPhoneNumber() == null ^ this.getToPhoneNumber() == null)
return false;
if (other.getToPhoneNumber() != null && other.getToPhoneNumber().equals(this.getToPhoneNumber()) == false)
return false;
if (other.getSipMediaApplicationId() == null ^ this.getSipMediaApplicationId() == null)
return false;
if (other.getSipMediaApplicationId() != null && other.getSipMediaApplicationId().equals(this.getSipMediaApplicationId()) == false)
return false;
if (other.getSipHeaders() == null ^ this.getSipHeaders() == null)
return false;
if (other.getSipHeaders() != null && other.getSipHeaders().equals(this.getSipHeaders()) == false)
return false;
if (other.getArgumentsMap() == null ^ this.getArgumentsMap() == null)
return false;
if (other.getArgumentsMap() != null && other.getArgumentsMap().equals(this.getArgumentsMap()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFromPhoneNumber() == null) ? 0 : getFromPhoneNumber().hashCode());
hashCode = prime * hashCode + ((getToPhoneNumber() == null) ? 0 : getToPhoneNumber().hashCode());
hashCode = prime * hashCode + ((getSipMediaApplicationId() == null) ? 0 : getSipMediaApplicationId().hashCode());
hashCode = prime * hashCode + ((getSipHeaders() == null) ? 0 : getSipHeaders().hashCode());
hashCode = prime * hashCode + ((getArgumentsMap() == null) ? 0 : getArgumentsMap().hashCode());
return hashCode;
}
@Override
public CreateSipMediaApplicationCallRequest clone() {
return (CreateSipMediaApplicationCallRequest) super.clone();
}
}