com.paypal.sdk.models.PhoneNumber Maven / Gradle / Ivy
/*
* PaypalServerSDKLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.paypal.sdk.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonSetter;
/**
* This is a model class for PhoneNumber type.
*/
public class PhoneNumber {
private String nationalNumber;
/**
* Default constructor.
*/
public PhoneNumber() {
}
/**
* Initialization constructor.
* @param nationalNumber String value for nationalNumber.
*/
public PhoneNumber(
String nationalNumber) {
this.nationalNumber = nationalNumber;
}
/**
* Getter for NationalNumber.
* The national number, in its canonical international [E.164 numbering plan
* format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling
* code (CC) and the national number must not be greater than 15 digits. The national number
* consists of a national destination code (NDC) and subscriber number (SN).
* @return Returns the String
*/
@JsonGetter("national_number")
public String getNationalNumber() {
return nationalNumber;
}
/**
* Setter for NationalNumber.
* The national number, in its canonical international [E.164 numbering plan
* format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling
* code (CC) and the national number must not be greater than 15 digits. The national number
* consists of a national destination code (NDC) and subscriber number (SN).
* @param nationalNumber Value for String
*/
@JsonSetter("national_number")
public void setNationalNumber(String nationalNumber) {
this.nationalNumber = nationalNumber;
}
/**
* Converts this PhoneNumber into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "PhoneNumber [" + "nationalNumber=" + nationalNumber + "]";
}
/**
* Builds a new {@link PhoneNumber.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link PhoneNumber.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder(nationalNumber);
return builder;
}
/**
* Class to build instances of {@link PhoneNumber}.
*/
public static class Builder {
private String nationalNumber;
/**
* Initialization constructor.
*/
public Builder() {
}
/**
* Initialization constructor.
* @param nationalNumber String value for nationalNumber.
*/
public Builder(String nationalNumber) {
this.nationalNumber = nationalNumber;
}
/**
* Setter for nationalNumber.
* @param nationalNumber String value for nationalNumber.
* @return Builder
*/
public Builder nationalNumber(String nationalNumber) {
this.nationalNumber = nationalNumber;
return this;
}
/**
* Builds a new {@link PhoneNumber} object using the set fields.
* @return {@link PhoneNumber}
*/
public PhoneNumber build() {
return new PhoneNumber(nationalNumber);
}
}
}