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

software.amazon.awssdk.services.transcribe.model.CallAnalyticsJobSettings 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.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Provides additional optional settings for your request, including content redaction, automatic language * identification; allows you to apply custom language models, custom vocabulary filters, and custom vocabularies. *

*/ @Generated("software.amazon.awssdk:codegen") public final class CallAnalyticsJobSettings implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField VOCABULARY_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("VocabularyName").getter(getter(CallAnalyticsJobSettings::vocabularyName)) .setter(setter(Builder::vocabularyName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VocabularyName").build()).build(); private static final SdkField VOCABULARY_FILTER_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("VocabularyFilterName").getter(getter(CallAnalyticsJobSettings::vocabularyFilterName)) .setter(setter(Builder::vocabularyFilterName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VocabularyFilterName").build()) .build(); private static final SdkField VOCABULARY_FILTER_METHOD_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("VocabularyFilterMethod").getter(getter(CallAnalyticsJobSettings::vocabularyFilterMethodAsString)) .setter(setter(Builder::vocabularyFilterMethod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VocabularyFilterMethod").build()) .build(); private static final SdkField LANGUAGE_MODEL_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LanguageModelName").getter(getter(CallAnalyticsJobSettings::languageModelName)) .setter(setter(Builder::languageModelName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LanguageModelName").build()).build(); private static final SdkField CONTENT_REDACTION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ContentRedaction") .getter(getter(CallAnalyticsJobSettings::contentRedaction)).setter(setter(Builder::contentRedaction)) .constructor(ContentRedaction::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ContentRedaction").build()).build(); private static final SdkField> LANGUAGE_OPTIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("LanguageOptions") .getter(getter(CallAnalyticsJobSettings::languageOptionsAsStrings)) .setter(setter(Builder::languageOptionsWithStrings)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LanguageOptions").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> LANGUAGE_ID_SETTINGS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("LanguageIdSettings") .getter(getter(CallAnalyticsJobSettings::languageIdSettingsAsStrings)) .setter(setter(Builder::languageIdSettingsWithStrings)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LanguageIdSettings").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(LanguageIdSettings::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField SUMMARIZATION_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("Summarization").getter(getter(CallAnalyticsJobSettings::summarization)) .setter(setter(Builder::summarization)).constructor(Summarization::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Summarization").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(VOCABULARY_NAME_FIELD, VOCABULARY_FILTER_NAME_FIELD, VOCABULARY_FILTER_METHOD_FIELD, LANGUAGE_MODEL_NAME_FIELD, CONTENT_REDACTION_FIELD, LANGUAGE_OPTIONS_FIELD, LANGUAGE_ID_SETTINGS_FIELD, SUMMARIZATION_FIELD)); private static final long serialVersionUID = 1L; private final String vocabularyName; private final String vocabularyFilterName; private final String vocabularyFilterMethod; private final String languageModelName; private final ContentRedaction contentRedaction; private final List languageOptions; private final Map languageIdSettings; private final Summarization summarization; private CallAnalyticsJobSettings(BuilderImpl builder) { this.vocabularyName = builder.vocabularyName; this.vocabularyFilterName = builder.vocabularyFilterName; this.vocabularyFilterMethod = builder.vocabularyFilterMethod; this.languageModelName = builder.languageModelName; this.contentRedaction = builder.contentRedaction; this.languageOptions = builder.languageOptions; this.languageIdSettings = builder.languageIdSettings; this.summarization = builder.summarization; } /** *

* The name of the custom vocabulary you want to include in your Call Analytics transcription request. Custom * vocabulary names are case sensitive. *

* * @return The name of the custom vocabulary you want to include in your Call Analytics transcription request. * Custom vocabulary names are case sensitive. */ public final String vocabularyName() { return vocabularyName; } /** *

* The name of the custom vocabulary filter you want to include in your Call Analytics transcription request. Custom * vocabulary filter names are case sensitive. *

*

* Note that if you include VocabularyFilterName in your request, you must also include * VocabularyFilterMethod. *

* * @return The name of the custom vocabulary filter you want to include in your Call Analytics transcription * request. Custom vocabulary filter names are case sensitive.

*

* Note that if you include VocabularyFilterName in your request, you must also include * VocabularyFilterMethod. */ public final String vocabularyFilterName() { return vocabularyFilterName; } /** *

* Specify how you want your custom vocabulary filter applied to your transcript. *

*

* To replace words with ***, choose mask. *

*

* To delete words, choose remove. *

*

* To flag words without changing them, choose tag. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #vocabularyFilterMethod} will return {@link VocabularyFilterMethod#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #vocabularyFilterMethodAsString}. *

* * @return Specify how you want your custom vocabulary filter applied to your transcript.

*

* To replace words with ***, choose mask. *

*

* To delete words, choose remove. *

*

* To flag words without changing them, choose tag. * @see VocabularyFilterMethod */ public final VocabularyFilterMethod vocabularyFilterMethod() { return VocabularyFilterMethod.fromValue(vocabularyFilterMethod); } /** *

* Specify how you want your custom vocabulary filter applied to your transcript. *

*

* To replace words with ***, choose mask. *

*

* To delete words, choose remove. *

*

* To flag words without changing them, choose tag. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #vocabularyFilterMethod} will return {@link VocabularyFilterMethod#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #vocabularyFilterMethodAsString}. *

* * @return Specify how you want your custom vocabulary filter applied to your transcript.

*

* To replace words with ***, choose mask. *

*

* To delete words, choose remove. *

*

* To flag words without changing them, choose tag. * @see VocabularyFilterMethod */ public final String vocabularyFilterMethodAsString() { return vocabularyFilterMethod; } /** *

* The name of the custom language model you want to use when processing your Call Analytics job. Note that custom * language model names are case sensitive. *

*

* The language of the specified custom language model must match the language code that you specify in your * transcription request. If the languages do not match, the custom language model isn't applied. There are no * errors or warnings associated with a language mismatch. *

* * @return The name of the custom language model you want to use when processing your Call Analytics job. Note that * custom language model names are case sensitive.

*

* The language of the specified custom language model must match the language code that you specify in your * transcription request. If the languages do not match, the custom language model isn't applied. There are * no errors or warnings associated with a language mismatch. */ public final String languageModelName() { return languageModelName; } /** * Returns the value of the ContentRedaction property for this object. * * @return The value of the ContentRedaction property for this object. */ public final ContentRedaction contentRedaction() { return contentRedaction; } /** *

* You can specify two or more language codes that represent the languages you think may be present in your media. * Including more than five is not recommended. If you're unsure what languages are present, do not include this * parameter. *

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported languages table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded at a sample * rate of 16,000 Hz or higher. *

*

* 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 #hasLanguageOptions} method. *

* * @return You can specify two or more language codes that represent the languages you think may be present in your * media. Including more than five is not recommended. If you're unsure what languages are present, do not * include this parameter.

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported languages * table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded at a * sample rate of 16,000 Hz or higher. */ public final List languageOptions() { return LanguageOptionsCopier.copyStringToEnum(languageOptions); } /** * For responses, this returns true if the service returned a value for the LanguageOptions 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 hasLanguageOptions() { return languageOptions != null && !(languageOptions instanceof SdkAutoConstructList); } /** *

* You can specify two or more language codes that represent the languages you think may be present in your media. * Including more than five is not recommended. If you're unsure what languages are present, do not include this * parameter. *

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported languages table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded at a sample * rate of 16,000 Hz or higher. *

*

* 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 #hasLanguageOptions} method. *

* * @return You can specify two or more language codes that represent the languages you think may be present in your * media. Including more than five is not recommended. If you're unsure what languages are present, do not * include this parameter.

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported languages * table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded at a * sample rate of 16,000 Hz or higher. */ public final List languageOptionsAsStrings() { return languageOptions; } /** *

* If using automatic language identification in your request and you want to apply a custom language model, a * custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings with the relevant * sub-parameters (VocabularyName, LanguageModelName, and * VocabularyFilterName). *

*

* LanguageIdSettings supports two to five language codes. Each language code you include can have an * associated custom language model, custom vocabulary, and custom vocabulary filter. The language codes that you * specify must match the languages of the associated custom language models, custom vocabularies, and custom * vocabulary filters. *

*

* It's recommended that you include LanguageOptions when using LanguageIdSettings to * ensure that the correct language dialect is identified. For example, if you specify a custom vocabulary that is * in en-US but Amazon Transcribe determines that the language spoken in your media is * en-AU, your custom vocabulary is not applied to your transcription. If you include * LanguageOptions and include en-US as the only English language dialect, your custom * vocabulary is applied to your transcription. *

*

* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your request * but do not want to use automatic language identification, use instead the * parameter with the LanguageModelName, VocabularyName, or * VocabularyFilterName sub-parameters. *

*

* For a list of languages supported with Call Analytics, refer to Supported languages and * language-specific features. *

*

* 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 #hasLanguageIdSettings} method. *

* * @return If using automatic language identification in your request and you want to apply a custom language model, * a custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings with the * relevant sub-parameters (VocabularyName, LanguageModelName, and * VocabularyFilterName).

*

* LanguageIdSettings supports two to five language codes. Each language code you include can * have an associated custom language model, custom vocabulary, and custom vocabulary filter. The language * codes that you specify must match the languages of the associated custom language models, custom * vocabularies, and custom vocabulary filters. *

*

* It's recommended that you include LanguageOptions when using LanguageIdSettings * to ensure that the correct language dialect is identified. For example, if you specify a custom * vocabulary that is in en-US but Amazon Transcribe determines that the language spoken in * your media is en-AU, your custom vocabulary is not applied to your transcription. If * you include LanguageOptions and include en-US as the only English language * dialect, your custom vocabulary is applied to your transcription. *

*

* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your * request but do not want to use automatic language identification, use instead the * parameter with the LanguageModelName, VocabularyName, or * VocabularyFilterName sub-parameters. *

*

* For a list of languages supported with Call Analytics, refer to Supported languages and * language-specific features. */ public final Map languageIdSettings() { return LanguageIdSettingsMapCopier.copyStringToEnum(languageIdSettings); } /** * For responses, this returns true if the service returned a value for the LanguageIdSettings 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 hasLanguageIdSettings() { return languageIdSettings != null && !(languageIdSettings instanceof SdkAutoConstructMap); } /** *

* If using automatic language identification in your request and you want to apply a custom language model, a * custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings with the relevant * sub-parameters (VocabularyName, LanguageModelName, and * VocabularyFilterName). *

*

* LanguageIdSettings supports two to five language codes. Each language code you include can have an * associated custom language model, custom vocabulary, and custom vocabulary filter. The language codes that you * specify must match the languages of the associated custom language models, custom vocabularies, and custom * vocabulary filters. *

*

* It's recommended that you include LanguageOptions when using LanguageIdSettings to * ensure that the correct language dialect is identified. For example, if you specify a custom vocabulary that is * in en-US but Amazon Transcribe determines that the language spoken in your media is * en-AU, your custom vocabulary is not applied to your transcription. If you include * LanguageOptions and include en-US as the only English language dialect, your custom * vocabulary is applied to your transcription. *

*

* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your request * but do not want to use automatic language identification, use instead the * parameter with the LanguageModelName, VocabularyName, or * VocabularyFilterName sub-parameters. *

*

* For a list of languages supported with Call Analytics, refer to Supported languages and * language-specific features. *

*

* 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 #hasLanguageIdSettings} method. *

* * @return If using automatic language identification in your request and you want to apply a custom language model, * a custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings with the * relevant sub-parameters (VocabularyName, LanguageModelName, and * VocabularyFilterName).

*

* LanguageIdSettings supports two to five language codes. Each language code you include can * have an associated custom language model, custom vocabulary, and custom vocabulary filter. The language * codes that you specify must match the languages of the associated custom language models, custom * vocabularies, and custom vocabulary filters. *

*

* It's recommended that you include LanguageOptions when using LanguageIdSettings * to ensure that the correct language dialect is identified. For example, if you specify a custom * vocabulary that is in en-US but Amazon Transcribe determines that the language spoken in * your media is en-AU, your custom vocabulary is not applied to your transcription. If * you include LanguageOptions and include en-US as the only English language * dialect, your custom vocabulary is applied to your transcription. *

*

* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your * request but do not want to use automatic language identification, use instead the * parameter with the LanguageModelName, VocabularyName, or * VocabularyFilterName sub-parameters. *

*

* For a list of languages supported with Call Analytics, refer to Supported languages and * language-specific features. */ public final Map languageIdSettingsAsStrings() { return languageIdSettings; } /** *

* Contains GenerateAbstractiveSummary, which is a required parameter if you want to enable Generative * call summarization in your Call Analytics request. *

* * @return Contains GenerateAbstractiveSummary, which is a required parameter if you want to enable * Generative call summarization in your Call Analytics request. */ public final Summarization summarization() { return summarization; } @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(vocabularyName()); hashCode = 31 * hashCode + Objects.hashCode(vocabularyFilterName()); hashCode = 31 * hashCode + Objects.hashCode(vocabularyFilterMethodAsString()); hashCode = 31 * hashCode + Objects.hashCode(languageModelName()); hashCode = 31 * hashCode + Objects.hashCode(contentRedaction()); hashCode = 31 * hashCode + Objects.hashCode(hasLanguageOptions() ? languageOptionsAsStrings() : null); hashCode = 31 * hashCode + Objects.hashCode(hasLanguageIdSettings() ? languageIdSettingsAsStrings() : null); hashCode = 31 * hashCode + Objects.hashCode(summarization()); 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 CallAnalyticsJobSettings)) { return false; } CallAnalyticsJobSettings other = (CallAnalyticsJobSettings) obj; return Objects.equals(vocabularyName(), other.vocabularyName()) && Objects.equals(vocabularyFilterName(), other.vocabularyFilterName()) && Objects.equals(vocabularyFilterMethodAsString(), other.vocabularyFilterMethodAsString()) && Objects.equals(languageModelName(), other.languageModelName()) && Objects.equals(contentRedaction(), other.contentRedaction()) && hasLanguageOptions() == other.hasLanguageOptions() && Objects.equals(languageOptionsAsStrings(), other.languageOptionsAsStrings()) && hasLanguageIdSettings() == other.hasLanguageIdSettings() && Objects.equals(languageIdSettingsAsStrings(), other.languageIdSettingsAsStrings()) && Objects.equals(summarization(), other.summarization()); } /** * 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("CallAnalyticsJobSettings").add("VocabularyName", vocabularyName()) .add("VocabularyFilterName", vocabularyFilterName()) .add("VocabularyFilterMethod", vocabularyFilterMethodAsString()).add("LanguageModelName", languageModelName()) .add("ContentRedaction", contentRedaction()) .add("LanguageOptions", hasLanguageOptions() ? languageOptionsAsStrings() : null) .add("LanguageIdSettings", hasLanguageIdSettings() ? languageIdSettingsAsStrings() : null) .add("Summarization", summarization()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "VocabularyName": return Optional.ofNullable(clazz.cast(vocabularyName())); case "VocabularyFilterName": return Optional.ofNullable(clazz.cast(vocabularyFilterName())); case "VocabularyFilterMethod": return Optional.ofNullable(clazz.cast(vocabularyFilterMethodAsString())); case "LanguageModelName": return Optional.ofNullable(clazz.cast(languageModelName())); case "ContentRedaction": return Optional.ofNullable(clazz.cast(contentRedaction())); case "LanguageOptions": return Optional.ofNullable(clazz.cast(languageOptionsAsStrings())); case "LanguageIdSettings": return Optional.ofNullable(clazz.cast(languageIdSettingsAsStrings())); case "Summarization": return Optional.ofNullable(clazz.cast(summarization())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CallAnalyticsJobSettings) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The name of the custom vocabulary you want to include in your Call Analytics transcription request. Custom * vocabulary names are case sensitive. *

* * @param vocabularyName * The name of the custom vocabulary you want to include in your Call Analytics transcription request. * Custom vocabulary names are case sensitive. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vocabularyName(String vocabularyName); /** *

* The name of the custom vocabulary filter you want to include in your Call Analytics transcription request. * Custom vocabulary filter names are case sensitive. *

*

* Note that if you include VocabularyFilterName in your request, you must also include * VocabularyFilterMethod. *

* * @param vocabularyFilterName * The name of the custom vocabulary filter you want to include in your Call Analytics transcription * request. Custom vocabulary filter names are case sensitive.

*

* Note that if you include VocabularyFilterName in your request, you must also include * VocabularyFilterMethod. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vocabularyFilterName(String vocabularyFilterName); /** *

* Specify how you want your custom vocabulary filter applied to your transcript. *

*

* To replace words with ***, choose mask. *

*

* To delete words, choose remove. *

*

* To flag words without changing them, choose tag. *

* * @param vocabularyFilterMethod * Specify how you want your custom vocabulary filter applied to your transcript.

*

* To replace words with ***, choose mask. *

*

* To delete words, choose remove. *

*

* To flag words without changing them, choose tag. * @see VocabularyFilterMethod * @return Returns a reference to this object so that method calls can be chained together. * @see VocabularyFilterMethod */ Builder vocabularyFilterMethod(String vocabularyFilterMethod); /** *

* Specify how you want your custom vocabulary filter applied to your transcript. *

*

* To replace words with ***, choose mask. *

*

* To delete words, choose remove. *

*

* To flag words without changing them, choose tag. *

* * @param vocabularyFilterMethod * Specify how you want your custom vocabulary filter applied to your transcript.

*

* To replace words with ***, choose mask. *

*

* To delete words, choose remove. *

*

* To flag words without changing them, choose tag. * @see VocabularyFilterMethod * @return Returns a reference to this object so that method calls can be chained together. * @see VocabularyFilterMethod */ Builder vocabularyFilterMethod(VocabularyFilterMethod vocabularyFilterMethod); /** *

* The name of the custom language model you want to use when processing your Call Analytics job. Note that * custom language model names are case sensitive. *

*

* The language of the specified custom language model must match the language code that you specify in your * transcription request. If the languages do not match, the custom language model isn't applied. There are no * errors or warnings associated with a language mismatch. *

* * @param languageModelName * The name of the custom language model you want to use when processing your Call Analytics job. Note * that custom language model names are case sensitive.

*

* The language of the specified custom language model must match the language code that you specify in * your transcription request. If the languages do not match, the custom language model isn't applied. * There are no errors or warnings associated with a language mismatch. * @return Returns a reference to this object so that method calls can be chained together. */ Builder languageModelName(String languageModelName); /** * Sets the value of the ContentRedaction property for this object. * * @param contentRedaction * The new value for the ContentRedaction property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder contentRedaction(ContentRedaction contentRedaction); /** * Sets the value of the ContentRedaction property for this object. * * This is a convenience method that creates an instance of the {@link ContentRedaction.Builder} avoiding the * need to create one manually via {@link ContentRedaction#builder()}. * *

* When the {@link Consumer} completes, {@link ContentRedaction.Builder#build()} is called immediately and its * result is passed to {@link #contentRedaction(ContentRedaction)}. * * @param contentRedaction * a consumer that will call methods on {@link ContentRedaction.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #contentRedaction(ContentRedaction) */ default Builder contentRedaction(Consumer contentRedaction) { return contentRedaction(ContentRedaction.builder().applyMutation(contentRedaction).build()); } /** *

* You can specify two or more language codes that represent the languages you think may be present in your * media. Including more than five is not recommended. If you're unsure what languages are present, do not * include this parameter. *

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported languages * table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded at a * sample rate of 16,000 Hz or higher. *

* * @param languageOptions * You can specify two or more language codes that represent the languages you think may be present in * your media. Including more than five is not recommended. If you're unsure what languages are present, * do not include this parameter.

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported * languages table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded * at a sample rate of 16,000 Hz or higher. * @return Returns a reference to this object so that method calls can be chained together. */ Builder languageOptionsWithStrings(Collection languageOptions); /** *

* You can specify two or more language codes that represent the languages you think may be present in your * media. Including more than five is not recommended. If you're unsure what languages are present, do not * include this parameter. *

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported languages * table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded at a * sample rate of 16,000 Hz or higher. *

* * @param languageOptions * You can specify two or more language codes that represent the languages you think may be present in * your media. Including more than five is not recommended. If you're unsure what languages are present, * do not include this parameter.

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported * languages table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded * at a sample rate of 16,000 Hz or higher. * @return Returns a reference to this object so that method calls can be chained together. */ Builder languageOptionsWithStrings(String... languageOptions); /** *

* You can specify two or more language codes that represent the languages you think may be present in your * media. Including more than five is not recommended. If you're unsure what languages are present, do not * include this parameter. *

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported languages * table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded at a * sample rate of 16,000 Hz or higher. *

* * @param languageOptions * You can specify two or more language codes that represent the languages you think may be present in * your media. Including more than five is not recommended. If you're unsure what languages are present, * do not include this parameter.

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported * languages table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded * at a sample rate of 16,000 Hz or higher. * @return Returns a reference to this object so that method calls can be chained together. */ Builder languageOptions(Collection languageOptions); /** *

* You can specify two or more language codes that represent the languages you think may be present in your * media. Including more than five is not recommended. If you're unsure what languages are present, do not * include this parameter. *

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported languages * table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded at a * sample rate of 16,000 Hz or higher. *

* * @param languageOptions * You can specify two or more language codes that represent the languages you think may be present in * your media. Including more than five is not recommended. If you're unsure what languages are present, * do not include this parameter.

*

* Including language options can improve the accuracy of language identification. *

*

* For a list of languages supported with Call Analytics, refer to the Supported * languages table. *

*

* To transcribe speech in Modern Standard Arabic (ar-SA), your media file must be encoded * at a sample rate of 16,000 Hz or higher. * @return Returns a reference to this object so that method calls can be chained together. */ Builder languageOptions(LanguageCode... languageOptions); /** *

* If using automatic language identification in your request and you want to apply a custom language model, a * custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings with the relevant * sub-parameters (VocabularyName, LanguageModelName, and * VocabularyFilterName). *

*

* LanguageIdSettings supports two to five language codes. Each language code you include can have * an associated custom language model, custom vocabulary, and custom vocabulary filter. The language codes that * you specify must match the languages of the associated custom language models, custom vocabularies, and * custom vocabulary filters. *

*

* It's recommended that you include LanguageOptions when using LanguageIdSettings to * ensure that the correct language dialect is identified. For example, if you specify a custom vocabulary that * is in en-US but Amazon Transcribe determines that the language spoken in your media is * en-AU, your custom vocabulary is not applied to your transcription. If you include * LanguageOptions and include en-US as the only English language dialect, your custom * vocabulary is applied to your transcription. *

*

* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your * request but do not want to use automatic language identification, use instead the * parameter with the LanguageModelName, VocabularyName, or * VocabularyFilterName sub-parameters. *

*

* For a list of languages supported with Call Analytics, refer to Supported languages and * language-specific features. *

* * @param languageIdSettings * If using automatic language identification in your request and you want to apply a custom language * model, a custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings * with the relevant sub-parameters (VocabularyName, LanguageModelName, and * VocabularyFilterName).

*

* LanguageIdSettings supports two to five language codes. Each language code you include * can have an associated custom language model, custom vocabulary, and custom vocabulary filter. The * language codes that you specify must match the languages of the associated custom language models, * custom vocabularies, and custom vocabulary filters. *

*

* It's recommended that you include LanguageOptions when using * LanguageIdSettings to ensure that the correct language dialect is identified. For * example, if you specify a custom vocabulary that is in en-US but Amazon Transcribe * determines that the language spoken in your media is en-AU, your custom vocabulary is * not applied to your transcription. If you include LanguageOptions and include * en-US as the only English language dialect, your custom vocabulary is applied to * your transcription. *

*

* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with * your request but do not want to use automatic language identification, use instead the * parameter with the LanguageModelName, VocabularyName, or * VocabularyFilterName sub-parameters. *

*

* For a list of languages supported with Call Analytics, refer to Supported languages * and language-specific features. * @return Returns a reference to this object so that method calls can be chained together. */ Builder languageIdSettingsWithStrings(Map languageIdSettings); /** *

* If using automatic language identification in your request and you want to apply a custom language model, a * custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings with the relevant * sub-parameters (VocabularyName, LanguageModelName, and * VocabularyFilterName). *

*

* LanguageIdSettings supports two to five language codes. Each language code you include can have * an associated custom language model, custom vocabulary, and custom vocabulary filter. The language codes that * you specify must match the languages of the associated custom language models, custom vocabularies, and * custom vocabulary filters. *

*

* It's recommended that you include LanguageOptions when using LanguageIdSettings to * ensure that the correct language dialect is identified. For example, if you specify a custom vocabulary that * is in en-US but Amazon Transcribe determines that the language spoken in your media is * en-AU, your custom vocabulary is not applied to your transcription. If you include * LanguageOptions and include en-US as the only English language dialect, your custom * vocabulary is applied to your transcription. *

*

* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your * request but do not want to use automatic language identification, use instead the * parameter with the LanguageModelName, VocabularyName, or * VocabularyFilterName sub-parameters. *

*

* For a list of languages supported with Call Analytics, refer to Supported languages and * language-specific features. *

* * @param languageIdSettings * If using automatic language identification in your request and you want to apply a custom language * model, a custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings * with the relevant sub-parameters (VocabularyName, LanguageModelName, and * VocabularyFilterName).

*

* LanguageIdSettings supports two to five language codes. Each language code you include * can have an associated custom language model, custom vocabulary, and custom vocabulary filter. The * language codes that you specify must match the languages of the associated custom language models, * custom vocabularies, and custom vocabulary filters. *

*

* It's recommended that you include LanguageOptions when using * LanguageIdSettings to ensure that the correct language dialect is identified. For * example, if you specify a custom vocabulary that is in en-US but Amazon Transcribe * determines that the language spoken in your media is en-AU, your custom vocabulary is * not applied to your transcription. If you include LanguageOptions and include * en-US as the only English language dialect, your custom vocabulary is applied to * your transcription. *

*

* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with * your request but do not want to use automatic language identification, use instead the * parameter with the LanguageModelName, VocabularyName, or * VocabularyFilterName sub-parameters. *

*

* For a list of languages supported with Call Analytics, refer to Supported languages * and language-specific features. * @return Returns a reference to this object so that method calls can be chained together. */ Builder languageIdSettings(Map languageIdSettings); /** *

* Contains GenerateAbstractiveSummary, which is a required parameter if you want to enable * Generative call summarization in your Call Analytics request. *

* * @param summarization * Contains GenerateAbstractiveSummary, which is a required parameter if you want to enable * Generative call summarization in your Call Analytics request. * @return Returns a reference to this object so that method calls can be chained together. */ Builder summarization(Summarization summarization); /** *

* Contains GenerateAbstractiveSummary, which is a required parameter if you want to enable * Generative call summarization in your Call Analytics request. *

* This is a convenience method that creates an instance of the {@link Summarization.Builder} avoiding the need * to create one manually via {@link Summarization#builder()}. * *

* When the {@link Consumer} completes, {@link Summarization.Builder#build()} is called immediately and its * result is passed to {@link #summarization(Summarization)}. * * @param summarization * a consumer that will call methods on {@link Summarization.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #summarization(Summarization) */ default Builder summarization(Consumer summarization) { return summarization(Summarization.builder().applyMutation(summarization).build()); } } static final class BuilderImpl implements Builder { private String vocabularyName; private String vocabularyFilterName; private String vocabularyFilterMethod; private String languageModelName; private ContentRedaction contentRedaction; private List languageOptions = DefaultSdkAutoConstructList.getInstance(); private Map languageIdSettings = DefaultSdkAutoConstructMap.getInstance(); private Summarization summarization; private BuilderImpl() { } private BuilderImpl(CallAnalyticsJobSettings model) { vocabularyName(model.vocabularyName); vocabularyFilterName(model.vocabularyFilterName); vocabularyFilterMethod(model.vocabularyFilterMethod); languageModelName(model.languageModelName); contentRedaction(model.contentRedaction); languageOptionsWithStrings(model.languageOptions); languageIdSettingsWithStrings(model.languageIdSettings); summarization(model.summarization); } public final String getVocabularyName() { return vocabularyName; } public final void setVocabularyName(String vocabularyName) { this.vocabularyName = vocabularyName; } @Override public final Builder vocabularyName(String vocabularyName) { this.vocabularyName = vocabularyName; return this; } public final String getVocabularyFilterName() { return vocabularyFilterName; } public final void setVocabularyFilterName(String vocabularyFilterName) { this.vocabularyFilterName = vocabularyFilterName; } @Override public final Builder vocabularyFilterName(String vocabularyFilterName) { this.vocabularyFilterName = vocabularyFilterName; return this; } public final String getVocabularyFilterMethod() { return vocabularyFilterMethod; } public final void setVocabularyFilterMethod(String vocabularyFilterMethod) { this.vocabularyFilterMethod = vocabularyFilterMethod; } @Override public final Builder vocabularyFilterMethod(String vocabularyFilterMethod) { this.vocabularyFilterMethod = vocabularyFilterMethod; return this; } @Override public final Builder vocabularyFilterMethod(VocabularyFilterMethod vocabularyFilterMethod) { this.vocabularyFilterMethod(vocabularyFilterMethod == null ? null : vocabularyFilterMethod.toString()); return this; } public final String getLanguageModelName() { return languageModelName; } public final void setLanguageModelName(String languageModelName) { this.languageModelName = languageModelName; } @Override public final Builder languageModelName(String languageModelName) { this.languageModelName = languageModelName; return this; } public final ContentRedaction.Builder getContentRedaction() { return contentRedaction != null ? contentRedaction.toBuilder() : null; } public final void setContentRedaction(ContentRedaction.BuilderImpl contentRedaction) { this.contentRedaction = contentRedaction != null ? contentRedaction.build() : null; } @Override public final Builder contentRedaction(ContentRedaction contentRedaction) { this.contentRedaction = contentRedaction; return this; } public final Collection getLanguageOptions() { if (languageOptions instanceof SdkAutoConstructList) { return null; } return languageOptions; } public final void setLanguageOptions(Collection languageOptions) { this.languageOptions = LanguageOptionsCopier.copy(languageOptions); } @Override public final Builder languageOptionsWithStrings(Collection languageOptions) { this.languageOptions = LanguageOptionsCopier.copy(languageOptions); return this; } @Override @SafeVarargs public final Builder languageOptionsWithStrings(String... languageOptions) { languageOptionsWithStrings(Arrays.asList(languageOptions)); return this; } @Override public final Builder languageOptions(Collection languageOptions) { this.languageOptions = LanguageOptionsCopier.copyEnumToString(languageOptions); return this; } @Override @SafeVarargs public final Builder languageOptions(LanguageCode... languageOptions) { languageOptions(Arrays.asList(languageOptions)); return this; } public final Map getLanguageIdSettings() { Map result = LanguageIdSettingsMapCopier.copyToBuilder(this.languageIdSettings); if (result instanceof SdkAutoConstructMap) { return null; } return result; } public final void setLanguageIdSettings(Map languageIdSettings) { this.languageIdSettings = LanguageIdSettingsMapCopier.copyFromBuilder(languageIdSettings); } @Override public final Builder languageIdSettingsWithStrings(Map languageIdSettings) { this.languageIdSettings = LanguageIdSettingsMapCopier.copy(languageIdSettings); return this; } @Override public final Builder languageIdSettings(Map languageIdSettings) { this.languageIdSettings = LanguageIdSettingsMapCopier.copyEnumToString(languageIdSettings); return this; } public final Summarization.Builder getSummarization() { return summarization != null ? summarization.toBuilder() : null; } public final void setSummarization(Summarization.BuilderImpl summarization) { this.summarization = summarization != null ? summarization.build() : null; } @Override public final Builder summarization(Summarization summarization) { this.summarization = summarization; return this; } @Override public CallAnalyticsJobSettings build() { return new CallAnalyticsJobSettings(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }