/* * Copyright 2018-2023 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; /** *
* Information about an RAM permission. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ResourceSharePermissionSummary implements Serializable, Cloneable, StructuredPojo { /** ** The Amazon Resource Name * (ARN) of the permission you want information about. *
*/ private String arn; /** ** The version of the permission associated with this resource share. *
*/ private String version; /** ** Specifies whether the version of the managed permission used by this resource share is the default version for * this managed permission. *
*/ private Boolean defaultVersion; /** ** The name of this managed permission. *
*/ private String name; /** *
* The type of resource to which this permission applies. This takes the form of: service-code
:
* resource-code
, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by
* the string ec2:subnet
.
*
* The current status of the permission. *
*/ private String status; /** ** The date and time when the permission was created. *
*/ private java.util.Date creationTime; /** ** The date and time when the permission was last updated. *
*/ private java.util.Date lastUpdatedTime; /** ** Specifies whether the managed permission associated with this resource share is the default managed permission * for all resources of this resource type. *
*/ private Boolean isResourceTypeDefault; /** ** The type of managed permission. This can be one of the following values: *
*
* AWS_MANAGED
– Amazon Web Services created and manages this managed permission. You can associate it
* with your resource shares, but you can't modify it.
*
* CUSTOMER_MANAGED
– You, or another principal in your account created this managed permission. You
* can associate it with your resource shares and create new versions that have different permissions.
*
* Indicates what features are available for this resource share. This parameter can have one of the following * values: *
** STANDARD – A resource share that supports all functionality. These resource shares are visible to all * principals you share the resource share with. You can modify these resource shares in RAM using the console or * APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and * then promoted. *
** CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That * policy did not match any existing managed permissions, so RAM created this customer managed permission * automatically on the customer's behalf based on the attached policy document. This type of resource share is * visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote * it. For more information, see PromoteResourceShareCreatedFromPolicy. *
*
* PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY
, but the
* customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value
* changes to STANDARD
when complete.
*
* A list of the tag key value pairs currently attached to the permission. *
*/ private java.util.List* The Amazon Resource Name * (ARN) of the permission you want information about. *
* * @param arn * The Amazon Resource * Name (ARN) of the permission you want information about. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name * (ARN) of the permission you want information about. *
* * @return The Amazon Resource * Name (ARN) of the permission you want information about. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name * (ARN) of the permission you want information about. *
* * @param arn * The Amazon Resource * Name (ARN) of the permission you want information about. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceSharePermissionSummary withArn(String arn) { setArn(arn); return this; } /** ** The version of the permission associated with this resource share. *
* * @param version * The version of the permission associated with this resource share. */ public void setVersion(String version) { this.version = version; } /** ** The version of the permission associated with this resource share. *
* * @return The version of the permission associated with this resource share. */ public String getVersion() { return this.version; } /** ** The version of the permission associated with this resource share. *
* * @param version * The version of the permission associated with this resource share. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceSharePermissionSummary withVersion(String version) { setVersion(version); return this; } /** ** Specifies whether the version of the managed permission used by this resource share is the default version for * this managed permission. *
* * @param defaultVersion * Specifies whether the version of the managed permission used by this resource share is the default version * for this managed permission. */ public void setDefaultVersion(Boolean defaultVersion) { this.defaultVersion = defaultVersion; } /** ** Specifies whether the version of the managed permission used by this resource share is the default version for * this managed permission. *
* * @return Specifies whether the version of the managed permission used by this resource share is the default * version for this managed permission. */ public Boolean getDefaultVersion() { return this.defaultVersion; } /** ** Specifies whether the version of the managed permission used by this resource share is the default version for * this managed permission. *
* * @param defaultVersion * Specifies whether the version of the managed permission used by this resource share is the default version * for this managed permission. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceSharePermissionSummary withDefaultVersion(Boolean defaultVersion) { setDefaultVersion(defaultVersion); return this; } /** ** Specifies whether the version of the managed permission used by this resource share is the default version for * this managed permission. *
* * @return Specifies whether the version of the managed permission used by this resource share is the default * version for this managed permission. */ public Boolean isDefaultVersion() { return this.defaultVersion; } /** ** The name of this managed permission. *
* * @param name * The name of this managed permission. */ public void setName(String name) { this.name = name; } /** ** The name of this managed permission. *
* * @return The name of this managed permission. */ public String getName() { return this.name; } /** ** The name of this managed permission. *
* * @param name * The name of this managed permission. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceSharePermissionSummary withName(String name) { setName(name); return this; } /** *
* The type of resource to which this permission applies. This takes the form of: service-code
:
* resource-code
, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by
* the string ec2:subnet
.
*
service-code
:
* resource-code
, and is case-insensitive. For example, an Amazon EC2 Subnet would be
* represented by the string ec2:subnet
.
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* The type of resource to which this permission applies. This takes the form of: service-code
:
* resource-code
, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by
* the string ec2:subnet
.
*
service-code
:
* resource-code
, and is case-insensitive. For example, an Amazon EC2 Subnet would be
* represented by the string ec2:subnet
.
*/
public String getResourceType() {
return this.resourceType;
}
/**
*
* The type of resource to which this permission applies. This takes the form of: service-code
:
* resource-code
, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by
* the string ec2:subnet
.
*
service-code
:
* resource-code
, and is case-insensitive. For example, an Amazon EC2 Subnet would be
* represented by the string ec2:subnet
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResourceSharePermissionSummary withResourceType(String resourceType) {
setResourceType(resourceType);
return this;
}
/**
* * The current status of the permission. *
* * @param status * The current status of the permission. */ public void setStatus(String status) { this.status = status; } /** ** The current status of the permission. *
* * @return The current status of the permission. */ public String getStatus() { return this.status; } /** ** The current status of the permission. *
* * @param status * The current status of the permission. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceSharePermissionSummary withStatus(String status) { setStatus(status); return this; } /** ** The date and time when the permission was created. *
* * @param creationTime * The date and time when the permission was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** ** The date and time when the permission was created. *
* * @return The date and time when the permission was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** ** The date and time when the permission was created. *
* * @param creationTime * The date and time when the permission was created. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceSharePermissionSummary withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** ** The date and time when the permission was last updated. *
* * @param lastUpdatedTime * The date and time when the permission was last updated. */ public void setLastUpdatedTime(java.util.Date lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } /** ** The date and time when the permission was last updated. *
* * @return The date and time when the permission was last updated. */ public java.util.Date getLastUpdatedTime() { return this.lastUpdatedTime; } /** ** The date and time when the permission was last updated. *
* * @param lastUpdatedTime * The date and time when the permission was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceSharePermissionSummary withLastUpdatedTime(java.util.Date lastUpdatedTime) { setLastUpdatedTime(lastUpdatedTime); return this; } /** ** Specifies whether the managed permission associated with this resource share is the default managed permission * for all resources of this resource type. *
* * @param isResourceTypeDefault * Specifies whether the managed permission associated with this resource share is the default managed * permission for all resources of this resource type. */ public void setIsResourceTypeDefault(Boolean isResourceTypeDefault) { this.isResourceTypeDefault = isResourceTypeDefault; } /** ** Specifies whether the managed permission associated with this resource share is the default managed permission * for all resources of this resource type. *
* * @return Specifies whether the managed permission associated with this resource share is the default managed * permission for all resources of this resource type. */ public Boolean getIsResourceTypeDefault() { return this.isResourceTypeDefault; } /** ** Specifies whether the managed permission associated with this resource share is the default managed permission * for all resources of this resource type. *
* * @param isResourceTypeDefault * Specifies whether the managed permission associated with this resource share is the default managed * permission for all resources of this resource type. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceSharePermissionSummary withIsResourceTypeDefault(Boolean isResourceTypeDefault) { setIsResourceTypeDefault(isResourceTypeDefault); return this; } /** ** Specifies whether the managed permission associated with this resource share is the default managed permission * for all resources of this resource type. *
* * @return Specifies whether the managed permission associated with this resource share is the default managed * permission for all resources of this resource type. */ public Boolean isResourceTypeDefault() { return this.isResourceTypeDefault; } /** ** The type of managed permission. This can be one of the following values: *
*
* AWS_MANAGED
– Amazon Web Services created and manages this managed permission. You can associate it
* with your resource shares, but you can't modify it.
*
* CUSTOMER_MANAGED
– You, or another principal in your account created this managed permission. You
* can associate it with your resource shares and create new versions that have different permissions.
*
* AWS_MANAGED
– Amazon Web Services created and manages this managed permission. You can
* associate it with your resource shares, but you can't modify it.
*
* CUSTOMER_MANAGED
– You, or another principal in your account created this managed permission.
* You can associate it with your resource shares and create new versions that have different permissions.
*
* The type of managed permission. This can be one of the following values: *
*
* AWS_MANAGED
– Amazon Web Services created and manages this managed permission. You can associate it
* with your resource shares, but you can't modify it.
*
* CUSTOMER_MANAGED
– You, or another principal in your account created this managed permission. You
* can associate it with your resource shares and create new versions that have different permissions.
*
* AWS_MANAGED
– Amazon Web Services created and manages this managed permission. You can
* associate it with your resource shares, but you can't modify it.
*
* CUSTOMER_MANAGED
– You, or another principal in your account created this managed
* permission. You can associate it with your resource shares and create new versions that have different
* permissions.
*
* The type of managed permission. This can be one of the following values: *
*
* AWS_MANAGED
– Amazon Web Services created and manages this managed permission. You can associate it
* with your resource shares, but you can't modify it.
*
* CUSTOMER_MANAGED
– You, or another principal in your account created this managed permission. You
* can associate it with your resource shares and create new versions that have different permissions.
*
* AWS_MANAGED
– Amazon Web Services created and manages this managed permission. You can
* associate it with your resource shares, but you can't modify it.
*
* CUSTOMER_MANAGED
– You, or another principal in your account created this managed permission.
* You can associate it with your resource shares and create new versions that have different permissions.
*
* The type of managed permission. This can be one of the following values: *
*
* AWS_MANAGED
– Amazon Web Services created and manages this managed permission. You can associate it
* with your resource shares, but you can't modify it.
*
* CUSTOMER_MANAGED
– You, or another principal in your account created this managed permission. You
* can associate it with your resource shares and create new versions that have different permissions.
*
* AWS_MANAGED
– Amazon Web Services created and manages this managed permission. You can
* associate it with your resource shares, but you can't modify it.
*
* CUSTOMER_MANAGED
– You, or another principal in your account created this managed permission.
* You can associate it with your resource shares and create new versions that have different permissions.
*
* Indicates what features are available for this resource share. This parameter can have one of the following * values: *
** STANDARD – A resource share that supports all functionality. These resource shares are visible to all * principals you share the resource share with. You can modify these resource shares in RAM using the console or * APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and * then promoted. *
** CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That * policy did not match any existing managed permissions, so RAM created this customer managed permission * automatically on the customer's behalf based on the attached policy document. This type of resource share is * visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote * it. For more information, see PromoteResourceShareCreatedFromPolicy. *
*
* PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY
, but the
* customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value
* changes to STANDARD
when complete.
*
* STANDARD – A resource share that supports all functionality. These resource shares are visible to * all principals you share the resource share with. You can modify these resource shares in RAM using the * console or APIs. This resource share might have been created by RAM, or it might have been * CREATED_FROM_POLICY and then promoted. *
** CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. * That policy did not match any existing managed permissions, so RAM created this customer managed * permission automatically on the customer's behalf based on the attached policy document. This type of * resource share is visible only to the Amazon Web Services account that created it. You can't modify it in * RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy. *
*
* PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY
, but
* the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress.
* This value changes to STANDARD
when complete.
*
* Indicates what features are available for this resource share. This parameter can have one of the following * values: *
** STANDARD – A resource share that supports all functionality. These resource shares are visible to all * principals you share the resource share with. You can modify these resource shares in RAM using the console or * APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and * then promoted. *
** CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That * policy did not match any existing managed permissions, so RAM created this customer managed permission * automatically on the customer's behalf based on the attached policy document. This type of resource share is * visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote * it. For more information, see PromoteResourceShareCreatedFromPolicy. *
*
* PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY
, but the
* customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value
* changes to STANDARD
when complete.
*
* STANDARD – A resource share that supports all functionality. These resource shares are visible to * all principals you share the resource share with. You can modify these resource shares in RAM using the * console or APIs. This resource share might have been created by RAM, or it might have been * CREATED_FROM_POLICY and then promoted. *
** CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based * policy. That policy did not match any existing managed permissions, so RAM created this customer managed * permission automatically on the customer's behalf based on the attached policy document. This type of * resource share is visible only to the Amazon Web Services account that created it. You can't modify it in * RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy. *
*
* PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY
, but
* the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in
* progress. This value changes to STANDARD
when complete.
*
* Indicates what features are available for this resource share. This parameter can have one of the following * values: *
** STANDARD – A resource share that supports all functionality. These resource shares are visible to all * principals you share the resource share with. You can modify these resource shares in RAM using the console or * APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and * then promoted. *
** CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That * policy did not match any existing managed permissions, so RAM created this customer managed permission * automatically on the customer's behalf based on the attached policy document. This type of resource share is * visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote * it. For more information, see PromoteResourceShareCreatedFromPolicy. *
*
* PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY
, but the
* customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value
* changes to STANDARD
when complete.
*
* STANDARD – A resource share that supports all functionality. These resource shares are visible to * all principals you share the resource share with. You can modify these resource shares in RAM using the * console or APIs. This resource share might have been created by RAM, or it might have been * CREATED_FROM_POLICY and then promoted. *
** CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. * That policy did not match any existing managed permissions, so RAM created this customer managed * permission automatically on the customer's behalf based on the attached policy document. This type of * resource share is visible only to the Amazon Web Services account that created it. You can't modify it in * RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy. *
*
* PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY
, but
* the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress.
* This value changes to STANDARD
when complete.
*
* Indicates what features are available for this resource share. This parameter can have one of the following * values: *
** STANDARD – A resource share that supports all functionality. These resource shares are visible to all * principals you share the resource share with. You can modify these resource shares in RAM using the console or * APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and * then promoted. *
** CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That * policy did not match any existing managed permissions, so RAM created this customer managed permission * automatically on the customer's behalf based on the attached policy document. This type of resource share is * visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote * it. For more information, see PromoteResourceShareCreatedFromPolicy. *
*
* PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY
, but the
* customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value
* changes to STANDARD
when complete.
*
* STANDARD – A resource share that supports all functionality. These resource shares are visible to * all principals you share the resource share with. You can modify these resource shares in RAM using the * console or APIs. This resource share might have been created by RAM, or it might have been * CREATED_FROM_POLICY and then promoted. *
** CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. * That policy did not match any existing managed permissions, so RAM created this customer managed * permission automatically on the customer's behalf based on the attached policy document. This type of * resource share is visible only to the Amazon Web Services account that created it. You can't modify it in * RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy. *
*
* PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY
, but
* the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress.
* This value changes to STANDARD
when complete.
*
* A list of the tag key value pairs currently attached to the permission. *
* * @return A list of the tag key value pairs currently attached to the permission. */ public java.util.List* A list of the tag key value pairs currently attached to the permission. *
* * @param tags * A list of the tag key value pairs currently attached to the permission. */ public void setTags(java.util.Collection* A list of the tag key value pairs currently attached to the permission. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * A list of the tag key value pairs currently attached to the permission. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceSharePermissionSummary withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* A list of the tag key value pairs currently attached to the permission. *
* * @param tags * A list of the tag key value pairs currently attached to the permission. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceSharePermissionSummary withTags(java.util.Collection