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

A complex type that describes function metadata.

 
 public class FunctionConfiguration implements SerializableCloneable {

    
The name of the function.

Constraints:
Length: 1 - 111
Pattern: (arn:aws:lambda:)?([a-z]{2}-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)

 
     private String functionName;

    
The Amazon Resource Name (ARN) assigned to the function.

Constraints:
Pattern: arn:aws:lambda:[a-z]{2}-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?

 
     private String functionArn;

    
The runtime environment for the Lambda function.

Constraints:
Allowed Values: nodejs, java8

 
     private String runtime;

    
The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources.

Constraints:
Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+

 
     private String role;

    
The function Lambda calls to begin executing your function.

Constraints:
Length: 0 - 128
Pattern: [^\s]+

 
     private String handler;

    
The size, in bytes, of the function .zip file you uploaded.
 
     private Long codeSize;

    
The user-provided description.

Constraints:
Length: 0 - 256

 
     private String description;

    
The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.

Constraints:
Range: 1 - 60

 
     private Integer timeout;

    
The memory size, in MB, you configured for the function. Must be a multiple of 64 MB.

Constraints:
Range: 128 - 1536

    private Integer memorySize;

    
The timestamp of the last time you updated the function.
    private String lastModified;

    
The name of the function.

Constraints:
Length: 1 - 111
Pattern: (arn:aws:lambda:)?([a-z]{2}-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)

Returns:
The name of the function.
    public String getFunctionName() {
        return ;
    }
    
    
The name of the function.

Constraints:
Length: 1 - 111
Pattern: (arn:aws:lambda:)?([a-z]{2}-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)

Parameters:
functionName The name of the function.
    public void setFunctionName(String functionName) {
        this. = functionName;
    }
    
    
The name of the function.

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

Constraints:
Length: 1 - 111
Pattern: (arn:aws:lambda:)?([a-z]{2}-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)

Parameters:
functionName The name of the function.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FunctionConfiguration withFunctionName(String functionName) {
        this. = functionName;
        return this;
    }

    
The Amazon Resource Name (ARN) assigned to the function.

Constraints:
Pattern: arn:aws:lambda:[a-z]{2}-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?

Returns:
The Amazon Resource Name (ARN) assigned to the function.
    public String getFunctionArn() {
        return ;
    }
    
    
The Amazon Resource Name (ARN) assigned to the function.

Constraints:
Pattern: arn:aws:lambda:[a-z]{2}-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?

Parameters:
functionArn The Amazon Resource Name (ARN) assigned to the function.
    public void setFunctionArn(String functionArn) {
        this. = functionArn;
    }
    
    
The Amazon Resource Name (ARN) assigned to the function.

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

Constraints:
Pattern: arn:aws:lambda:[a-z]{2}-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?

Parameters:
functionArn The Amazon Resource Name (ARN) assigned to the function.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FunctionConfiguration withFunctionArn(String functionArn) {
        this. = functionArn;
        return this;
    }

    
The runtime environment for the Lambda function.

Constraints:
Allowed Values: nodejs, java8

Returns:
The runtime environment for the Lambda function.
See also:
Runtime
    public String getRuntime() {
        return ;
    }
    
    
The runtime environment for the Lambda function.

Constraints:
Allowed Values: nodejs, java8

Parameters:
runtime The runtime environment for the Lambda function.
See also:
Runtime
    public void setRuntime(String runtime) {
        this. = runtime;
    }
    
    
The runtime environment for the Lambda function.

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

Constraints:
Allowed Values: nodejs, java8

Parameters:
runtime The runtime environment for the Lambda function.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
Runtime
    public FunctionConfiguration withRuntime(String runtime) {
        this. = runtime;
        return this;
    }

    
The runtime environment for the Lambda function.

Constraints:
Allowed Values: nodejs, java8

Parameters:
runtime The runtime environment for the Lambda function.
See also:
Runtime
    public void setRuntime(Runtime runtime) {
        this. = runtime.toString();
    }
    
    
The runtime environment for the Lambda function.

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

Constraints:
Allowed Values: nodejs, java8

Parameters:
runtime The runtime environment for the Lambda function.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
Runtime
    public FunctionConfiguration withRuntime(Runtime runtime) {
        this. = runtime.toString();
        return this;
    }

    
The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources.

Constraints:
Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+

Returns:
The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources.
    public String getRole() {
        return ;
    }
    
    
The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources.

Constraints:
Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+

Parameters:
role The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources.
    public void setRole(String role) {
        this. = role;
    }
    
    
The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources.

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

Constraints:
Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+

Parameters:
role The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FunctionConfiguration withRole(String role) {
        this. = role;
        return this;
    }

    
The function Lambda calls to begin executing your function.

Constraints:
Length: 0 - 128
Pattern: [^\s]+

Returns:
The function Lambda calls to begin executing your function.
    public String getHandler() {
        return ;
    }
    
    
The function Lambda calls to begin executing your function.

Constraints:
Length: 0 - 128
Pattern: [^\s]+

Parameters:
handler The function Lambda calls to begin executing your function.
    public void setHandler(String handler) {
        this. = handler;
    }
    
    
The function Lambda calls to begin executing your function.

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

Constraints:
Length: 0 - 128
Pattern: [^\s]+

Parameters:
handler The function Lambda calls to begin executing your function.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FunctionConfiguration withHandler(String handler) {
        this. = handler;
        return this;
    }

    
The size, in bytes, of the function .zip file you uploaded.

Returns:
The size, in bytes, of the function .zip file you uploaded.
    public Long getCodeSize() {
        return ;
    }
    
    
The size, in bytes, of the function .zip file you uploaded.

Parameters:
codeSize The size, in bytes, of the function .zip file you uploaded.
    public void setCodeSize(Long codeSize) {
        this. = codeSize;
    }
    
    
The size, in bytes, of the function .zip file you uploaded.

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

Parameters:
codeSize The size, in bytes, of the function .zip file you uploaded.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FunctionConfiguration withCodeSize(Long codeSize) {
        this. = codeSize;
        return this;
    }

    
The user-provided description.

Constraints:
Length: 0 - 256

Returns:
The user-provided description.
    public String getDescription() {
        return ;
    }
    
    
The user-provided description.

Constraints:
Length: 0 - 256

Parameters:
description The user-provided description.
    public void setDescription(String description) {
        this. = description;
    }
    
    
The user-provided description.

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

Constraints:
Length: 0 - 256

Parameters:
description The user-provided description.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FunctionConfiguration withDescription(String description) {
        this. = description;
        return this;
    }

    
The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.

Constraints:
Range: 1 - 60

Returns:
The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.
    public Integer getTimeout() {
        return ;
    }
    
    
The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.

Constraints:
Range: 1 - 60

Parameters:
timeout The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.
    public void setTimeout(Integer timeout) {
        this. = timeout;
    }
    
    
The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.

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

Constraints:
Range: 1 - 60

Parameters:
timeout The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FunctionConfiguration withTimeout(Integer timeout) {
        this. = timeout;
        return this;
    }

    
The memory size, in MB, you configured for the function. Must be a multiple of 64 MB.

Constraints:
Range: 128 - 1536

Returns:
The memory size, in MB, you configured for the function. Must be a multiple of 64 MB.
    public Integer getMemorySize() {
        return ;
    }
    
    
The memory size, in MB, you configured for the function. Must be a multiple of 64 MB.

Constraints:
Range: 128 - 1536

Parameters:
memorySize The memory size, in MB, you configured for the function. Must be a multiple of 64 MB.
    public void setMemorySize(Integer memorySize) {
        this. = memorySize;
    }
    
    
The memory size, in MB, you configured for the function. Must be a multiple of 64 MB.

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

Constraints:
Range: 128 - 1536

Parameters:
memorySize The memory size, in MB, you configured for the function. Must be a multiple of 64 MB.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FunctionConfiguration withMemorySize(Integer memorySize) {
        this. = memorySize;
        return this;
    }

    
The timestamp of the last time you updated the function.

Returns:
The timestamp of the last time you updated the function.
    public String getLastModified() {
        return ;
    }
    
    
The timestamp of the last time you updated the function.

Parameters:
lastModified The timestamp of the last time you updated the function.
    public void setLastModified(String lastModified) {
        this. = lastModified;
    }
    
    
The timestamp of the last time you updated the function.

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

Parameters:
lastModified The timestamp of the last time you updated the function.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FunctionConfiguration withLastModified(String lastModified) {
        this. = lastModified;
        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 (getFunctionName() != nullsb.append("FunctionName: " + getFunctionName() + ",");
        if (getFunctionArn() != nullsb.append("FunctionArn: " + getFunctionArn() + ",");
        if (getRuntime() != nullsb.append("Runtime: " + getRuntime() + ",");
        if (getRole() != nullsb.append("Role: " + getRole() + ",");
        if (getHandler() != nullsb.append("Handler: " + getHandler() + ",");
        if (getCodeSize() != nullsb.append("CodeSize: " + getCodeSize() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getTimeout() != nullsb.append("Timeout: " + getTimeout() + ",");
        if (getMemorySize() != nullsb.append("MemorySize: " + getMemorySize() + ",");
        if (getLastModified() != nullsb.append("LastModified: " + getLastModified() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getFunctionName() == null) ? 0 : getFunctionName().hashCode()); 
        hashCode = prime * hashCode + ((getFunctionArn() == null) ? 0 : getFunctionArn().hashCode()); 
        hashCode = prime * hashCode + ((getRuntime() == null) ? 0 : getRuntime().hashCode()); 
        hashCode = prime * hashCode + ((getRole() == null) ? 0 : getRole().hashCode()); 
        hashCode = prime * hashCode + ((getHandler() == null) ? 0 : getHandler().hashCode()); 
        hashCode = prime * hashCode + ((getCodeSize() == null) ? 0 : getCodeSize().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getTimeout() == null) ? 0 : getTimeout().hashCode()); 
        hashCode = prime * hashCode + ((getMemorySize() == null) ? 0 : getMemorySize().hashCode()); 
        hashCode = prime * hashCode + ((getLastModified() == null) ? 0 : getLastModified().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof FunctionConfiguration == falsereturn false;
        FunctionConfiguration other = (FunctionConfiguration)obj;
        
        if (other.getFunctionName() == null ^ this.getFunctionName() == nullreturn false;
        if (other.getFunctionName() != null && other.getFunctionName().equals(this.getFunctionName()) == falsereturn false
        if (other.getFunctionArn() == null ^ this.getFunctionArn() == nullreturn false;
        if (other.getFunctionArn() != null && other.getFunctionArn().equals(this.getFunctionArn()) == falsereturn false
        if (other.getRuntime() == null ^ this.getRuntime() == nullreturn false;
        if (other.getRuntime() != null && other.getRuntime().equals(this.getRuntime()) == falsereturn false
        if (other.getRole() == null ^ this.getRole() == nullreturn false;
        if (other.getRole() != null && other.getRole().equals(this.getRole()) == falsereturn false
        if (other.getHandler() == null ^ this.getHandler() == nullreturn false;
        if (other.getHandler() != null && other.getHandler().equals(this.getHandler()) == falsereturn false
        if (other.getCodeSize() == null ^ this.getCodeSize() == nullreturn false;
        if (other.getCodeSize() != null && other.getCodeSize().equals(this.getCodeSize()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getTimeout() == null ^ this.getTimeout() == nullreturn false;
        if (other.getTimeout() != null && other.getTimeout().equals(this.getTimeout()) == falsereturn false
        if (other.getMemorySize() == null ^ this.getMemorySize() == nullreturn false;
        if (other.getMemorySize() != null && other.getMemorySize().equals(this.getMemorySize()) == falsereturn false
        if (other.getLastModified() == null ^ this.getLastModified() == nullreturn false;
        if (other.getLastModified() != null && other.getLastModified().equals(this.getLastModified()) == falsereturn false
        return true;
    }
    
    @Override
    public FunctionConfiguration clone() {
        try {
            return (FunctionConfigurationsuper.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