/* * Copyright 2018-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.pinpoint.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Specifies demographic information about an endpoint, such as the applicable time zone and platform. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EndpointDemographic implements Serializable, Cloneable, StructuredPojo { /** ** The version of the app that's associated with the endpoint. *
*/ private String appVersion; /** ** The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore (_), * followed by an ISO 3166-1 alpha-2 value. *
*/ private String locale; /** ** The manufacturer of the endpoint device, such as apple or samsung. *
*/ private String make; /** ** The model name or number of the endpoint device, such as iPhone or SM-G900F. *
*/ private String model; /** ** The model version of the endpoint device. *
*/ private String modelVersion; /** ** The platform of the endpoint device, such as ios. *
*/ private String platform; /** ** The platform version of the endpoint device. *
*/ private String platformVersion; /** ** The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles. *
*/ private String timezone; /** ** The version of the app that's associated with the endpoint. *
* * @param appVersion * The version of the app that's associated with the endpoint. */ public void setAppVersion(String appVersion) { this.appVersion = appVersion; } /** ** The version of the app that's associated with the endpoint. *
* * @return The version of the app that's associated with the endpoint. */ public String getAppVersion() { return this.appVersion; } /** ** The version of the app that's associated with the endpoint. *
* * @param appVersion * The version of the app that's associated with the endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDemographic withAppVersion(String appVersion) { setAppVersion(appVersion); return this; } /** ** The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore (_), * followed by an ISO 3166-1 alpha-2 value. *
* * @param locale * The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore * (_), followed by an ISO 3166-1 alpha-2 value. */ public void setLocale(String locale) { this.locale = locale; } /** ** The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore (_), * followed by an ISO 3166-1 alpha-2 value. *
* * @return The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an * underscore (_), followed by an ISO 3166-1 alpha-2 value. */ public String getLocale() { return this.locale; } /** ** The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore (_), * followed by an ISO 3166-1 alpha-2 value. *
* * @param locale * The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore * (_), followed by an ISO 3166-1 alpha-2 value. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDemographic withLocale(String locale) { setLocale(locale); return this; } /** ** The manufacturer of the endpoint device, such as apple or samsung. *
* * @param make * The manufacturer of the endpoint device, such as apple or samsung. */ public void setMake(String make) { this.make = make; } /** ** The manufacturer of the endpoint device, such as apple or samsung. *
* * @return The manufacturer of the endpoint device, such as apple or samsung. */ public String getMake() { return this.make; } /** ** The manufacturer of the endpoint device, such as apple or samsung. *
* * @param make * The manufacturer of the endpoint device, such as apple or samsung. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDemographic withMake(String make) { setMake(make); return this; } /** ** The model name or number of the endpoint device, such as iPhone or SM-G900F. *
* * @param model * The model name or number of the endpoint device, such as iPhone or SM-G900F. */ public void setModel(String model) { this.model = model; } /** ** The model name or number of the endpoint device, such as iPhone or SM-G900F. *
* * @return The model name or number of the endpoint device, such as iPhone or SM-G900F. */ public String getModel() { return this.model; } /** ** The model name or number of the endpoint device, such as iPhone or SM-G900F. *
* * @param model * The model name or number of the endpoint device, such as iPhone or SM-G900F. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDemographic withModel(String model) { setModel(model); return this; } /** ** The model version of the endpoint device. *
* * @param modelVersion * The model version of the endpoint device. */ public void setModelVersion(String modelVersion) { this.modelVersion = modelVersion; } /** ** The model version of the endpoint device. *
* * @return The model version of the endpoint device. */ public String getModelVersion() { return this.modelVersion; } /** ** The model version of the endpoint device. *
* * @param modelVersion * The model version of the endpoint device. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDemographic withModelVersion(String modelVersion) { setModelVersion(modelVersion); return this; } /** ** The platform of the endpoint device, such as ios. *
* * @param platform * The platform of the endpoint device, such as ios. */ public void setPlatform(String platform) { this.platform = platform; } /** ** The platform of the endpoint device, such as ios. *
* * @return The platform of the endpoint device, such as ios. */ public String getPlatform() { return this.platform; } /** ** The platform of the endpoint device, such as ios. *
* * @param platform * The platform of the endpoint device, such as ios. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDemographic withPlatform(String platform) { setPlatform(platform); return this; } /** ** The platform version of the endpoint device. *
* * @param platformVersion * The platform version of the endpoint device. */ public void setPlatformVersion(String platformVersion) { this.platformVersion = platformVersion; } /** ** The platform version of the endpoint device. *
* * @return The platform version of the endpoint device. */ public String getPlatformVersion() { return this.platformVersion; } /** ** The platform version of the endpoint device. *
* * @param platformVersion * The platform version of the endpoint device. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDemographic withPlatformVersion(String platformVersion) { setPlatformVersion(platformVersion); return this; } /** ** The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles. *
* * @param timezone * The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles. */ public void setTimezone(String timezone) { this.timezone = timezone; } /** ** The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles. *
* * @return The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles. */ public String getTimezone() { return this.timezone; } /** ** The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles. *
* * @param timezone * The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles. * @return Returns a reference to this object so that method calls can be chained together. */ public EndpointDemographic withTimezone(String timezone) { setTimezone(timezone); 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 (getAppVersion() != null) sb.append("AppVersion: ").append(getAppVersion()).append(","); if (getLocale() != null) sb.append("Locale: ").append(getLocale()).append(","); if (getMake() != null) sb.append("Make: ").append(getMake()).append(","); if (getModel() != null) sb.append("Model: ").append(getModel()).append(","); if (getModelVersion() != null) sb.append("ModelVersion: ").append(getModelVersion()).append(","); if (getPlatform() != null) sb.append("Platform: ").append(getPlatform()).append(","); if (getPlatformVersion() != null) sb.append("PlatformVersion: ").append(getPlatformVersion()).append(","); if (getTimezone() != null) sb.append("Timezone: ").append(getTimezone()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EndpointDemographic == false) return false; EndpointDemographic other = (EndpointDemographic) obj; if (other.getAppVersion() == null ^ this.getAppVersion() == null) return false; if (other.getAppVersion() != null && other.getAppVersion().equals(this.getAppVersion()) == false) return false; if (other.getLocale() == null ^ this.getLocale() == null) return false; if (other.getLocale() != null && other.getLocale().equals(this.getLocale()) == false) return false; if (other.getMake() == null ^ this.getMake() == null) return false; if (other.getMake() != null && other.getMake().equals(this.getMake()) == false) return false; if (other.getModel() == null ^ this.getModel() == null) return false; if (other.getModel() != null && other.getModel().equals(this.getModel()) == false) return false; if (other.getModelVersion() == null ^ this.getModelVersion() == null) return false; if (other.getModelVersion() != null && other.getModelVersion().equals(this.getModelVersion()) == false) return false; if (other.getPlatform() == null ^ this.getPlatform() == null) return false; if (other.getPlatform() != null && other.getPlatform().equals(this.getPlatform()) == false) return false; if (other.getPlatformVersion() == null ^ this.getPlatformVersion() == null) return false; if (other.getPlatformVersion() != null && other.getPlatformVersion().equals(this.getPlatformVersion()) == false) return false; if (other.getTimezone() == null ^ this.getTimezone() == null) return false; if (other.getTimezone() != null && other.getTimezone().equals(this.getTimezone()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAppVersion() == null) ? 0 : getAppVersion().hashCode()); hashCode = prime * hashCode + ((getLocale() == null) ? 0 : getLocale().hashCode()); hashCode = prime * hashCode + ((getMake() == null) ? 0 : getMake().hashCode()); hashCode = prime * hashCode + ((getModel() == null) ? 0 : getModel().hashCode()); hashCode = prime * hashCode + ((getModelVersion() == null) ? 0 : getModelVersion().hashCode()); hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); hashCode = prime * hashCode + ((getPlatformVersion() == null) ? 0 : getPlatformVersion().hashCode()); hashCode = prime * hashCode + ((getTimezone() == null) ? 0 : getTimezone().hashCode()); return hashCode; } @Override public EndpointDemographic clone() { try { return (EndpointDemographic) 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.pinpoint.model.transform.EndpointDemographicMarshaller.getInstance().marshall(this, protocolMarshaller); } }