com.amazonaws.services.dataexchange.model.CreateDataSetResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-dataexchange 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.dataexchange.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateDataSetResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ARN for the data set.
*
*/
private String arn;
/**
*
* The type of asset that is added to a data set.
*
*/
private String assetType;
/**
*
* The date and time that the data set was created, in ISO 8601 format.
*
*/
private java.util.Date createdAt;
/**
*
* The description for the data set.
*
*/
private String description;
/**
*
* The unique identifier for the data set.
*
*/
private String id;
/**
*
* The name of the data set.
*
*/
private String name;
/**
*
* A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for
* subscribers).
*
*/
private String origin;
/**
*
* If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
*
*/
private OriginDetails originDetails;
/**
*
* The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is
* returned when a data set owner is viewing the entitled copy of its owned data set.
*
*/
private String sourceId;
/**
*
* The tags for the data set.
*
*/
private java.util.Map tags;
/**
*
* The date and time that the data set was last updated, in ISO 8601 format.
*
*/
private java.util.Date updatedAt;
/**
*
* The ARN for the data set.
*
*
* @param arn
* The ARN for the data set.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN for the data set.
*
*
* @return The ARN for the data set.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN for the data set.
*
*
* @param arn
* The ARN for the data set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The type of asset that is added to a data set.
*
*
* @param assetType
* The type of asset that is added to a data set.
* @see AssetType
*/
public void setAssetType(String assetType) {
this.assetType = assetType;
}
/**
*
* The type of asset that is added to a data set.
*
*
* @return The type of asset that is added to a data set.
* @see AssetType
*/
public String getAssetType() {
return this.assetType;
}
/**
*
* The type of asset that is added to a data set.
*
*
* @param assetType
* The type of asset that is added to a data set.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AssetType
*/
public CreateDataSetResult withAssetType(String assetType) {
setAssetType(assetType);
return this;
}
/**
*
* The type of asset that is added to a data set.
*
*
* @param assetType
* The type of asset that is added to a data set.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AssetType
*/
public CreateDataSetResult withAssetType(AssetType assetType) {
this.assetType = assetType.toString();
return this;
}
/**
*
* The date and time that the data set was created, in ISO 8601 format.
*
*
* @param createdAt
* The date and time that the data set was created, in ISO 8601 format.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The date and time that the data set was created, in ISO 8601 format.
*
*
* @return The date and time that the data set was created, in ISO 8601 format.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The date and time that the data set was created, in ISO 8601 format.
*
*
* @param createdAt
* The date and time that the data set was created, in ISO 8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The description for the data set.
*
*
* @param description
* The description for the data set.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description for the data set.
*
*
* @return The description for the data set.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description for the data set.
*
*
* @param description
* The description for the data set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The unique identifier for the data set.
*
*
* @param id
* The unique identifier for the data set.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The unique identifier for the data set.
*
*
* @return The unique identifier for the data set.
*/
public String getId() {
return this.id;
}
/**
*
* The unique identifier for the data set.
*
*
* @param id
* The unique identifier for the data set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult withId(String id) {
setId(id);
return this;
}
/**
*
* The name of the data set.
*
*
* @param name
* The name of the data set.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the data set.
*
*
* @return The name of the data set.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the data set.
*
*
* @param name
* The name of the data set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult withName(String name) {
setName(name);
return this;
}
/**
*
* A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for
* subscribers).
*
*
* @param origin
* A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account
* (for subscribers).
* @see Origin
*/
public void setOrigin(String origin) {
this.origin = origin;
}
/**
*
* A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for
* subscribers).
*
*
* @return A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account
* (for subscribers).
* @see Origin
*/
public String getOrigin() {
return this.origin;
}
/**
*
* A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for
* subscribers).
*
*
* @param origin
* A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account
* (for subscribers).
* @return Returns a reference to this object so that method calls can be chained together.
* @see Origin
*/
public CreateDataSetResult withOrigin(String origin) {
setOrigin(origin);
return this;
}
/**
*
* A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for
* subscribers).
*
*
* @param origin
* A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account
* (for subscribers).
* @return Returns a reference to this object so that method calls can be chained together.
* @see Origin
*/
public CreateDataSetResult withOrigin(Origin origin) {
this.origin = origin.toString();
return this;
}
/**
*
* If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
*
*
* @param originDetails
* If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
*/
public void setOriginDetails(OriginDetails originDetails) {
this.originDetails = originDetails;
}
/**
*
* If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
*
*
* @return If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
*/
public OriginDetails getOriginDetails() {
return this.originDetails;
}
/**
*
* If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
*
*
* @param originDetails
* If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult withOriginDetails(OriginDetails originDetails) {
setOriginDetails(originDetails);
return this;
}
/**
*
* The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is
* returned when a data set owner is viewing the entitled copy of its owned data set.
*
*
* @param sourceId
* The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter
* is returned when a data set owner is viewing the entitled copy of its owned data set.
*/
public void setSourceId(String sourceId) {
this.sourceId = sourceId;
}
/**
*
* The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is
* returned when a data set owner is viewing the entitled copy of its owned data set.
*
*
* @return The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter
* is returned when a data set owner is viewing the entitled copy of its owned data set.
*/
public String getSourceId() {
return this.sourceId;
}
/**
*
* The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is
* returned when a data set owner is viewing the entitled copy of its owned data set.
*
*
* @param sourceId
* The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter
* is returned when a data set owner is viewing the entitled copy of its owned data set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult withSourceId(String sourceId) {
setSourceId(sourceId);
return this;
}
/**
*
* The tags for the data set.
*
*
* @return The tags for the data set.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* The tags for the data set.
*
*
* @param tags
* The tags for the data set.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* The tags for the data set.
*
*
* @param tags
* The tags for the data set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateDataSetResult#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult clearTagsEntries() {
this.tags = null;
return this;
}
/**
*
* The date and time that the data set was last updated, in ISO 8601 format.
*
*
* @param updatedAt
* The date and time that the data set was last updated, in ISO 8601 format.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The date and time that the data set was last updated, in ISO 8601 format.
*
*
* @return The date and time that the data set was last updated, in ISO 8601 format.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The date and time that the data set was last updated, in ISO 8601 format.
*
*
* @param updatedAt
* The date and time that the data set was last updated, in ISO 8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetResult withUpdatedAt(java.util.Date updatedAt) {
setUpdatedAt(updatedAt);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getAssetType() != null)
sb.append("AssetType: ").append(getAssetType()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getOrigin() != null)
sb.append("Origin: ").append(getOrigin()).append(",");
if (getOriginDetails() != null)
sb.append("OriginDetails: ").append(getOriginDetails()).append(",");
if (getSourceId() != null)
sb.append("SourceId: ").append(getSourceId()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getUpdatedAt() != null)
sb.append("UpdatedAt: ").append(getUpdatedAt());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateDataSetResult == false)
return false;
CreateDataSetResult other = (CreateDataSetResult) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getAssetType() == null ^ this.getAssetType() == null)
return false;
if (other.getAssetType() != null && other.getAssetType().equals(this.getAssetType()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getOrigin() == null ^ this.getOrigin() == null)
return false;
if (other.getOrigin() != null && other.getOrigin().equals(this.getOrigin()) == false)
return false;
if (other.getOriginDetails() == null ^ this.getOriginDetails() == null)
return false;
if (other.getOriginDetails() != null && other.getOriginDetails().equals(this.getOriginDetails()) == false)
return false;
if (other.getSourceId() == null ^ this.getSourceId() == null)
return false;
if (other.getSourceId() != null && other.getSourceId().equals(this.getSourceId()) == 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.getUpdatedAt() == null ^ this.getUpdatedAt() == null)
return false;
if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getAssetType() == null) ? 0 : getAssetType().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getOrigin() == null) ? 0 : getOrigin().hashCode());
hashCode = prime * hashCode + ((getOriginDetails() == null) ? 0 : getOriginDetails().hashCode());
hashCode = prime * hashCode + ((getSourceId() == null) ? 0 : getSourceId().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
return hashCode;
}
@Override
public CreateDataSetResult clone() {
try {
return (CreateDataSetResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}