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.model;
 

A complex type that lists the AWS accounts that were included in the TrustedSigners complex type, as well as their active CloudFront key pair IDs, if any.

 
 public class Signer implements SerializableCloneable {

    
Specifies an AWS account that can create signed URLs. Values: self, which indicates that the AWS account that was used to create the distribution can created signed URLs, or an AWS account number. Omit the dashes in the account number.
 
     private String awsAccountNumber;

    
A complex type that lists the active CloudFront key pairs, if any, that are associated with AwsAccountNumber.
 
     private KeyPairIds keyPairIds;

    
Default constructor for a new Signer object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public Signer() {}
    
    
Specifies an AWS account that can create signed URLs. Values: self, which indicates that the AWS account that was used to create the distribution can created signed URLs, or an AWS account number. Omit the dashes in the account number.

Returns:
Specifies an AWS account that can create signed URLs. Values: self, which indicates that the AWS account that was used to create the distribution can created signed URLs, or an AWS account number. Omit the dashes in the account number.
 
     public String getAwsAccountNumber() {
         return ;
     }
    
    
Specifies an AWS account that can create signed URLs. Values: self, which indicates that the AWS account that was used to create the distribution can created signed URLs, or an AWS account number. Omit the dashes in the account number.

Parameters:
awsAccountNumber Specifies an AWS account that can create signed URLs. Values: self, which indicates that the AWS account that was used to create the distribution can created signed URLs, or an AWS account number. Omit the dashes in the account number.
 
     public void setAwsAccountNumber(String awsAccountNumber) {
         this. = awsAccountNumber;
     }
    
    
Specifies an AWS account that can create signed URLs. Values: self, which indicates that the AWS account that was used to create the distribution can created signed URLs, or an AWS account number. Omit the dashes in the account number.

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

Parameters:
awsAccountNumber Specifies an AWS account that can create signed URLs. Values: self, which indicates that the AWS account that was used to create the distribution can created signed URLs, or an AWS account number. Omit the dashes in the account number.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Signer withAwsAccountNumber(String awsAccountNumber) {
         this. = awsAccountNumber;
         return this;
     }

    
A complex type that lists the active CloudFront key pairs, if any, that are associated with AwsAccountNumber.

Returns:
A complex type that lists the active CloudFront key pairs, if any, that are associated with AwsAccountNumber.
    public KeyPairIds getKeyPairIds() {
        return ;
    }
    
    
A complex type that lists the active CloudFront key pairs, if any, that are associated with AwsAccountNumber.

Parameters:
keyPairIds A complex type that lists the active CloudFront key pairs, if any, that are associated with AwsAccountNumber.
    public void setKeyPairIds(KeyPairIds keyPairIds) {
        this. = keyPairIds;
    }
    
    
A complex type that lists the active CloudFront key pairs, if any, that are associated with AwsAccountNumber.

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

Parameters:
keyPairIds A complex type that lists the active CloudFront key pairs, if any, that are associated with AwsAccountNumber.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Signer withKeyPairIds(KeyPairIds keyPairIds) {
        this. = keyPairIds;
        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 (getAwsAccountNumber() != nullsb.append("AwsAccountNumber: " + getAwsAccountNumber() + ",");
        if (getKeyPairIds() != nullsb.append("KeyPairIds: " + getKeyPairIds() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getAwsAccountNumber() == null) ? 0 : getAwsAccountNumber().hashCode()); 
        hashCode = prime * hashCode + ((getKeyPairIds() == null) ? 0 : getKeyPairIds().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof Signer == falsereturn false;
        Signer other = (Signer)obj;
        
        if (other.getAwsAccountNumber() == null ^ this.getAwsAccountNumber() == nullreturn false;
        if (other.getAwsAccountNumber() != null && other.getAwsAccountNumber().equals(this.getAwsAccountNumber()) == falsereturn false
        if (other.getKeyPairIds() == null ^ this.getKeyPairIds() == nullreturn false;
        if (other.getKeyPairIds() != null && other.getKeyPairIds().equals(this.getKeyPairIds()) == falsereturn false
        return true;
    }
    
    @Override
    public Signer clone() {
        try {
            return (Signersuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X