com.amazonaws.services.datazone.model.DeleteSubscriptionGrantResult 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;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DeleteSubscriptionGrantResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The assets for which the subsctiption grant that is deleted gave access.
*
*/
private java.util.List assets;
/**
*
* The timestamp of when the subscription grant that is deleted was created.
*
*/
private java.util.Date createdAt;
/**
*
* The Amazon DataZone user who created the subscription grant that is deleted.
*
*/
private String createdBy;
/**
*
* The ID of the Amazon DataZone domain in which the subscription grant is deleted.
*
*/
private String domainId;
/**
*
* The entity to which the subscription is deleted.
*
*/
private GrantedEntity grantedEntity;
/**
*
* The ID of the subscription grant that is deleted.
*
*/
private String id;
/**
*
* The status of the subscription grant that is deleted.
*
*/
private String status;
/**
*
* The identifier of the subsctiption whose subscription grant is to be deleted.
*
*/
private String subscriptionId;
/**
*
* The ID of the subscription target associated with the subscription grant that is deleted.
*
*/
private String subscriptionTargetId;
/**
*
* The timestamp of when the subscription grant that is deleted was updated.
*
*/
private java.util.Date updatedAt;
/**
*
* The Amazon DataZone user who updated the subscription grant that is deleted.
*
*/
private String updatedBy;
/**
*
* The assets for which the subsctiption grant that is deleted gave access.
*
*
* @return The assets for which the subsctiption grant that is deleted gave access.
*/
public java.util.List getAssets() {
return assets;
}
/**
*
* The assets for which the subsctiption grant that is deleted gave access.
*
*
* @param assets
* The assets for which the subsctiption grant that is deleted gave access.
*/
public void setAssets(java.util.Collection assets) {
if (assets == null) {
this.assets = null;
return;
}
this.assets = new java.util.ArrayList(assets);
}
/**
*
* The assets for which the subsctiption grant that is deleted gave access.
*
*
* 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 for which the subsctiption grant that is deleted gave access.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult 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 for which the subsctiption grant that is deleted gave access.
*
*
* @param assets
* The assets for which the subsctiption grant that is deleted gave access.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult withAssets(java.util.Collection assets) {
setAssets(assets);
return this;
}
/**
*
* The timestamp of when the subscription grant that is deleted was created.
*
*
* @param createdAt
* The timestamp of when the subscription grant that is deleted was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The timestamp of when the subscription grant that is deleted was created.
*
*
* @return The timestamp of when the subscription grant that is deleted was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The timestamp of when the subscription grant that is deleted was created.
*
*
* @param createdAt
* The timestamp of when the subscription grant that is deleted was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The Amazon DataZone user who created the subscription grant that is deleted.
*
*
* @param createdBy
* The Amazon DataZone user who created the subscription grant that is deleted.
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
*
* The Amazon DataZone user who created the subscription grant that is deleted.
*
*
* @return The Amazon DataZone user who created the subscription grant that is deleted.
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
*
* The Amazon DataZone user who created the subscription grant that is deleted.
*
*
* @param createdBy
* The Amazon DataZone user who created the subscription grant that is deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult withCreatedBy(String createdBy) {
setCreatedBy(createdBy);
return this;
}
/**
*
* The ID of the Amazon DataZone domain in which the subscription grant is deleted.
*
*
* @param domainId
* The ID of the Amazon DataZone domain in which the subscription grant is deleted.
*/
public void setDomainId(String domainId) {
this.domainId = domainId;
}
/**
*
* The ID of the Amazon DataZone domain in which the subscription grant is deleted.
*
*
* @return The ID of the Amazon DataZone domain in which the subscription grant is deleted.
*/
public String getDomainId() {
return this.domainId;
}
/**
*
* The ID of the Amazon DataZone domain in which the subscription grant is deleted.
*
*
* @param domainId
* The ID of the Amazon DataZone domain in which the subscription grant is deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult withDomainId(String domainId) {
setDomainId(domainId);
return this;
}
/**
*
* The entity to which the subscription is deleted.
*
*
* @param grantedEntity
* The entity to which the subscription is deleted.
*/
public void setGrantedEntity(GrantedEntity grantedEntity) {
this.grantedEntity = grantedEntity;
}
/**
*
* The entity to which the subscription is deleted.
*
*
* @return The entity to which the subscription is deleted.
*/
public GrantedEntity getGrantedEntity() {
return this.grantedEntity;
}
/**
*
* The entity to which the subscription is deleted.
*
*
* @param grantedEntity
* The entity to which the subscription is deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult withGrantedEntity(GrantedEntity grantedEntity) {
setGrantedEntity(grantedEntity);
return this;
}
/**
*
* The ID of the subscription grant that is deleted.
*
*
* @param id
* The ID of the subscription grant that is deleted.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The ID of the subscription grant that is deleted.
*
*
* @return The ID of the subscription grant that is deleted.
*/
public String getId() {
return this.id;
}
/**
*
* The ID of the subscription grant that is deleted.
*
*
* @param id
* The ID of the subscription grant that is deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult withId(String id) {
setId(id);
return this;
}
/**
*
* The status of the subscription grant that is deleted.
*
*
* @param status
* The status of the subscription grant that is deleted.
* @see SubscriptionGrantOverallStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the subscription grant that is deleted.
*
*
* @return The status of the subscription grant that is deleted.
* @see SubscriptionGrantOverallStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the subscription grant that is deleted.
*
*
* @param status
* The status of the subscription grant that is deleted.
* @return Returns a reference to this object so that method calls can be chained together.
* @see SubscriptionGrantOverallStatus
*/
public DeleteSubscriptionGrantResult withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the subscription grant that is deleted.
*
*
* @param status
* The status of the subscription grant that is deleted.
* @return Returns a reference to this object so that method calls can be chained together.
* @see SubscriptionGrantOverallStatus
*/
public DeleteSubscriptionGrantResult withStatus(SubscriptionGrantOverallStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The identifier of the subsctiption whose subscription grant is to be deleted.
*
*
* @param subscriptionId
* The identifier of the subsctiption whose subscription grant is to be deleted.
*/
public void setSubscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
}
/**
*
* The identifier of the subsctiption whose subscription grant is to be deleted.
*
*
* @return The identifier of the subsctiption whose subscription grant is to be deleted.
*/
public String getSubscriptionId() {
return this.subscriptionId;
}
/**
*
* The identifier of the subsctiption whose subscription grant is to be deleted.
*
*
* @param subscriptionId
* The identifier of the subsctiption whose subscription grant is to be deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult withSubscriptionId(String subscriptionId) {
setSubscriptionId(subscriptionId);
return this;
}
/**
*
* The ID of the subscription target associated with the subscription grant that is deleted.
*
*
* @param subscriptionTargetId
* The ID of the subscription target associated with the subscription grant that is deleted.
*/
public void setSubscriptionTargetId(String subscriptionTargetId) {
this.subscriptionTargetId = subscriptionTargetId;
}
/**
*
* The ID of the subscription target associated with the subscription grant that is deleted.
*
*
* @return The ID of the subscription target associated with the subscription grant that is deleted.
*/
public String getSubscriptionTargetId() {
return this.subscriptionTargetId;
}
/**
*
* The ID of the subscription target associated with the subscription grant that is deleted.
*
*
* @param subscriptionTargetId
* The ID of the subscription target associated with the subscription grant that is deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult withSubscriptionTargetId(String subscriptionTargetId) {
setSubscriptionTargetId(subscriptionTargetId);
return this;
}
/**
*
* The timestamp of when the subscription grant that is deleted was updated.
*
*
* @param updatedAt
* The timestamp of when the subscription grant that is deleted was updated.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The timestamp of when the subscription grant that is deleted was updated.
*
*
* @return The timestamp of when the subscription grant that is deleted was updated.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The timestamp of when the subscription grant that is deleted was updated.
*
*
* @param updatedAt
* The timestamp of when the subscription grant that is deleted was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult withUpdatedAt(java.util.Date updatedAt) {
setUpdatedAt(updatedAt);
return this;
}
/**
*
* The Amazon DataZone user who updated the subscription grant that is deleted.
*
*
* @param updatedBy
* The Amazon DataZone user who updated the subscription grant that is deleted.
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
*
* The Amazon DataZone user who updated the subscription grant that is deleted.
*
*
* @return The Amazon DataZone user who updated the subscription grant that is deleted.
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
*
* The Amazon DataZone user who updated the subscription grant that is deleted.
*
*
* @param updatedBy
* The Amazon DataZone user who updated the subscription grant that is deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteSubscriptionGrantResult 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 DeleteSubscriptionGrantResult == false)
return false;
DeleteSubscriptionGrantResult other = (DeleteSubscriptionGrantResult) 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 DeleteSubscriptionGrantResult clone() {
try {
return (DeleteSubscriptionGrantResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}