software.amazon.awssdk.services.transcribe.model.MedicalScribeJobSummary 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.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
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.Function;
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.LocationTrait;
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 specific Medical Scribe job.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class MedicalScribeJobSummary implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField MEDICAL_SCRIBE_JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("MedicalScribeJobName").getter(getter(MedicalScribeJobSummary::medicalScribeJobName))
.setter(setter(Builder::medicalScribeJobName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MedicalScribeJobName").build())
.build();
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CreationTime").getter(getter(MedicalScribeJobSummary::creationTime))
.setter(setter(Builder::creationTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build();
private static final SdkField START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("StartTime").getter(getter(MedicalScribeJobSummary::startTime)).setter(setter(Builder::startTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StartTime").build()).build();
private static final SdkField COMPLETION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CompletionTime").getter(getter(MedicalScribeJobSummary::completionTime))
.setter(setter(Builder::completionTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CompletionTime").build()).build();
private static final SdkField LANGUAGE_CODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("LanguageCode").getter(getter(MedicalScribeJobSummary::languageCodeAsString))
.setter(setter(Builder::languageCode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LanguageCode").build()).build();
private static final SdkField MEDICAL_SCRIBE_JOB_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("MedicalScribeJobStatus").getter(getter(MedicalScribeJobSummary::medicalScribeJobStatusAsString))
.setter(setter(Builder::medicalScribeJobStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MedicalScribeJobStatus").build())
.build();
private static final SdkField FAILURE_REASON_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FailureReason").getter(getter(MedicalScribeJobSummary::failureReason))
.setter(setter(Builder::failureReason))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailureReason").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(MEDICAL_SCRIBE_JOB_NAME_FIELD,
CREATION_TIME_FIELD, START_TIME_FIELD, COMPLETION_TIME_FIELD, LANGUAGE_CODE_FIELD, MEDICAL_SCRIBE_JOB_STATUS_FIELD,
FAILURE_REASON_FIELD));
private static final long serialVersionUID = 1L;
private final String medicalScribeJobName;
private final Instant creationTime;
private final Instant startTime;
private final Instant completionTime;
private final String languageCode;
private final String medicalScribeJobStatus;
private final String failureReason;
private MedicalScribeJobSummary(BuilderImpl builder) {
this.medicalScribeJobName = builder.medicalScribeJobName;
this.creationTime = builder.creationTime;
this.startTime = builder.startTime;
this.completionTime = builder.completionTime;
this.languageCode = builder.languageCode;
this.medicalScribeJobStatus = builder.medicalScribeJobStatus;
this.failureReason = builder.failureReason;
}
/**
*
* The name of the Medical Scribe job. Job names are case sensitive and must be unique within an Amazon Web Services
* account.
*
*
* @return The name of the Medical Scribe job. Job names are case sensitive and must be unique within an Amazon Web
* Services account.
*/
public final String medicalScribeJobName() {
return medicalScribeJobName;
}
/**
*
* The date and time the specified Medical Scribe 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 Medical Scribe job that started processing at 12:32 PM
* UTC-7 on May 4, 2022.
*
*
* @return The date and time the specified Medical Scribe 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 Medical Scribe job that started processing at
* 12:32 PM UTC-7 on May 4, 2022.
*/
public final Instant creationTime() {
return creationTime;
}
/**
*
* The date and time your Medical Scribe 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 Medical Scribe job that started processing at 12:32 PM
* UTC-7 on May 4, 2022.
*
*
* @return The date and time your Medical Scribe 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 Medical Scribe 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 Medical Scribe job finished processing.
*
*
* 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 Medical Scribe job that finished processing at 12:32
* PM UTC-7 on May 4, 2022.
*
*
* @return The date and time the specified Medical Scribe job finished processing.
*
* 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 Medical Scribe job that finished processing at
* 12:32 PM UTC-7 on May 4, 2022.
*/
public final Instant completionTime() {
return completionTime;
}
/**
*
* The language code used to create your Medical Scribe job. US English (en-US
) is the only supported
* language for Medical Scribe jobs.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #languageCode} will
* return {@link MedicalScribeLanguageCode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #languageCodeAsString}.
*
*
* @return The language code used to create your Medical Scribe job. US English (en-US
) is the only
* supported language for Medical Scribe jobs.
* @see MedicalScribeLanguageCode
*/
public final MedicalScribeLanguageCode languageCode() {
return MedicalScribeLanguageCode.fromValue(languageCode);
}
/**
*
* The language code used to create your Medical Scribe job. US English (en-US
) is the only supported
* language for Medical Scribe jobs.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #languageCode} will
* return {@link MedicalScribeLanguageCode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #languageCodeAsString}.
*
*
* @return The language code used to create your Medical Scribe job. US English (en-US
) is the only
* supported language for Medical Scribe jobs.
* @see MedicalScribeLanguageCode
*/
public final String languageCodeAsString() {
return languageCode;
}
/**
*
* Provides the status of the specified Medical Scribe job.
*
*
* If the status is COMPLETED
, the job is finished and you can find the results at the location
* specified in MedicalScribeOutput
If the status is FAILED
, FailureReason
* provides details on why your Medical Scribe job failed.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #medicalScribeJobStatus} will return {@link MedicalScribeJobStatus#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #medicalScribeJobStatusAsString}.
*
*
* @return Provides the status of the specified Medical Scribe job.
*
* If the status is COMPLETED
, the job is finished and you can find the results at the location
* specified in MedicalScribeOutput
If the status is FAILED
,
* FailureReason
provides details on why your Medical Scribe job failed.
* @see MedicalScribeJobStatus
*/
public final MedicalScribeJobStatus medicalScribeJobStatus() {
return MedicalScribeJobStatus.fromValue(medicalScribeJobStatus);
}
/**
*
* Provides the status of the specified Medical Scribe job.
*
*
* If the status is COMPLETED
, the job is finished and you can find the results at the location
* specified in MedicalScribeOutput
If the status is FAILED
, FailureReason
* provides details on why your Medical Scribe job failed.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #medicalScribeJobStatus} will return {@link MedicalScribeJobStatus#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #medicalScribeJobStatusAsString}.
*
*
* @return Provides the status of the specified Medical Scribe job.
*
* If the status is COMPLETED
, the job is finished and you can find the results at the location
* specified in MedicalScribeOutput
If the status is FAILED
,
* FailureReason
provides details on why your Medical Scribe job failed.
* @see MedicalScribeJobStatus
*/
public final String medicalScribeJobStatusAsString() {
return medicalScribeJobStatus;
}
/**
*
* If MedicalScribeJobStatus
is FAILED
, FailureReason
contains information
* about why the transcription job failed. See also: Common Errors.
*
*
* @return If MedicalScribeJobStatus
is FAILED
, FailureReason
contains
* information about why the transcription job failed. See also: Common Errors.
*/
public final String failureReason() {
return failureReason;
}
@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(medicalScribeJobName());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(startTime());
hashCode = 31 * hashCode + Objects.hashCode(completionTime());
hashCode = 31 * hashCode + Objects.hashCode(languageCodeAsString());
hashCode = 31 * hashCode + Objects.hashCode(medicalScribeJobStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(failureReason());
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 MedicalScribeJobSummary)) {
return false;
}
MedicalScribeJobSummary other = (MedicalScribeJobSummary) obj;
return Objects.equals(medicalScribeJobName(), other.medicalScribeJobName())
&& Objects.equals(creationTime(), other.creationTime()) && Objects.equals(startTime(), other.startTime())
&& Objects.equals(completionTime(), other.completionTime())
&& Objects.equals(languageCodeAsString(), other.languageCodeAsString())
&& Objects.equals(medicalScribeJobStatusAsString(), other.medicalScribeJobStatusAsString())
&& Objects.equals(failureReason(), other.failureReason());
}
/**
* 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("MedicalScribeJobSummary").add("MedicalScribeJobName", medicalScribeJobName())
.add("CreationTime", creationTime()).add("StartTime", startTime()).add("CompletionTime", completionTime())
.add("LanguageCode", languageCodeAsString()).add("MedicalScribeJobStatus", medicalScribeJobStatusAsString())
.add("FailureReason", failureReason()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "MedicalScribeJobName":
return Optional.ofNullable(clazz.cast(medicalScribeJobName()));
case "CreationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
case "StartTime":
return Optional.ofNullable(clazz.cast(startTime()));
case "CompletionTime":
return Optional.ofNullable(clazz.cast(completionTime()));
case "LanguageCode":
return Optional.ofNullable(clazz.cast(languageCodeAsString()));
case "MedicalScribeJobStatus":
return Optional.ofNullable(clazz.cast(medicalScribeJobStatusAsString()));
case "FailureReason":
return Optional.ofNullable(clazz.cast(failureReason()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function