/* * 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; /** *
* Provides information about the configuration, dimension, and other settings for a segment. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SegmentResponse implements Serializable, Cloneable, StructuredPojo { /** ** The unique identifier for the application that the segment is associated with. *
*/ private String applicationId; /** ** The Amazon Resource Name (ARN) of the segment. *
*/ private String arn; /** ** The date and time when the segment was created. *
*/ private String creationDate; /** ** The dimension settings for the segment. *
*/ private SegmentDimensions dimensions; /** ** The unique identifier for the segment. *
*/ private String id; /** ** The settings for the import job that's associated with the segment. *
*/ private SegmentImportResource importDefinition; /** ** The date and time when the segment was last modified. *
*/ private String lastModifiedDate; /** ** The name of the segment. *
*/ private String name; /** ** A list of one or more segment groups that apply to the segment. Each segment group consists of zero or more base * segments and the dimensions that are applied to those base segments. *
*/ private SegmentGroupList segmentGroups; /** ** The segment type. Valid values are: *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on * endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on * endpoint definitions that you they don't change over time. *
** A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. Each tag * consists of a required tag key and an associated tag value. *
*/ private java.util.Map* The version number of the segment. *
*/ private Integer version; /** ** The unique identifier for the application that the segment is associated with. *
* * @param applicationId * The unique identifier for the application that the segment is associated with. */ public void setApplicationId(String applicationId) { this.applicationId = applicationId; } /** ** The unique identifier for the application that the segment is associated with. *
* * @return The unique identifier for the application that the segment is associated with. */ public String getApplicationId() { return this.applicationId; } /** ** The unique identifier for the application that the segment is associated with. *
* * @param applicationId * The unique identifier for the application that the segment is associated with. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withApplicationId(String applicationId) { setApplicationId(applicationId); return this; } /** ** The Amazon Resource Name (ARN) of the segment. *
* * @param arn * The Amazon Resource Name (ARN) of the segment. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) of the segment. *
* * @return The Amazon Resource Name (ARN) of the segment. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name (ARN) of the segment. *
* * @param arn * The Amazon Resource Name (ARN) of the segment. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withArn(String arn) { setArn(arn); return this; } /** ** The date and time when the segment was created. *
* * @param creationDate * The date and time when the segment was created. */ public void setCreationDate(String creationDate) { this.creationDate = creationDate; } /** ** The date and time when the segment was created. *
* * @return The date and time when the segment was created. */ public String getCreationDate() { return this.creationDate; } /** ** The date and time when the segment was created. *
* * @param creationDate * The date and time when the segment was created. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withCreationDate(String creationDate) { setCreationDate(creationDate); return this; } /** ** The dimension settings for the segment. *
* * @param dimensions * The dimension settings for the segment. */ public void setDimensions(SegmentDimensions dimensions) { this.dimensions = dimensions; } /** ** The dimension settings for the segment. *
* * @return The dimension settings for the segment. */ public SegmentDimensions getDimensions() { return this.dimensions; } /** ** The dimension settings for the segment. *
* * @param dimensions * The dimension settings for the segment. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withDimensions(SegmentDimensions dimensions) { setDimensions(dimensions); return this; } /** ** The unique identifier for the segment. *
* * @param id * The unique identifier for the segment. */ public void setId(String id) { this.id = id; } /** ** The unique identifier for the segment. *
* * @return The unique identifier for the segment. */ public String getId() { return this.id; } /** ** The unique identifier for the segment. *
* * @param id * The unique identifier for the segment. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withId(String id) { setId(id); return this; } /** ** The settings for the import job that's associated with the segment. *
* * @param importDefinition * The settings for the import job that's associated with the segment. */ public void setImportDefinition(SegmentImportResource importDefinition) { this.importDefinition = importDefinition; } /** ** The settings for the import job that's associated with the segment. *
* * @return The settings for the import job that's associated with the segment. */ public SegmentImportResource getImportDefinition() { return this.importDefinition; } /** ** The settings for the import job that's associated with the segment. *
* * @param importDefinition * The settings for the import job that's associated with the segment. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withImportDefinition(SegmentImportResource importDefinition) { setImportDefinition(importDefinition); return this; } /** ** The date and time when the segment was last modified. *
* * @param lastModifiedDate * The date and time when the segment was last modified. */ public void setLastModifiedDate(String lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** ** The date and time when the segment was last modified. *
* * @return The date and time when the segment was last modified. */ public String getLastModifiedDate() { return this.lastModifiedDate; } /** ** The date and time when the segment was last modified. *
* * @param lastModifiedDate * The date and time when the segment was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withLastModifiedDate(String lastModifiedDate) { setLastModifiedDate(lastModifiedDate); return this; } /** ** The name of the segment. *
* * @param name * The name of the segment. */ public void setName(String name) { this.name = name; } /** ** The name of the segment. *
* * @return The name of the segment. */ public String getName() { return this.name; } /** ** The name of the segment. *
* * @param name * The name of the segment. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withName(String name) { setName(name); return this; } /** ** A list of one or more segment groups that apply to the segment. Each segment group consists of zero or more base * segments and the dimensions that are applied to those base segments. *
* * @param segmentGroups * A list of one or more segment groups that apply to the segment. Each segment group consists of zero or * more base segments and the dimensions that are applied to those base segments. */ public void setSegmentGroups(SegmentGroupList segmentGroups) { this.segmentGroups = segmentGroups; } /** ** A list of one or more segment groups that apply to the segment. Each segment group consists of zero or more base * segments and the dimensions that are applied to those base segments. *
* * @return A list of one or more segment groups that apply to the segment. Each segment group consists of zero or * more base segments and the dimensions that are applied to those base segments. */ public SegmentGroupList getSegmentGroups() { return this.segmentGroups; } /** ** A list of one or more segment groups that apply to the segment. Each segment group consists of zero or more base * segments and the dimensions that are applied to those base segments. *
* * @param segmentGroups * A list of one or more segment groups that apply to the segment. Each segment group consists of zero or * more base segments and the dimensions that are applied to those base segments. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withSegmentGroups(SegmentGroupList segmentGroups) { setSegmentGroups(segmentGroups); return this; } /** ** The segment type. Valid values are: *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on * endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on * endpoint definitions that you import from a file. Imported segments are static; they don't change over time. *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is * based on endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based * on endpoint definitions that you import from a file. Imported segments are static; they don't change over * time. *
** The segment type. Valid values are: *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on * endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on * endpoint definitions that you import from a file. Imported segments are static; they don't change over time. *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is * based on endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based * on endpoint definitions that you import from a file. Imported segments are static; they don't change over * time. *
** The segment type. Valid values are: *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on * endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on * endpoint definitions that you import from a file. Imported segments are static; they don't change over time. *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is * based on endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based * on endpoint definitions that you import from a file. Imported segments are static; they don't change over * time. *
** The segment type. Valid values are: *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on * endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on * endpoint definitions that you import from a file. Imported segments are static; they don't change over time. *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is * based on endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based * on endpoint definitions that you import from a file. Imported segments are static; they don't change over * time. *
** The segment type. Valid values are: *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on * endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on * endpoint definitions that you import from a file. Imported segments are static; they don't change over time. *
** DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is * based on endpoint data that's reported by your app. Dynamic segments can change over time. *
** IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based * on endpoint definitions that you import from a file. Imported segments are static; they don't change over * time. *
** A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. Each tag * consists of a required tag key and an associated tag value. *
* * @return A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. * Each tag consists of a required tag key and an associated tag value. */ public java.util.Map* A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. Each tag * consists of a required tag key and an associated tag value. *
* * @param tags * A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. * Each tag consists of a required tag key and an associated tag value. */ public void setTags(java.util.Map* A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. Each tag * consists of a required tag key and an associated tag value. *
* * @param tags * A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. * Each tag consists of a required tag key and an associated tag value. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withTags(java.util.Map* The version number of the segment. *
* * @param version * The version number of the segment. */ public void setVersion(Integer version) { this.version = version; } /** ** The version number of the segment. *
* * @return The version number of the segment. */ public Integer getVersion() { return this.version; } /** ** The version number of the segment. *
* * @param version * The version number of the segment. * @return Returns a reference to this object so that method calls can be chained together. */ public SegmentResponse withVersion(Integer version) { setVersion(version); 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 (getApplicationId() != null) sb.append("ApplicationId: ").append(getApplicationId()).append(","); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()).append(","); if (getDimensions() != null) sb.append("Dimensions: ").append(getDimensions()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getImportDefinition() != null) sb.append("ImportDefinition: ").append(getImportDefinition()).append(","); if (getLastModifiedDate() != null) sb.append("LastModifiedDate: ").append(getLastModifiedDate()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getSegmentGroups() != null) sb.append("SegmentGroups: ").append(getSegmentGroups()).append(","); if (getSegmentType() != null) sb.append("SegmentType: ").append(getSegmentType()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).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 SegmentResponse == false) return false; SegmentResponse other = (SegmentResponse) obj; if (other.getApplicationId() == null ^ this.getApplicationId() == null) return false; if (other.getApplicationId() != null && other.getApplicationId().equals(this.getApplicationId()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == 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.getDimensions() == null ^ this.getDimensions() == null) return false; if (other.getDimensions() != null && other.getDimensions().equals(this.getDimensions()) == 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.getImportDefinition() == null ^ this.getImportDefinition() == null) return false; if (other.getImportDefinition() != null && other.getImportDefinition().equals(this.getImportDefinition()) == 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.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getSegmentGroups() == null ^ this.getSegmentGroups() == null) return false; if (other.getSegmentGroups() != null && other.getSegmentGroups().equals(this.getSegmentGroups()) == false) return false; if (other.getSegmentType() == null ^ this.getSegmentType() == null) return false; if (other.getSegmentType() != null && other.getSegmentType().equals(this.getSegmentType()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getImportDefinition() == null) ? 0 : getImportDefinition().hashCode()); hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getSegmentGroups() == null) ? 0 : getSegmentGroups().hashCode()); hashCode = prime * hashCode + ((getSegmentType() == null) ? 0 : getSegmentType().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); return hashCode; } @Override public SegmentResponse clone() { try { return (SegmentResponse) 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.SegmentResponseMarshaller.getInstance().marshall(this, protocolMarshaller); } }