com.amazonaws.services.private5g.model.Address Maven / Gradle / Ivy
Show all versions of aws-java-sdk-private5g 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.private5g.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about an address.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Address implements Serializable, Cloneable, StructuredPojo {
/**
*
* The city for this address.
*
*/
private String city;
/**
*
* The company name for this address.
*
*/
private String company;
/**
*
* The country for this address.
*
*/
private String country;
/**
*
* The recipient's email address.
*
*/
private String emailAddress;
/**
*
* The recipient's name for this address.
*
*/
private String name;
/**
*
* The recipient's phone number.
*
*/
private String phoneNumber;
/**
*
* The postal code for this address.
*
*/
private String postalCode;
/**
*
* The state or province for this address.
*
*/
private String stateOrProvince;
/**
*
* The first line of the street address.
*
*/
private String street1;
/**
*
* The second line of the street address.
*
*/
private String street2;
/**
*
* The third line of the street address.
*
*/
private String street3;
/**
*
* The city for this address.
*
*
* @param city
* The city for this address.
*/
public void setCity(String city) {
this.city = city;
}
/**
*
* The city for this address.
*
*
* @return The city for this address.
*/
public String getCity() {
return this.city;
}
/**
*
* The city for this address.
*
*
* @param city
* The city for this address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withCity(String city) {
setCity(city);
return this;
}
/**
*
* The company name for this address.
*
*
* @param company
* The company name for this address.
*/
public void setCompany(String company) {
this.company = company;
}
/**
*
* The company name for this address.
*
*
* @return The company name for this address.
*/
public String getCompany() {
return this.company;
}
/**
*
* The company name for this address.
*
*
* @param company
* The company name for this address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withCompany(String company) {
setCompany(company);
return this;
}
/**
*
* The country for this address.
*
*
* @param country
* The country for this address.
*/
public void setCountry(String country) {
this.country = country;
}
/**
*
* The country for this address.
*
*
* @return The country for this address.
*/
public String getCountry() {
return this.country;
}
/**
*
* The country for this address.
*
*
* @param country
* The country for this address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withCountry(String country) {
setCountry(country);
return this;
}
/**
*
* The recipient's email address.
*
*
* @param emailAddress
* The recipient's email address.
*/
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
/**
*
* The recipient's email address.
*
*
* @return The recipient's email address.
*/
public String getEmailAddress() {
return this.emailAddress;
}
/**
*
* The recipient's email address.
*
*
* @param emailAddress
* The recipient's email address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withEmailAddress(String emailAddress) {
setEmailAddress(emailAddress);
return this;
}
/**
*
* The recipient's name for this address.
*
*
* @param name
* The recipient's name for this address.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The recipient's name for this address.
*
*
* @return The recipient's name for this address.
*/
public String getName() {
return this.name;
}
/**
*
* The recipient's name for this address.
*
*
* @param name
* The recipient's name for this address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withName(String name) {
setName(name);
return this;
}
/**
*
* The recipient's phone number.
*
*
* @param phoneNumber
* The recipient's phone number.
*/
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
/**
*
* The recipient's phone number.
*
*
* @return The recipient's phone number.
*/
public String getPhoneNumber() {
return this.phoneNumber;
}
/**
*
* The recipient's phone number.
*
*
* @param phoneNumber
* The recipient's phone number.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withPhoneNumber(String phoneNumber) {
setPhoneNumber(phoneNumber);
return this;
}
/**
*
* The postal code for this address.
*
*
* @param postalCode
* The postal code for this address.
*/
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
}
/**
*
* The postal code for this address.
*
*
* @return The postal code for this address.
*/
public String getPostalCode() {
return this.postalCode;
}
/**
*
* The postal code for this address.
*
*
* @param postalCode
* The postal code for this address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withPostalCode(String postalCode) {
setPostalCode(postalCode);
return this;
}
/**
*
* The state or province for this address.
*
*
* @param stateOrProvince
* The state or province for this address.
*/
public void setStateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
}
/**
*
* The state or province for this address.
*
*
* @return The state or province for this address.
*/
public String getStateOrProvince() {
return this.stateOrProvince;
}
/**
*
* The state or province for this address.
*
*
* @param stateOrProvince
* The state or province for this address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withStateOrProvince(String stateOrProvince) {
setStateOrProvince(stateOrProvince);
return this;
}
/**
*
* The first line of the street address.
*
*
* @param street1
* The first line of the street address.
*/
public void setStreet1(String street1) {
this.street1 = street1;
}
/**
*
* The first line of the street address.
*
*
* @return The first line of the street address.
*/
public String getStreet1() {
return this.street1;
}
/**
*
* The first line of the street address.
*
*
* @param street1
* The first line of the street address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withStreet1(String street1) {
setStreet1(street1);
return this;
}
/**
*
* The second line of the street address.
*
*
* @param street2
* The second line of the street address.
*/
public void setStreet2(String street2) {
this.street2 = street2;
}
/**
*
* The second line of the street address.
*
*
* @return The second line of the street address.
*/
public String getStreet2() {
return this.street2;
}
/**
*
* The second line of the street address.
*
*
* @param street2
* The second line of the street address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withStreet2(String street2) {
setStreet2(street2);
return this;
}
/**
*
* The third line of the street address.
*
*
* @param street3
* The third line of the street address.
*/
public void setStreet3(String street3) {
this.street3 = street3;
}
/**
*
* The third line of the street address.
*
*
* @return The third line of the street address.
*/
public String getStreet3() {
return this.street3;
}
/**
*
* The third line of the street address.
*
*
* @param street3
* The third line of the street address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Address withStreet3(String street3) {
setStreet3(street3);
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 (getCity() != null)
sb.append("City: ").append("***Sensitive Data Redacted***").append(",");
if (getCompany() != null)
sb.append("Company: ").append("***Sensitive Data Redacted***").append(",");
if (getCountry() != null)
sb.append("Country: ").append("***Sensitive Data Redacted***").append(",");
if (getEmailAddress() != null)
sb.append("EmailAddress: ").append("***Sensitive Data Redacted***").append(",");
if (getName() != null)
sb.append("Name: ").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 (getStateOrProvince() != null)
sb.append("StateOrProvince: ").append("***Sensitive Data Redacted***").append(",");
if (getStreet1() != null)
sb.append("Street1: ").append("***Sensitive Data Redacted***").append(",");
if (getStreet2() != null)
sb.append("Street2: ").append("***Sensitive Data Redacted***").append(",");
if (getStreet3() != null)
sb.append("Street3: ").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 Address == false)
return false;
Address other = (Address) obj;
if (other.getCity() == null ^ this.getCity() == null)
return false;
if (other.getCity() != null && other.getCity().equals(this.getCity()) == false)
return false;
if (other.getCompany() == null ^ this.getCompany() == null)
return false;
if (other.getCompany() != null && other.getCompany().equals(this.getCompany()) == false)
return false;
if (other.getCountry() == null ^ this.getCountry() == null)
return false;
if (other.getCountry() != null && other.getCountry().equals(this.getCountry()) == false)
return false;
if (other.getEmailAddress() == null ^ this.getEmailAddress() == null)
return false;
if (other.getEmailAddress() != null && other.getEmailAddress().equals(this.getEmailAddress()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == 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.getStateOrProvince() == null ^ this.getStateOrProvince() == null)
return false;
if (other.getStateOrProvince() != null && other.getStateOrProvince().equals(this.getStateOrProvince()) == false)
return false;
if (other.getStreet1() == null ^ this.getStreet1() == null)
return false;
if (other.getStreet1() != null && other.getStreet1().equals(this.getStreet1()) == false)
return false;
if (other.getStreet2() == null ^ this.getStreet2() == null)
return false;
if (other.getStreet2() != null && other.getStreet2().equals(this.getStreet2()) == false)
return false;
if (other.getStreet3() == null ^ this.getStreet3() == null)
return false;
if (other.getStreet3() != null && other.getStreet3().equals(this.getStreet3()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCity() == null) ? 0 : getCity().hashCode());
hashCode = prime * hashCode + ((getCompany() == null) ? 0 : getCompany().hashCode());
hashCode = prime * hashCode + ((getCountry() == null) ? 0 : getCountry().hashCode());
hashCode = prime * hashCode + ((getEmailAddress() == null) ? 0 : getEmailAddress().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getPhoneNumber() == null) ? 0 : getPhoneNumber().hashCode());
hashCode = prime * hashCode + ((getPostalCode() == null) ? 0 : getPostalCode().hashCode());
hashCode = prime * hashCode + ((getStateOrProvince() == null) ? 0 : getStateOrProvince().hashCode());
hashCode = prime * hashCode + ((getStreet1() == null) ? 0 : getStreet1().hashCode());
hashCode = prime * hashCode + ((getStreet2() == null) ? 0 : getStreet2().hashCode());
hashCode = prime * hashCode + ((getStreet3() == null) ? 0 : getStreet3().hashCode());
return hashCode;
}
@Override
public Address clone() {
try {
return (Address) 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.private5g.model.transform.AddressMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}