All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.datazone.model.SubscriptionGrantSummary Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon DataZone module holds the client classes that are used for communicating with Amazon DataZone Service

The newest version!
/*
 * 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 subscription grant. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SubscriptionGrantSummary implements Serializable, Cloneable, StructuredPojo { /** *

* The assets included in the subscription grant. *

*/ private java.util.List assets; /** *

* The timestamp of when a subscription grant was created. *

*/ private java.util.Date createdAt; /** *

* The datazone user who created the subscription grant. *

*/ private String createdBy; /** *

* The identifier of the Amazon DataZone domain in which a subscription grant exists. *

*/ private String domainId; /** *

* The entity to which the subscription is granted. *

*/ private GrantedEntity grantedEntity; /** *

* The identifier of the subscription grant. *

*/ private String id; /** *

* The status of the subscription grant. *

*/ private String status; /** *

* The ID of the subscription grant. *

*/ private String subscriptionId; /** *

* The identifier of the target of the subscription grant. *

*/ private String subscriptionTargetId; /** *

* The timestampf of when the subscription grant was updated. *

*/ private java.util.Date updatedAt; /** *

* The Amazon DataZone user who updated the subscription grant. *

*/ private String updatedBy; /** *

* The assets included in the subscription grant. *

* * @return The assets included in the subscription grant. */ public java.util.List getAssets() { return assets; } /** *

* The assets included in the subscription grant. *

* * @param assets * The assets included in the subscription grant. */ public void setAssets(java.util.Collection assets) { if (assets == null) { this.assets = null; return; } this.assets = new java.util.ArrayList(assets); } /** *

* The assets included in the subscription grant. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAssets(java.util.Collection)} or {@link #withAssets(java.util.Collection)} if you want to override the * existing values. *

* * @param assets * The assets included in the subscription grant. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withAssets(SubscribedAsset... assets) { if (this.assets == null) { setAssets(new java.util.ArrayList(assets.length)); } for (SubscribedAsset ele : assets) { this.assets.add(ele); } return this; } /** *

* The assets included in the subscription grant. *

* * @param assets * The assets included in the subscription grant. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withAssets(java.util.Collection assets) { setAssets(assets); return this; } /** *

* The timestamp of when a subscription grant was created. *

* * @param createdAt * The timestamp of when a subscription grant was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* The timestamp of when a subscription grant was created. *

* * @return The timestamp of when a subscription grant was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

* The timestamp of when a subscription grant was created. *

* * @param createdAt * The timestamp of when a subscription grant was created. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** *

* The datazone user who created the subscription grant. *

* * @param createdBy * The datazone user who created the subscription grant. */ public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } /** *

* The datazone user who created the subscription grant. *

* * @return The datazone user who created the subscription grant. */ public String getCreatedBy() { return this.createdBy; } /** *

* The datazone user who created the subscription grant. *

* * @param createdBy * The datazone user who created the subscription grant. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withCreatedBy(String createdBy) { setCreatedBy(createdBy); return this; } /** *

* The identifier of the Amazon DataZone domain in which a subscription grant exists. *

* * @param domainId * The identifier of the Amazon DataZone domain in which a subscription grant exists. */ public void setDomainId(String domainId) { this.domainId = domainId; } /** *

* The identifier of the Amazon DataZone domain in which a subscription grant exists. *

* * @return The identifier of the Amazon DataZone domain in which a subscription grant exists. */ public String getDomainId() { return this.domainId; } /** *

* The identifier of the Amazon DataZone domain in which a subscription grant exists. *

* * @param domainId * The identifier of the Amazon DataZone domain in which a subscription grant exists. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withDomainId(String domainId) { setDomainId(domainId); return this; } /** *

* The entity to which the subscription is granted. *

* * @param grantedEntity * The entity to which the subscription is granted. */ public void setGrantedEntity(GrantedEntity grantedEntity) { this.grantedEntity = grantedEntity; } /** *

* The entity to which the subscription is granted. *

* * @return The entity to which the subscription is granted. */ public GrantedEntity getGrantedEntity() { return this.grantedEntity; } /** *

* The entity to which the subscription is granted. *

* * @param grantedEntity * The entity to which the subscription is granted. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withGrantedEntity(GrantedEntity grantedEntity) { setGrantedEntity(grantedEntity); return this; } /** *

* The identifier of the subscription grant. *

* * @param id * The identifier of the subscription grant. */ public void setId(String id) { this.id = id; } /** *

* The identifier of the subscription grant. *

* * @return The identifier of the subscription grant. */ public String getId() { return this.id; } /** *

* The identifier of the subscription grant. *

* * @param id * The identifier of the subscription grant. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withId(String id) { setId(id); return this; } /** *

* The status of the subscription grant. *

* * @param status * The status of the subscription grant. * @see SubscriptionGrantOverallStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of the subscription grant. *

* * @return The status of the subscription grant. * @see SubscriptionGrantOverallStatus */ public String getStatus() { return this.status; } /** *

* The status of the subscription grant. *

* * @param status * The status of the subscription grant. * @return Returns a reference to this object so that method calls can be chained together. * @see SubscriptionGrantOverallStatus */ public SubscriptionGrantSummary withStatus(String status) { setStatus(status); return this; } /** *

* The status of the subscription grant. *

* * @param status * The status of the subscription grant. * @return Returns a reference to this object so that method calls can be chained together. * @see SubscriptionGrantOverallStatus */ public SubscriptionGrantSummary withStatus(SubscriptionGrantOverallStatus status) { this.status = status.toString(); return this; } /** *

* The ID of the subscription grant. *

* * @param subscriptionId * The ID of the subscription grant. */ public void setSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; } /** *

* The ID of the subscription grant. *

* * @return The ID of the subscription grant. */ public String getSubscriptionId() { return this.subscriptionId; } /** *

* The ID of the subscription grant. *

* * @param subscriptionId * The ID of the subscription grant. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withSubscriptionId(String subscriptionId) { setSubscriptionId(subscriptionId); return this; } /** *

* The identifier of the target of the subscription grant. *

* * @param subscriptionTargetId * The identifier of the target of the subscription grant. */ public void setSubscriptionTargetId(String subscriptionTargetId) { this.subscriptionTargetId = subscriptionTargetId; } /** *

* The identifier of the target of the subscription grant. *

* * @return The identifier of the target of the subscription grant. */ public String getSubscriptionTargetId() { return this.subscriptionTargetId; } /** *

* The identifier of the target of the subscription grant. *

* * @param subscriptionTargetId * The identifier of the target of the subscription grant. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withSubscriptionTargetId(String subscriptionTargetId) { setSubscriptionTargetId(subscriptionTargetId); return this; } /** *

* The timestampf of when the subscription grant was updated. *

* * @param updatedAt * The timestampf of when the subscription grant was updated. */ public void setUpdatedAt(java.util.Date updatedAt) { this.updatedAt = updatedAt; } /** *

* The timestampf of when the subscription grant was updated. *

* * @return The timestampf of when the subscription grant was updated. */ public java.util.Date getUpdatedAt() { return this.updatedAt; } /** *

* The timestampf of when the subscription grant was updated. *

* * @param updatedAt * The timestampf of when the subscription grant was updated. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withUpdatedAt(java.util.Date updatedAt) { setUpdatedAt(updatedAt); return this; } /** *

* The Amazon DataZone user who updated the subscription grant. *

* * @param updatedBy * The Amazon DataZone user who updated the subscription grant. */ public void setUpdatedBy(String updatedBy) { this.updatedBy = updatedBy; } /** *

* The Amazon DataZone user who updated the subscription grant. *

* * @return The Amazon DataZone user who updated the subscription grant. */ public String getUpdatedBy() { return this.updatedBy; } /** *

* The Amazon DataZone user who updated the subscription grant. *

* * @param updatedBy * The Amazon DataZone user who updated the subscription grant. * @return Returns a reference to this object so that method calls can be chained together. */ public SubscriptionGrantSummary withUpdatedBy(String updatedBy) { setUpdatedBy(updatedBy); 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 (getAssets() != null) sb.append("Assets: ").append(getAssets()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getCreatedBy() != null) sb.append("CreatedBy: ").append(getCreatedBy()).append(","); if (getDomainId() != null) sb.append("DomainId: ").append(getDomainId()).append(","); if (getGrantedEntity() != null) sb.append("GrantedEntity: ").append(getGrantedEntity()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getSubscriptionId() != null) sb.append("SubscriptionId: ").append(getSubscriptionId()).append(","); if (getSubscriptionTargetId() != null) sb.append("SubscriptionTargetId: ").append(getSubscriptionTargetId()).append(","); if (getUpdatedAt() != null) sb.append("UpdatedAt: ").append(getUpdatedAt()).append(","); if (getUpdatedBy() != null) sb.append("UpdatedBy: ").append(getUpdatedBy()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SubscriptionGrantSummary == false) return false; SubscriptionGrantSummary other = (SubscriptionGrantSummary) obj; if (other.getAssets() == null ^ this.getAssets() == null) return false; if (other.getAssets() != null && other.getAssets().equals(this.getAssets()) == 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.getCreatedBy() == null ^ this.getCreatedBy() == null) return false; if (other.getCreatedBy() != null && other.getCreatedBy().equals(this.getCreatedBy()) == false) return false; if (other.getDomainId() == null ^ this.getDomainId() == null) return false; if (other.getDomainId() != null && other.getDomainId().equals(this.getDomainId()) == false) return false; if (other.getGrantedEntity() == null ^ this.getGrantedEntity() == null) return false; if (other.getGrantedEntity() != null && other.getGrantedEntity().equals(this.getGrantedEntity()) == 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.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getSubscriptionId() == null ^ this.getSubscriptionId() == null) return false; if (other.getSubscriptionId() != null && other.getSubscriptionId().equals(this.getSubscriptionId()) == false) return false; if (other.getSubscriptionTargetId() == null ^ this.getSubscriptionTargetId() == null) return false; if (other.getSubscriptionTargetId() != null && other.getSubscriptionTargetId().equals(this.getSubscriptionTargetId()) == false) return false; if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null) return false; if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false) return false; if (other.getUpdatedBy() == null ^ this.getUpdatedBy() == null) return false; if (other.getUpdatedBy() != null && other.getUpdatedBy().equals(this.getUpdatedBy()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAssets() == null) ? 0 : getAssets().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode()); hashCode = prime * hashCode + ((getDomainId() == null) ? 0 : getDomainId().hashCode()); hashCode = prime * hashCode + ((getGrantedEntity() == null) ? 0 : getGrantedEntity().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getSubscriptionId() == null) ? 0 : getSubscriptionId().hashCode()); hashCode = prime * hashCode + ((getSubscriptionTargetId() == null) ? 0 : getSubscriptionTargetId().hashCode()); hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode()); return hashCode; } @Override public SubscriptionGrantSummary clone() { try { return (SubscriptionGrantSummary) 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.SubscriptionGrantSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy