/* * 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.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDistributionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name for the distribution. *
*/ private String distributionName; /** ** An object that describes the origin resource for the distribution, such as a Lightsail instance, bucket, or load * balancer. *
** The distribution pulls, caches, and serves content from the origin. *
*/ private InputOrigin origin; /** ** An object that describes the default cache behavior for the distribution. *
*/ private CacheBehavior defaultCacheBehavior; /** ** An object that describes the cache behavior settings for the distribution. *
*/ private CacheSettings cacheBehaviorSettings; /** ** An array of objects that describe the per-path cache behavior for the distribution. *
*/ private java.util.List* The bundle ID to use for the distribution. *
** A distribution bundle describes the specifications of your distribution, such as the monthly cost and monthly * network transfer quota. *
*
* Use the GetDistributionBundles
action to get a list of distribution bundle IDs that you can specify.
*
* The IP address type for the distribution. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
*
* The tag keys and optional values to add to the distribution during create. *
*
* Use the TagResource
action to tag a resource after it's created.
*
* The name for the distribution. *
* * @param distributionName * The name for the distribution. */ public void setDistributionName(String distributionName) { this.distributionName = distributionName; } /** ** The name for the distribution. *
* * @return The name for the distribution. */ public String getDistributionName() { return this.distributionName; } /** ** The name for the distribution. *
* * @param distributionName * The name for the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDistributionRequest withDistributionName(String distributionName) { setDistributionName(distributionName); return this; } /** ** An object that describes the origin resource for 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 for the distribution, such as a Lightsail instance, bucket, * or load balancer. ** The distribution pulls, caches, and serves content from the origin. */ public void setOrigin(InputOrigin origin) { this.origin = origin; } /** *
* An object that describes the origin resource for 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 for the distribution, such as a Lightsail instance, bucket, * or load balancer. ** The distribution pulls, caches, and serves content from the origin. */ public InputOrigin getOrigin() { return this.origin; } /** *
* An object that describes the origin resource for 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 for 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 CreateDistributionRequest withOrigin(InputOrigin origin) { setOrigin(origin); return this; } /** *
* An object that describes the default cache behavior for the distribution. *
* * @param defaultCacheBehavior * An object that describes the default cache behavior for the distribution. */ public void setDefaultCacheBehavior(CacheBehavior defaultCacheBehavior) { this.defaultCacheBehavior = defaultCacheBehavior; } /** ** An object that describes the default cache behavior for the distribution. *
* * @return An object that describes the default cache behavior for the distribution. */ public CacheBehavior getDefaultCacheBehavior() { return this.defaultCacheBehavior; } /** ** An object that describes the default cache behavior for the distribution. *
* * @param defaultCacheBehavior * An object that describes the default cache behavior for the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDistributionRequest withDefaultCacheBehavior(CacheBehavior defaultCacheBehavior) { setDefaultCacheBehavior(defaultCacheBehavior); return this; } /** ** An object that describes the cache behavior settings for the distribution. *
* * @param cacheBehaviorSettings * An object that describes the cache behavior settings for the distribution. */ public void setCacheBehaviorSettings(CacheSettings cacheBehaviorSettings) { this.cacheBehaviorSettings = cacheBehaviorSettings; } /** ** An object that describes the cache behavior settings for the distribution. *
* * @return An object that describes the cache behavior settings for the distribution. */ public CacheSettings getCacheBehaviorSettings() { return this.cacheBehaviorSettings; } /** ** An object that describes the cache behavior settings for the distribution. *
* * @param cacheBehaviorSettings * An object that describes the cache behavior settings for the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDistributionRequest withCacheBehaviorSettings(CacheSettings cacheBehaviorSettings) { setCacheBehaviorSettings(cacheBehaviorSettings); return this; } /** ** An array of objects that describe the per-path cache behavior for the distribution. *
* * @return An array of objects that describe the per-path cache behavior for the distribution. */ public java.util.List* An array of objects that describe the per-path cache behavior for the distribution. *
* * @param cacheBehaviors * An array of objects that describe the per-path cache behavior for the distribution. */ public void setCacheBehaviors(java.util.Collection* An array of objects that describe the per-path cache behavior for 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 for the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDistributionRequest withCacheBehaviors(CacheBehaviorPerPath... cacheBehaviors) { if (this.cacheBehaviors == null) { setCacheBehaviors(new java.util.ArrayList* An array of objects that describe the per-path cache behavior for the distribution. *
* * @param cacheBehaviors * An array of objects that describe the per-path cache behavior for the distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDistributionRequest withCacheBehaviors(java.util.Collection* The bundle ID to use for the distribution. *
** A distribution bundle describes the specifications of your distribution, such as the monthly cost and monthly * network transfer quota. *
*
* Use the GetDistributionBundles
action to get a list of distribution bundle IDs that you can specify.
*
* A distribution bundle describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota. *
*
* Use the GetDistributionBundles
action to get a list of distribution bundle IDs that you can
* specify.
*/
public void setBundleId(String bundleId) {
this.bundleId = bundleId;
}
/**
*
* The bundle ID to use for the distribution. *
** A distribution bundle describes the specifications of your distribution, such as the monthly cost and monthly * network transfer quota. *
*
* Use the GetDistributionBundles
action to get a list of distribution bundle IDs that you can specify.
*
* A distribution bundle describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota. *
*
* Use the GetDistributionBundles
action to get a list of distribution bundle IDs that you can
* specify.
*/
public String getBundleId() {
return this.bundleId;
}
/**
*
* The bundle ID to use for the distribution. *
** A distribution bundle describes the specifications of your distribution, such as the monthly cost and monthly * network transfer quota. *
*
* Use the GetDistributionBundles
action to get a list of distribution bundle IDs that you can specify.
*
* A distribution bundle describes the specifications of your distribution, such as the monthly cost and * monthly network transfer quota. *
*
* Use the GetDistributionBundles
action to get a list of distribution bundle IDs that you can
* specify.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDistributionRequest withBundleId(String bundleId) {
setBundleId(bundleId);
return this;
}
/**
*
* The IP address type for the distribution. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
* @see IpAddressType
*/
public void setIpAddressType(String ipAddressType) {
this.ipAddressType = ipAddressType;
}
/**
*
* The IP address type for the distribution. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
* @see IpAddressType
*/
public String getIpAddressType() {
return this.ipAddressType;
}
/**
*
* The IP address type for the distribution. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public CreateDistributionRequest withIpAddressType(String ipAddressType) {
setIpAddressType(ipAddressType);
return this;
}
/**
*
* The IP address type for the distribution. *
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
* The default value is dualstack
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public CreateDistributionRequest withIpAddressType(IpAddressType ipAddressType) {
this.ipAddressType = ipAddressType.toString();
return this;
}
/**
*
* The tag keys and optional values to add to the distribution during create. *
*
* Use the TagResource
action to tag a resource after it's created.
*
* Use the
* The tag keys and optional values to add to the distribution during create.
*
* Use the TagResource
action to tag a resource after it's created.
*/
public java.util.ListTagResource
action to tag a resource after it's created.
*
* Use the
* The tag keys and optional values to add to the distribution during create.
*
* Use the
* 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.
* TagResource
action to tag a resource after it's created.
*/
public void setTags(java.util.CollectionTagResource
action to tag a resource after it's created.
*
* Use the
* The tag keys and optional values to add to the distribution during create.
*
* Use the TagResource
action to tag a resource after it's created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDistributionRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayListTagResource
action to tag a resource after it's created.
*
* Use the TagResource
action to tag a resource after it's created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDistributionRequest withTags(java.util.Collection