com.amazonaws.services.cloudfront.model.CopyDistributionRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudfront Show documentation
/*
* Copyright 2017-2022 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.cloudfront.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 CopyDistributionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The identifier of the primary distribution whose configuration you are copying. To get a distribution ID, use
* ListDistributions
.
*
*/
private String primaryDistributionId;
/**
*
* The type of distribution that your primary distribution will be copied to. The only valid value is
* True
, indicating that you are copying to a staging distribution.
*
*/
private Boolean staging;
/**
*
* The version identifier of the primary distribution whose configuration you are copying. This is the
* ETag
value returned in the response to GetDistribution
and
* GetDistributionConfig
.
*
*/
private String ifMatch;
/**
*
* A value that uniquely identifies a request to create a resource. This helps to prevent CloudFront from creating a
* duplicate resource if you accidentally resubmit an identical request.
*
*/
private String callerReference;
/**
*
* The identifier of the primary distribution whose configuration you are copying. To get a distribution ID, use
* ListDistributions
.
*
*
* @param primaryDistributionId
* The identifier of the primary distribution whose configuration you are copying. To get a distribution ID,
* use ListDistributions
.
*/
public void setPrimaryDistributionId(String primaryDistributionId) {
this.primaryDistributionId = primaryDistributionId;
}
/**
*
* The identifier of the primary distribution whose configuration you are copying. To get a distribution ID, use
* ListDistributions
.
*
*
* @return The identifier of the primary distribution whose configuration you are copying. To get a distribution ID,
* use ListDistributions
.
*/
public String getPrimaryDistributionId() {
return this.primaryDistributionId;
}
/**
*
* The identifier of the primary distribution whose configuration you are copying. To get a distribution ID, use
* ListDistributions
.
*
*
* @param primaryDistributionId
* The identifier of the primary distribution whose configuration you are copying. To get a distribution ID,
* use ListDistributions
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopyDistributionRequest withPrimaryDistributionId(String primaryDistributionId) {
setPrimaryDistributionId(primaryDistributionId);
return this;
}
/**
*
* The type of distribution that your primary distribution will be copied to. The only valid value is
* True
, indicating that you are copying to a staging distribution.
*
*
* @param staging
* The type of distribution that your primary distribution will be copied to. The only valid value is
* True
, indicating that you are copying to a staging distribution.
*/
public void setStaging(Boolean staging) {
this.staging = staging;
}
/**
*
* The type of distribution that your primary distribution will be copied to. The only valid value is
* True
, indicating that you are copying to a staging distribution.
*
*
* @return The type of distribution that your primary distribution will be copied to. The only valid value is
* True
, indicating that you are copying to a staging distribution.
*/
public Boolean getStaging() {
return this.staging;
}
/**
*
* The type of distribution that your primary distribution will be copied to. The only valid value is
* True
, indicating that you are copying to a staging distribution.
*
*
* @param staging
* The type of distribution that your primary distribution will be copied to. The only valid value is
* True
, indicating that you are copying to a staging distribution.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopyDistributionRequest withStaging(Boolean staging) {
setStaging(staging);
return this;
}
/**
*
* The type of distribution that your primary distribution will be copied to. The only valid value is
* True
, indicating that you are copying to a staging distribution.
*
*
* @return The type of distribution that your primary distribution will be copied to. The only valid value is
* True
, indicating that you are copying to a staging distribution.
*/
public Boolean isStaging() {
return this.staging;
}
/**
*
* The version identifier of the primary distribution whose configuration you are copying. This is the
* ETag
value returned in the response to GetDistribution
and
* GetDistributionConfig
.
*
*
* @param ifMatch
* The version identifier of the primary distribution whose configuration you are copying. This is the
* ETag
value returned in the response to GetDistribution
and
* GetDistributionConfig
.
*/
public void setIfMatch(String ifMatch) {
this.ifMatch = ifMatch;
}
/**
*
* The version identifier of the primary distribution whose configuration you are copying. This is the
* ETag
value returned in the response to GetDistribution
and
* GetDistributionConfig
.
*
*
* @return The version identifier of the primary distribution whose configuration you are copying. This is the
* ETag
value returned in the response to GetDistribution
and
* GetDistributionConfig
.
*/
public String getIfMatch() {
return this.ifMatch;
}
/**
*
* The version identifier of the primary distribution whose configuration you are copying. This is the
* ETag
value returned in the response to GetDistribution
and
* GetDistributionConfig
.
*
*
* @param ifMatch
* The version identifier of the primary distribution whose configuration you are copying. This is the
* ETag
value returned in the response to GetDistribution
and
* GetDistributionConfig
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopyDistributionRequest withIfMatch(String ifMatch) {
setIfMatch(ifMatch);
return this;
}
/**
*
* A value that uniquely identifies a request to create a resource. This helps to prevent CloudFront from creating a
* duplicate resource if you accidentally resubmit an identical request.
*
*
* @param callerReference
* A value that uniquely identifies a request to create a resource. This helps to prevent CloudFront from
* creating a duplicate resource if you accidentally resubmit an identical request.
*/
public void setCallerReference(String callerReference) {
this.callerReference = callerReference;
}
/**
*
* A value that uniquely identifies a request to create a resource. This helps to prevent CloudFront from creating a
* duplicate resource if you accidentally resubmit an identical request.
*
*
* @return A value that uniquely identifies a request to create a resource. This helps to prevent CloudFront from
* creating a duplicate resource if you accidentally resubmit an identical request.
*/
public String getCallerReference() {
return this.callerReference;
}
/**
*
* A value that uniquely identifies a request to create a resource. This helps to prevent CloudFront from creating a
* duplicate resource if you accidentally resubmit an identical request.
*
*
* @param callerReference
* A value that uniquely identifies a request to create a resource. This helps to prevent CloudFront from
* creating a duplicate resource if you accidentally resubmit an identical request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopyDistributionRequest withCallerReference(String callerReference) {
setCallerReference(callerReference);
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 (getPrimaryDistributionId() != null)
sb.append("PrimaryDistributionId: ").append(getPrimaryDistributionId()).append(",");
if (getStaging() != null)
sb.append("Staging: ").append(getStaging()).append(",");
if (getIfMatch() != null)
sb.append("IfMatch: ").append(getIfMatch()).append(",");
if (getCallerReference() != null)
sb.append("CallerReference: ").append(getCallerReference());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CopyDistributionRequest == false)
return false;
CopyDistributionRequest other = (CopyDistributionRequest) obj;
if (other.getPrimaryDistributionId() == null ^ this.getPrimaryDistributionId() == null)
return false;
if (other.getPrimaryDistributionId() != null && other.getPrimaryDistributionId().equals(this.getPrimaryDistributionId()) == false)
return false;
if (other.getStaging() == null ^ this.getStaging() == null)
return false;
if (other.getStaging() != null && other.getStaging().equals(this.getStaging()) == false)
return false;
if (other.getIfMatch() == null ^ this.getIfMatch() == null)
return false;
if (other.getIfMatch() != null && other.getIfMatch().equals(this.getIfMatch()) == false)
return false;
if (other.getCallerReference() == null ^ this.getCallerReference() == null)
return false;
if (other.getCallerReference() != null && other.getCallerReference().equals(this.getCallerReference()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getPrimaryDistributionId() == null) ? 0 : getPrimaryDistributionId().hashCode());
hashCode = prime * hashCode + ((getStaging() == null) ? 0 : getStaging().hashCode());
hashCode = prime * hashCode + ((getIfMatch() == null) ? 0 : getIfMatch().hashCode());
hashCode = prime * hashCode + ((getCallerReference() == null) ? 0 : getCallerReference().hashCode());
return hashCode;
}
@Override
public CopyDistributionRequest clone() {
return (CopyDistributionRequest) super.clone();
}
}