/* * Copyright 2012-2017 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; /** * Apple Distribution Push Notification Service channel definition. */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class APNSChannelResponse implements Serializable, Cloneable, StructuredPojo { /** The ID of the application to which the channel applies. */ private String applicationId; /** When was this segment created */ private String creationDate; /** The unique channel ID. */ private String id; /** Is this channel archived */ private Boolean isArchived; /** Who last updated this entry */ private String lastModifiedBy; /** Last date this was updated */ private String lastModifiedDate; /** The platform type. Will be APNS. */ private String platform; /** Version of channel */ private Integer version; /** * The ID of the application to which the channel applies. * * @param applicationId * The ID of the application to which the channel applies. */ public void setApplicationId(String applicationId) { this.applicationId = applicationId; } /** * The ID of the application to which the channel applies. * * @return The ID of the application to which the channel applies. */ public String getApplicationId() { return this.applicationId; } /** * The ID of the application to which the channel applies. * * @param applicationId * The ID of the application to which the channel applies. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSChannelResponse withApplicationId(String applicationId) { setApplicationId(applicationId); return this; } /** * When was this segment created * * @param creationDate * When was this segment created */ public void setCreationDate(String creationDate) { this.creationDate = creationDate; } /** * When was this segment created * * @return When was this segment created */ public String getCreationDate() { return this.creationDate; } /** * When was this segment created * * @param creationDate * When was this segment created * @return Returns a reference to this object so that method calls can be chained together. */ public APNSChannelResponse withCreationDate(String creationDate) { setCreationDate(creationDate); return this; } /** * The unique channel ID. * * @param id * The unique channel ID. */ public void setId(String id) { this.id = id; } /** * The unique channel ID. * * @return The unique channel ID. */ public String getId() { return this.id; } /** * The unique channel ID. * * @param id * The unique channel ID. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSChannelResponse withId(String id) { setId(id); return this; } /** * Is this channel archived * * @param isArchived * Is this channel archived */ public void setIsArchived(Boolean isArchived) { this.isArchived = isArchived; } /** * Is this channel archived * * @return Is this channel archived */ public Boolean getIsArchived() { return this.isArchived; } /** * Is this channel archived * * @param isArchived * Is this channel archived * @return Returns a reference to this object so that method calls can be chained together. */ public APNSChannelResponse withIsArchived(Boolean isArchived) { setIsArchived(isArchived); return this; } /** * Is this channel archived * * @return Is this channel archived */ public Boolean isArchived() { return this.isArchived; } /** * Who last updated this entry * * @param lastModifiedBy * Who last updated this entry */ public void setLastModifiedBy(String lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } /** * Who last updated this entry * * @return Who last updated this entry */ public String getLastModifiedBy() { return this.lastModifiedBy; } /** * Who last updated this entry * * @param lastModifiedBy * Who last updated this entry * @return Returns a reference to this object so that method calls can be chained together. */ public APNSChannelResponse withLastModifiedBy(String lastModifiedBy) { setLastModifiedBy(lastModifiedBy); return this; } /** * Last date this was updated * * @param lastModifiedDate * Last date this was updated */ public void setLastModifiedDate(String lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** * Last date this was updated * * @return Last date this was updated */ public String getLastModifiedDate() { return this.lastModifiedDate; } /** * Last date this was updated * * @param lastModifiedDate * Last date this was updated * @return Returns a reference to this object so that method calls can be chained together. */ public APNSChannelResponse withLastModifiedDate(String lastModifiedDate) { setLastModifiedDate(lastModifiedDate); return this; } /** * The platform type. Will be APNS. * * @param platform * The platform type. Will be APNS. */ public void setPlatform(String platform) { this.platform = platform; } /** * The platform type. Will be APNS. * * @return The platform type. Will be APNS. */ public String getPlatform() { return this.platform; } /** * The platform type. Will be APNS. * * @param platform * The platform type. Will be APNS. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSChannelResponse withPlatform(String platform) { setPlatform(platform); return this; } /** * Version of channel * * @param version * Version of channel */ public void setVersion(Integer version) { this.version = version; } /** * Version of channel * * @return Version of channel */ public Integer getVersion() { return this.version; } /** * Version of channel * * @param version * Version of channel * @return Returns a reference to this object so that method calls can be chained together. */ public APNSChannelResponse withVersion(Integer version) { setVersion(version); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getApplicationId() != null) sb.append("ApplicationId: ").append(getApplicationId()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getIsArchived() != null) sb.append("IsArchived: ").append(getIsArchived()).append(","); if (getLastModifiedBy() != null) sb.append("LastModifiedBy: ").append(getLastModifiedBy()).append(","); if (getLastModifiedDate() != null) sb.append("LastModifiedDate: ").append(getLastModifiedDate()).append(","); if (getPlatform() != null) sb.append("Platform: ").append(getPlatform()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof APNSChannelResponse == false) return false; APNSChannelResponse other = (APNSChannelResponse) obj; if (other.getApplicationId() == null ^ this.getApplicationId() == null) return false; if (other.getApplicationId() != null && other.getApplicationId().equals(this.getApplicationId()) == false) return false; if (other.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getIsArchived() == null ^ this.getIsArchived() == null) return false; if (other.getIsArchived() != null && other.getIsArchived().equals(this.getIsArchived()) == false) return false; if (other.getLastModifiedBy() == null ^ this.getLastModifiedBy() == null) return false; if (other.getLastModifiedBy() != null && other.getLastModifiedBy().equals(this.getLastModifiedBy()) == false) return false; if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null) return false; if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == 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.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getApplicationId() == null) ? 0 : getApplicationId().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getIsArchived() == null) ? 0 : getIsArchived().hashCode()); hashCode = prime * hashCode + ((getLastModifiedBy() == null) ? 0 : getLastModifiedBy().hashCode()); hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode()); hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); return hashCode; } @Override public APNSChannelResponse clone() { try { return (APNSChannelResponse) 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.APNSChannelResponseMarshaller.getInstance().marshall(this, protocolMarshaller); } }