com.amazonaws.services.dataexchange.model.GetAssetResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-dataexchange Show documentation
/*
* Copyright 2017-2022 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 GetAssetResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ARN for the asset.
*
*/
private String arn;
/**
*
* Information about the asset.
*
*/
private AssetDetails assetDetails;
/**
*
* The type of asset that is added to a data set.
*
*/
private String assetType;
/**
*
* The date and time that the asset was created, in ISO 8601 format.
*
*/
private java.util.Date createdAt;
/**
*
* The unique identifier for the data set associated with this asset.
*
*/
private String dataSetId;
/**
*
* The unique identifier for the asset.
*
*/
private String id;
/**
*
* The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting
* to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon API Gateway API,
* the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the
* asset name.
*
*/
private String name;
/**
*
* The unique identifier for the revision associated with this asset.
*
*/
private String revisionId;
/**
*
* The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when
* an asset owner is viewing the entitled copy of its owned asset.
*
*/
private String sourceId;
/**
*
* The date and time that the asset was last updated, in ISO 8601 format.
*
*/
private java.util.Date updatedAt;
/**
*
* The ARN for the asset.
*
*
* @param arn
* The ARN for the asset.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN for the asset.
*
*
* @return The ARN for the asset.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN for the asset.
*
*
* @param arn
* The ARN for the asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAssetResult withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* Information about the asset.
*
*
* @param assetDetails
* Information about the asset.
*/
public void setAssetDetails(AssetDetails assetDetails) {
this.assetDetails = assetDetails;
}
/**
*
* Information about the asset.
*
*
* @return Information about the asset.
*/
public AssetDetails getAssetDetails() {
return this.assetDetails;
}
/**
*
* Information about the asset.
*
*
* @param assetDetails
* Information about the asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAssetResult withAssetDetails(AssetDetails assetDetails) {
setAssetDetails(assetDetails);
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 GetAssetResult 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 GetAssetResult withAssetType(AssetType assetType) {
this.assetType = assetType.toString();
return this;
}
/**
*
* The date and time that the asset was created, in ISO 8601 format.
*
*
* @param createdAt
* The date and time that the asset was created, in ISO 8601 format.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The date and time that the asset was created, in ISO 8601 format.
*
*
* @return The date and time that the asset was created, in ISO 8601 format.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The date and time that the asset was created, in ISO 8601 format.
*
*
* @param createdAt
* The date and time that the asset was created, in ISO 8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAssetResult withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The unique identifier for the data set associated with this asset.
*
*
* @param dataSetId
* The unique identifier for the data set associated with this asset.
*/
public void setDataSetId(String dataSetId) {
this.dataSetId = dataSetId;
}
/**
*
* The unique identifier for the data set associated with this asset.
*
*
* @return The unique identifier for the data set associated with this asset.
*/
public String getDataSetId() {
return this.dataSetId;
}
/**
*
* The unique identifier for the data set associated with this asset.
*
*
* @param dataSetId
* The unique identifier for the data set associated with this asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAssetResult withDataSetId(String dataSetId) {
setDataSetId(dataSetId);
return this;
}
/**
*
* The unique identifier for the asset.
*
*
* @param id
* The unique identifier for the asset.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The unique identifier for the asset.
*
*
* @return The unique identifier for the asset.
*/
public String getId() {
return this.id;
}
/**
*
* The unique identifier for the asset.
*
*
* @param id
* The unique identifier for the asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAssetResult withId(String id) {
setId(id);
return this;
}
/**
*
* The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting
* to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon API Gateway API,
* the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the
* asset name.
*
*
* @param name
* The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When
* exporting to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon
* API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the
* datashare name is used as the asset name.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting
* to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon API Gateway API,
* the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the
* asset name.
*
*
* @return The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When
* exporting to Amazon S3, the asset name is used as default target S3 object key. When importing from
* Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the
* datashare name is used as the asset name.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting
* to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon API Gateway API,
* the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the
* asset name.
*
*
* @param name
* The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When
* exporting to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon
* API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the
* datashare name is used as the asset name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAssetResult withName(String name) {
setName(name);
return this;
}
/**
*
* The unique identifier for the revision associated with this asset.
*
*
* @param revisionId
* The unique identifier for the revision associated with this asset.
*/
public void setRevisionId(String revisionId) {
this.revisionId = revisionId;
}
/**
*
* The unique identifier for the revision associated with this asset.
*
*
* @return The unique identifier for the revision associated with this asset.
*/
public String getRevisionId() {
return this.revisionId;
}
/**
*
* The unique identifier for the revision associated with this asset.
*
*
* @param revisionId
* The unique identifier for the revision associated with this asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAssetResult withRevisionId(String revisionId) {
setRevisionId(revisionId);
return this;
}
/**
*
* The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when
* an asset owner is viewing the entitled copy of its owned asset.
*
*
* @param sourceId
* The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is
* returned when an asset owner is viewing the entitled copy of its owned asset.
*/
public void setSourceId(String sourceId) {
this.sourceId = sourceId;
}
/**
*
* The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when
* an asset owner is viewing the entitled copy of its owned asset.
*
*
* @return The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is
* returned when an asset owner is viewing the entitled copy of its owned asset.
*/
public String getSourceId() {
return this.sourceId;
}
/**
*
* The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when
* an asset owner is viewing the entitled copy of its owned asset.
*
*
* @param sourceId
* The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is
* returned when an asset owner is viewing the entitled copy of its owned asset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAssetResult withSourceId(String sourceId) {
setSourceId(sourceId);
return this;
}
/**
*
* The date and time that the asset was last updated, in ISO 8601 format.
*
*
* @param updatedAt
* The date and time that the asset was last updated, in ISO 8601 format.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The date and time that the asset was last updated, in ISO 8601 format.
*
*
* @return The date and time that the asset was last updated, in ISO 8601 format.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The date and time that the asset was last updated, in ISO 8601 format.
*
*
* @param updatedAt
* The date and time that the asset was last updated, in ISO 8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAssetResult 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 (getAssetDetails() != null)
sb.append("AssetDetails: ").append(getAssetDetails()).append(",");
if (getAssetType() != null)
sb.append("AssetType: ").append(getAssetType()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getDataSetId() != null)
sb.append("DataSetId: ").append(getDataSetId()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getRevisionId() != null)
sb.append("RevisionId: ").append(getRevisionId()).append(",");
if (getSourceId() != null)
sb.append("SourceId: ").append(getSourceId()).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 GetAssetResult == false)
return false;
GetAssetResult other = (GetAssetResult) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getAssetDetails() == null ^ this.getAssetDetails() == null)
return false;
if (other.getAssetDetails() != null && other.getAssetDetails().equals(this.getAssetDetails()) == 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.getDataSetId() == null ^ this.getDataSetId() == null)
return false;
if (other.getDataSetId() != null && other.getDataSetId().equals(this.getDataSetId()) == 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.getRevisionId() == null ^ this.getRevisionId() == null)
return false;
if (other.getRevisionId() != null && other.getRevisionId().equals(this.getRevisionId()) == 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.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 + ((getAssetDetails() == null) ? 0 : getAssetDetails().hashCode());
hashCode = prime * hashCode + ((getAssetType() == null) ? 0 : getAssetType().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getDataSetId() == null) ? 0 : getDataSetId().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getRevisionId() == null) ? 0 : getRevisionId().hashCode());
hashCode = prime * hashCode + ((getSourceId() == null) ? 0 : getSourceId().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
return hashCode;
}
@Override
public GetAssetResult clone() {
try {
return (GetAssetResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}