com.amazonaws.services.transcribe.model.JobExecutionSettings Maven / Gradle / Ivy
Show all versions of aws-java-sdk-transcribe Show documentation
/*
* Copyright 2019-2024 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;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* 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
.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class JobExecutionSettings implements Serializable, Cloneable, StructuredPojo {
/**
*
* 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
.
*
*/
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
.
*
*
* @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
.
*
*
* @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 this.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
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public JobExecutionSettings withAllowDeferredExecution(Boolean allowDeferredExecution) {
setAllowDeferredExecution(allowDeferredExecution);
return this;
}
/**
*
* 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 this.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
.
*
*
* @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
.
*
*
* @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 this.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
.
*
*
* @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 Returns a reference to this object so that method calls can be chained together.
*/
public JobExecutionSettings withDataAccessRoleArn(String dataAccessRoleArn) {
setDataAccessRoleArn(dataAccessRoleArn);
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 (getAllowDeferredExecution() != null)
sb.append("AllowDeferredExecution: ").append(getAllowDeferredExecution()).append(",");
if (getDataAccessRoleArn() != null)
sb.append("DataAccessRoleArn: ").append(getDataAccessRoleArn());
sb.append("}");
return sb.toString();
}
@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;
}
@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 JobExecutionSettings clone() {
try {
return (JobExecutionSettings) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.transcribe.model.transform.JobExecutionSettingsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}