/* * 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.lightsail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes an Amazon Lightsail bucket. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Bucket implements Serializable, Cloneable, StructuredPojo { /** *
* The Lightsail resource type of the bucket (for example, Bucket
).
*
* An object that describes the access rules of the bucket. *
*/ private AccessRules accessRules; /** ** The Amazon Resource Name (ARN) of the bucket. *
*/ private String arn; /** ** The ID of the bundle currently applied to the bucket. *
** A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket. *
** Use the * UpdateBucketBundle action to change the bundle of a bucket. *
*/ private String bundleId; /** ** The timestamp when the distribution was created. *
*/ private java.util.Date createdAt; /** ** The URL of the bucket. *
*/ private String url; /** ** An object that describes the location of the bucket, such as the Amazon Web Services Region and Availability * Zone. *
*/ private ResourceLocation location; /** ** The name of the bucket. *
*/ private String name; /** ** The support code for a bucket. Include this code in your email to support when you have questions about a * Lightsail bucket. This code enables our support team to look up your Lightsail information more easily. *
*/ private String supportCode; /** ** The tag keys and optional values for the bucket. For more information, see Tags in Amazon Lightsail in * the Amazon Lightsail Developer Guide. *
*/ private java.util.List* Indicates whether object versioning is enabled for the bucket. *
** The following options can be configured: *
*
* Enabled
- Object versioning is enabled.
*
* Suspended
- Object versioning was previously enabled but is currently suspended. Existing object
* versions are retained.
*
* NeverEnabled
- Object versioning has never been enabled.
*
* Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle. *
** You can update a bucket's bundle only one time within a monthly Amazon Web Services billing cycle. *
** Use the * UpdateBucketBundle action to change a bucket's bundle. *
*/ private Boolean ableToUpdateBundle; /** ** An array of strings that specify the Amazon Web Services account IDs that have read-only access to the bucket. *
*/ private java.util.List* An array of objects that describe Lightsail instances that have access to the bucket. *
** Use the SetResourceAccessForBucket action to update the instances that have access to a bucket. *
*/ private java.util.List* An object that describes the state of the bucket. *
*/ private BucketState state; /** ** An object that describes the access log configuration for the bucket. *
*/ private BucketAccessLogConfig accessLogConfig; /** *
* The Lightsail resource type of the bucket (for example, Bucket
).
*
Bucket
).
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* The Lightsail resource type of the bucket (for example, Bucket
).
*
Bucket
).
*/
public String getResourceType() {
return this.resourceType;
}
/**
*
* The Lightsail resource type of the bucket (for example, Bucket
).
*
Bucket
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Bucket withResourceType(String resourceType) {
setResourceType(resourceType);
return this;
}
/**
* * An object that describes the access rules of the bucket. *
* * @param accessRules * An object that describes the access rules of the bucket. */ public void setAccessRules(AccessRules accessRules) { this.accessRules = accessRules; } /** ** An object that describes the access rules of the bucket. *
* * @return An object that describes the access rules of the bucket. */ public AccessRules getAccessRules() { return this.accessRules; } /** ** An object that describes the access rules of the bucket. *
* * @param accessRules * An object that describes the access rules of the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withAccessRules(AccessRules accessRules) { setAccessRules(accessRules); return this; } /** ** The Amazon Resource Name (ARN) of the bucket. *
* * @param arn * The Amazon Resource Name (ARN) of the bucket. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) of the bucket. *
* * @return The Amazon Resource Name (ARN) of the bucket. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name (ARN) of the bucket. *
* * @param arn * The Amazon Resource Name (ARN) of the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withArn(String arn) { setArn(arn); return this; } /** ** The ID of the bundle currently applied to the bucket. *
** A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket. *
** Use the * UpdateBucketBundle action to change the bundle of a bucket. *
* * @param bundleId * The ID of the bundle currently applied to the bucket. ** A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket. *
** Use the UpdateBucketBundle action to change the bundle of a bucket. */ public void setBundleId(String bundleId) { this.bundleId = bundleId; } /** *
* The ID of the bundle currently applied to the bucket. *
** A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket. *
** Use the * UpdateBucketBundle action to change the bundle of a bucket. *
* * @return The ID of the bundle currently applied to the bucket. ** A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket. *
** Use the UpdateBucketBundle action to change the bundle of a bucket. */ public String getBundleId() { return this.bundleId; } /** *
* The ID of the bundle currently applied to the bucket. *
** A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket. *
** Use the * UpdateBucketBundle action to change the bundle of a bucket. *
* * @param bundleId * The ID of the bundle currently applied to the bucket. ** A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket. *
** Use the UpdateBucketBundle action to change the bundle of a bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withBundleId(String bundleId) { setBundleId(bundleId); return this; } /** *
* The timestamp when the distribution was created. *
* * @param createdAt * The timestamp when the distribution was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** ** The timestamp when the distribution was created. *
* * @return The timestamp when the distribution was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** ** The timestamp when the distribution was created. *
* * @param createdAt * The timestamp when the distribution was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** ** The URL of the bucket. *
* * @param url * The URL of the bucket. */ public void setUrl(String url) { this.url = url; } /** ** The URL of the bucket. *
* * @return The URL of the bucket. */ public String getUrl() { return this.url; } /** ** The URL of the bucket. *
* * @param url * The URL of the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withUrl(String url) { setUrl(url); return this; } /** ** An object that describes the location of the bucket, such as the Amazon Web Services Region and Availability * Zone. *
* * @param location * An object that describes the location of the bucket, such as the Amazon Web Services Region and * Availability Zone. */ public void setLocation(ResourceLocation location) { this.location = location; } /** ** An object that describes the location of the bucket, such as the Amazon Web Services Region and Availability * Zone. *
* * @return An object that describes the location of the bucket, such as the Amazon Web Services Region and * Availability Zone. */ public ResourceLocation getLocation() { return this.location; } /** ** An object that describes the location of the bucket, such as the Amazon Web Services Region and Availability * Zone. *
* * @param location * An object that describes the location of the bucket, such as the Amazon Web Services Region and * Availability Zone. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withLocation(ResourceLocation location) { setLocation(location); return this; } /** ** The name of the bucket. *
* * @param name * The name of the bucket. */ public void setName(String name) { this.name = name; } /** ** The name of the bucket. *
* * @return The name of the bucket. */ public String getName() { return this.name; } /** ** The name of the bucket. *
* * @param name * The name of the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withName(String name) { setName(name); return this; } /** ** The support code for a bucket. Include this code in your email to support when you have questions about a * Lightsail bucket. This code enables our support team to look up your Lightsail information more easily. *
* * @param supportCode * The support code for a bucket. Include this code in your email to support when you have questions about a * Lightsail bucket. This code enables our support team to look up your Lightsail information more easily. */ public void setSupportCode(String supportCode) { this.supportCode = supportCode; } /** ** The support code for a bucket. Include this code in your email to support when you have questions about a * Lightsail bucket. This code enables our support team to look up your Lightsail information more easily. *
* * @return The support code for a bucket. Include this code in your email to support when you have questions about a * Lightsail bucket. This code enables our support team to look up your Lightsail information more easily. */ public String getSupportCode() { return this.supportCode; } /** ** The support code for a bucket. Include this code in your email to support when you have questions about a * Lightsail bucket. This code enables our support team to look up your Lightsail information more easily. *
* * @param supportCode * The support code for a bucket. Include this code in your email to support when you have questions about a * Lightsail bucket. This code enables our support team to look up your Lightsail information more easily. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withSupportCode(String supportCode) { setSupportCode(supportCode); return this; } /** ** The tag keys and optional values for the bucket. For more information, see Tags in Amazon Lightsail in * the Amazon Lightsail Developer Guide. *
* * @return The tag keys and optional values for the bucket. For more information, see Tags in Amazon * Lightsail in the Amazon Lightsail Developer Guide. */ public java.util.List* The tag keys and optional values for the bucket. For more information, see Tags in Amazon Lightsail in * the Amazon Lightsail Developer Guide. *
* * @param tags * The tag keys and optional values for the bucket. For more information, see Tags in Amazon * Lightsail in the Amazon Lightsail Developer Guide. */ public void setTags(java.util.Collection* The tag keys and optional values for the bucket. For more information, see Tags in Amazon Lightsail in * the Amazon Lightsail Developer Guide. *
** 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 * The tag keys and optional values for the bucket. For more information, see Tags in Amazon * Lightsail in the Amazon Lightsail Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* The tag keys and optional values for the bucket. For more information, see Tags in Amazon Lightsail in * the Amazon Lightsail Developer Guide. *
* * @param tags * The tag keys and optional values for the bucket. For more information, see Tags in Amazon * Lightsail in the Amazon Lightsail Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withTags(java.util.Collection* Indicates whether object versioning is enabled for the bucket. *
** The following options can be configured: *
*
* Enabled
- Object versioning is enabled.
*
* Suspended
- Object versioning was previously enabled but is currently suspended. Existing object
* versions are retained.
*
* NeverEnabled
- Object versioning has never been enabled.
*
* The following options can be configured: *
*
* Enabled
- Object versioning is enabled.
*
* Suspended
- Object versioning was previously enabled but is currently suspended. Existing
* object versions are retained.
*
* NeverEnabled
- Object versioning has never been enabled.
*
* Indicates whether object versioning is enabled for the bucket. *
** The following options can be configured: *
*
* Enabled
- Object versioning is enabled.
*
* Suspended
- Object versioning was previously enabled but is currently suspended. Existing object
* versions are retained.
*
* NeverEnabled
- Object versioning has never been enabled.
*
* The following options can be configured: *
*
* Enabled
- Object versioning is enabled.
*
* Suspended
- Object versioning was previously enabled but is currently suspended. Existing
* object versions are retained.
*
* NeverEnabled
- Object versioning has never been enabled.
*
* Indicates whether object versioning is enabled for the bucket. *
** The following options can be configured: *
*
* Enabled
- Object versioning is enabled.
*
* Suspended
- Object versioning was previously enabled but is currently suspended. Existing object
* versions are retained.
*
* NeverEnabled
- Object versioning has never been enabled.
*
* The following options can be configured: *
*
* Enabled
- Object versioning is enabled.
*
* Suspended
- Object versioning was previously enabled but is currently suspended. Existing
* object versions are retained.
*
* NeverEnabled
- Object versioning has never been enabled.
*
* Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle. *
** You can update a bucket's bundle only one time within a monthly Amazon Web Services billing cycle. *
** Use the * UpdateBucketBundle action to change a bucket's bundle. *
* * @param ableToUpdateBundle * Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle. ** You can update a bucket's bundle only one time within a monthly Amazon Web Services billing cycle. *
** Use the UpdateBucketBundle action to change a bucket's bundle. */ public void setAbleToUpdateBundle(Boolean ableToUpdateBundle) { this.ableToUpdateBundle = ableToUpdateBundle; } /** *
* Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle. *
** You can update a bucket's bundle only one time within a monthly Amazon Web Services billing cycle. *
** Use the * UpdateBucketBundle action to change a bucket's bundle. *
* * @return Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle. ** You can update a bucket's bundle only one time within a monthly Amazon Web Services billing cycle. *
** Use the UpdateBucketBundle action to change a bucket's bundle. */ public Boolean getAbleToUpdateBundle() { return this.ableToUpdateBundle; } /** *
* Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle. *
** You can update a bucket's bundle only one time within a monthly Amazon Web Services billing cycle. *
** Use the * UpdateBucketBundle action to change a bucket's bundle. *
* * @param ableToUpdateBundle * Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle. ** You can update a bucket's bundle only one time within a monthly Amazon Web Services billing cycle. *
** Use the UpdateBucketBundle action to change a bucket's bundle. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withAbleToUpdateBundle(Boolean ableToUpdateBundle) { setAbleToUpdateBundle(ableToUpdateBundle); return this; } /** *
* Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle. *
** You can update a bucket's bundle only one time within a monthly Amazon Web Services billing cycle. *
** Use the * UpdateBucketBundle action to change a bucket's bundle. *
* * @return Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle. ** You can update a bucket's bundle only one time within a monthly Amazon Web Services billing cycle. *
** Use the UpdateBucketBundle action to change a bucket's bundle. */ public Boolean isAbleToUpdateBundle() { return this.ableToUpdateBundle; } /** *
* An array of strings that specify the Amazon Web Services account IDs that have read-only access to the bucket. *
* * @return An array of strings that specify the Amazon Web Services account IDs that have read-only access to the * bucket. */ public java.util.List* An array of strings that specify the Amazon Web Services account IDs that have read-only access to the bucket. *
* * @param readonlyAccessAccounts * An array of strings that specify the Amazon Web Services account IDs that have read-only access to the * bucket. */ public void setReadonlyAccessAccounts(java.util.Collection* An array of strings that specify the Amazon Web Services account IDs that have read-only access to the bucket. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setReadonlyAccessAccounts(java.util.Collection)} or * {@link #withReadonlyAccessAccounts(java.util.Collection)} if you want to override the existing values. *
* * @param readonlyAccessAccounts * An array of strings that specify the Amazon Web Services account IDs that have read-only access to the * bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withReadonlyAccessAccounts(String... readonlyAccessAccounts) { if (this.readonlyAccessAccounts == null) { setReadonlyAccessAccounts(new java.util.ArrayList* An array of strings that specify the Amazon Web Services account IDs that have read-only access to the bucket. *
* * @param readonlyAccessAccounts * An array of strings that specify the Amazon Web Services account IDs that have read-only access to the * bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public Bucket withReadonlyAccessAccounts(java.util.Collection* An array of objects that describe Lightsail instances that have access to the bucket. *
** Use the SetResourceAccessForBucket action to update the instances that have access to a bucket. *
* * @return An array of objects that describe Lightsail instances that have access to the bucket. *
* Use the SetResourceAccessForBucket action to update the instances that have access to a bucket.
*/
public java.util.List
* An array of objects that describe Lightsail instances that have access to the bucket.
*
* Use the SetResourceAccessForBucket action to update the instances that have access to a bucket.
*
* Use the SetResourceAccessForBucket action to update the instances that have access to a bucket.
*/
public void setResourcesReceivingAccess(java.util.Collection
* An array of objects that describe Lightsail instances that have access to the bucket.
*
* Use the SetResourceAccessForBucket action to update the instances that have access to a bucket.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setResourcesReceivingAccess(java.util.Collection)} or
* {@link #withResourcesReceivingAccess(java.util.Collection)} if you want to override the existing values.
*
* Use the SetResourceAccessForBucket action to update the instances that have access to a bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Bucket withResourcesReceivingAccess(ResourceReceivingAccess... resourcesReceivingAccess) {
if (this.resourcesReceivingAccess == null) {
setResourcesReceivingAccess(new java.util.ArrayList
* An array of objects that describe Lightsail instances that have access to the bucket.
*
* Use the SetResourceAccessForBucket action to update the instances that have access to a bucket.
*
* Use the SetResourceAccessForBucket action to update the instances that have access to a bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Bucket withResourcesReceivingAccess(java.util.Collection
* An object that describes the state of the bucket.
*
* An object that describes the state of the bucket.
*
* An object that describes the state of the bucket.
*
* An object that describes the access log configuration for the bucket.
*
* An object that describes the access log configuration for the bucket.
*
* An object that describes the access log configuration for the bucket.
*