/* * 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. *

*
*/ private ResourceLocation location; /** *

* The Lightsail resource type (e.g., Distribution). *

*/ private String resourceType; /** *

* The alternate domain names of the distribution. *

*/ private java.util.List alternativeDomainNames; /** *

* 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 cacheBehaviors; /** *

* 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. *

*/ private Boolean ableToUpdateBundle; /** *

* The IP address type of the distribution. *

*

* The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. *

*/ private String ipAddressType; /** *

* 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 tags; /** *

* 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. *

*
* * @param location * 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. *

*/ public void setLocation(ResourceLocation location) { this.location = location; } /** *

* 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. *

*
* * @return 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. *

*/ public ResourceLocation getLocation() { return this.location; } /** *

* 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. *

*
* * @param location * 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. *

* @return Returns a reference to this object so that method calls can be chained together. */ public LightsailDistribution withLocation(ResourceLocation location) { setLocation(location); return this; } /** *

* The Lightsail resource type (e.g., Distribution). *

* * @param resourceType * The Lightsail resource type (e.g., Distribution). * @see ResourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** *

* The Lightsail resource type (e.g., Distribution). *

* * @return The Lightsail resource type (e.g., Distribution). * @see ResourceType */ public String getResourceType() { return this.resourceType; } /** *

* The Lightsail resource type (e.g., Distribution). *

* * @param resourceType * The Lightsail resource type (e.g., 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). *

* * @param resourceType * The Lightsail resource type (e.g., 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 getAlternativeDomainNames() { return alternativeDomainNames; } /** *

* The alternate domain names of the distribution. *

* * @param alternativeDomainNames * The alternate domain names of the distribution. */ public void setAlternativeDomainNames(java.util.Collection alternativeDomainNames) { if (alternativeDomainNames == null) { this.alternativeDomainNames = null; return; } this.alternativeDomainNames = new java.util.ArrayList(alternativeDomainNames); } /** *

* 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(alternativeDomainNames.length)); } for (String ele : alternativeDomainNames) { this.alternativeDomainNames.add(ele); } return this; } /** *

* 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 alternativeDomainNames) { setAlternativeDomainNames(alternativeDomainNames); return this; } /** *

* 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 getCacheBehaviors() { return cacheBehaviors; } /** *

* 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 cacheBehaviors) { if (cacheBehaviors == null) { this.cacheBehaviors = null; return; } this.cacheBehaviors = new java.util.ArrayList(cacheBehaviors); } /** *

* 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(cacheBehaviors.length)); } for (CacheBehaviorPerPath ele : cacheBehaviors) { this.cacheBehaviors.add(ele); } return this; } /** *

* 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 cacheBehaviors) { setCacheBehaviors(cacheBehaviors); 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. *

* * @param 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. */ 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. *

* * @return 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. */ 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. *

* * @param 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. * @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. *

* * @return 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. */ 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. *

* * @param ipAddressType * The IP address type of the distribution.

*

* 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. *

* * @return The IP address type of the distribution.

*

* 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. *

* * @param ipAddressType * The IP address type of the distribution.

*

* 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. *

* * @param ipAddressType * The IP address type of the distribution.

*

* 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 getTags() { return tags; } /** *

* 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 tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* 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(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* 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 tags) { setTags(tags); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getSupportCode() != null) sb.append("SupportCode: ").append(getSupportCode()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getLocation() != null) sb.append("Location: ").append(getLocation()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getAlternativeDomainNames() != null) sb.append("AlternativeDomainNames: ").append(getAlternativeDomainNames()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getIsEnabled() != null) sb.append("IsEnabled: ").append(getIsEnabled()).append(","); if (getDomainName() != null) sb.append("DomainName: ").append(getDomainName()).append(","); if (getBundleId() != null) sb.append("BundleId: ").append(getBundleId()).append(","); if (getCertificateName() != null) sb.append("CertificateName: ").append(getCertificateName()).append(","); if (getOrigin() != null) sb.append("Origin: ").append(getOrigin()).append(","); if (getOriginPublicDNS() != null) sb.append("OriginPublicDNS: ").append(getOriginPublicDNS()).append(","); if (getDefaultCacheBehavior() != null) sb.append("DefaultCacheBehavior: ").append(getDefaultCacheBehavior()).append(","); if (getCacheBehaviorSettings() != null) sb.append("CacheBehaviorSettings: ").append(getCacheBehaviorSettings()).append(","); if (getCacheBehaviors() != null) sb.append("CacheBehaviors: ").append(getCacheBehaviors()).append(","); if (getAbleToUpdateBundle() != null) sb.append("AbleToUpdateBundle: ").append(getAbleToUpdateBundle()).append(","); if (getIpAddressType() != null) sb.append("IpAddressType: ").append(getIpAddressType()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LightsailDistribution == false) return false; LightsailDistribution other = (LightsailDistribution) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getSupportCode() == null ^ this.getSupportCode() == null) return false; if (other.getSupportCode() != null && other.getSupportCode().equals(this.getSupportCode()) == 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.getLocation() == null ^ this.getLocation() == null) return false; if (other.getLocation() != null && other.getLocation().equals(this.getLocation()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getAlternativeDomainNames() == null ^ this.getAlternativeDomainNames() == null) return false; if (other.getAlternativeDomainNames() != null && other.getAlternativeDomainNames().equals(this.getAlternativeDomainNames()) == 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.getIsEnabled() == null ^ this.getIsEnabled() == null) return false; if (other.getIsEnabled() != null && other.getIsEnabled().equals(this.getIsEnabled()) == false) return false; if (other.getDomainName() == null ^ this.getDomainName() == null) return false; if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false) return false; if (other.getBundleId() == null ^ this.getBundleId() == null) return false; if (other.getBundleId() != null && other.getBundleId().equals(this.getBundleId()) == false) return false; if (other.getCertificateName() == null ^ this.getCertificateName() == null) return false; if (other.getCertificateName() != null && other.getCertificateName().equals(this.getCertificateName()) == false) return false; if (other.getOrigin() == null ^ this.getOrigin() == null) return false; if (other.getOrigin() != null && other.getOrigin().equals(this.getOrigin()) == false) return false; if (other.getOriginPublicDNS() == null ^ this.getOriginPublicDNS() == null) return false; if (other.getOriginPublicDNS() != null && other.getOriginPublicDNS().equals(this.getOriginPublicDNS()) == false) return false; if (other.getDefaultCacheBehavior() == null ^ this.getDefaultCacheBehavior() == null) return false; if (other.getDefaultCacheBehavior() != null && other.getDefaultCacheBehavior().equals(this.getDefaultCacheBehavior()) == false) return false; if (other.getCacheBehaviorSettings() == null ^ this.getCacheBehaviorSettings() == null) return false; if (other.getCacheBehaviorSettings() != null && other.getCacheBehaviorSettings().equals(this.getCacheBehaviorSettings()) == false) return false; if (other.getCacheBehaviors() == null ^ this.getCacheBehaviors() == null) return false; if (other.getCacheBehaviors() != null && other.getCacheBehaviors().equals(this.getCacheBehaviors()) == false) return false; if (other.getAbleToUpdateBundle() == null ^ this.getAbleToUpdateBundle() == null) return false; if (other.getAbleToUpdateBundle() != null && other.getAbleToUpdateBundle().equals(this.getAbleToUpdateBundle()) == false) return false; if (other.getIpAddressType() == null ^ this.getIpAddressType() == null) return false; if (other.getIpAddressType() != null && other.getIpAddressType().equals(this.getIpAddressType()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getSupportCode() == null) ? 0 : getSupportCode().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getLocation() == null) ? 0 : getLocation().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getAlternativeDomainNames() == null) ? 0 : getAlternativeDomainNames().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getIsEnabled() == null) ? 0 : getIsEnabled().hashCode()); hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode()); hashCode = prime * hashCode + ((getBundleId() == null) ? 0 : getBundleId().hashCode()); hashCode = prime * hashCode + ((getCertificateName() == null) ? 0 : getCertificateName().hashCode()); hashCode = prime * hashCode + ((getOrigin() == null) ? 0 : getOrigin().hashCode()); hashCode = prime * hashCode + ((getOriginPublicDNS() == null) ? 0 : getOriginPublicDNS().hashCode()); hashCode = prime * hashCode + ((getDefaultCacheBehavior() == null) ? 0 : getDefaultCacheBehavior().hashCode()); hashCode = prime * hashCode + ((getCacheBehaviorSettings() == null) ? 0 : getCacheBehaviorSettings().hashCode()); hashCode = prime * hashCode + ((getCacheBehaviors() == null) ? 0 : getCacheBehaviors().hashCode()); hashCode = prime * hashCode + ((getAbleToUpdateBundle() == null) ? 0 : getAbleToUpdateBundle().hashCode()); hashCode = prime * hashCode + ((getIpAddressType() == null) ? 0 : getIpAddressType().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public LightsailDistribution clone() { try { return (LightsailDistribution) 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.lightsail.model.transform.LightsailDistributionMarshaller.getInstance().marshall(this, protocolMarshaller); } }