/* * Copyright 2018-2023 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. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

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

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

* */ 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. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

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

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. * @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. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

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

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. * @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. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

*

* 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.

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. * @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. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

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

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. * @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. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

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

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. * @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: *

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

*