software.amazon.awssdk.services.transcribe.model.CallAnalyticsJob Maven / Gradle / Ivy
Show all versions of transcribe Show documentation
/*
* Copyright 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 software.amazon.awssdk.services.transcribe.model;
import java.beans.Transient;
import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Provides detailed information about a Call Analytics job.
*
*
* To view the job's status, refer to CallAnalyticsJobStatus
. If the status is COMPLETED
, the
* job is finished. You can find your completed transcript at the URI specified in TranscriptFileUri
. If
* the status is FAILED
, FailureReason
provides details on why your transcription job failed.
*
*
* If you enabled personally identifiable information (PII) redaction, the redacted transcript appears at the location
* specified in RedactedTranscriptFileUri
.
*
*
* If you chose to redact the audio in your media file, you can find your redacted media file at the location specified
* in the RedactedMediaFileUri
field of your response.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class CallAnalyticsJob implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField CALL_ANALYTICS_JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CallAnalyticsJobName").getter(getter(CallAnalyticsJob::callAnalyticsJobName))
.setter(setter(Builder::callAnalyticsJobName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CallAnalyticsJobName").build())
.build();
private static final SdkField CALL_ANALYTICS_JOB_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CallAnalyticsJobStatus").getter(getter(CallAnalyticsJob::callAnalyticsJobStatusAsString))
.setter(setter(Builder::callAnalyticsJobStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CallAnalyticsJobStatus").build())
.build();
private static final SdkField LANGUAGE_CODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("LanguageCode").getter(getter(CallAnalyticsJob::languageCodeAsString))
.setter(setter(Builder::languageCode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LanguageCode").build()).build();
private static final SdkField MEDIA_SAMPLE_RATE_HERTZ_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("MediaSampleRateHertz").getter(getter(CallAnalyticsJob::mediaSampleRateHertz))
.setter(setter(Builder::mediaSampleRateHertz))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MediaSampleRateHertz").build())
.build();
private static final SdkField MEDIA_FORMAT_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("MediaFormat").getter(getter(CallAnalyticsJob::mediaFormatAsString)).setter(setter(Builder::mediaFormat))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MediaFormat").build()).build();
private static final SdkField MEDIA_FIELD = SdkField. builder(MarshallingType.SDK_POJO).memberName("Media")
.getter(getter(CallAnalyticsJob::media)).setter(setter(Builder::media)).constructor(Media::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Media").build()).build();
private static final SdkField TRANSCRIPT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Transcript").getter(getter(CallAnalyticsJob::transcript)).setter(setter(Builder::transcript))
.constructor(Transcript::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Transcript").build()).build();
private static final SdkField START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("StartTime").getter(getter(CallAnalyticsJob::startTime)).setter(setter(Builder::startTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StartTime").build()).build();
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CreationTime").getter(getter(CallAnalyticsJob::creationTime)).setter(setter(Builder::creationTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build();
private static final SdkField COMPLETION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CompletionTime").getter(getter(CallAnalyticsJob::completionTime))
.setter(setter(Builder::completionTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CompletionTime").build()).build();
private static final SdkField FAILURE_REASON_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FailureReason").getter(getter(CallAnalyticsJob::failureReason)).setter(setter(Builder::failureReason))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailureReason").build()).build();
private static final SdkField DATA_ACCESS_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DataAccessRoleArn").getter(getter(CallAnalyticsJob::dataAccessRoleArn))
.setter(setter(Builder::dataAccessRoleArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DataAccessRoleArn").build()).build();
private static final SdkField IDENTIFIED_LANGUAGE_SCORE_FIELD = SdkField. builder(MarshallingType.FLOAT)
.memberName("IdentifiedLanguageScore").getter(getter(CallAnalyticsJob::identifiedLanguageScore))
.setter(setter(Builder::identifiedLanguageScore))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdentifiedLanguageScore").build())
.build();
private static final SdkField SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Settings")
.getter(getter(CallAnalyticsJob::settings)).setter(setter(Builder::settings))
.constructor(CallAnalyticsJobSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Settings").build()).build();
private static final SdkField> CHANNEL_DEFINITIONS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("ChannelDefinitions")
.getter(getter(CallAnalyticsJob::channelDefinitions))
.setter(setter(Builder::channelDefinitions))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChannelDefinitions").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(ChannelDefinition::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CALL_ANALYTICS_JOB_NAME_FIELD,
CALL_ANALYTICS_JOB_STATUS_FIELD, LANGUAGE_CODE_FIELD, MEDIA_SAMPLE_RATE_HERTZ_FIELD, MEDIA_FORMAT_FIELD, MEDIA_FIELD,
TRANSCRIPT_FIELD, START_TIME_FIELD, CREATION_TIME_FIELD, COMPLETION_TIME_FIELD, FAILURE_REASON_FIELD,
DATA_ACCESS_ROLE_ARN_FIELD, IDENTIFIED_LANGUAGE_SCORE_FIELD, SETTINGS_FIELD, CHANNEL_DEFINITIONS_FIELD));
private static final long serialVersionUID = 1L;
private final String callAnalyticsJobName;
private final String callAnalyticsJobStatus;
private final String languageCode;
private final Integer mediaSampleRateHertz;
private final String mediaFormat;
private final Media media;
private final Transcript transcript;
private final Instant startTime;
private final Instant creationTime;
private final Instant completionTime;
private final String failureReason;
private final String dataAccessRoleArn;
private final Float identifiedLanguageScore;
private final CallAnalyticsJobSettings settings;
private final List channelDefinitions;
private CallAnalyticsJob(BuilderImpl builder) {
this.callAnalyticsJobName = builder.callAnalyticsJobName;
this.callAnalyticsJobStatus = builder.callAnalyticsJobStatus;
this.languageCode = builder.languageCode;
this.mediaSampleRateHertz = builder.mediaSampleRateHertz;
this.mediaFormat = builder.mediaFormat;
this.media = builder.media;
this.transcript = builder.transcript;
this.startTime = builder.startTime;
this.creationTime = builder.creationTime;
this.completionTime = builder.completionTime;
this.failureReason = builder.failureReason;
this.dataAccessRoleArn = builder.dataAccessRoleArn;
this.identifiedLanguageScore = builder.identifiedLanguageScore;
this.settings = builder.settings;
this.channelDefinitions = builder.channelDefinitions;
}
/**
*
* The name of the Call Analytics job. Job names are case sensitive and must be unique within an Amazon Web Services
* account.
*
*
* @return The name of the Call Analytics job. Job names are case sensitive and must be unique within an Amazon Web
* Services account.
*/
public final String callAnalyticsJobName() {
return callAnalyticsJobName;
}
/**
*
* Provides the status of the specified Call Analytics job.
*
*
* If the status is COMPLETED
, the job is finished and you can find the results at the location
* specified in TranscriptFileUri
(or RedactedTranscriptFileUri
, if you requested
* transcript redaction). If the status is FAILED
, FailureReason
provides details on why
* your transcription job failed.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #callAnalyticsJobStatus} will return {@link CallAnalyticsJobStatus#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #callAnalyticsJobStatusAsString}.
*
*
* @return Provides the status of the specified Call Analytics job.
*
* If the status is COMPLETED
, the job is finished and you can find the results at the location
* specified in TranscriptFileUri
(or RedactedTranscriptFileUri
, if you requested
* transcript redaction). If the status is FAILED
, FailureReason
provides details
* on why your transcription job failed.
* @see CallAnalyticsJobStatus
*/
public final CallAnalyticsJobStatus callAnalyticsJobStatus() {
return CallAnalyticsJobStatus.fromValue(callAnalyticsJobStatus);
}
/**
*
* Provides the status of the specified Call Analytics job.
*
*
* If the status is COMPLETED
, the job is finished and you can find the results at the location
* specified in TranscriptFileUri
(or RedactedTranscriptFileUri
, if you requested
* transcript redaction). If the status is FAILED
, FailureReason
provides details on why
* your transcription job failed.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #callAnalyticsJobStatus} will return {@link CallAnalyticsJobStatus#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #callAnalyticsJobStatusAsString}.
*
*
* @return Provides the status of the specified Call Analytics job.
*
* If the status is COMPLETED
, the job is finished and you can find the results at the location
* specified in TranscriptFileUri
(or RedactedTranscriptFileUri
, if you requested
* transcript redaction). If the status is FAILED
, FailureReason
provides details
* on why your transcription job failed.
* @see CallAnalyticsJobStatus
*/
public final String callAnalyticsJobStatusAsString() {
return callAnalyticsJobStatus;
}
/**
*
* The language code used to create your Call Analytics job. For a list of supported languages and their associated
* language codes, refer to the Supported languages table.
*
*
* If you don't know the language spoken in your media file, you can omit this field and let Amazon Transcribe
* automatically identify the language of your media. To improve the accuracy of language identification, you can
* include several language codes and Amazon Transcribe chooses the closest match for your transcription.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #languageCode} will
* return {@link LanguageCode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #languageCodeAsString}.
*
*
* @return The language code used to create your Call Analytics job. For a list of supported languages and their
* associated language codes, refer to the Supported languages
* table.
*
* If you don't know the language spoken in your media file, you can omit this field and let Amazon
* Transcribe automatically identify the language of your media. To improve the accuracy of language
* identification, you can include several language codes and Amazon Transcribe chooses the closest match
* for your transcription.
* @see LanguageCode
*/
public final LanguageCode languageCode() {
return LanguageCode.fromValue(languageCode);
}
/**
*
* The language code used to create your Call Analytics job. For a list of supported languages and their associated
* language codes, refer to the Supported languages table.
*
*
* If you don't know the language spoken in your media file, you can omit this field and let Amazon Transcribe
* automatically identify the language of your media. To improve the accuracy of language identification, you can
* include several language codes and Amazon Transcribe chooses the closest match for your transcription.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #languageCode} will
* return {@link LanguageCode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #languageCodeAsString}.
*
*
* @return The language code used to create your Call Analytics job. For a list of supported languages and their
* associated language codes, refer to the Supported languages
* table.
*
* If you don't know the language spoken in your media file, you can omit this field and let Amazon
* Transcribe automatically identify the language of your media. To improve the accuracy of language
* identification, you can include several language codes and Amazon Transcribe chooses the closest match
* for your transcription.
* @see LanguageCode
*/
public final String languageCodeAsString() {
return languageCode;
}
/**
*
* The sample rate, in hertz, of the audio track in your input media file.
*
*
* @return The sample rate, in hertz, of the audio track in your input media file.
*/
public final Integer mediaSampleRateHertz() {
return mediaSampleRateHertz;
}
/**
*
* The format of the input media file.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #mediaFormat} will
* return {@link MediaFormat#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #mediaFormatAsString}.
*
*
* @return The format of the input media file.
* @see MediaFormat
*/
public final MediaFormat mediaFormat() {
return MediaFormat.fromValue(mediaFormat);
}
/**
*
* The format of the input media file.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #mediaFormat} will
* return {@link MediaFormat#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #mediaFormatAsString}.
*
*
* @return The format of the input media file.
* @see MediaFormat
*/
public final String mediaFormatAsString() {
return mediaFormat;
}
/**
*
* Provides the Amazon S3 location of the media file you used in your Call Analytics request.
*
*
* @return Provides the Amazon S3 location of the media file you used in your Call Analytics request.
*/
public final Media media() {
return media;
}
/**
* Returns the value of the Transcript property for this object.
*
* @return The value of the Transcript property for this object.
*/
public final Transcript transcript() {
return transcript;
}
/**
*
* The date and time the specified Call Analytics job began processing.
*
*
* Timestamps are in the format YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC
. For example,
* 2022-05-04T12:32:58.789000-07:00
represents a transcription job that started processing at 12:32 PM
* UTC-7 on May 4, 2022.
*
*
* @return The date and time the specified Call Analytics job began processing.
*
* Timestamps are in the format YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC
. For example,
* 2022-05-04T12:32:58.789000-07:00
represents a transcription job that started processing at
* 12:32 PM UTC-7 on May 4, 2022.
*/
public final Instant startTime() {
return startTime;
}
/**
*
* The date and time the specified Call Analytics job request was made.
*
*
* Timestamps are in the format YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC
. For example,
* 2022-05-04T12:32:58.761000-07:00
represents a transcription job that started processing at 12:32 PM
* UTC-7 on May 4, 2022.
*
*
* @return The date and time the specified Call Analytics job request was made.
*
* Timestamps are in the format YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC
. For example,
* 2022-05-04T12:32:58.761000-07:00
represents a transcription job that started processing at
* 12:32 PM UTC-7 on May 4, 2022.
*/
public final Instant creationTime() {
return creationTime;
}
/**
*
* The date and time the specified Call Analytics job finished processing.
*
*
* Timestamps are in the format YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC
. For example,
* 2022-05-04T12:33:13.922000-07:00
represents a transcription job that started processing at 12:33 PM
* UTC-7 on May 4, 2022.
*
*
* @return The date and time the specified Call Analytics job finished processing.
*
* Timestamps are in the format YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC
. For example,
* 2022-05-04T12:33:13.922000-07:00
represents a transcription job that started processing at
* 12:33 PM UTC-7 on May 4, 2022.
*/
public final Instant completionTime() {
return completionTime;
}
/**
*
* If CallAnalyticsJobStatus
is FAILED
, FailureReason
contains information
* about why the Call Analytics job request failed.
*
*
* The FailureReason
field contains one of the following values:
*
*
* -
*
* Unsupported media format
.
*
*
* The media format specified in MediaFormat
isn't valid. Refer to MediaFormat for a list of
* supported formats.
*
*
* -
*
* The media format provided does not match the detected media format
.
*
*
* The media format specified in MediaFormat
doesn't match the format of the input file. Check the
* media format of your media file and correct the specified value.
*
*
* -
*
* Invalid sample rate for audio file
.
*
*
* The sample rate specified in MediaSampleRateHertz
isn't valid. The sample rate must be between 8,000
* and 48,000 hertz.
*
*
* -
*
* The sample rate provided does not match the detected sample rate
.
*
*
* The sample rate specified in MediaSampleRateHertz
doesn't match the sample rate detected in your
* input media file. Check the sample rate of your media file and correct the specified value.
*
*
* -
*
* Invalid file size: file size too large
.
*
*
* The size of your media file is larger than what Amazon Transcribe can process. For more information, refer to Guidelines and quotas.
*
*
* -
*
* Invalid number of channels: number of channels too large
.
*
*
* Your audio contains more channels than Amazon Transcribe is able to process. For more information, refer to Guidelines and quotas.
*
*
*
*
* @return If CallAnalyticsJobStatus
is FAILED
, FailureReason
contains
* information about why the Call Analytics job request failed.
*
* The FailureReason
field contains one of the following values:
*
*
* -
*
* Unsupported media format
.
*
*
* The media format specified in MediaFormat
isn't valid. Refer to MediaFormat for a
* list of supported formats.
*
*
* -
*
* The media format provided does not match the detected media format
.
*
*
* The media format specified in MediaFormat
doesn't match the format of the input file. Check
* the media format of your media file and correct the specified value.
*
*
* -
*
* Invalid sample rate for audio file
.
*
*
* The sample rate specified in MediaSampleRateHertz
isn't valid. The sample rate must be
* between 8,000 and 48,000 hertz.
*
*
* -
*
* The sample rate provided does not match the detected sample rate
.
*
*
* The sample rate specified in MediaSampleRateHertz
doesn't match the sample rate detected in
* your input media file. Check the sample rate of your media file and correct the specified value.
*
*
* -
*
* Invalid file size: file size too large
.
*
*
* The size of your media file is larger than what Amazon Transcribe can process. For more information,
* refer to Guidelines and
* quotas.
*
*
* -
*
* Invalid number of channels: number of channels too large
.
*
*
* Your audio contains more channels than Amazon Transcribe is able to process. For more information, refer
* to Guidelines
* and quotas.
*
*
*/
public final String failureReason() {
return failureReason;
}
/**
*
* The Amazon Resource Name (ARN) you included in your request.
*
*
* @return The Amazon Resource Name (ARN) you included in your request.
*/
public final String dataAccessRoleArn() {
return dataAccessRoleArn;
}
/**
*
* The confidence score associated with the language identified in your media file.
*
*
* Confidence scores are values between 0 and 1; a larger value indicates a higher probability that the identified
* language correctly matches the language spoken in your media.
*
*
* @return The confidence score associated with the language identified in your media file.
*
* Confidence scores are values between 0 and 1; a larger value indicates a higher probability that the
* identified language correctly matches the language spoken in your media.
*/
public final Float identifiedLanguageScore() {
return identifiedLanguageScore;
}
/**
*
* Provides information on any additional settings that were included in your request. Additional settings include
* content redaction and language identification settings.
*
*
* @return Provides information on any additional settings that were included in your request. Additional settings
* include content redaction and language identification settings.
*/
public final CallAnalyticsJobSettings settings() {
return settings;
}
/**
* For responses, this returns true if the service returned a value for the ChannelDefinitions property. This DOES
* NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasChannelDefinitions() {
return channelDefinitions != null && !(channelDefinitions instanceof SdkAutoConstructList);
}
/**
*
* Indicates which speaker is on which channel.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasChannelDefinitions} method.
*
*
* @return Indicates which speaker is on which channel.
*/
public final List channelDefinitions() {
return channelDefinitions;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(callAnalyticsJobName());
hashCode = 31 * hashCode + Objects.hashCode(callAnalyticsJobStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(languageCodeAsString());
hashCode = 31 * hashCode + Objects.hashCode(mediaSampleRateHertz());
hashCode = 31 * hashCode + Objects.hashCode(mediaFormatAsString());
hashCode = 31 * hashCode + Objects.hashCode(media());
hashCode = 31 * hashCode + Objects.hashCode(transcript());
hashCode = 31 * hashCode + Objects.hashCode(startTime());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(completionTime());
hashCode = 31 * hashCode + Objects.hashCode(failureReason());
hashCode = 31 * hashCode + Objects.hashCode(dataAccessRoleArn());
hashCode = 31 * hashCode + Objects.hashCode(identifiedLanguageScore());
hashCode = 31 * hashCode + Objects.hashCode(settings());
hashCode = 31 * hashCode + Objects.hashCode(hasChannelDefinitions() ? channelDefinitions() : null);
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CallAnalyticsJob)) {
return false;
}
CallAnalyticsJob other = (CallAnalyticsJob) obj;
return Objects.equals(callAnalyticsJobName(), other.callAnalyticsJobName())
&& Objects.equals(callAnalyticsJobStatusAsString(), other.callAnalyticsJobStatusAsString())
&& Objects.equals(languageCodeAsString(), other.languageCodeAsString())
&& Objects.equals(mediaSampleRateHertz(), other.mediaSampleRateHertz())
&& Objects.equals(mediaFormatAsString(), other.mediaFormatAsString()) && Objects.equals(media(), other.media())
&& Objects.equals(transcript(), other.transcript()) && Objects.equals(startTime(), other.startTime())
&& Objects.equals(creationTime(), other.creationTime())
&& Objects.equals(completionTime(), other.completionTime())
&& Objects.equals(failureReason(), other.failureReason())
&& Objects.equals(dataAccessRoleArn(), other.dataAccessRoleArn())
&& Objects.equals(identifiedLanguageScore(), other.identifiedLanguageScore())
&& Objects.equals(settings(), other.settings()) && hasChannelDefinitions() == other.hasChannelDefinitions()
&& Objects.equals(channelDefinitions(), other.channelDefinitions());
}
/**
* 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.
*/
@Override
public final String toString() {
return ToString.builder("CallAnalyticsJob").add("CallAnalyticsJobName", callAnalyticsJobName())
.add("CallAnalyticsJobStatus", callAnalyticsJobStatusAsString()).add("LanguageCode", languageCodeAsString())
.add("MediaSampleRateHertz", mediaSampleRateHertz()).add("MediaFormat", mediaFormatAsString())
.add("Media", media()).add("Transcript", transcript()).add("StartTime", startTime())
.add("CreationTime", creationTime()).add("CompletionTime", completionTime())
.add("FailureReason", failureReason()).add("DataAccessRoleArn", dataAccessRoleArn())
.add("IdentifiedLanguageScore", identifiedLanguageScore()).add("Settings", settings())
.add("ChannelDefinitions", hasChannelDefinitions() ? channelDefinitions() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "CallAnalyticsJobName":
return Optional.ofNullable(clazz.cast(callAnalyticsJobName()));
case "CallAnalyticsJobStatus":
return Optional.ofNullable(clazz.cast(callAnalyticsJobStatusAsString()));
case "LanguageCode":
return Optional.ofNullable(clazz.cast(languageCodeAsString()));
case "MediaSampleRateHertz":
return Optional.ofNullable(clazz.cast(mediaSampleRateHertz()));
case "MediaFormat":
return Optional.ofNullable(clazz.cast(mediaFormatAsString()));
case "Media":
return Optional.ofNullable(clazz.cast(media()));
case "Transcript":
return Optional.ofNullable(clazz.cast(transcript()));
case "StartTime":
return Optional.ofNullable(clazz.cast(startTime()));
case "CreationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
case "CompletionTime":
return Optional.ofNullable(clazz.cast(completionTime()));
case "FailureReason":
return Optional.ofNullable(clazz.cast(failureReason()));
case "DataAccessRoleArn":
return Optional.ofNullable(clazz.cast(dataAccessRoleArn()));
case "IdentifiedLanguageScore":
return Optional.ofNullable(clazz.cast(identifiedLanguageScore()));
case "Settings":
return Optional.ofNullable(clazz.cast(settings()));
case "ChannelDefinitions":
return Optional.ofNullable(clazz.cast(channelDefinitions()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function