/* * Copyright 2010-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.sns.model; import java.io.Serializable; /** *
* A list of phone numbers and their metadata. *
*/ public class PhoneNumberInformation implements Serializable { /** ** The date and time when the phone number was created. *
*/ private java.util.Date createdAt; /** ** The phone number. *
*/ private String phoneNumber; /** ** The status of the phone number. *
*/ private String status; /** ** The two-character code for the country or region, in ISO 3166-1 alpha-2 * format. *
*
* Constraints:
* Length: - 2
* Pattern: ^[A-Za-z]{2}$
*/
private String iso2CountryCode;
/**
*
* The list of supported routes. *
*
* Constraints:
* Allowed Values: Transactional, Promotional, Premium
*/
private String routeType;
/**
*
* The capabilities of each phone number. *
*/ private java.util.List* The date and time when the phone number was created. *
* * @return* The date and time when the phone number was created. *
*/ public java.util.Date getCreatedAt() { return createdAt; } /** ** The date and time when the phone number was created. *
* * @param createdAt* The date and time when the phone number was created. *
*/ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** ** The date and time when the phone number was created. *
** Returns a reference to this object so that method calls can be chained * together. * * @param createdAt
* The date and time when the phone number was created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public PhoneNumberInformation withCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; return this; } /** ** The phone number. *
* * @return* The phone number. *
*/ public String getPhoneNumber() { return phoneNumber; } /** ** The phone number. *
* * @param phoneNumber* The phone number. *
*/ public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } /** ** The phone number. *
** Returns a reference to this object so that method calls can be chained * together. * * @param phoneNumber
* The phone number. *
* @return A reference to this updated object so that method calls can be * chained together. */ public PhoneNumberInformation withPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; return this; } /** ** The status of the phone number. *
* * @return* The status of the phone number. *
*/ public String getStatus() { return status; } /** ** The status of the phone number. *
* * @param status* The status of the phone number. *
*/ public void setStatus(String status) { this.status = status; } /** ** The status of the phone number. *
** Returns a reference to this object so that method calls can be chained * together. * * @param status
* The status of the phone number. *
* @return A reference to this updated object so that method calls can be * chained together. */ public PhoneNumberInformation withStatus(String status) { this.status = status; return this; } /** ** The two-character code for the country or region, in ISO 3166-1 alpha-2 * format. *
*
* Constraints:
* Length: - 2
* Pattern: ^[A-Za-z]{2}$
*
* @return
* The two-character code for the country or region, in ISO 3166-1 * alpha-2 format. *
*/ public String getIso2CountryCode() { return iso2CountryCode; } /** ** The two-character code for the country or region, in ISO 3166-1 alpha-2 * format. *
*
* Constraints:
* Length: - 2
* Pattern: ^[A-Za-z]{2}$
*
* @param iso2CountryCode
* The two-character code for the country or region, in ISO * 3166-1 alpha-2 format. *
*/ public void setIso2CountryCode(String iso2CountryCode) { this.iso2CountryCode = iso2CountryCode; } /** ** The two-character code for the country or region, in ISO 3166-1 alpha-2 * format. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 2
* Pattern: ^[A-Za-z]{2}$
*
* @param iso2CountryCode
* The two-character code for the country or region, in ISO * 3166-1 alpha-2 format. *
* @return A reference to this updated object so that method calls can be * chained together. */ public PhoneNumberInformation withIso2CountryCode(String iso2CountryCode) { this.iso2CountryCode = iso2CountryCode; return this; } /** ** The list of supported routes. *
*
* Constraints:
* Allowed Values: Transactional, Promotional, Premium
*
* @return
* The list of supported routes. *
* @see RouteType */ public String getRouteType() { return routeType; } /** ** The list of supported routes. *
*
* Constraints:
* Allowed Values: Transactional, Promotional, Premium
*
* @param routeType
* The list of supported routes. *
* @see RouteType */ public void setRouteType(String routeType) { this.routeType = routeType; } /** ** The list of supported routes. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: Transactional, Promotional, Premium
*
* @param routeType
* The list of supported routes. *
* @return A reference to this updated object so that method calls can be * chained together. * @see RouteType */ public PhoneNumberInformation withRouteType(String routeType) { this.routeType = routeType; return this; } /** ** The list of supported routes. *
*
* Constraints:
* Allowed Values: Transactional, Promotional, Premium
*
* @param routeType
* The list of supported routes. *
* @see RouteType */ public void setRouteType(RouteType routeType) { this.routeType = routeType.toString(); } /** ** The list of supported routes. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: Transactional, Promotional, Premium
*
* @param routeType
* The list of supported routes. *
* @return A reference to this updated object so that method calls can be * chained together. * @see RouteType */ public PhoneNumberInformation withRouteType(RouteType routeType) { this.routeType = routeType.toString(); return this; } /** ** The capabilities of each phone number. *
* * @return* The capabilities of each phone number. *
*/ public java.util.List* The capabilities of each phone number. *
* * @param numberCapabilities* The capabilities of each phone number. *
*/ public void setNumberCapabilities(java.util.Collection* The capabilities of each phone number. *
** Returns a reference to this object so that method calls can be chained * together. * * @param numberCapabilities
* The capabilities of each phone number. *
* @return A reference to this updated object so that method calls can be * chained together. */ public PhoneNumberInformation withNumberCapabilities(String... numberCapabilities) { if (getNumberCapabilities() == null) { this.numberCapabilities = new java.util.ArrayList* The capabilities of each phone number. *
** Returns a reference to this object so that method calls can be chained * together. * * @param numberCapabilities
* The capabilities of each phone number. *
* @return A reference to this updated object so that method calls can be * chained together. */ public PhoneNumberInformation withNumberCapabilities( java.util.Collection