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

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

Go to download

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

There is a newer version: 1.12.772
Show newest version
/*
 * 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 PublishVersionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name of the Lambda function. *

*

* Name formats *

*
    *
  • *

    * Function name - MyFunction. *

    *
  • *
  • *

    * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. *

    *
  • *
  • *

    * Partial ARN - 123456789012:function:MyFunction. *

    *
  • *
*

* The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 * characters in length. *

*/ private String functionName; /** *

* Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing * a version if the function code has changed since you last updated it. You can get the hash for the version that * you uploaded from the output of UpdateFunctionCode. *

*/ private String codeSha256; /** *

* A description for the version to override the description in the function configuration. *

*/ private String description; /** *

* Only update the function if the revision ID matches the ID that's specified. Use this option to avoid publishing * a version if the function configuration has changed since you last updated it. *

*/ private String revisionId; /** *

* The name of the Lambda function. *

*

* Name formats *

*
    *
  • *

    * Function name - MyFunction. *

    *
  • *
  • *

    * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. *

    *
  • *
  • *

    * Partial ARN - 123456789012:function:MyFunction. *

    *
  • *
*

* The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 * characters in length. *

* * @param functionName * The name of the Lambda function.

*

* Name formats *

*
    *
  • *

    * Function name - MyFunction. *

    *
  • *
  • *

    * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. *

    *
  • *
  • *

    * Partial ARN - 123456789012:function:MyFunction. *

    *
  • *
*

* The length constraint applies only to the full ARN. If you specify only the function name, it is limited * to 64 characters in length. */ public void setFunctionName(String functionName) { this.functionName = functionName; } /** *

* The name of the Lambda function. *

*

* Name formats *

*
    *
  • *

    * Function name - MyFunction. *

    *
  • *
  • *

    * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. *

    *
  • *
  • *

    * Partial ARN - 123456789012:function:MyFunction. *

    *
  • *
*

* The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 * characters in length. *

* * @return The name of the Lambda function.

*

* Name formats *

*
    *
  • *

    * Function name - MyFunction. *

    *
  • *
  • *

    * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. *

    *
  • *
  • *

    * Partial ARN - 123456789012:function:MyFunction. *

    *
  • *
*

* The length constraint applies only to the full ARN. If you specify only the function name, it is limited * to 64 characters in length. */ public String getFunctionName() { return this.functionName; } /** *

* The name of the Lambda function. *

*

* Name formats *

*
    *
  • *

    * Function name - MyFunction. *

    *
  • *
  • *

    * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. *

    *
  • *
  • *

    * Partial ARN - 123456789012:function:MyFunction. *

    *
  • *
*

* The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 * characters in length. *

* * @param functionName * The name of the Lambda function.

*

* Name formats *

*
    *
  • *

    * Function name - MyFunction. *

    *
  • *
  • *

    * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. *

    *
  • *
  • *

    * Partial ARN - 123456789012:function:MyFunction. *

    *
  • *
*

* The length constraint applies only to the full ARN. If you specify only the function name, it is limited * to 64 characters in length. * @return Returns a reference to this object so that method calls can be chained together. */ public PublishVersionRequest withFunctionName(String functionName) { setFunctionName(functionName); return this; } /** *

* Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing * a version if the function code has changed since you last updated it. You can get the hash for the version that * you uploaded from the output of UpdateFunctionCode. *

* * @param codeSha256 * Only publish a version if the hash value matches the value that's specified. Use this option to avoid * publishing a version if the function code has changed since you last updated it. You can get the hash for * the version that you uploaded from the output of UpdateFunctionCode. */ public void setCodeSha256(String codeSha256) { this.codeSha256 = codeSha256; } /** *

* Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing * a version if the function code has changed since you last updated it. You can get the hash for the version that * you uploaded from the output of UpdateFunctionCode. *

* * @return Only publish a version if the hash value matches the value that's specified. Use this option to avoid * publishing a version if the function code has changed since you last updated it. You can get the hash for * the version that you uploaded from the output of UpdateFunctionCode. */ public String getCodeSha256() { return this.codeSha256; } /** *

* Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing * a version if the function code has changed since you last updated it. You can get the hash for the version that * you uploaded from the output of UpdateFunctionCode. *

* * @param codeSha256 * Only publish a version if the hash value matches the value that's specified. Use this option to avoid * publishing a version if the function code has changed since you last updated it. You can get the hash for * the version that you uploaded from the output of UpdateFunctionCode. * @return Returns a reference to this object so that method calls can be chained together. */ public PublishVersionRequest withCodeSha256(String codeSha256) { setCodeSha256(codeSha256); return this; } /** *

* A description for the version to override the description in the function configuration. *

* * @param description * A description for the version to override the description in the function configuration. */ public void setDescription(String description) { this.description = description; } /** *

* A description for the version to override the description in the function configuration. *

* * @return A description for the version to override the description in the function configuration. */ public String getDescription() { return this.description; } /** *

* A description for the version to override the description in the function configuration. *

* * @param description * A description for the version to override the description in the function configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public PublishVersionRequest withDescription(String description) { setDescription(description); return this; } /** *

* Only update the function if the revision ID matches the ID that's specified. Use this option to avoid publishing * a version if the function configuration has changed since you last updated it. *

* * @param revisionId * Only update the function if the revision ID matches the ID that's specified. Use this option to avoid * publishing a version if the function configuration has changed since you last updated it. */ public void setRevisionId(String revisionId) { this.revisionId = revisionId; } /** *

* Only update the function if the revision ID matches the ID that's specified. Use this option to avoid publishing * a version if the function configuration has changed since you last updated it. *

* * @return Only update the function if the revision ID matches the ID that's specified. Use this option to avoid * publishing a version if the function configuration has changed since you last updated it. */ public String getRevisionId() { return this.revisionId; } /** *

* Only update the function if the revision ID matches the ID that's specified. Use this option to avoid publishing * a version if the function configuration has changed since you last updated it. *

* * @param revisionId * Only update the function if the revision ID matches the ID that's specified. Use this option to avoid * publishing a version if the function configuration has changed since you last updated it. * @return Returns a reference to this object so that method calls can be chained together. */ public PublishVersionRequest withRevisionId(String revisionId) { setRevisionId(revisionId); 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 (getFunctionName() != null) sb.append("FunctionName: ").append(getFunctionName()).append(","); if (getCodeSha256() != null) sb.append("CodeSha256: ").append(getCodeSha256()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRevisionId() != null) sb.append("RevisionId: ").append(getRevisionId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PublishVersionRequest == false) return false; PublishVersionRequest other = (PublishVersionRequest) obj; if (other.getFunctionName() == null ^ this.getFunctionName() == null) return false; if (other.getFunctionName() != null && other.getFunctionName().equals(this.getFunctionName()) == false) return false; if (other.getCodeSha256() == null ^ this.getCodeSha256() == null) return false; if (other.getCodeSha256() != null && other.getCodeSha256().equals(this.getCodeSha256()) == 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.getRevisionId() == null ^ this.getRevisionId() == null) return false; if (other.getRevisionId() != null && other.getRevisionId().equals(this.getRevisionId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFunctionName() == null) ? 0 : getFunctionName().hashCode()); hashCode = prime * hashCode + ((getCodeSha256() == null) ? 0 : getCodeSha256().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRevisionId() == null) ? 0 : getRevisionId().hashCode()); return hashCode; } @Override public PublishVersionRequest clone() { return (PublishVersionRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy