/* * Copyright 2010-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.transcribe.model; import java.io.Serializable; /** *

* Makes it possible to control how your transcription job is processed. * Currently, the only JobExecutionSettings modification you can * choose is enabling job queueing using the AllowDeferredExecution * sub-parameter. *

*

* If you include JobExecutionSettings in your request, you must * also include the sub-parameters: AllowDeferredExecution and * DataAccessRoleArn. *

*/ public class JobExecutionSettings implements Serializable { /** *

* Makes it possible to enable job queuing when your concurrent request * limit is exceeded. When AllowDeferredExecution is set to * true, transcription job requests are placed in a queue until * the number of jobs falls below the concurrent request limit. If * AllowDeferredExecution is set to false and the * number of transcription job requests exceed the concurrent request limit, * you get a LimitExceededException error. *

*

* If you include AllowDeferredExecution in your request, you * must also include DataAccessRoleArn. *

*/ private Boolean allowDeferredExecution; /** *

* The Amazon Resource Name (ARN) of an IAM role that has permissions to * access the Amazon S3 bucket that contains your input files. If the role * that you specify doesn’t have the appropriate permissions to access the * specified Amazon S3 location, your request fails. *

*

* IAM role ARNs have the format * arn:partition:iam::account:role/role-name-with-path. For * example: arn:aws:iam::111122223333:role/Admin. For more * information, see IAM ARNs. *

*

* Note that if you include DataAccessRoleArn in your request, * you must also include AllowDeferredExecution. *

*

* Constraints:
* Length: 20 - 2048
* Pattern: * ^arn:(aws|aws-cn|aws-us-gov|aws-iso-{0,1}[a-z]{0,1}):iam:: * [0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1024}$
*/ private String dataAccessRoleArn; /** *

* Makes it possible to enable job queuing when your concurrent request * limit is exceeded. When AllowDeferredExecution is set to * true, transcription job requests are placed in a queue until * the number of jobs falls below the concurrent request limit. If * AllowDeferredExecution is set to false and the * number of transcription job requests exceed the concurrent request limit, * you get a LimitExceededException error. *

*

* If you include AllowDeferredExecution in your request, you * must also include DataAccessRoleArn. *

* * @return

* Makes it possible to enable job queuing when your concurrent * request limit is exceeded. When * AllowDeferredExecution is set to true, * transcription job requests are placed in a queue until the number * of jobs falls below the concurrent request limit. If * AllowDeferredExecution is set to false * and the number of transcription job requests exceed the * concurrent request limit, you get a * LimitExceededException error. *

*

* If you include AllowDeferredExecution in your * request, you must also include DataAccessRoleArn. *

*/ public Boolean isAllowDeferredExecution() { return allowDeferredExecution; } /** *

* Makes it possible to enable job queuing when your concurrent request * limit is exceeded. When AllowDeferredExecution is set to * true, transcription job requests are placed in a queue until * the number of jobs falls below the concurrent request limit. If * AllowDeferredExecution is set to false and the * number of transcription job requests exceed the concurrent request limit, * you get a LimitExceededException error. *

*

* If you include AllowDeferredExecution in your request, you * must also include DataAccessRoleArn. *

* * @return

* Makes it possible to enable job queuing when your concurrent * request limit is exceeded. When * AllowDeferredExecution is set to true, * transcription job requests are placed in a queue until the number * of jobs falls below the concurrent request limit. If * AllowDeferredExecution is set to false * and the number of transcription job requests exceed the * concurrent request limit, you get a * LimitExceededException error. *

*

* If you include AllowDeferredExecution in your * request, you must also include DataAccessRoleArn. *

*/ public Boolean getAllowDeferredExecution() { return allowDeferredExecution; } /** *

* Makes it possible to enable job queuing when your concurrent request * limit is exceeded. When AllowDeferredExecution is set to * true, transcription job requests are placed in a queue until * the number of jobs falls below the concurrent request limit. If * AllowDeferredExecution is set to false and the * number of transcription job requests exceed the concurrent request limit, * you get a LimitExceededException error. *

*

* If you include AllowDeferredExecution in your request, you * must also include DataAccessRoleArn. *

* * @param allowDeferredExecution

* Makes it possible to enable job queuing when your concurrent * request limit is exceeded. When * AllowDeferredExecution is set to * true, transcription job requests are placed in a * queue until the number of jobs falls below the concurrent * request limit. If AllowDeferredExecution is set * to false and the number of transcription job * requests exceed the concurrent request limit, you get a * LimitExceededException error. *

*

* If you include AllowDeferredExecution in your * request, you must also include DataAccessRoleArn. *

*/ public void setAllowDeferredExecution(Boolean allowDeferredExecution) { this.allowDeferredExecution = allowDeferredExecution; } /** *

* Makes it possible to enable job queuing when your concurrent request * limit is exceeded. When AllowDeferredExecution is set to * true, transcription job requests are placed in a queue until * the number of jobs falls below the concurrent request limit. If * AllowDeferredExecution is set to false and the * number of transcription job requests exceed the concurrent request limit, * you get a LimitExceededException error. *

*

* If you include AllowDeferredExecution in your request, you * must also include DataAccessRoleArn. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param allowDeferredExecution

* Makes it possible to enable job queuing when your concurrent * request limit is exceeded. When * AllowDeferredExecution is set to * true, transcription job requests are placed in a * queue until the number of jobs falls below the concurrent * request limit. If AllowDeferredExecution is set * to false and the number of transcription job * requests exceed the concurrent request limit, you get a * LimitExceededException error. *

*

* If you include AllowDeferredExecution in your * request, you must also include DataAccessRoleArn. *

* @return A reference to this updated object so that method calls can be * chained together. */ public JobExecutionSettings withAllowDeferredExecution(Boolean allowDeferredExecution) { this.allowDeferredExecution = allowDeferredExecution; return this; } /** *

* The Amazon Resource Name (ARN) of an IAM role that has permissions to * access the Amazon S3 bucket that contains your input files. If the role * that you specify doesn’t have the appropriate permissions to access the * specified Amazon S3 location, your request fails. *

*

* IAM role ARNs have the format * arn:partition:iam::account:role/role-name-with-path. For * example: arn:aws:iam::111122223333:role/Admin. For more * information, see IAM ARNs. *

*

* Note that if you include DataAccessRoleArn in your request, * you must also include AllowDeferredExecution. *

*

* Constraints:
* Length: 20 - 2048
* Pattern: * ^arn:(aws|aws-cn|aws-us-gov|aws-iso-{0,1}[a-z]{0,1}):iam:: * [0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1024}$
* * @return

* The Amazon Resource Name (ARN) of an IAM role that has * permissions to access the Amazon S3 bucket that contains your * input files. If the role that you specify doesn’t have the * appropriate permissions to access the specified Amazon S3 * location, your request fails. *

*

* IAM role ARNs have the format * arn:partition:iam::account:role/role-name-with-path. * For example: arn:aws:iam::111122223333:role/Admin. * For more information, see IAM ARNs. *

*

* Note that if you include DataAccessRoleArn in your * request, you must also include * AllowDeferredExecution. *

*/ public String getDataAccessRoleArn() { return dataAccessRoleArn; } /** *

* The Amazon Resource Name (ARN) of an IAM role that has permissions to * access the Amazon S3 bucket that contains your input files. If the role * that you specify doesn’t have the appropriate permissions to access the * specified Amazon S3 location, your request fails. *

*

* IAM role ARNs have the format * arn:partition:iam::account:role/role-name-with-path. For * example: arn:aws:iam::111122223333:role/Admin. For more * information, see IAM ARNs. *

*

* Note that if you include DataAccessRoleArn in your request, * you must also include AllowDeferredExecution. *

*

* Constraints:
* Length: 20 - 2048
* Pattern: * ^arn:(aws|aws-cn|aws-us-gov|aws-iso-{0,1}[a-z]{0,1}):iam:: * [0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1024}$
* * @param dataAccessRoleArn

* The Amazon Resource Name (ARN) of an IAM role that has * permissions to access the Amazon S3 bucket that contains your * input files. If the role that you specify doesn’t have the * appropriate permissions to access the specified Amazon S3 * location, your request fails. *

*

* IAM role ARNs have the format * arn:partition:iam::account:role/role-name-with-path * . For example: * arn:aws:iam::111122223333:role/Admin. For more * information, see IAM ARNs. *

*

* Note that if you include DataAccessRoleArn in * your request, you must also include * AllowDeferredExecution. *

*/ public void setDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; } /** *

* The Amazon Resource Name (ARN) of an IAM role that has permissions to * access the Amazon S3 bucket that contains your input files. If the role * that you specify doesn’t have the appropriate permissions to access the * specified Amazon S3 location, your request fails. *

*

* IAM role ARNs have the format * arn:partition:iam::account:role/role-name-with-path. For * example: arn:aws:iam::111122223333:role/Admin. For more * information, see IAM ARNs. *

*

* Note that if you include DataAccessRoleArn in your request, * you must also include AllowDeferredExecution. *

*

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

* Constraints:
* Length: 20 - 2048
* Pattern: * ^arn:(aws|aws-cn|aws-us-gov|aws-iso-{0,1}[a-z]{0,1}):iam:: * [0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1024}$
* * @param dataAccessRoleArn

* The Amazon Resource Name (ARN) of an IAM role that has * permissions to access the Amazon S3 bucket that contains your * input files. If the role that you specify doesn’t have the * appropriate permissions to access the specified Amazon S3 * location, your request fails. *

*

* IAM role ARNs have the format * arn:partition:iam::account:role/role-name-with-path * . For example: * arn:aws:iam::111122223333:role/Admin. For more * information, see IAM ARNs. *

*

* Note that if you include DataAccessRoleArn in * your request, you must also include * AllowDeferredExecution. *

* @return A reference to this updated object so that method calls can be * chained together. */ public JobExecutionSettings withDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; 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 (getAllowDeferredExecution() != null) sb.append("AllowDeferredExecution: " + getAllowDeferredExecution() + ","); if (getDataAccessRoleArn() != null) sb.append("DataAccessRoleArn: " + getDataAccessRoleArn()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAllowDeferredExecution() == null) ? 0 : getAllowDeferredExecution() .hashCode()); hashCode = prime * hashCode + ((getDataAccessRoleArn() == null) ? 0 : getDataAccessRoleArn().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof JobExecutionSettings == false) return false; JobExecutionSettings other = (JobExecutionSettings) obj; if (other.getAllowDeferredExecution() == null ^ this.getAllowDeferredExecution() == null) return false; if (other.getAllowDeferredExecution() != null && other.getAllowDeferredExecution().equals(this.getAllowDeferredExecution()) == false) return false; if (other.getDataAccessRoleArn() == null ^ this.getDataAccessRoleArn() == null) return false; if (other.getDataAccessRoleArn() != null && other.getDataAccessRoleArn().equals(this.getDataAccessRoleArn()) == false) return false; return true; } }