
com.amazonaws.services.datazone.model.SubscribedAssetListing Maven / Gradle / Ivy
Show all versions of aws-java-sdk-datazoneexternal 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.datazone.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The details of the published asset for which the subscription grant is created.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SubscribedAssetListing implements Serializable, Cloneable, StructuredPojo {
/**
*
* The identifier of the published asset for which the subscription grant is created.
*
*/
private String entityId;
/**
*
* The revision of the published asset for which the subscription grant is created.
*
*/
private String entityRevision;
/**
*
* The type of the published asset for which the subscription grant is created.
*
*/
private String entityType;
/**
*
* The forms attached to the published asset for which the subscription grant is created.
*
*/
private String forms;
/**
*
* The glossary terms attached to the published asset for which the subscription grant is created.
*
*/
private java.util.List glossaryTerms;
/**
*
* The identifier of the published asset for which the subscription grant is created.
*
*
* @param entityId
* The identifier of the published asset for which the subscription grant is created.
*/
public void setEntityId(String entityId) {
this.entityId = entityId;
}
/**
*
* The identifier of the published asset for which the subscription grant is created.
*
*
* @return The identifier of the published asset for which the subscription grant is created.
*/
public String getEntityId() {
return this.entityId;
}
/**
*
* The identifier of the published asset for which the subscription grant is created.
*
*
* @param entityId
* The identifier of the published asset for which the subscription grant is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubscribedAssetListing withEntityId(String entityId) {
setEntityId(entityId);
return this;
}
/**
*
* The revision of the published asset for which the subscription grant is created.
*
*
* @param entityRevision
* The revision of the published asset for which the subscription grant is created.
*/
public void setEntityRevision(String entityRevision) {
this.entityRevision = entityRevision;
}
/**
*
* The revision of the published asset for which the subscription grant is created.
*
*
* @return The revision of the published asset for which the subscription grant is created.
*/
public String getEntityRevision() {
return this.entityRevision;
}
/**
*
* The revision of the published asset for which the subscription grant is created.
*
*
* @param entityRevision
* The revision of the published asset for which the subscription grant is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubscribedAssetListing withEntityRevision(String entityRevision) {
setEntityRevision(entityRevision);
return this;
}
/**
*
* The type of the published asset for which the subscription grant is created.
*
*
* @param entityType
* The type of the published asset for which the subscription grant is created.
*/
public void setEntityType(String entityType) {
this.entityType = entityType;
}
/**
*
* The type of the published asset for which the subscription grant is created.
*
*
* @return The type of the published asset for which the subscription grant is created.
*/
public String getEntityType() {
return this.entityType;
}
/**
*
* The type of the published asset for which the subscription grant is created.
*
*
* @param entityType
* The type of the published asset for which the subscription grant is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubscribedAssetListing withEntityType(String entityType) {
setEntityType(entityType);
return this;
}
/**
*
* The forms attached to the published asset for which the subscription grant is created.
*
*
* @param forms
* The forms attached to the published asset for which the subscription grant is created.
*/
public void setForms(String forms) {
this.forms = forms;
}
/**
*
* The forms attached to the published asset for which the subscription grant is created.
*
*
* @return The forms attached to the published asset for which the subscription grant is created.
*/
public String getForms() {
return this.forms;
}
/**
*
* The forms attached to the published asset for which the subscription grant is created.
*
*
* @param forms
* The forms attached to the published asset for which the subscription grant is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubscribedAssetListing withForms(String forms) {
setForms(forms);
return this;
}
/**
*
* The glossary terms attached to the published asset for which the subscription grant is created.
*
*
* @return The glossary terms attached to the published asset for which the subscription grant is created.
*/
public java.util.List getGlossaryTerms() {
return glossaryTerms;
}
/**
*
* The glossary terms attached to the published asset for which the subscription grant is created.
*
*
* @param glossaryTerms
* The glossary terms attached to the published asset for which the subscription grant is created.
*/
public void setGlossaryTerms(java.util.Collection glossaryTerms) {
if (glossaryTerms == null) {
this.glossaryTerms = null;
return;
}
this.glossaryTerms = new java.util.ArrayList(glossaryTerms);
}
/**
*
* The glossary terms attached to the published asset for which the subscription grant is created.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setGlossaryTerms(java.util.Collection)} or {@link #withGlossaryTerms(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param glossaryTerms
* The glossary terms attached to the published asset for which the subscription grant is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubscribedAssetListing withGlossaryTerms(DetailedGlossaryTerm... glossaryTerms) {
if (this.glossaryTerms == null) {
setGlossaryTerms(new java.util.ArrayList(glossaryTerms.length));
}
for (DetailedGlossaryTerm ele : glossaryTerms) {
this.glossaryTerms.add(ele);
}
return this;
}
/**
*
* The glossary terms attached to the published asset for which the subscription grant is created.
*
*
* @param glossaryTerms
* The glossary terms attached to the published asset for which the subscription grant is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubscribedAssetListing withGlossaryTerms(java.util.Collection glossaryTerms) {
setGlossaryTerms(glossaryTerms);
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 (getEntityId() != null)
sb.append("EntityId: ").append(getEntityId()).append(",");
if (getEntityRevision() != null)
sb.append("EntityRevision: ").append(getEntityRevision()).append(",");
if (getEntityType() != null)
sb.append("EntityType: ").append(getEntityType()).append(",");
if (getForms() != null)
sb.append("Forms: ").append(getForms()).append(",");
if (getGlossaryTerms() != null)
sb.append("GlossaryTerms: ").append(getGlossaryTerms());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SubscribedAssetListing == false)
return false;
SubscribedAssetListing other = (SubscribedAssetListing) obj;
if (other.getEntityId() == null ^ this.getEntityId() == null)
return false;
if (other.getEntityId() != null && other.getEntityId().equals(this.getEntityId()) == false)
return false;
if (other.getEntityRevision() == null ^ this.getEntityRevision() == null)
return false;
if (other.getEntityRevision() != null && other.getEntityRevision().equals(this.getEntityRevision()) == false)
return false;
if (other.getEntityType() == null ^ this.getEntityType() == null)
return false;
if (other.getEntityType() != null && other.getEntityType().equals(this.getEntityType()) == false)
return false;
if (other.getForms() == null ^ this.getForms() == null)
return false;
if (other.getForms() != null && other.getForms().equals(this.getForms()) == false)
return false;
if (other.getGlossaryTerms() == null ^ this.getGlossaryTerms() == null)
return false;
if (other.getGlossaryTerms() != null && other.getGlossaryTerms().equals(this.getGlossaryTerms()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEntityId() == null) ? 0 : getEntityId().hashCode());
hashCode = prime * hashCode + ((getEntityRevision() == null) ? 0 : getEntityRevision().hashCode());
hashCode = prime * hashCode + ((getEntityType() == null) ? 0 : getEntityType().hashCode());
hashCode = prime * hashCode + ((getForms() == null) ? 0 : getForms().hashCode());
hashCode = prime * hashCode + ((getGlossaryTerms() == null) ? 0 : getGlossaryTerms().hashCode());
return hashCode;
}
@Override
public SubscribedAssetListing clone() {
try {
return (SubscribedAssetListing) 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.datazone.model.transform.SubscribedAssetListingMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}