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

com.amazonaws.services.ram.model.Resource Maven / Gradle / Ivy

/*
 * Copyright 2016-2021 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.ram.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes a resource associated with a resource share. *

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

* The Amazon Resource Name (ARN) of the resource. *

*/ private String arn; /** *

* The resource type. *

*/ private String type; /** *

* The Amazon Resource Name (ARN) of the resource share. *

*/ private String resourceShareArn; /** *

* The Amazon Resource Name (ARN) of the resource group. This value is returned only if the resource is a resource * group. *

*/ private String resourceGroupArn; /** *

* The status of the resource. *

*/ private String status; /** *

* A message about the status of the resource. *

*/ private String statusMessage; /** *

* The time when the resource was associated with the resource share. *

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

* The time when the association was last updated. *

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

* The Amazon Resource Name (ARN) of the resource. *

* * @param arn * The Amazon Resource Name (ARN) of the resource. */ public void setArn(String arn) { this.arn = arn; } /** *

* The Amazon Resource Name (ARN) of the resource. *

* * @return The Amazon Resource Name (ARN) of the resource. */ public String getArn() { return this.arn; } /** *

* The Amazon Resource Name (ARN) of the resource. *

* * @param arn * The Amazon Resource Name (ARN) of the resource. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withArn(String arn) { setArn(arn); return this; } /** *

* The resource type. *

* * @param type * The resource type. */ public void setType(String type) { this.type = type; } /** *

* The resource type. *

* * @return The resource type. */ public String getType() { return this.type; } /** *

* The resource type. *

* * @param type * The resource type. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withType(String type) { setType(type); return this; } /** *

* The Amazon Resource Name (ARN) of the resource share. *

* * @param resourceShareArn * The Amazon Resource Name (ARN) of the resource share. */ public void setResourceShareArn(String resourceShareArn) { this.resourceShareArn = resourceShareArn; } /** *

* The Amazon Resource Name (ARN) of the resource share. *

* * @return The Amazon Resource Name (ARN) of the resource share. */ public String getResourceShareArn() { return this.resourceShareArn; } /** *

* The Amazon Resource Name (ARN) of the resource share. *

* * @param resourceShareArn * The Amazon Resource Name (ARN) of the resource share. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withResourceShareArn(String resourceShareArn) { setResourceShareArn(resourceShareArn); return this; } /** *

* The Amazon Resource Name (ARN) of the resource group. This value is returned only if the resource is a resource * group. *

* * @param resourceGroupArn * The Amazon Resource Name (ARN) of the resource group. This value is returned only if the resource is a * resource group. */ public void setResourceGroupArn(String resourceGroupArn) { this.resourceGroupArn = resourceGroupArn; } /** *

* The Amazon Resource Name (ARN) of the resource group. This value is returned only if the resource is a resource * group. *

* * @return The Amazon Resource Name (ARN) of the resource group. This value is returned only if the resource is a * resource group. */ public String getResourceGroupArn() { return this.resourceGroupArn; } /** *

* The Amazon Resource Name (ARN) of the resource group. This value is returned only if the resource is a resource * group. *

* * @param resourceGroupArn * The Amazon Resource Name (ARN) of the resource group. This value is returned only if the resource is a * resource group. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withResourceGroupArn(String resourceGroupArn) { setResourceGroupArn(resourceGroupArn); return this; } /** *

* The status of the resource. *

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

* The status of the resource. *

* * @return The status of the resource. * @see ResourceStatus */ public String getStatus() { return this.status; } /** *

* The status of the resource. *

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

* The status of the resource. *

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

* A message about the status of the resource. *

* * @param statusMessage * A message about the status of the resource. */ public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } /** *

* A message about the status of the resource. *

* * @return A message about the status of the resource. */ public String getStatusMessage() { return this.statusMessage; } /** *

* A message about the status of the resource. *

* * @param statusMessage * A message about the status of the resource. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withStatusMessage(String statusMessage) { setStatusMessage(statusMessage); return this; } /** *

* The time when the resource was associated with the resource share. *

* * @param creationTime * The time when the resource was associated with the resource share. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

* The time when the resource was associated with the resource share. *

* * @return The time when the resource was associated with the resource share. */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

* The time when the resource was associated with the resource share. *

* * @param creationTime * The time when the resource was associated with the resource share. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** *

* The time when the association was last updated. *

* * @param lastUpdatedTime * The time when the association was last updated. */ public void setLastUpdatedTime(java.util.Date lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } /** *

* The time when the association was last updated. *

* * @return The time when the association was last updated. */ public java.util.Date getLastUpdatedTime() { return this.lastUpdatedTime; } /** *

* The time when the association was last updated. *

* * @param lastUpdatedTime * The time when the association was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withLastUpdatedTime(java.util.Date lastUpdatedTime) { setLastUpdatedTime(lastUpdatedTime); 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 (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getResourceShareArn() != null) sb.append("ResourceShareArn: ").append(getResourceShareArn()).append(","); if (getResourceGroupArn() != null) sb.append("ResourceGroupArn: ").append(getResourceGroupArn()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusMessage() != null) sb.append("StatusMessage: ").append(getStatusMessage()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getLastUpdatedTime() != null) sb.append("LastUpdatedTime: ").append(getLastUpdatedTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Resource == false) return false; Resource other = (Resource) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getResourceShareArn() == null ^ this.getResourceShareArn() == null) return false; if (other.getResourceShareArn() != null && other.getResourceShareArn().equals(this.getResourceShareArn()) == false) return false; if (other.getResourceGroupArn() == null ^ this.getResourceGroupArn() == null) return false; if (other.getResourceGroupArn() != null && other.getResourceGroupArn().equals(this.getResourceGroupArn()) == 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.getStatusMessage() == null ^ this.getStatusMessage() == null) return false; if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getLastUpdatedTime() == null ^ this.getLastUpdatedTime() == null) return false; if (other.getLastUpdatedTime() != null && other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == 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 + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getResourceShareArn() == null) ? 0 : getResourceShareArn().hashCode()); hashCode = prime * hashCode + ((getResourceGroupArn() == null) ? 0 : getResourceGroupArn().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime().hashCode()); return hashCode; } @Override public Resource clone() { try { return (Resource) 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.ram.model.transform.ResourceMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy