/* * 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 content delivery network (CDN) distribution. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class LightsailDistribution implements Serializable, Cloneable, StructuredPojo { /** ** The name of the distribution. *
*/ private String name; /** ** The Amazon Resource Name (ARN) of the distribution. *
*/ private String arn; /** ** The support code. Include this code in your email to support when you have questions about your Lightsail * distribution. This code enables our support team to look up your Lightsail information more easily. *
*/ private String supportCode; /** ** The timestamp when the distribution was created. *
*/ private java.util.Date createdAt; /** ** An object that describes the location of the distribution, such as the Amazon Web Services Region and * Availability Zone. *
*
* Lightsail distributions are global resources that can reference an origin in any Amazon Web Services Region, and
* distribute its content globally. However, all distributions are located in the us-east-1
Region.
*
* The Lightsail resource type (e.g., Distribution
).
*
* The alternate domain names of the distribution. *
*/ private java.util.List* The status of the distribution. *
*/ private String status; /** ** Indicates whether the distribution is enabled. *
*/ private Boolean isEnabled; /** ** The domain name of the distribution. *
*/ private String domainName; /** ** The ID of the bundle currently applied to the distribution. *
*/ private String bundleId; /** ** The name of the SSL/TLS certificate attached to the distribution, if any. *
*/ private String certificateName; /** ** An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load * balancer. *
** The distribution pulls, caches, and serves content from the origin. *
*/ private Origin origin; /** ** The public DNS of the origin. *
*/ private String originPublicDNS; /** ** An object that describes the default cache behavior of the distribution. *
*/ private CacheBehavior defaultCacheBehavior; /** ** An object that describes the cache behavior settings of the distribution. *
*/ private CacheSettings cacheBehaviorSettings; /** ** An array of objects that describe the per-path cache behavior of the distribution. *
*/ private java.util.List
* Indicates whether the bundle that is currently applied to your distribution, specified using the
* distributionName
parameter, can be changed to another bundle.
*
* Use the UpdateDistributionBundle
action to change your distribution's bundle.
*
* The IP address type of the distribution. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer * Guide. *
*/ private java.util.List* The name of the distribution. *
* * @param name * The name of the distribution. */ public void setName(String name) { this.name = name; } /** ** The name of the distribution. *
* * @return The name of the distribution. */ public String getName() { return this.name; } /** ** The name of the distribution. *
* * @param name * The name of the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withName(String name) { setName(name); return this; } /** ** The Amazon Resource Name (ARN) of the distribution. *
* * @param arn * The Amazon Resource Name (ARN) of the distribution. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) of the distribution. *
* * @return The Amazon Resource Name (ARN) of the distribution. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name (ARN) of the distribution. *
* * @param arn * The Amazon Resource Name (ARN) of the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withArn(String arn) { setArn(arn); return this; } /** ** The support code. Include this code in your email to support when you have questions about your Lightsail * distribution. This code enables our support team to look up your Lightsail information more easily. *
* * @param supportCode * The support code. Include this code in your email to support when you have questions about your Lightsail * distribution. 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. Include this code in your email to support when you have questions about your Lightsail * distribution. This code enables our support team to look up your Lightsail information more easily. *
* * @return The support code. Include this code in your email to support when you have questions about your Lightsail * distribution. This code enables our support team to look up your Lightsail information more easily. */ public String getSupportCode() { return this.supportCode; } /** ** The support code. Include this code in your email to support when you have questions about your Lightsail * distribution. This code enables our support team to look up your Lightsail information more easily. *
* * @param supportCode * The support code. Include this code in your email to support when you have questions about your Lightsail * distribution. 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 LightsailDistribution withSupportCode(String supportCode) { setSupportCode(supportCode); 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 LightsailDistribution withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** ** An object that describes the location of the distribution, such as the Amazon Web Services Region and * Availability Zone. *
*
* Lightsail distributions are global resources that can reference an origin in any Amazon Web Services Region, and
* distribute its content globally. However, all distributions are located in the us-east-1
Region.
*
* Lightsail distributions are global resources that can reference an origin in any Amazon Web Services
* Region, and distribute its content globally. However, all distributions are located in the
* us-east-1
Region.
*
* An object that describes the location of the distribution, such as the Amazon Web Services Region and * Availability Zone. *
*
* Lightsail distributions are global resources that can reference an origin in any Amazon Web Services Region, and
* distribute its content globally. However, all distributions are located in the us-east-1
Region.
*
* Lightsail distributions are global resources that can reference an origin in any Amazon Web Services
* Region, and distribute its content globally. However, all distributions are located in the
* us-east-1
Region.
*
* An object that describes the location of the distribution, such as the Amazon Web Services Region and * Availability Zone. *
*
* Lightsail distributions are global resources that can reference an origin in any Amazon Web Services Region, and
* distribute its content globally. However, all distributions are located in the us-east-1
Region.
*
* Lightsail distributions are global resources that can reference an origin in any Amazon Web Services
* Region, and distribute its content globally. However, all distributions are located in the
* us-east-1
Region.
*
* The Lightsail resource type (e.g., Distribution
).
*
Distribution
).
* @see ResourceType
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* The Lightsail resource type (e.g., Distribution
).
*
Distribution
).
* @see ResourceType
*/
public String getResourceType() {
return this.resourceType;
}
/**
*
* The Lightsail resource type (e.g., Distribution
).
*
Distribution
).
* @return Returns a reference to this object so that method calls can be chained together.
* @see ResourceType
*/
public LightsailDistribution withResourceType(String resourceType) {
setResourceType(resourceType);
return this;
}
/**
*
* The Lightsail resource type (e.g., Distribution
).
*
Distribution
).
* @return Returns a reference to this object so that method calls can be chained together.
* @see ResourceType
*/
public LightsailDistribution withResourceType(ResourceType resourceType) {
this.resourceType = resourceType.toString();
return this;
}
/**
* * The alternate domain names of the distribution. *
* * @return The alternate domain names of the distribution. */ public java.util.List* The alternate domain names of the distribution. *
* * @param alternativeDomainNames * The alternate domain names of the distribution. */ public void setAlternativeDomainNames(java.util.Collection* The alternate domain names of the distribution. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAlternativeDomainNames(java.util.Collection)} or * {@link #withAlternativeDomainNames(java.util.Collection)} if you want to override the existing values. *
* * @param alternativeDomainNames * The alternate domain names of the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withAlternativeDomainNames(String... alternativeDomainNames) { if (this.alternativeDomainNames == null) { setAlternativeDomainNames(new java.util.ArrayList* The alternate domain names of the distribution. *
* * @param alternativeDomainNames * The alternate domain names of the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withAlternativeDomainNames(java.util.Collection* The status of the distribution. *
* * @param status * The status of the distribution. */ public void setStatus(String status) { this.status = status; } /** ** The status of the distribution. *
* * @return The status of the distribution. */ public String getStatus() { return this.status; } /** ** The status of the distribution. *
* * @param status * The status of the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withStatus(String status) { setStatus(status); return this; } /** ** Indicates whether the distribution is enabled. *
* * @param isEnabled * Indicates whether the distribution is enabled. */ public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } /** ** Indicates whether the distribution is enabled. *
* * @return Indicates whether the distribution is enabled. */ public Boolean getIsEnabled() { return this.isEnabled; } /** ** Indicates whether the distribution is enabled. *
* * @param isEnabled * Indicates whether the distribution is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withIsEnabled(Boolean isEnabled) { setIsEnabled(isEnabled); return this; } /** ** Indicates whether the distribution is enabled. *
* * @return Indicates whether the distribution is enabled. */ public Boolean isEnabled() { return this.isEnabled; } /** ** The domain name of the distribution. *
* * @param domainName * The domain name of the distribution. */ public void setDomainName(String domainName) { this.domainName = domainName; } /** ** The domain name of the distribution. *
* * @return The domain name of the distribution. */ public String getDomainName() { return this.domainName; } /** ** The domain name of the distribution. *
* * @param domainName * The domain name of the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withDomainName(String domainName) { setDomainName(domainName); return this; } /** ** The ID of the bundle currently applied to the distribution. *
* * @param bundleId * The ID of the bundle currently applied to the distribution. */ public void setBundleId(String bundleId) { this.bundleId = bundleId; } /** ** The ID of the bundle currently applied to the distribution. *
* * @return The ID of the bundle currently applied to the distribution. */ public String getBundleId() { return this.bundleId; } /** ** The ID of the bundle currently applied to the distribution. *
* * @param bundleId * The ID of the bundle currently applied to the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withBundleId(String bundleId) { setBundleId(bundleId); return this; } /** ** The name of the SSL/TLS certificate attached to the distribution, if any. *
* * @param certificateName * The name of the SSL/TLS certificate attached to the distribution, if any. */ public void setCertificateName(String certificateName) { this.certificateName = certificateName; } /** ** The name of the SSL/TLS certificate attached to the distribution, if any. *
* * @return The name of the SSL/TLS certificate attached to the distribution, if any. */ public String getCertificateName() { return this.certificateName; } /** ** The name of the SSL/TLS certificate attached to the distribution, if any. *
* * @param certificateName * The name of the SSL/TLS certificate attached to the distribution, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withCertificateName(String certificateName) { setCertificateName(certificateName); return this; } /** ** An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load * balancer. *
** The distribution pulls, caches, and serves content from the origin. *
* * @param origin * An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or * load balancer. ** The distribution pulls, caches, and serves content from the origin. */ public void setOrigin(Origin origin) { this.origin = origin; } /** *
* An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load * balancer. *
** The distribution pulls, caches, and serves content from the origin. *
* * @return An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, * or load balancer. ** The distribution pulls, caches, and serves content from the origin. */ public Origin getOrigin() { return this.origin; } /** *
* An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load * balancer. *
** The distribution pulls, caches, and serves content from the origin. *
* * @param origin * An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or * load balancer. ** The distribution pulls, caches, and serves content from the origin. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withOrigin(Origin origin) { setOrigin(origin); return this; } /** *
* The public DNS of the origin. *
* * @param originPublicDNS * The public DNS of the origin. */ public void setOriginPublicDNS(String originPublicDNS) { this.originPublicDNS = originPublicDNS; } /** ** The public DNS of the origin. *
* * @return The public DNS of the origin. */ public String getOriginPublicDNS() { return this.originPublicDNS; } /** ** The public DNS of the origin. *
* * @param originPublicDNS * The public DNS of the origin. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withOriginPublicDNS(String originPublicDNS) { setOriginPublicDNS(originPublicDNS); return this; } /** ** An object that describes the default cache behavior of the distribution. *
* * @param defaultCacheBehavior * An object that describes the default cache behavior of the distribution. */ public void setDefaultCacheBehavior(CacheBehavior defaultCacheBehavior) { this.defaultCacheBehavior = defaultCacheBehavior; } /** ** An object that describes the default cache behavior of the distribution. *
* * @return An object that describes the default cache behavior of the distribution. */ public CacheBehavior getDefaultCacheBehavior() { return this.defaultCacheBehavior; } /** ** An object that describes the default cache behavior of the distribution. *
* * @param defaultCacheBehavior * An object that describes the default cache behavior of the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withDefaultCacheBehavior(CacheBehavior defaultCacheBehavior) { setDefaultCacheBehavior(defaultCacheBehavior); return this; } /** ** An object that describes the cache behavior settings of the distribution. *
* * @param cacheBehaviorSettings * An object that describes the cache behavior settings of the distribution. */ public void setCacheBehaviorSettings(CacheSettings cacheBehaviorSettings) { this.cacheBehaviorSettings = cacheBehaviorSettings; } /** ** An object that describes the cache behavior settings of the distribution. *
* * @return An object that describes the cache behavior settings of the distribution. */ public CacheSettings getCacheBehaviorSettings() { return this.cacheBehaviorSettings; } /** ** An object that describes the cache behavior settings of the distribution. *
* * @param cacheBehaviorSettings * An object that describes the cache behavior settings of the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withCacheBehaviorSettings(CacheSettings cacheBehaviorSettings) { setCacheBehaviorSettings(cacheBehaviorSettings); return this; } /** ** An array of objects that describe the per-path cache behavior of the distribution. *
* * @return An array of objects that describe the per-path cache behavior of the distribution. */ public java.util.List* An array of objects that describe the per-path cache behavior of the distribution. *
* * @param cacheBehaviors * An array of objects that describe the per-path cache behavior of the distribution. */ public void setCacheBehaviors(java.util.Collection* An array of objects that describe the per-path cache behavior of the distribution. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCacheBehaviors(java.util.Collection)} or {@link #withCacheBehaviors(java.util.Collection)} if you want * to override the existing values. *
* * @param cacheBehaviors * An array of objects that describe the per-path cache behavior of the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withCacheBehaviors(CacheBehaviorPerPath... cacheBehaviors) { if (this.cacheBehaviors == null) { setCacheBehaviors(new java.util.ArrayList* An array of objects that describe the per-path cache behavior of the distribution. *
* * @param cacheBehaviors * An array of objects that describe the per-path cache behavior of the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withCacheBehaviors(java.util.Collection
* Indicates whether the bundle that is currently applied to your distribution, specified using the
* distributionName
parameter, can be changed to another bundle.
*
* Use the UpdateDistributionBundle
action to change your distribution's bundle.
*
distributionName
parameter, can be changed to another bundle.
*
* Use the UpdateDistributionBundle
action to change your distribution's bundle.
*/
public void setAbleToUpdateBundle(Boolean ableToUpdateBundle) {
this.ableToUpdateBundle = ableToUpdateBundle;
}
/**
*
* Indicates whether the bundle that is currently applied to your distribution, specified using the
* distributionName
parameter, can be changed to another bundle.
*
* Use the UpdateDistributionBundle
action to change your distribution's bundle.
*
distributionName
parameter, can be changed to another bundle.
*
* Use the UpdateDistributionBundle
action to change your distribution's bundle.
*/
public Boolean getAbleToUpdateBundle() {
return this.ableToUpdateBundle;
}
/**
*
* Indicates whether the bundle that is currently applied to your distribution, specified using the
* distributionName
parameter, can be changed to another bundle.
*
* Use the UpdateDistributionBundle
action to change your distribution's bundle.
*
distributionName
parameter, can be changed to another bundle.
*
* Use the UpdateDistributionBundle
action to change your distribution's bundle.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LightsailDistribution withAbleToUpdateBundle(Boolean ableToUpdateBundle) {
setAbleToUpdateBundle(ableToUpdateBundle);
return this;
}
/**
*
* Indicates whether the bundle that is currently applied to your distribution, specified using the
* distributionName
parameter, can be changed to another bundle.
*
* Use the UpdateDistributionBundle
action to change your distribution's bundle.
*
distributionName
parameter, can be changed to another bundle.
*
* Use the UpdateDistributionBundle
action to change your distribution's bundle.
*/
public Boolean isAbleToUpdateBundle() {
return this.ableToUpdateBundle;
}
/**
*
* The IP address type of the distribution. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
* @see IpAddressType
*/
public void setIpAddressType(String ipAddressType) {
this.ipAddressType = ipAddressType;
}
/**
*
* The IP address type of the distribution. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
* @see IpAddressType
*/
public String getIpAddressType() {
return this.ipAddressType;
}
/**
*
* The IP address type of the distribution. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public LightsailDistribution withIpAddressType(String ipAddressType) {
setIpAddressType(ipAddressType);
return this;
}
/**
*
* The IP address type of the distribution. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public LightsailDistribution withIpAddressType(IpAddressType ipAddressType) {
this.ipAddressType = ipAddressType.toString();
return this;
}
/**
*
* The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer * Guide. *
* * @return The tag keys and optional values for the resource. For more information about tags in Lightsail, see the * Amazon Lightsail * Developer Guide. */ public java.util.List* The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer * Guide. *
* * @param tags * The tag keys and optional values for the resource. For more information about tags in Lightsail, see the * Amazon Lightsail * Developer Guide. */ public void setTags(java.util.Collection* The tag keys and optional values for the resource. For more information about tags in Lightsail, see 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 resource. For more information about tags in Lightsail, see the * Amazon Lightsail * Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer * Guide. *
* * @param tags * The tag keys and optional values for the resource. For more information about tags in Lightsail, see the * Amazon Lightsail * Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withTags(java.util.Collection