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

software.amazon.awssdk.services.transcribe.model.Media Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Transcribe module holds the client classes that are used for communicating with Transcribe.

There is a newer version: 2.29.39
Show newest version
/*
 * 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.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;

/**
 * 

* Describes the Amazon S3 location of the media file you want to use in your request. *

*

* For information on supported media formats, refer to the MediaFormat parameter or the Media formats section in * the Amazon S3 Developer Guide. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Media implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField MEDIA_FILE_URI_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("MediaFileUri").getter(getter(Media::mediaFileUri)).setter(setter(Builder::mediaFileUri)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MediaFileUri").build()).build(); private static final SdkField REDACTED_MEDIA_FILE_URI_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RedactedMediaFileUri").getter(getter(Media::redactedMediaFileUri)) .setter(setter(Builder::redactedMediaFileUri)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RedactedMediaFileUri").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(MEDIA_FILE_URI_FIELD, REDACTED_MEDIA_FILE_URI_FIELD)); private static final long serialVersionUID = 1L; private final String mediaFileUri; private final String redactedMediaFileUri; private Media(BuilderImpl builder) { this.mediaFileUri = builder.mediaFileUri; this.redactedMediaFileUri = builder.redactedMediaFileUri; } /** *

* The Amazon S3 location of the media file you want to transcribe. For example: *

*
    *
  • *

    * s3://DOC-EXAMPLE-BUCKET/my-media-file.flac *

    *
  • *
  • *

    * s3://DOC-EXAMPLE-BUCKET/media-files/my-media-file.flac *

    *
  • *
*

* Note that the Amazon S3 bucket that contains your input media must be located in the same Amazon Web Services * Region where you're making your transcription request. *

* * @return The Amazon S3 location of the media file you want to transcribe. For example:

*
    *
  • *

    * s3://DOC-EXAMPLE-BUCKET/my-media-file.flac *

    *
  • *
  • *

    * s3://DOC-EXAMPLE-BUCKET/media-files/my-media-file.flac *

    *
  • *
*

* Note that the Amazon S3 bucket that contains your input media must be located in the same Amazon Web * Services Region where you're making your transcription request. */ public final String mediaFileUri() { return mediaFileUri; } /** *

* The Amazon S3 location of the media file you want to redact. For example: *

*
    *
  • *

    * s3://DOC-EXAMPLE-BUCKET/my-media-file.flac *

    *
  • *
  • *

    * s3://DOC-EXAMPLE-BUCKET/media-files/my-media-file.flac *

    *
  • *
*

* Note that the Amazon S3 bucket that contains your input media must be located in the same Amazon Web Services * Region where you're making your transcription request. *

* *

* RedactedMediaFileUri produces a redacted audio file in addition to a redacted transcript. It is only * supported for Call Analytics (StartCallAnalyticsJob) transcription requests. *

*
* * @return The Amazon S3 location of the media file you want to redact. For example:

*
    *
  • *

    * s3://DOC-EXAMPLE-BUCKET/my-media-file.flac *

    *
  • *
  • *

    * s3://DOC-EXAMPLE-BUCKET/media-files/my-media-file.flac *

    *
  • *
*

* Note that the Amazon S3 bucket that contains your input media must be located in the same Amazon Web * Services Region where you're making your transcription request. *

* *

* RedactedMediaFileUri produces a redacted audio file in addition to a redacted transcript. It * is only supported for Call Analytics (StartCallAnalyticsJob) transcription requests. *

*/ public final String redactedMediaFileUri() { return redactedMediaFileUri; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(mediaFileUri()); hashCode = 31 * hashCode + Objects.hashCode(redactedMediaFileUri()); 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 Media)) { return false; } Media other = (Media) obj; return Objects.equals(mediaFileUri(), other.mediaFileUri()) && Objects.equals(redactedMediaFileUri(), other.redactedMediaFileUri()); } /** * 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("Media").add("MediaFileUri", mediaFileUri()).add("RedactedMediaFileUri", redactedMediaFileUri()) .build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "MediaFileUri": return Optional.ofNullable(clazz.cast(mediaFileUri())); case "RedactedMediaFileUri": return Optional.ofNullable(clazz.cast(redactedMediaFileUri())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Media) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The Amazon S3 location of the media file you want to transcribe. For example: *

*
    *
  • *

    * s3://DOC-EXAMPLE-BUCKET/my-media-file.flac *

    *
  • *
  • *

    * s3://DOC-EXAMPLE-BUCKET/media-files/my-media-file.flac *

    *
  • *
*

* Note that the Amazon S3 bucket that contains your input media must be located in the same Amazon Web Services * Region where you're making your transcription request. *

* * @param mediaFileUri * The Amazon S3 location of the media file you want to transcribe. For example:

*
    *
  • *

    * s3://DOC-EXAMPLE-BUCKET/my-media-file.flac *

    *
  • *
  • *

    * s3://DOC-EXAMPLE-BUCKET/media-files/my-media-file.flac *

    *
  • *
*

* Note that the Amazon S3 bucket that contains your input media must be located in the same Amazon Web * Services Region where you're making your transcription request. * @return Returns a reference to this object so that method calls can be chained together. */ Builder mediaFileUri(String mediaFileUri); /** *

* The Amazon S3 location of the media file you want to redact. For example: *

*
    *
  • *

    * s3://DOC-EXAMPLE-BUCKET/my-media-file.flac *

    *
  • *
  • *

    * s3://DOC-EXAMPLE-BUCKET/media-files/my-media-file.flac *

    *
  • *
*

* Note that the Amazon S3 bucket that contains your input media must be located in the same Amazon Web Services * Region where you're making your transcription request. *

* *

* RedactedMediaFileUri produces a redacted audio file in addition to a redacted transcript. It is * only supported for Call Analytics (StartCallAnalyticsJob) transcription requests. *

*
* * @param redactedMediaFileUri * The Amazon S3 location of the media file you want to redact. For example:

*
    *
  • *

    * s3://DOC-EXAMPLE-BUCKET/my-media-file.flac *

    *
  • *
  • *

    * s3://DOC-EXAMPLE-BUCKET/media-files/my-media-file.flac *

    *
  • *
*

* Note that the Amazon S3 bucket that contains your input media must be located in the same Amazon Web * Services Region where you're making your transcription request. *

* *

* RedactedMediaFileUri produces a redacted audio file in addition to a redacted transcript. * It is only supported for Call Analytics (StartCallAnalyticsJob) transcription requests. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder redactedMediaFileUri(String redactedMediaFileUri); } static final class BuilderImpl implements Builder { private String mediaFileUri; private String redactedMediaFileUri; private BuilderImpl() { } private BuilderImpl(Media model) { mediaFileUri(model.mediaFileUri); redactedMediaFileUri(model.redactedMediaFileUri); } public final String getMediaFileUri() { return mediaFileUri; } public final void setMediaFileUri(String mediaFileUri) { this.mediaFileUri = mediaFileUri; } @Override public final Builder mediaFileUri(String mediaFileUri) { this.mediaFileUri = mediaFileUri; return this; } public final String getRedactedMediaFileUri() { return redactedMediaFileUri; } public final void setRedactedMediaFileUri(String redactedMediaFileUri) { this.redactedMediaFileUri = redactedMediaFileUri; } @Override public final Builder redactedMediaFileUri(String redactedMediaFileUri) { this.redactedMediaFileUri = redactedMediaFileUri; return this; } @Override public Media build() { return new Media(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy