com.bandwidth.voice.models.Diversion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bandwidth-sdk Show documentation
Show all versions of bandwidth-sdk Show documentation
The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs
/*
* BandwidthLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.bandwidth.voice.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
/**
* This is a model class for Diversion type.
*/
public class Diversion {
@JsonInclude(JsonInclude.Include.NON_NULL)
private String reason;
@JsonInclude(JsonInclude.Include.NON_NULL)
private String privacy;
@JsonInclude(JsonInclude.Include.NON_NULL)
private String unknown;
@JsonInclude(JsonInclude.Include.NON_NULL)
private String origTo;
/**
* Default constructor.
*/
public Diversion() {
}
/**
* Initialization constructor.
* @param reason String value for reason.
* @param privacy String value for privacy.
* @param unknown String value for unknown.
* @param origTo String value for origTo.
*/
public Diversion(
String reason,
String privacy,
String unknown,
String origTo) {
this.reason = reason;
this.privacy = privacy;
this.unknown = unknown;
this.origTo = origTo;
}
/**
* Getter for Reason.
* @return Returns the String
*/
@JsonGetter("reason")
public String getReason() {
return reason;
}
/**
* Setter for Reason.
* @param reason Value for String
*/
@JsonSetter("reason")
public void setReason(String reason) {
this.reason = reason;
}
/**
* Getter for Privacy.
* @return Returns the String
*/
@JsonGetter("privacy")
public String getPrivacy() {
return privacy;
}
/**
* Setter for Privacy.
* @param privacy Value for String
*/
@JsonSetter("privacy")
public void setPrivacy(String privacy) {
this.privacy = privacy;
}
/**
* Getter for Unknown.
* @return Returns the String
*/
@JsonGetter("unknown")
public String getUnknown() {
return unknown;
}
/**
* Setter for Unknown.
* @param unknown Value for String
*/
@JsonSetter("unknown")
public void setUnknown(String unknown) {
this.unknown = unknown;
}
/**
* Getter for OrigTo.
* @return Returns the String
*/
@JsonGetter("origTo")
public String getOrigTo() {
return origTo;
}
/**
* Setter for OrigTo.
* @param origTo Value for String
*/
@JsonSetter("origTo")
public void setOrigTo(String origTo) {
this.origTo = origTo;
}
/**
* Converts this Diversion into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "Diversion [" + "reason=" + reason + ", privacy=" + privacy + ", unknown=" + unknown
+ ", origTo=" + origTo + "]";
}
/**
* Builds a new {@link Diversion.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link Diversion.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder()
.reason(getReason())
.privacy(getPrivacy())
.unknown(getUnknown())
.origTo(getOrigTo());
return builder;
}
/**
* Class to build instances of {@link Diversion}.
*/
public static class Builder {
private String reason;
private String privacy;
private String unknown;
private String origTo;
/**
* Setter for reason.
* @param reason String value for reason.
* @return Builder
*/
public Builder reason(String reason) {
this.reason = reason;
return this;
}
/**
* Setter for privacy.
* @param privacy String value for privacy.
* @return Builder
*/
public Builder privacy(String privacy) {
this.privacy = privacy;
return this;
}
/**
* Setter for unknown.
* @param unknown String value for unknown.
* @return Builder
*/
public Builder unknown(String unknown) {
this.unknown = unknown;
return this;
}
/**
* Setter for origTo.
* @param origTo String value for origTo.
* @return Builder
*/
public Builder origTo(String origTo) {
this.origTo = origTo;
return this;
}
/**
* Builds a new {@link Diversion} object using the set fields.
* @return {@link Diversion}
*/
public Diversion build() {
return new Diversion(reason, privacy, unknown, origTo);
}
}
}