All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.cloudfront.model.OriginAccessControlSummary Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CloudFront module holds the client classes that are used for communicating with Amazon CloudFront Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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;

/**
 * 

* A CloudFront origin access control. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class OriginAccessControlSummary implements Serializable, Cloneable { /** *

* The unique identifier of the origin access control. *

*/ private String id; /** *

* A description of the origin access control. *

*/ private String description; /** *

* A unique name that identifies the origin access control. *

*/ private String name; /** *

* The signing protocol of the origin access control. The signing protocol determines how CloudFront signs * (authenticates) requests. The only valid value is sigv4. *

*/ private String signingProtocol; /** *

* A value that specifies which requests CloudFront signs (adds authentication information to). This field can have * one of the following values: *

*
    *
  • *

    * never – CloudFront doesn't sign any origin requests. *

    *
  • *
  • *

    * always – CloudFront signs all origin requests, overwriting the Authorization header * from the viewer request if necessary. *

    *
  • *
  • *

    * no-override – If the viewer request doesn't contain the Authorization header, * CloudFront signs the origin request. If the viewer request contains the Authorization header, * CloudFront doesn't sign the origin request, but instead passes along the Authorization header that * it received in the viewer request. *

    *
  • *
*/ private String signingBehavior; /** *

* The type of origin that this origin access control is for. The only valid value is s3. *

*/ private String originAccessControlOriginType; /** *

* The unique identifier of the origin access control. *

* * @param id * The unique identifier of the origin access control. */ public void setId(String id) { this.id = id; } /** *

* The unique identifier of the origin access control. *

* * @return The unique identifier of the origin access control. */ public String getId() { return this.id; } /** *

* The unique identifier of the origin access control. *

* * @param id * The unique identifier of the origin access control. * @return Returns a reference to this object so that method calls can be chained together. */ public OriginAccessControlSummary withId(String id) { setId(id); return this; } /** *

* A description of the origin access control. *

* * @param description * A description of the origin access control. */ public void setDescription(String description) { this.description = description; } /** *

* A description of the origin access control. *

* * @return A description of the origin access control. */ public String getDescription() { return this.description; } /** *

* A description of the origin access control. *

* * @param description * A description of the origin access control. * @return Returns a reference to this object so that method calls can be chained together. */ public OriginAccessControlSummary withDescription(String description) { setDescription(description); return this; } /** *

* A unique name that identifies the origin access control. *

* * @param name * A unique name that identifies the origin access control. */ public void setName(String name) { this.name = name; } /** *

* A unique name that identifies the origin access control. *

* * @return A unique name that identifies the origin access control. */ public String getName() { return this.name; } /** *

* A unique name that identifies the origin access control. *

* * @param name * A unique name that identifies the origin access control. * @return Returns a reference to this object so that method calls can be chained together. */ public OriginAccessControlSummary withName(String name) { setName(name); return this; } /** *

* The signing protocol of the origin access control. The signing protocol determines how CloudFront signs * (authenticates) requests. The only valid value is sigv4. *

* * @param signingProtocol * The signing protocol of the origin access control. The signing protocol determines how CloudFront signs * (authenticates) requests. The only valid value is sigv4. * @see OriginAccessControlSigningProtocols */ public void setSigningProtocol(String signingProtocol) { this.signingProtocol = signingProtocol; } /** *

* The signing protocol of the origin access control. The signing protocol determines how CloudFront signs * (authenticates) requests. The only valid value is sigv4. *

* * @return The signing protocol of the origin access control. The signing protocol determines how CloudFront signs * (authenticates) requests. The only valid value is sigv4. * @see OriginAccessControlSigningProtocols */ public String getSigningProtocol() { return this.signingProtocol; } /** *

* The signing protocol of the origin access control. The signing protocol determines how CloudFront signs * (authenticates) requests. The only valid value is sigv4. *

* * @param signingProtocol * The signing protocol of the origin access control. The signing protocol determines how CloudFront signs * (authenticates) requests. The only valid value is sigv4. * @return Returns a reference to this object so that method calls can be chained together. * @see OriginAccessControlSigningProtocols */ public OriginAccessControlSummary withSigningProtocol(String signingProtocol) { setSigningProtocol(signingProtocol); return this; } /** *

* The signing protocol of the origin access control. The signing protocol determines how CloudFront signs * (authenticates) requests. The only valid value is sigv4. *

* * @param signingProtocol * The signing protocol of the origin access control. The signing protocol determines how CloudFront signs * (authenticates) requests. The only valid value is sigv4. * @return Returns a reference to this object so that method calls can be chained together. * @see OriginAccessControlSigningProtocols */ public OriginAccessControlSummary withSigningProtocol(OriginAccessControlSigningProtocols signingProtocol) { this.signingProtocol = signingProtocol.toString(); return this; } /** *

* A value that specifies which requests CloudFront signs (adds authentication information to). This field can have * one of the following values: *

*
    *
  • *

    * never – CloudFront doesn't sign any origin requests. *

    *
  • *
  • *

    * always – CloudFront signs all origin requests, overwriting the Authorization header * from the viewer request if necessary. *

    *
  • *
  • *

    * no-override – If the viewer request doesn't contain the Authorization header, * CloudFront signs the origin request. If the viewer request contains the Authorization header, * CloudFront doesn't sign the origin request, but instead passes along the Authorization header that * it received in the viewer request. *

    *
  • *
* * @param signingBehavior * A value that specifies which requests CloudFront signs (adds authentication information to). This field * can have one of the following values:

*
    *
  • *

    * never – CloudFront doesn't sign any origin requests. *

    *
  • *
  • *

    * always – CloudFront signs all origin requests, overwriting the Authorization * header from the viewer request if necessary. *

    *
  • *
  • *

    * no-override – If the viewer request doesn't contain the Authorization header, * CloudFront signs the origin request. If the viewer request contains the Authorization header, * CloudFront doesn't sign the origin request, but instead passes along the Authorization header * that it received in the viewer request. *

    *
  • * @see OriginAccessControlSigningBehaviors */ public void setSigningBehavior(String signingBehavior) { this.signingBehavior = signingBehavior; } /** *

    * A value that specifies which requests CloudFront signs (adds authentication information to). This field can have * one of the following values: *

    *
      *
    • *

      * never – CloudFront doesn't sign any origin requests. *

      *
    • *
    • *

      * always – CloudFront signs all origin requests, overwriting the Authorization header * from the viewer request if necessary. *

      *
    • *
    • *

      * no-override – If the viewer request doesn't contain the Authorization header, * CloudFront signs the origin request. If the viewer request contains the Authorization header, * CloudFront doesn't sign the origin request, but instead passes along the Authorization header that * it received in the viewer request. *

      *
    • *
    * * @return A value that specifies which requests CloudFront signs (adds authentication information to). This field * can have one of the following values:

    *
      *
    • *

      * never – CloudFront doesn't sign any origin requests. *

      *
    • *
    • *

      * always – CloudFront signs all origin requests, overwriting the Authorization * header from the viewer request if necessary. *

      *
    • *
    • *

      * no-override – If the viewer request doesn't contain the Authorization header, * CloudFront signs the origin request. If the viewer request contains the Authorization * header, CloudFront doesn't sign the origin request, but instead passes along the * Authorization header that it received in the viewer request. *

      *
    • * @see OriginAccessControlSigningBehaviors */ public String getSigningBehavior() { return this.signingBehavior; } /** *

      * A value that specifies which requests CloudFront signs (adds authentication information to). This field can have * one of the following values: *

      *
        *
      • *

        * never – CloudFront doesn't sign any origin requests. *

        *
      • *
      • *

        * always – CloudFront signs all origin requests, overwriting the Authorization header * from the viewer request if necessary. *

        *
      • *
      • *

        * no-override – If the viewer request doesn't contain the Authorization header, * CloudFront signs the origin request. If the viewer request contains the Authorization header, * CloudFront doesn't sign the origin request, but instead passes along the Authorization header that * it received in the viewer request. *

        *
      • *
      * * @param signingBehavior * A value that specifies which requests CloudFront signs (adds authentication information to). This field * can have one of the following values:

      *
        *
      • *

        * never – CloudFront doesn't sign any origin requests. *

        *
      • *
      • *

        * always – CloudFront signs all origin requests, overwriting the Authorization * header from the viewer request if necessary. *

        *
      • *
      • *

        * no-override – If the viewer request doesn't contain the Authorization header, * CloudFront signs the origin request. If the viewer request contains the Authorization header, * CloudFront doesn't sign the origin request, but instead passes along the Authorization header * that it received in the viewer request. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see OriginAccessControlSigningBehaviors */ public OriginAccessControlSummary withSigningBehavior(String signingBehavior) { setSigningBehavior(signingBehavior); return this; } /** *

        * A value that specifies which requests CloudFront signs (adds authentication information to). This field can have * one of the following values: *

        *
          *
        • *

          * never – CloudFront doesn't sign any origin requests. *

          *
        • *
        • *

          * always – CloudFront signs all origin requests, overwriting the Authorization header * from the viewer request if necessary. *

          *
        • *
        • *

          * no-override – If the viewer request doesn't contain the Authorization header, * CloudFront signs the origin request. If the viewer request contains the Authorization header, * CloudFront doesn't sign the origin request, but instead passes along the Authorization header that * it received in the viewer request. *

          *
        • *
        * * @param signingBehavior * A value that specifies which requests CloudFront signs (adds authentication information to). This field * can have one of the following values:

        *
          *
        • *

          * never – CloudFront doesn't sign any origin requests. *

          *
        • *
        • *

          * always – CloudFront signs all origin requests, overwriting the Authorization * header from the viewer request if necessary. *

          *
        • *
        • *

          * no-override – If the viewer request doesn't contain the Authorization header, * CloudFront signs the origin request. If the viewer request contains the Authorization header, * CloudFront doesn't sign the origin request, but instead passes along the Authorization header * that it received in the viewer request. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see OriginAccessControlSigningBehaviors */ public OriginAccessControlSummary withSigningBehavior(OriginAccessControlSigningBehaviors signingBehavior) { this.signingBehavior = signingBehavior.toString(); return this; } /** *

          * The type of origin that this origin access control is for. The only valid value is s3. *

          * * @param originAccessControlOriginType * The type of origin that this origin access control is for. The only valid value is s3. * @see OriginAccessControlOriginTypes */ public void setOriginAccessControlOriginType(String originAccessControlOriginType) { this.originAccessControlOriginType = originAccessControlOriginType; } /** *

          * The type of origin that this origin access control is for. The only valid value is s3. *

          * * @return The type of origin that this origin access control is for. The only valid value is s3. * @see OriginAccessControlOriginTypes */ public String getOriginAccessControlOriginType() { return this.originAccessControlOriginType; } /** *

          * The type of origin that this origin access control is for. The only valid value is s3. *

          * * @param originAccessControlOriginType * The type of origin that this origin access control is for. The only valid value is s3. * @return Returns a reference to this object so that method calls can be chained together. * @see OriginAccessControlOriginTypes */ public OriginAccessControlSummary withOriginAccessControlOriginType(String originAccessControlOriginType) { setOriginAccessControlOriginType(originAccessControlOriginType); return this; } /** *

          * The type of origin that this origin access control is for. The only valid value is s3. *

          * * @param originAccessControlOriginType * The type of origin that this origin access control is for. The only valid value is s3. * @return Returns a reference to this object so that method calls can be chained together. * @see OriginAccessControlOriginTypes */ public OriginAccessControlSummary withOriginAccessControlOriginType(OriginAccessControlOriginTypes originAccessControlOriginType) { this.originAccessControlOriginType = originAccessControlOriginType.toString(); 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 (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getSigningProtocol() != null) sb.append("SigningProtocol: ").append(getSigningProtocol()).append(","); if (getSigningBehavior() != null) sb.append("SigningBehavior: ").append(getSigningBehavior()).append(","); if (getOriginAccessControlOriginType() != null) sb.append("OriginAccessControlOriginType: ").append(getOriginAccessControlOriginType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof OriginAccessControlSummary == false) return false; OriginAccessControlSummary other = (OriginAccessControlSummary) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getSigningProtocol() == null ^ this.getSigningProtocol() == null) return false; if (other.getSigningProtocol() != null && other.getSigningProtocol().equals(this.getSigningProtocol()) == false) return false; if (other.getSigningBehavior() == null ^ this.getSigningBehavior() == null) return false; if (other.getSigningBehavior() != null && other.getSigningBehavior().equals(this.getSigningBehavior()) == false) return false; if (other.getOriginAccessControlOriginType() == null ^ this.getOriginAccessControlOriginType() == null) return false; if (other.getOriginAccessControlOriginType() != null && other.getOriginAccessControlOriginType().equals(this.getOriginAccessControlOriginType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getSigningProtocol() == null) ? 0 : getSigningProtocol().hashCode()); hashCode = prime * hashCode + ((getSigningBehavior() == null) ? 0 : getSigningBehavior().hashCode()); hashCode = prime * hashCode + ((getOriginAccessControlOriginType() == null) ? 0 : getOriginAccessControlOriginType().hashCode()); return hashCode; } @Override public OriginAccessControlSummary clone() { try { return (OriginAccessControlSummary) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy