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

com.amazonaws.services.simpleworkflow.model.ScheduleLambdaFunctionDecisionAttributes Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.9.13
Show newest version
/*
 * Copyright 2010-2016 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.simpleworkflow.model;

import java.io.Serializable;

/**
 * 

* Provides details of the ScheduleLambdaFunction decision. *

*

* Access Control *

*

* You can use IAM policies to control this decision's access to Amazon SWF * resources as follows: *

*
    *
  • Use a Resource element with the domain name to limit the * action to only specified domains.
  • *
  • Use an Action element to allow or deny permission to call * this action.
  • *
  • Constrain the following parameters by using a Condition * element with the appropriate keys. *
      *
    • activityType.name: String constraint. The key is * swf:activityType.name.
    • *
    • activityType.version: String constraint. The key is * swf:activityType.version.
    • *
    • taskList: String constraint. The key is * swf:taskList.name.
    • *
    *
  • *
*

* If the caller does not have sufficient permissions to invoke the action, or * the parameter values fall outside the specified constraints, the action * fails. The associated event attribute's cause parameter will be set to * OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows. *

*/ public class ScheduleLambdaFunctionDecisionAttributes implements Serializable, Cloneable { /** *

* Required. The SWF id of the AWS Lambda task. *

*

* The specified string must not start or end with whitespace. It must not * contain a : (colon), / (slash), | * (vertical bar), or any control characters (\u0000-\u001f | \u007f - * \u009f). Also, it must not contain the literal string quotarnquot. *

*/ private String id; /** *

* Required. The name of the AWS Lambda function to invoke. *

*/ private String name; /** *

* The input provided to the AWS Lambda function. *

*/ private String input; /** *

* If set, specifies the maximum duration the function may take to execute. *

*/ private String startToCloseTimeout; /** *

* Required. The SWF id of the AWS Lambda task. *

*

* The specified string must not start or end with whitespace. It must not * contain a : (colon), / (slash), | * (vertical bar), or any control characters (\u0000-\u001f | \u007f - * \u009f). Also, it must not contain the literal string quotarnquot. *

* * @param id * Required. The SWF id of the AWS Lambda task.

*

* The specified string must not start or end with whitespace. It * must not contain a : (colon), / (slash), * | */ public void setId(String id) { this.id = id; } /** *

* Required. The SWF id of the AWS Lambda task. *

*

* The specified string must not start or end with whitespace. It must not * contain a : (colon), / (slash), | * (vertical bar), or any control characters (\u0000-\u001f | \u007f - * \u009f). Also, it must not contain the literal string quotarnquot. *

* * @return Required. The SWF id of the AWS Lambda task.

*

* The specified string must not start or end with whitespace. It * must not contain a : (colon), / * (slash), | */ public String getId() { return this.id; } /** *

* Required. The SWF id of the AWS Lambda task. *

*

* The specified string must not start or end with whitespace. It must not * contain a : (colon), / (slash), | * (vertical bar), or any control characters (\u0000-\u001f | \u007f - * \u009f). Also, it must not contain the literal string quotarnquot. *

* * @param id * Required. The SWF id of the AWS Lambda task.

*

* The specified string must not start or end with whitespace. It * must not contain a : (colon), / (slash), * | * @return Returns a reference to this object so that method calls can be * chained together. */ public ScheduleLambdaFunctionDecisionAttributes withId(String id) { setId(id); return this; } /** *

* Required. The name of the AWS Lambda function to invoke. *

* * @param name * Required. */ public void setName(String name) { this.name = name; } /** *

* Required. The name of the AWS Lambda function to invoke. *

* * @return Required. */ public String getName() { return this.name; } /** *

* Required. The name of the AWS Lambda function to invoke. *

* * @param name * Required. * @return Returns a reference to this object so that method calls can be * chained together. */ public ScheduleLambdaFunctionDecisionAttributes withName(String name) { setName(name); return this; } /** *

* The input provided to the AWS Lambda function. *

* * @param input * The input provided to the AWS Lambda function. */ public void setInput(String input) { this.input = input; } /** *

* The input provided to the AWS Lambda function. *

* * @return The input provided to the AWS Lambda function. */ public String getInput() { return this.input; } /** *

* The input provided to the AWS Lambda function. *

* * @param input * The input provided to the AWS Lambda function. * @return Returns a reference to this object so that method calls can be * chained together. */ public ScheduleLambdaFunctionDecisionAttributes withInput(String input) { setInput(input); return this; } /** *

* If set, specifies the maximum duration the function may take to execute. *

* * @param startToCloseTimeout * If set, specifies the maximum duration the function may take to * execute. */ public void setStartToCloseTimeout(String startToCloseTimeout) { this.startToCloseTimeout = startToCloseTimeout; } /** *

* If set, specifies the maximum duration the function may take to execute. *

* * @return If set, specifies the maximum duration the function may take to * execute. */ public String getStartToCloseTimeout() { return this.startToCloseTimeout; } /** *

* If set, specifies the maximum duration the function may take to execute. *

* * @param startToCloseTimeout * If set, specifies the maximum duration the function may take to * execute. * @return Returns a reference to this object so that method calls can be * chained together. */ public ScheduleLambdaFunctionDecisionAttributes withStartToCloseTimeout( String startToCloseTimeout) { setStartToCloseTimeout(startToCloseTimeout); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @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: " + getId() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getInput() != null) sb.append("Input: " + getInput() + ","); if (getStartToCloseTimeout() != null) sb.append("StartToCloseTimeout: " + getStartToCloseTimeout()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ScheduleLambdaFunctionDecisionAttributes == false) return false; ScheduleLambdaFunctionDecisionAttributes other = (ScheduleLambdaFunctionDecisionAttributes) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == 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.getInput() == null ^ this.getInput() == null) return false; if (other.getInput() != null && other.getInput().equals(this.getInput()) == false) return false; if (other.getStartToCloseTimeout() == null ^ this.getStartToCloseTimeout() == null) return false; if (other.getStartToCloseTimeout() != null && other.getStartToCloseTimeout().equals( this.getStartToCloseTimeout()) == 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 + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getInput() == null) ? 0 : getInput().hashCode()); hashCode = prime * hashCode + ((getStartToCloseTimeout() == null) ? 0 : getStartToCloseTimeout().hashCode()); return hashCode; } @Override public ScheduleLambdaFunctionDecisionAttributes clone() { try { return (ScheduleLambdaFunctionDecisionAttributes) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }