All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.account.model.ContactInformation Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Account module holds the client classes that are used for communicating with AWS Account Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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.account.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Contains the details of the primary contact information associated with an Amazon Web Services account. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ContactInformation implements Serializable, Cloneable, StructuredPojo { /** *

* The first line of the primary contact address. *

*/ private String addressLine1; /** *

* The second line of the primary contact address, if any. *

*/ private String addressLine2; /** *

* The third line of the primary contact address, if any. *

*/ private String addressLine3; /** *

* The city of the primary contact address. *

*/ private String city; /** *

* The name of the company associated with the primary contact information, if any. *

*/ private String companyName; /** *

* The ISO-3166 two-letter country code for the primary contact address. *

*/ private String countryCode; /** *

* The district or county of the primary contact address, if any. *

*/ private String districtOrCounty; /** *

* The full name of the primary contact address. *

*/ private String fullName; /** *

* The phone number of the primary contact information. The number will be validated and, in some countries, checked * for activation. *

*/ private String phoneNumber; /** *

* The postal code of the primary contact address. *

*/ private String postalCode; /** *

* The state or region of the primary contact address. If the mailing address is within the United States (US), the * value in this field can be either a two character state code (for example, NJ) or the full state * name (for example, New Jersey). This field is required in the following countries: US, * CA, GB, DE, JP, IN, and BR. *

*/ private String stateOrRegion; /** *

* The URL of the website associated with the primary contact information, if any. *

*/ private String websiteUrl; /** *

* The first line of the primary contact address. *

* * @param addressLine1 * The first line of the primary contact address. */ public void setAddressLine1(String addressLine1) { this.addressLine1 = addressLine1; } /** *

* The first line of the primary contact address. *

* * @return The first line of the primary contact address. */ public String getAddressLine1() { return this.addressLine1; } /** *

* The first line of the primary contact address. *

* * @param addressLine1 * The first line of the primary contact address. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withAddressLine1(String addressLine1) { setAddressLine1(addressLine1); return this; } /** *

* The second line of the primary contact address, if any. *

* * @param addressLine2 * The second line of the primary contact address, if any. */ public void setAddressLine2(String addressLine2) { this.addressLine2 = addressLine2; } /** *

* The second line of the primary contact address, if any. *

* * @return The second line of the primary contact address, if any. */ public String getAddressLine2() { return this.addressLine2; } /** *

* The second line of the primary contact address, if any. *

* * @param addressLine2 * The second line of the primary contact address, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withAddressLine2(String addressLine2) { setAddressLine2(addressLine2); return this; } /** *

* The third line of the primary contact address, if any. *

* * @param addressLine3 * The third line of the primary contact address, if any. */ public void setAddressLine3(String addressLine3) { this.addressLine3 = addressLine3; } /** *

* The third line of the primary contact address, if any. *

* * @return The third line of the primary contact address, if any. */ public String getAddressLine3() { return this.addressLine3; } /** *

* The third line of the primary contact address, if any. *

* * @param addressLine3 * The third line of the primary contact address, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withAddressLine3(String addressLine3) { setAddressLine3(addressLine3); return this; } /** *

* The city of the primary contact address. *

* * @param city * The city of the primary contact address. */ public void setCity(String city) { this.city = city; } /** *

* The city of the primary contact address. *

* * @return The city of the primary contact address. */ public String getCity() { return this.city; } /** *

* The city of the primary contact address. *

* * @param city * The city of the primary contact address. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withCity(String city) { setCity(city); return this; } /** *

* The name of the company associated with the primary contact information, if any. *

* * @param companyName * The name of the company associated with the primary contact information, if any. */ public void setCompanyName(String companyName) { this.companyName = companyName; } /** *

* The name of the company associated with the primary contact information, if any. *

* * @return The name of the company associated with the primary contact information, if any. */ public String getCompanyName() { return this.companyName; } /** *

* The name of the company associated with the primary contact information, if any. *

* * @param companyName * The name of the company associated with the primary contact information, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withCompanyName(String companyName) { setCompanyName(companyName); return this; } /** *

* The ISO-3166 two-letter country code for the primary contact address. *

* * @param countryCode * The ISO-3166 two-letter country code for the primary contact address. */ public void setCountryCode(String countryCode) { this.countryCode = countryCode; } /** *

* The ISO-3166 two-letter country code for the primary contact address. *

* * @return The ISO-3166 two-letter country code for the primary contact address. */ public String getCountryCode() { return this.countryCode; } /** *

* The ISO-3166 two-letter country code for the primary contact address. *

* * @param countryCode * The ISO-3166 two-letter country code for the primary contact address. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withCountryCode(String countryCode) { setCountryCode(countryCode); return this; } /** *

* The district or county of the primary contact address, if any. *

* * @param districtOrCounty * The district or county of the primary contact address, if any. */ public void setDistrictOrCounty(String districtOrCounty) { this.districtOrCounty = districtOrCounty; } /** *

* The district or county of the primary contact address, if any. *

* * @return The district or county of the primary contact address, if any. */ public String getDistrictOrCounty() { return this.districtOrCounty; } /** *

* The district or county of the primary contact address, if any. *

* * @param districtOrCounty * The district or county of the primary contact address, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withDistrictOrCounty(String districtOrCounty) { setDistrictOrCounty(districtOrCounty); return this; } /** *

* The full name of the primary contact address. *

* * @param fullName * The full name of the primary contact address. */ public void setFullName(String fullName) { this.fullName = fullName; } /** *

* The full name of the primary contact address. *

* * @return The full name of the primary contact address. */ public String getFullName() { return this.fullName; } /** *

* The full name of the primary contact address. *

* * @param fullName * The full name of the primary contact address. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withFullName(String fullName) { setFullName(fullName); return this; } /** *

* The phone number of the primary contact information. The number will be validated and, in some countries, checked * for activation. *

* * @param phoneNumber * The phone number of the primary contact information. The number will be validated and, in some countries, * checked for activation. */ public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } /** *

* The phone number of the primary contact information. The number will be validated and, in some countries, checked * for activation. *

* * @return The phone number of the primary contact information. The number will be validated and, in some countries, * checked for activation. */ public String getPhoneNumber() { return this.phoneNumber; } /** *

* The phone number of the primary contact information. The number will be validated and, in some countries, checked * for activation. *

* * @param phoneNumber * The phone number of the primary contact information. The number will be validated and, in some countries, * checked for activation. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withPhoneNumber(String phoneNumber) { setPhoneNumber(phoneNumber); return this; } /** *

* The postal code of the primary contact address. *

* * @param postalCode * The postal code of the primary contact address. */ public void setPostalCode(String postalCode) { this.postalCode = postalCode; } /** *

* The postal code of the primary contact address. *

* * @return The postal code of the primary contact address. */ public String getPostalCode() { return this.postalCode; } /** *

* The postal code of the primary contact address. *

* * @param postalCode * The postal code of the primary contact address. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withPostalCode(String postalCode) { setPostalCode(postalCode); return this; } /** *

* The state or region of the primary contact address. If the mailing address is within the United States (US), the * value in this field can be either a two character state code (for example, NJ) or the full state * name (for example, New Jersey). This field is required in the following countries: US, * CA, GB, DE, JP, IN, and BR. *

* * @param stateOrRegion * The state or region of the primary contact address. If the mailing address is within the United States * (US), the value in this field can be either a two character state code (for example, NJ) or * the full state name (for example, New Jersey). This field is required in the following * countries: US, CA, GB, DE, JP, * IN, and BR. */ public void setStateOrRegion(String stateOrRegion) { this.stateOrRegion = stateOrRegion; } /** *

* The state or region of the primary contact address. If the mailing address is within the United States (US), the * value in this field can be either a two character state code (for example, NJ) or the full state * name (for example, New Jersey). This field is required in the following countries: US, * CA, GB, DE, JP, IN, and BR. *

* * @return The state or region of the primary contact address. If the mailing address is within the United States * (US), the value in this field can be either a two character state code (for example, NJ) or * the full state name (for example, New Jersey). This field is required in the following * countries: US, CA, GB, DE, JP, * IN, and BR. */ public String getStateOrRegion() { return this.stateOrRegion; } /** *

* The state or region of the primary contact address. If the mailing address is within the United States (US), the * value in this field can be either a two character state code (for example, NJ) or the full state * name (for example, New Jersey). This field is required in the following countries: US, * CA, GB, DE, JP, IN, and BR. *

* * @param stateOrRegion * The state or region of the primary contact address. If the mailing address is within the United States * (US), the value in this field can be either a two character state code (for example, NJ) or * the full state name (for example, New Jersey). This field is required in the following * countries: US, CA, GB, DE, JP, * IN, and BR. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withStateOrRegion(String stateOrRegion) { setStateOrRegion(stateOrRegion); return this; } /** *

* The URL of the website associated with the primary contact information, if any. *

* * @param websiteUrl * The URL of the website associated with the primary contact information, if any. */ public void setWebsiteUrl(String websiteUrl) { this.websiteUrl = websiteUrl; } /** *

* The URL of the website associated with the primary contact information, if any. *

* * @return The URL of the website associated with the primary contact information, if any. */ public String getWebsiteUrl() { return this.websiteUrl; } /** *

* The URL of the website associated with the primary contact information, if any. *

* * @param websiteUrl * The URL of the website associated with the primary contact information, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactInformation withWebsiteUrl(String websiteUrl) { setWebsiteUrl(websiteUrl); 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 (getAddressLine1() != null) sb.append("AddressLine1: ").append("***Sensitive Data Redacted***").append(","); if (getAddressLine2() != null) sb.append("AddressLine2: ").append("***Sensitive Data Redacted***").append(","); if (getAddressLine3() != null) sb.append("AddressLine3: ").append("***Sensitive Data Redacted***").append(","); if (getCity() != null) sb.append("City: ").append("***Sensitive Data Redacted***").append(","); if (getCompanyName() != null) sb.append("CompanyName: ").append("***Sensitive Data Redacted***").append(","); if (getCountryCode() != null) sb.append("CountryCode: ").append("***Sensitive Data Redacted***").append(","); if (getDistrictOrCounty() != null) sb.append("DistrictOrCounty: ").append("***Sensitive Data Redacted***").append(","); if (getFullName() != null) sb.append("FullName: ").append("***Sensitive Data Redacted***").append(","); if (getPhoneNumber() != null) sb.append("PhoneNumber: ").append("***Sensitive Data Redacted***").append(","); if (getPostalCode() != null) sb.append("PostalCode: ").append("***Sensitive Data Redacted***").append(","); if (getStateOrRegion() != null) sb.append("StateOrRegion: ").append("***Sensitive Data Redacted***").append(","); if (getWebsiteUrl() != null) sb.append("WebsiteUrl: ").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 ContactInformation == false) return false; ContactInformation other = (ContactInformation) obj; if (other.getAddressLine1() == null ^ this.getAddressLine1() == null) return false; if (other.getAddressLine1() != null && other.getAddressLine1().equals(this.getAddressLine1()) == false) return false; if (other.getAddressLine2() == null ^ this.getAddressLine2() == null) return false; if (other.getAddressLine2() != null && other.getAddressLine2().equals(this.getAddressLine2()) == false) return false; if (other.getAddressLine3() == null ^ this.getAddressLine3() == null) return false; if (other.getAddressLine3() != null && other.getAddressLine3().equals(this.getAddressLine3()) == false) return false; if (other.getCity() == null ^ this.getCity() == null) return false; if (other.getCity() != null && other.getCity().equals(this.getCity()) == false) return false; if (other.getCompanyName() == null ^ this.getCompanyName() == null) return false; if (other.getCompanyName() != null && other.getCompanyName().equals(this.getCompanyName()) == false) return false; if (other.getCountryCode() == null ^ this.getCountryCode() == null) return false; if (other.getCountryCode() != null && other.getCountryCode().equals(this.getCountryCode()) == false) return false; if (other.getDistrictOrCounty() == null ^ this.getDistrictOrCounty() == null) return false; if (other.getDistrictOrCounty() != null && other.getDistrictOrCounty().equals(this.getDistrictOrCounty()) == false) return false; if (other.getFullName() == null ^ this.getFullName() == null) return false; if (other.getFullName() != null && other.getFullName().equals(this.getFullName()) == false) return false; if (other.getPhoneNumber() == null ^ this.getPhoneNumber() == null) return false; if (other.getPhoneNumber() != null && other.getPhoneNumber().equals(this.getPhoneNumber()) == false) return false; if (other.getPostalCode() == null ^ this.getPostalCode() == null) return false; if (other.getPostalCode() != null && other.getPostalCode().equals(this.getPostalCode()) == false) return false; if (other.getStateOrRegion() == null ^ this.getStateOrRegion() == null) return false; if (other.getStateOrRegion() != null && other.getStateOrRegion().equals(this.getStateOrRegion()) == false) return false; if (other.getWebsiteUrl() == null ^ this.getWebsiteUrl() == null) return false; if (other.getWebsiteUrl() != null && other.getWebsiteUrl().equals(this.getWebsiteUrl()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAddressLine1() == null) ? 0 : getAddressLine1().hashCode()); hashCode = prime * hashCode + ((getAddressLine2() == null) ? 0 : getAddressLine2().hashCode()); hashCode = prime * hashCode + ((getAddressLine3() == null) ? 0 : getAddressLine3().hashCode()); hashCode = prime * hashCode + ((getCity() == null) ? 0 : getCity().hashCode()); hashCode = prime * hashCode + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode()); hashCode = prime * hashCode + ((getCountryCode() == null) ? 0 : getCountryCode().hashCode()); hashCode = prime * hashCode + ((getDistrictOrCounty() == null) ? 0 : getDistrictOrCounty().hashCode()); hashCode = prime * hashCode + ((getFullName() == null) ? 0 : getFullName().hashCode()); hashCode = prime * hashCode + ((getPhoneNumber() == null) ? 0 : getPhoneNumber().hashCode()); hashCode = prime * hashCode + ((getPostalCode() == null) ? 0 : getPostalCode().hashCode()); hashCode = prime * hashCode + ((getStateOrRegion() == null) ? 0 : getStateOrRegion().hashCode()); hashCode = prime * hashCode + ((getWebsiteUrl() == null) ? 0 : getWebsiteUrl().hashCode()); return hashCode; } @Override public ContactInformation clone() { try { return (ContactInformation) 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.account.model.transform.ContactInformationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy