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

com.amazonaws.services.lambda.model.PublishLayerVersionRequest Maven / Gradle / Ivy

/*
 * 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.lambda.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 PublishLayerVersionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name or Amazon Resource Name (ARN) of the layer. *

*/ private String layerName; /** *

* The description of the version. *

*/ private String description; /** *

* The function layer archive. *

*/ private LayerVersionContentInput content; /** *

* A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. *

*/ private com.amazonaws.internal.SdkInternalList compatibleRuntimes; /** *

* The layer's software license. It can be any of the following: *

*
    *
  • *

    * An SPDX license identifier. For example, MIT. *

    *
  • *
  • *

    * The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT. *

    *
  • *
  • *

    * The full text of the license. *

    *
  • *
*/ private String licenseInfo; /** *

* A list of compatible instruction set * architectures. *

*/ private com.amazonaws.internal.SdkInternalList compatibleArchitectures; /** *

* The name or Amazon Resource Name (ARN) of the layer. *

* * @param layerName * The name or Amazon Resource Name (ARN) of the layer. */ public void setLayerName(String layerName) { this.layerName = layerName; } /** *

* The name or Amazon Resource Name (ARN) of the layer. *

* * @return The name or Amazon Resource Name (ARN) of the layer. */ public String getLayerName() { return this.layerName; } /** *

* The name or Amazon Resource Name (ARN) of the layer. *

* * @param layerName * The name or Amazon Resource Name (ARN) of the layer. * @return Returns a reference to this object so that method calls can be chained together. */ public PublishLayerVersionRequest withLayerName(String layerName) { setLayerName(layerName); return this; } /** *

* The description of the version. *

* * @param description * The description of the version. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the version. *

* * @return The description of the version. */ public String getDescription() { return this.description; } /** *

* The description of the version. *

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

* The function layer archive. *

* * @param content * The function layer archive. */ public void setContent(LayerVersionContentInput content) { this.content = content; } /** *

* The function layer archive. *

* * @return The function layer archive. */ public LayerVersionContentInput getContent() { return this.content; } /** *

* The function layer archive. *

* * @param content * The function layer archive. * @return Returns a reference to this object so that method calls can be chained together. */ public PublishLayerVersionRequest withContent(LayerVersionContentInput content) { setContent(content); return this; } /** *

* A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. *

* * @return A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. * @see Runtime */ public java.util.List getCompatibleRuntimes() { if (compatibleRuntimes == null) { compatibleRuntimes = new com.amazonaws.internal.SdkInternalList(); } return compatibleRuntimes; } /** *

* A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. *

* * @param compatibleRuntimes * A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. * @see Runtime */ public void setCompatibleRuntimes(java.util.Collection compatibleRuntimes) { if (compatibleRuntimes == null) { this.compatibleRuntimes = null; return; } this.compatibleRuntimes = new com.amazonaws.internal.SdkInternalList(compatibleRuntimes); } /** *

* A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setCompatibleRuntimes(java.util.Collection)} or {@link #withCompatibleRuntimes(java.util.Collection)} if * you want to override the existing values. *

* * @param compatibleRuntimes * A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. * @return Returns a reference to this object so that method calls can be chained together. * @see Runtime */ public PublishLayerVersionRequest withCompatibleRuntimes(String... compatibleRuntimes) { if (this.compatibleRuntimes == null) { setCompatibleRuntimes(new com.amazonaws.internal.SdkInternalList(compatibleRuntimes.length)); } for (String ele : compatibleRuntimes) { this.compatibleRuntimes.add(ele); } return this; } /** *

* A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. *

* * @param compatibleRuntimes * A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. * @return Returns a reference to this object so that method calls can be chained together. * @see Runtime */ public PublishLayerVersionRequest withCompatibleRuntimes(java.util.Collection compatibleRuntimes) { setCompatibleRuntimes(compatibleRuntimes); return this; } /** *

* A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. *

* * @param compatibleRuntimes * A list of compatible function * runtimes. Used for filtering with ListLayers and ListLayerVersions. * @return Returns a reference to this object so that method calls can be chained together. * @see Runtime */ public PublishLayerVersionRequest withCompatibleRuntimes(Runtime... compatibleRuntimes) { com.amazonaws.internal.SdkInternalList compatibleRuntimesCopy = new com.amazonaws.internal.SdkInternalList(compatibleRuntimes.length); for (Runtime value : compatibleRuntimes) { compatibleRuntimesCopy.add(value.toString()); } if (getCompatibleRuntimes() == null) { setCompatibleRuntimes(compatibleRuntimesCopy); } else { getCompatibleRuntimes().addAll(compatibleRuntimesCopy); } return this; } /** *

* The layer's software license. It can be any of the following: *

*
    *
  • *

    * An SPDX license identifier. For example, MIT. *

    *
  • *
  • *

    * The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT. *

    *
  • *
  • *

    * The full text of the license. *

    *
  • *
* * @param licenseInfo * The layer's software license. It can be any of the following:

*
    *
  • *

    * An SPDX license identifier. For example, MIT. *

    *
  • *
  • *

    * The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT * . *

    *
  • *
  • *

    * The full text of the license. *

    *
  • */ public void setLicenseInfo(String licenseInfo) { this.licenseInfo = licenseInfo; } /** *

    * The layer's software license. It can be any of the following: *

    *
      *
    • *

      * An SPDX license identifier. For example, MIT. *

      *
    • *
    • *

      * The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT. *

      *
    • *
    • *

      * The full text of the license. *

      *
    • *
    * * @return The layer's software license. It can be any of the following:

    *
      *
    • *

      * An SPDX license identifier. For example, MIT. *

      *
    • *
    • *

      * The URL of a license hosted on the internet. For example, * https://opensource.org/licenses/MIT. *

      *
    • *
    • *

      * The full text of the license. *

      *
    • */ public String getLicenseInfo() { return this.licenseInfo; } /** *

      * The layer's software license. It can be any of the following: *

      *
        *
      • *

        * An SPDX license identifier. For example, MIT. *

        *
      • *
      • *

        * The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT. *

        *
      • *
      • *

        * The full text of the license. *

        *
      • *
      * * @param licenseInfo * The layer's software license. It can be any of the following:

      *
        *
      • *

        * An SPDX license identifier. For example, MIT. *

        *
      • *
      • *

        * The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT * . *

        *
      • *
      • *

        * The full text of the license. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public PublishLayerVersionRequest withLicenseInfo(String licenseInfo) { setLicenseInfo(licenseInfo); return this; } /** *

        * A list of compatible instruction set * architectures. *

        * * @return A list of compatible instruction set * architectures. * @see Architecture */ public java.util.List getCompatibleArchitectures() { if (compatibleArchitectures == null) { compatibleArchitectures = new com.amazonaws.internal.SdkInternalList(); } return compatibleArchitectures; } /** *

        * A list of compatible instruction set * architectures. *

        * * @param compatibleArchitectures * A list of compatible instruction set * architectures. * @see Architecture */ public void setCompatibleArchitectures(java.util.Collection compatibleArchitectures) { if (compatibleArchitectures == null) { this.compatibleArchitectures = null; return; } this.compatibleArchitectures = new com.amazonaws.internal.SdkInternalList(compatibleArchitectures); } /** *

        * A list of compatible instruction set * architectures. *

        *

        * NOTE: This method appends the values to the existing list (if any). Use * {@link #setCompatibleArchitectures(java.util.Collection)} or * {@link #withCompatibleArchitectures(java.util.Collection)} if you want to override the existing values. *

        * * @param compatibleArchitectures * A list of compatible instruction set * architectures. * @return Returns a reference to this object so that method calls can be chained together. * @see Architecture */ public PublishLayerVersionRequest withCompatibleArchitectures(String... compatibleArchitectures) { if (this.compatibleArchitectures == null) { setCompatibleArchitectures(new com.amazonaws.internal.SdkInternalList(compatibleArchitectures.length)); } for (String ele : compatibleArchitectures) { this.compatibleArchitectures.add(ele); } return this; } /** *

        * A list of compatible instruction set * architectures. *

        * * @param compatibleArchitectures * A list of compatible instruction set * architectures. * @return Returns a reference to this object so that method calls can be chained together. * @see Architecture */ public PublishLayerVersionRequest withCompatibleArchitectures(java.util.Collection compatibleArchitectures) { setCompatibleArchitectures(compatibleArchitectures); return this; } /** *

        * A list of compatible instruction set * architectures. *

        * * @param compatibleArchitectures * A list of compatible instruction set * architectures. * @return Returns a reference to this object so that method calls can be chained together. * @see Architecture */ public PublishLayerVersionRequest withCompatibleArchitectures(Architecture... compatibleArchitectures) { com.amazonaws.internal.SdkInternalList compatibleArchitecturesCopy = new com.amazonaws.internal.SdkInternalList( compatibleArchitectures.length); for (Architecture value : compatibleArchitectures) { compatibleArchitecturesCopy.add(value.toString()); } if (getCompatibleArchitectures() == null) { setCompatibleArchitectures(compatibleArchitecturesCopy); } else { getCompatibleArchitectures().addAll(compatibleArchitecturesCopy); } 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 (getLayerName() != null) sb.append("LayerName: ").append(getLayerName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getContent() != null) sb.append("Content: ").append(getContent()).append(","); if (getCompatibleRuntimes() != null) sb.append("CompatibleRuntimes: ").append(getCompatibleRuntimes()).append(","); if (getLicenseInfo() != null) sb.append("LicenseInfo: ").append(getLicenseInfo()).append(","); if (getCompatibleArchitectures() != null) sb.append("CompatibleArchitectures: ").append(getCompatibleArchitectures()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PublishLayerVersionRequest == false) return false; PublishLayerVersionRequest other = (PublishLayerVersionRequest) obj; if (other.getLayerName() == null ^ this.getLayerName() == null) return false; if (other.getLayerName() != null && other.getLayerName().equals(this.getLayerName()) == 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.getContent() == null ^ this.getContent() == null) return false; if (other.getContent() != null && other.getContent().equals(this.getContent()) == false) return false; if (other.getCompatibleRuntimes() == null ^ this.getCompatibleRuntimes() == null) return false; if (other.getCompatibleRuntimes() != null && other.getCompatibleRuntimes().equals(this.getCompatibleRuntimes()) == false) return false; if (other.getLicenseInfo() == null ^ this.getLicenseInfo() == null) return false; if (other.getLicenseInfo() != null && other.getLicenseInfo().equals(this.getLicenseInfo()) == false) return false; if (other.getCompatibleArchitectures() == null ^ this.getCompatibleArchitectures() == null) return false; if (other.getCompatibleArchitectures() != null && other.getCompatibleArchitectures().equals(this.getCompatibleArchitectures()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLayerName() == null) ? 0 : getLayerName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getContent() == null) ? 0 : getContent().hashCode()); hashCode = prime * hashCode + ((getCompatibleRuntimes() == null) ? 0 : getCompatibleRuntimes().hashCode()); hashCode = prime * hashCode + ((getLicenseInfo() == null) ? 0 : getLicenseInfo().hashCode()); hashCode = prime * hashCode + ((getCompatibleArchitectures() == null) ? 0 : getCompatibleArchitectures().hashCode()); return hashCode; } @Override public PublishLayerVersionRequest clone() { return (PublishLayerVersionRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy