Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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_2012_03_15.model;

The configuration for the streaming distribution.

 
 public class StreamingDistributionConfig {

    
S3 Origin information to associate with the distribution.
 
     private S3Origin s3Origin;

    
A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the StreamingDistributionConfig object), a new streaming distribution is created. If the CallerReference is a value you already sent in a previous request to create a streaming distribution, and the content of the StreamingDistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a streaming distribution but the content of the StreamingDistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.
 
     private String callerReference;

    
A CNAME alias you want to associate with this streaming distribution. You can have up to 10 CNAME aliases per streaming distribution. Only include a CNAME element if you have a CNAME to associate with the distribution. Don't include an empty CNAME element in the StreamingDistributionConfig object. If you do, CloudFront returns a MalformedXML error.
 
     private java.util.List<StringcNAME;

    
Any comments you want to include about the streaming distribution.
 
     private String comment;

    
Whether the streaming distribution is enabled to accept end user requests for content.
 
     private Boolean enabled;

    
A complex type that controls whether access logs are written for the streaming distribution. If you want to turn on access logs, include this element; if you want to turn off access logs, remove this element.
 
     private LoggingConfig logging;

    
A complex type that specifies any AWS accounts you want to permit to create signed URLs for private content. If you want the distribution to use signed URLs, include this element; if you want the distribution to use basic URLs, remove this element.
 
     private TrustedSigners trustedSigners;

    
Default constructor for a new StreamingDistributionConfig object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public StreamingDistributionConfig() {}
    
    
Constructs a new StreamingDistributionConfig object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
s3Origin S3 Origin information to associate with the distribution.
callerReference A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the StreamingDistributionConfig object), a new streaming distribution is created. If the CallerReference is a value you already sent in a previous request to create a streaming distribution, and the content of the StreamingDistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a streaming distribution but the content of the StreamingDistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.
enabled Whether the streaming distribution is enabled to accept end user requests for content.
    public StreamingDistributionConfig(S3Origin s3OriginString callerReferenceBoolean enabled) {
        this. = s3Origin;
        this. = callerReference;
        this. = enabled;
    }

    
    
    
S3 Origin information to associate with the distribution.

Returns:
S3 Origin information to associate with the distribution.
    public S3Origin getS3Origin() {
        return ;
    }
    
    
S3 Origin information to associate with the distribution.

Parameters:
s3Origin S3 Origin information to associate with the distribution.
    public void setS3Origin(S3Origin s3Origin) {
        this. = s3Origin;
    }
    
    
S3 Origin information to associate with the distribution.

Returns a reference to this object so that method calls can be chained together.

Parameters:
s3Origin S3 Origin information to associate with the distribution.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = s3Origin;
        return this;
    }
    
    
    
A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the StreamingDistributionConfig object), a new streaming distribution is created. If the CallerReference is a value you already sent in a previous request to create a streaming distribution, and the content of the StreamingDistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a streaming distribution but the content of the StreamingDistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.

Returns:
A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the StreamingDistributionConfig object), a new streaming distribution is created. If the CallerReference is a value you already sent in a previous request to create a streaming distribution, and the content of the StreamingDistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a streaming distribution but the content of the StreamingDistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.
    public String getCallerReference() {
        return ;
    }
    
    
A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the StreamingDistributionConfig object), a new streaming distribution is created. If the CallerReference is a value you already sent in a previous request to create a streaming distribution, and the content of the StreamingDistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a streaming distribution but the content of the StreamingDistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.

Parameters:
callerReference A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the StreamingDistributionConfig object), a new streaming distribution is created. If the CallerReference is a value you already sent in a previous request to create a streaming distribution, and the content of the StreamingDistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a streaming distribution but the content of the StreamingDistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.
    public void setCallerReference(String callerReference) {
        this. = callerReference;
    }
    
    
A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the StreamingDistributionConfig object), a new streaming distribution is created. If the CallerReference is a value you already sent in a previous request to create a streaming distribution, and the content of the StreamingDistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a streaming distribution but the content of the StreamingDistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.

Returns a reference to this object so that method calls can be chained together.

Parameters:
callerReference A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the StreamingDistributionConfig object), a new streaming distribution is created. If the CallerReference is a value you already sent in a previous request to create a streaming distribution, and the content of the StreamingDistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a streaming distribution but the content of the StreamingDistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StreamingDistributionConfig withCallerReference(String callerReference) {
        this. = callerReference;
        return this;
    }
    
    
    
A CNAME alias you want to associate with this streaming distribution. You can have up to 10 CNAME aliases per streaming distribution. Only include a CNAME element if you have a CNAME to associate with the distribution. Don't include an empty CNAME element in the StreamingDistributionConfig object. If you do, CloudFront returns a MalformedXML error.

Returns:
A CNAME alias you want to associate with this streaming distribution. You can have up to 10 CNAME aliases per streaming distribution. Only include a CNAME element if you have a CNAME to associate with the distribution. Don't include an empty CNAME element in the StreamingDistributionConfig object. If you do, CloudFront returns a MalformedXML error.
    public java.util.List<StringgetCNAME() {
        
        if ( == null) {
             = new java.util.ArrayList<String>();
        }
        return ;
    }
    
    
A CNAME alias you want to associate with this streaming distribution. You can have up to 10 CNAME aliases per streaming distribution. Only include a CNAME element if you have a CNAME to associate with the distribution. Don't include an empty CNAME element in the StreamingDistributionConfig object. If you do, CloudFront returns a MalformedXML error.

Parameters:
cNAME A CNAME alias you want to associate with this streaming distribution. You can have up to 10 CNAME aliases per streaming distribution. Only include a CNAME element if you have a CNAME to associate with the distribution. Don't include an empty CNAME element in the StreamingDistributionConfig object. If you do, CloudFront returns a MalformedXML error.
    public void setCNAME(java.util.Collection<StringcNAME) {
        if (cNAME == null) {
            this. = null;
            return;
        }
        java.util.List<StringcNAMECopy = new java.util.ArrayList<String>(cNAME.size());
        cNAMECopy.addAll(cNAME);
        this. = cNAMECopy;
    }
    
    
A CNAME alias you want to associate with this streaming distribution. You can have up to 10 CNAME aliases per streaming distribution. Only include a CNAME element if you have a CNAME to associate with the distribution. Don't include an empty CNAME element in the StreamingDistributionConfig object. If you do, CloudFront returns a MalformedXML error.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cNAME A CNAME alias you want to associate with this streaming distribution. You can have up to 10 CNAME aliases per streaming distribution. Only include a CNAME element if you have a CNAME to associate with the distribution. Don't include an empty CNAME element in the StreamingDistributionConfig object. If you do, CloudFront returns a MalformedXML error.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StreamingDistributionConfig withCNAME(String... cNAME) {
        if (getCNAME() == nullsetCNAME(new java.util.ArrayList<String>(cNAME.length));
        for (String value : cNAME) {
            getCNAME().add(value);
        }
        return this;
    }
    
    
A CNAME alias you want to associate with this streaming distribution. You can have up to 10 CNAME aliases per streaming distribution. Only include a CNAME element if you have a CNAME to associate with the distribution. Don't include an empty CNAME element in the StreamingDistributionConfig object. If you do, CloudFront returns a MalformedXML error.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cNAME A CNAME alias you want to associate with this streaming distribution. You can have up to 10 CNAME aliases per streaming distribution. Only include a CNAME element if you have a CNAME to associate with the distribution. Don't include an empty CNAME element in the StreamingDistributionConfig object. If you do, CloudFront returns a MalformedXML error.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (cNAME == null) {
            this. = null;
        } else {
            java.util.List<StringcNAMECopy = new java.util.ArrayList<String>(cNAME.size());
            cNAMECopy.addAll(cNAME);
            this. = cNAMECopy;
        }
        return this;
    }
    
    
Any comments you want to include about the streaming distribution.

Returns:
Any comments you want to include about the streaming distribution.
    public String getComment() {
        return ;
    }
    
    
Any comments you want to include about the streaming distribution.

Parameters:
comment Any comments you want to include about the streaming distribution.
    public void setComment(String comment) {
        this. = comment;
    }
    
    
Any comments you want to include about the streaming distribution.

Returns a reference to this object so that method calls can be chained together.

Parameters:
comment Any comments you want to include about the streaming distribution.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StreamingDistributionConfig withComment(String comment) {
        this. = comment;
        return this;
    }
    
    
    
Whether the streaming distribution is enabled to accept end user requests for content.

Returns:
Whether the streaming distribution is enabled to accept end user requests for content.
    public Boolean isEnabled() {
        return ;
    }
    
    
Whether the streaming distribution is enabled to accept end user requests for content.

Parameters:
enabled Whether the streaming distribution is enabled to accept end user requests for content.
    public void setEnabled(Boolean enabled) {
        this. = enabled;
    }
    
    
Whether the streaming distribution is enabled to accept end user requests for content.

Returns a reference to this object so that method calls can be chained together.

Parameters:
enabled Whether the streaming distribution is enabled to accept end user requests for content.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StreamingDistributionConfig withEnabled(Boolean enabled) {
        this. = enabled;
        return this;
    }
    
    
    
Whether the streaming distribution is enabled to accept end user requests for content.

Returns:
Whether the streaming distribution is enabled to accept end user requests for content.
    public Boolean getEnabled() {
        return ;
    }
    
    
A complex type that controls whether access logs are written for the streaming distribution. If you want to turn on access logs, include this element; if you want to turn off access logs, remove this element.

Returns:
A complex type that controls whether access logs are written for the streaming distribution. If you want to turn on access logs, include this element; if you want to turn off access logs, remove this element.
    public LoggingConfig getLogging() {
        return ;
    }
    
    
A complex type that controls whether access logs are written for the streaming distribution. If you want to turn on access logs, include this element; if you want to turn off access logs, remove this element.

Parameters:
logging A complex type that controls whether access logs are written for the streaming distribution. If you want to turn on access logs, include this element; if you want to turn off access logs, remove this element.
    public void setLogging(LoggingConfig logging) {
        this. = logging;
    }
    
    
A complex type that controls whether access logs are written for the streaming distribution. If you want to turn on access logs, include this element; if you want to turn off access logs, remove this element.

Returns a reference to this object so that method calls can be chained together.

Parameters:
logging A complex type that controls whether access logs are written for the streaming distribution. If you want to turn on access logs, include this element; if you want to turn off access logs, remove this element.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = logging;
        return this;
    }
    
    
    
A complex type that specifies any AWS accounts you want to permit to create signed URLs for private content. If you want the distribution to use signed URLs, include this element; if you want the distribution to use basic URLs, remove this element.

Returns:
A complex type that specifies any AWS accounts you want to permit to create signed URLs for private content. If you want the distribution to use signed URLs, include this element; if you want the distribution to use basic URLs, remove this element.
    public TrustedSigners getTrustedSigners() {
        return ;
    }
    
    
A complex type that specifies any AWS accounts you want to permit to create signed URLs for private content. If you want the distribution to use signed URLs, include this element; if you want the distribution to use basic URLs, remove this element.

Parameters:
trustedSigners A complex type that specifies any AWS accounts you want to permit to create signed URLs for private content. If you want the distribution to use signed URLs, include this element; if you want the distribution to use basic URLs, remove this element.
    public void setTrustedSigners(TrustedSigners trustedSigners) {
        this. = trustedSigners;
    }
    
    
A complex type that specifies any AWS accounts you want to permit to create signed URLs for private content. If you want the distribution to use signed URLs, include this element; if you want the distribution to use basic URLs, remove this element.

Returns a reference to this object so that method calls can be chained together.

Parameters:
trustedSigners A complex type that specifies any AWS accounts you want to permit to create signed URLs for private content. If you want the distribution to use signed URLs, include this element; if you want the distribution to use basic URLs, remove this element.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = trustedSigners;
        return this;
    }
    
    
    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if ( != nullsb.append("S3Origin: " +  + ", ");
        if ( != nullsb.append("CallerReference: " +  + ", ");
        if ( != nullsb.append("CNAME: " +  + ", ");
        if ( != nullsb.append("Comment: " +  + ", ");
        if ( != nullsb.append("Enabled: " +  + ", ");
        if ( != nullsb.append("Logging: " +  + ", ");
        if ( != nullsb.append("TrustedSigners: " +  + ", ");
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getS3Origin() == null) ? 0 : getS3Origin().hashCode()); 
        hashCode = prime * hashCode + ((getCallerReference() == null) ? 0 : getCallerReference().hashCode()); 
        hashCode = prime * hashCode + ((getCNAME() == null) ? 0 : getCNAME().hashCode()); 
        hashCode = prime * hashCode + ((getComment() == null) ? 0 : getComment().hashCode()); 
        hashCode = prime * hashCode + ((isEnabled() == null) ? 0 : isEnabled().hashCode()); 
        hashCode = prime * hashCode + ((getLogging() == null) ? 0 : getLogging().hashCode()); 
        hashCode = prime * hashCode + ((getTrustedSigners() == null) ? 0 : getTrustedSigners().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
    
        if (obj instanceof StreamingDistributionConfig == falsereturn false;
        
        if (other.getS3Origin() == null ^ this.getS3Origin() == nullreturn false;
        if (other.getS3Origin() != null && other.getS3Origin().equals(this.getS3Origin()) == falsereturn false
        if (other.getCallerReference() == null ^ this.getCallerReference() == nullreturn false;
        if (other.getCallerReference() != null && other.getCallerReference().equals(this.getCallerReference()) == falsereturn false
        if (other.getCNAME() == null ^ this.getCNAME() == nullreturn false;
        if (other.getCNAME() != null && other.getCNAME().equals(this.getCNAME()) == falsereturn false
        if (other.getComment() == null ^ this.getComment() == nullreturn false;
        if (other.getComment() != null && other.getComment().equals(this.getComment()) == falsereturn false
        if (other.isEnabled() == null ^ this.isEnabled() == nullreturn false;
        if (other.isEnabled() != null && other.isEnabled().equals(this.isEnabled()) == falsereturn false
        if (other.getLogging() == null ^ this.getLogging() == nullreturn false;
        if (other.getLogging() != null && other.getLogging().equals(this.getLogging()) == falsereturn false
        if (other.getTrustedSigners() == null ^ this.getTrustedSigners() == nullreturn false;
        if (other.getTrustedSigners() != null && other.getTrustedSigners().equals(this.getTrustedSigners()) == falsereturn false
        return true;
    }
    
}
    
New to GrepCode? Check out our FAQ X