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

software.amazon.awssdk.services.mediatailor.model.PutPlaybackConfigurationRequest Maven / Gradle / Ivy

/*
 * 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.mediatailor.model;

import java.util.Arrays;
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.awscore.AwsRequestOverrideConfiguration;
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.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
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;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class PutPlaybackConfigurationRequest extends MediaTailorRequest implements
        ToCopyableBuilder {
    private static final SdkField AD_DECISION_SERVER_URL_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("AdDecisionServerUrl").getter(getter(PutPlaybackConfigurationRequest::adDecisionServerUrl))
            .setter(setter(Builder::adDecisionServerUrl))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AdDecisionServerUrl").build())
            .build();

    private static final SdkField AVAIL_SUPPRESSION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("AvailSuppression")
            .getter(getter(PutPlaybackConfigurationRequest::availSuppression)).setter(setter(Builder::availSuppression))
            .constructor(AvailSuppression::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailSuppression").build()).build();

    private static final SdkField BUMPER_FIELD = SdkField. builder(MarshallingType.SDK_POJO).memberName("Bumper")
            .getter(getter(PutPlaybackConfigurationRequest::bumper)).setter(setter(Builder::bumper)).constructor(Bumper::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Bumper").build()).build();

    private static final SdkField CDN_CONFIGURATION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("CdnConfiguration")
            .getter(getter(PutPlaybackConfigurationRequest::cdnConfiguration)).setter(setter(Builder::cdnConfiguration))
            .constructor(CdnConfiguration::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CdnConfiguration").build()).build();

    private static final SdkField>> CONFIGURATION_ALIASES_FIELD = SdkField
            .>> builder(MarshallingType.MAP)
            .memberName("ConfigurationAliases")
            .getter(getter(PutPlaybackConfigurationRequest::configurationAliases))
            .setter(setter(Builder::configurationAliases))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ConfigurationAliases").build(),
                    MapTrait.builder()
                            .keyLocationName("key")
                            .valueLocationName("value")
                            .valueFieldInfo(
                                    SdkField.> builder(MarshallingType.MAP)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("value").build(),
                                                    MapTrait.builder()
                                                            .keyLocationName("key")
                                                            .valueLocationName("value")
                                                            .valueFieldInfo(
                                                                    SdkField. builder(MarshallingType.STRING)
                                                                            .traits(LocationTrait.builder()
                                                                                    .location(MarshallLocation.PAYLOAD)
                                                                                    .locationName("value").build()).build())
                                                            .build()).build()).build()).build();

    private static final SdkField DASH_CONFIGURATION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("DashConfiguration")
            .getter(getter(PutPlaybackConfigurationRequest::dashConfiguration)).setter(setter(Builder::dashConfiguration))
            .constructor(DashConfigurationForPut::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DashConfiguration").build()).build();

    private static final SdkField LIVE_PRE_ROLL_CONFIGURATION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("LivePreRollConfiguration")
            .getter(getter(PutPlaybackConfigurationRequest::livePreRollConfiguration))
            .setter(setter(Builder::livePreRollConfiguration)).constructor(LivePreRollConfiguration::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LivePreRollConfiguration").build())
            .build();

    private static final SdkField MANIFEST_PROCESSING_RULES_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("ManifestProcessingRules")
            .getter(getter(PutPlaybackConfigurationRequest::manifestProcessingRules))
            .setter(setter(Builder::manifestProcessingRules)).constructor(ManifestProcessingRules::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ManifestProcessingRules").build())
            .build();

    private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name")
            .getter(getter(PutPlaybackConfigurationRequest::name)).setter(setter(Builder::name))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build();

    private static final SdkField PERSONALIZATION_THRESHOLD_SECONDS_FIELD = SdkField
            . builder(MarshallingType.INTEGER)
            .memberName("PersonalizationThresholdSeconds")
            .getter(getter(PutPlaybackConfigurationRequest::personalizationThresholdSeconds))
            .setter(setter(Builder::personalizationThresholdSeconds))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PersonalizationThresholdSeconds")
                    .build()).build();

    private static final SdkField SLATE_AD_URL_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("SlateAdUrl").getter(getter(PutPlaybackConfigurationRequest::slateAdUrl))
            .setter(setter(Builder::slateAdUrl))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SlateAdUrl").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("Tags")
            .getter(getter(PutPlaybackConfigurationRequest::tags))
            .setter(setter(Builder::tags))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").build(),
                    MapTrait.builder()
                            .keyLocationName("key")
                            .valueLocationName("value")
                            .valueFieldInfo(
                                    SdkField. builder(MarshallingType.STRING)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("value").build()).build()).build()).build();

    private static final SdkField TRANSCODE_PROFILE_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("TranscodeProfileName").getter(getter(PutPlaybackConfigurationRequest::transcodeProfileName))
            .setter(setter(Builder::transcodeProfileName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TranscodeProfileName").build())
            .build();

    private static final SdkField VIDEO_CONTENT_SOURCE_URL_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("VideoContentSourceUrl").getter(getter(PutPlaybackConfigurationRequest::videoContentSourceUrl))
            .setter(setter(Builder::videoContentSourceUrl))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VideoContentSourceUrl").build())
            .build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AD_DECISION_SERVER_URL_FIELD,
            AVAIL_SUPPRESSION_FIELD, BUMPER_FIELD, CDN_CONFIGURATION_FIELD, CONFIGURATION_ALIASES_FIELD,
            DASH_CONFIGURATION_FIELD, LIVE_PRE_ROLL_CONFIGURATION_FIELD, MANIFEST_PROCESSING_RULES_FIELD, NAME_FIELD,
            PERSONALIZATION_THRESHOLD_SECONDS_FIELD, SLATE_AD_URL_FIELD, TAGS_FIELD, TRANSCODE_PROFILE_NAME_FIELD,
            VIDEO_CONTENT_SOURCE_URL_FIELD));

    private final String adDecisionServerUrl;

    private final AvailSuppression availSuppression;

    private final Bumper bumper;

    private final CdnConfiguration cdnConfiguration;

    private final Map> configurationAliases;

    private final DashConfigurationForPut dashConfiguration;

    private final LivePreRollConfiguration livePreRollConfiguration;

    private final ManifestProcessingRules manifestProcessingRules;

    private final String name;

    private final Integer personalizationThresholdSeconds;

    private final String slateAdUrl;

    private final Map tags;

    private final String transcodeProfileName;

    private final String videoContentSourceUrl;

    private PutPlaybackConfigurationRequest(BuilderImpl builder) {
        super(builder);
        this.adDecisionServerUrl = builder.adDecisionServerUrl;
        this.availSuppression = builder.availSuppression;
        this.bumper = builder.bumper;
        this.cdnConfiguration = builder.cdnConfiguration;
        this.configurationAliases = builder.configurationAliases;
        this.dashConfiguration = builder.dashConfiguration;
        this.livePreRollConfiguration = builder.livePreRollConfiguration;
        this.manifestProcessingRules = builder.manifestProcessingRules;
        this.name = builder.name;
        this.personalizationThresholdSeconds = builder.personalizationThresholdSeconds;
        this.slateAdUrl = builder.slateAdUrl;
        this.tags = builder.tags;
        this.transcodeProfileName = builder.transcodeProfileName;
        this.videoContentSourceUrl = builder.videoContentSourceUrl;
    }

    /**
     * 

* The URL for the ad decision server (ADS). This includes the specification of static parameters and placeholders * for dynamic parameters. AWS Elemental MediaTailor substitutes player-specific and session-specific parameters as * needed when calling the ADS. Alternately, for testing you can provide a static VAST URL. The maximum length is * 25,000 characters. *

* * @return The URL for the ad decision server (ADS). This includes the specification of static parameters and * placeholders for dynamic parameters. AWS Elemental MediaTailor substitutes player-specific and * session-specific parameters as needed when calling the ADS. Alternately, for testing you can provide a * static VAST URL. The maximum length is 25,000 characters. */ public final String adDecisionServerUrl() { return adDecisionServerUrl; } /** *

* The configuration for avail suppression, also known as ad suppression. For more information about ad suppression, * see Ad Suppression. *

* * @return The configuration for avail suppression, also known as ad suppression. For more information about ad * suppression, see Ad * Suppression. */ public final AvailSuppression availSuppression() { return availSuppression; } /** *

* The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the end of * an ad break. To learn more about bumpers, see Bumpers. *

* * @return The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before * the end of an ad break. To learn more about bumpers, see Bumpers. */ public final Bumper bumper() { return bumper; } /** *

* The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad segment * management. *

* * @return The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad * segment management. */ public final CdnConfiguration cdnConfiguration() { return cdnConfiguration; } /** * For responses, this returns true if the service returned a value for the ConfigurationAliases 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 hasConfigurationAliases() { return configurationAliases != null && !(configurationAliases instanceof SdkAutoConstructMap); } /** *

* The player parameters and aliases used as dynamic variables during session initialization. For more information, * see Domain Variables. *

*

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

* * @return The player parameters and aliases used as dynamic variables during session initialization. For more * information, see Domain * Variables. */ public final Map> configurationAliases() { return configurationAliases; } /** *

* The configuration for DASH content. *

* * @return The configuration for DASH content. */ public final DashConfigurationForPut dashConfiguration() { return dashConfiguration; } /** *

* The configuration for pre-roll ad insertion. *

* * @return The configuration for pre-roll ad insertion. */ public final LivePreRollConfiguration livePreRollConfiguration() { return livePreRollConfiguration; } /** *

* The configuration for manifest processing rules. Manifest processing rules enable customization of the * personalized manifests created by MediaTailor. *

* * @return The configuration for manifest processing rules. Manifest processing rules enable customization of the * personalized manifests created by MediaTailor. */ public final ManifestProcessingRules manifestProcessingRules() { return manifestProcessingRules; } /** *

* The identifier for the playback configuration. *

* * @return The identifier for the playback configuration. */ public final String name() { return name; } /** *

* Defines the maximum duration of underfilled ad time (in seconds) allowed in an ad break. If the duration of * underfilled ad time exceeds the personalization threshold, then the personalization of the ad break is abandoned * and the underlying content is shown. This feature applies to ad replacement in live and VOD streams, * rather than ad insertion, because it relies on an underlying content stream. For more information about ad break * behavior, including ad replacement and insertion, see Ad Behavior in AWS Elemental * MediaTailor. *

* * @return Defines the maximum duration of underfilled ad time (in seconds) allowed in an ad break. If the duration * of underfilled ad time exceeds the personalization threshold, then the personalization of the ad break is * abandoned and the underlying content is shown. This feature applies to ad replacement in live and * VOD streams, rather than ad insertion, because it relies on an underlying content stream. For more * information about ad break behavior, including ad replacement and insertion, see Ad Behavior in AWS Elemental * MediaTailor. */ public final Integer personalizationThresholdSeconds() { return personalizationThresholdSeconds; } /** *

* The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. AWS Elemental * MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is optional for non-VPAID * configurations. For VPAID, the slate is required because MediaTailor provides it in the slots that are designated * for dynamic ad content. The slate must be a high-quality asset that contains both audio and video. *

* * @return The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. AWS * Elemental MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is optional * for non-VPAID configurations. For VPAID, the slate is required because MediaTailor provides it in the * slots that are designated for dynamic ad content. The slate must be a high-quality asset that contains * both audio and video. */ public final String slateAdUrl() { return slateAdUrl; } /** * For responses, this returns true if the service returned a value for the Tags 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 hasTags() { return tags != null && !(tags instanceof SdkAutoConstructMap); } /** *

* The tags to assign to the playback configuration. Tags are key-value pairs that you can associate with Amazon * resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor * Resources. *

*

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

* * @return The tags to assign to the playback configuration. Tags are key-value pairs that you can associate with * Amazon resources to help with organization, access control, and cost tracking. For more information, see * Tagging AWS Elemental * MediaTailor Resources. */ public final Map tags() { return tags; } /** *

* The name that is used to associate this playback configuration with a custom transcode profile. This overrides * the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up custom profiles with * the help of AWS Support. *

* * @return The name that is used to associate this playback configuration with a custom transcode profile. This * overrides the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up * custom profiles with the help of AWS Support. */ public final String transcodeProfileName() { return transcodeProfileName; } /** *

* The URL prefix for the parent manifest for the stream, minus the asset ID. The maximum length is 512 characters. *

* * @return The URL prefix for the parent manifest for the stream, minus the asset ID. The maximum length is 512 * characters. */ public final String videoContentSourceUrl() { return videoContentSourceUrl; } @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 + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(adDecisionServerUrl()); hashCode = 31 * hashCode + Objects.hashCode(availSuppression()); hashCode = 31 * hashCode + Objects.hashCode(bumper()); hashCode = 31 * hashCode + Objects.hashCode(cdnConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(hasConfigurationAliases() ? configurationAliases() : null); hashCode = 31 * hashCode + Objects.hashCode(dashConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(livePreRollConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(manifestProcessingRules()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(personalizationThresholdSeconds()); hashCode = 31 * hashCode + Objects.hashCode(slateAdUrl()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(transcodeProfileName()); hashCode = 31 * hashCode + Objects.hashCode(videoContentSourceUrl()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof PutPlaybackConfigurationRequest)) { return false; } PutPlaybackConfigurationRequest other = (PutPlaybackConfigurationRequest) obj; return Objects.equals(adDecisionServerUrl(), other.adDecisionServerUrl()) && Objects.equals(availSuppression(), other.availSuppression()) && Objects.equals(bumper(), other.bumper()) && Objects.equals(cdnConfiguration(), other.cdnConfiguration()) && hasConfigurationAliases() == other.hasConfigurationAliases() && Objects.equals(configurationAliases(), other.configurationAliases()) && Objects.equals(dashConfiguration(), other.dashConfiguration()) && Objects.equals(livePreRollConfiguration(), other.livePreRollConfiguration()) && Objects.equals(manifestProcessingRules(), other.manifestProcessingRules()) && Objects.equals(name(), other.name()) && Objects.equals(personalizationThresholdSeconds(), other.personalizationThresholdSeconds()) && Objects.equals(slateAdUrl(), other.slateAdUrl()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(transcodeProfileName(), other.transcodeProfileName()) && Objects.equals(videoContentSourceUrl(), other.videoContentSourceUrl()); } /** * 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("PutPlaybackConfigurationRequest").add("AdDecisionServerUrl", adDecisionServerUrl()) .add("AvailSuppression", availSuppression()).add("Bumper", bumper()).add("CdnConfiguration", cdnConfiguration()) .add("ConfigurationAliases", hasConfigurationAliases() ? configurationAliases() : null) .add("DashConfiguration", dashConfiguration()).add("LivePreRollConfiguration", livePreRollConfiguration()) .add("ManifestProcessingRules", manifestProcessingRules()).add("Name", name()) .add("PersonalizationThresholdSeconds", personalizationThresholdSeconds()).add("SlateAdUrl", slateAdUrl()) .add("Tags", hasTags() ? tags() : null).add("TranscodeProfileName", transcodeProfileName()) .add("VideoContentSourceUrl", videoContentSourceUrl()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AdDecisionServerUrl": return Optional.ofNullable(clazz.cast(adDecisionServerUrl())); case "AvailSuppression": return Optional.ofNullable(clazz.cast(availSuppression())); case "Bumper": return Optional.ofNullable(clazz.cast(bumper())); case "CdnConfiguration": return Optional.ofNullable(clazz.cast(cdnConfiguration())); case "ConfigurationAliases": return Optional.ofNullable(clazz.cast(configurationAliases())); case "DashConfiguration": return Optional.ofNullable(clazz.cast(dashConfiguration())); case "LivePreRollConfiguration": return Optional.ofNullable(clazz.cast(livePreRollConfiguration())); case "ManifestProcessingRules": return Optional.ofNullable(clazz.cast(manifestProcessingRules())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "PersonalizationThresholdSeconds": return Optional.ofNullable(clazz.cast(personalizationThresholdSeconds())); case "SlateAdUrl": return Optional.ofNullable(clazz.cast(slateAdUrl())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "TranscodeProfileName": return Optional.ofNullable(clazz.cast(transcodeProfileName())); case "VideoContentSourceUrl": return Optional.ofNullable(clazz.cast(videoContentSourceUrl())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((PutPlaybackConfigurationRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends MediaTailorRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The URL for the ad decision server (ADS). This includes the specification of static parameters and * placeholders for dynamic parameters. AWS Elemental MediaTailor substitutes player-specific and * session-specific parameters as needed when calling the ADS. Alternately, for testing you can provide a static * VAST URL. The maximum length is 25,000 characters. *

* * @param adDecisionServerUrl * The URL for the ad decision server (ADS). This includes the specification of static parameters and * placeholders for dynamic parameters. AWS Elemental MediaTailor substitutes player-specific and * session-specific parameters as needed when calling the ADS. Alternately, for testing you can provide a * static VAST URL. The maximum length is 25,000 characters. * @return Returns a reference to this object so that method calls can be chained together. */ Builder adDecisionServerUrl(String adDecisionServerUrl); /** *

* The configuration for avail suppression, also known as ad suppression. For more information about ad * suppression, see Ad * Suppression. *

* * @param availSuppression * The configuration for avail suppression, also known as ad suppression. For more information about ad * suppression, see Ad * Suppression. * @return Returns a reference to this object so that method calls can be chained together. */ Builder availSuppression(AvailSuppression availSuppression); /** *

* The configuration for avail suppression, also known as ad suppression. For more information about ad * suppression, see Ad * Suppression. *

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

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

* The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the * end of an ad break. To learn more about bumpers, see Bumpers. *

* * @param bumper * The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before * the end of an ad break. To learn more about bumpers, see Bumpers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bumper(Bumper bumper); /** *

* The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the * end of an ad break. To learn more about bumpers, see Bumpers. *

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

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

* The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad * segment management. *

* * @param cdnConfiguration * The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and * ad segment management. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cdnConfiguration(CdnConfiguration cdnConfiguration); /** *

* The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad * segment management. *

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

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

* The player parameters and aliases used as dynamic variables during session initialization. For more * information, see Domain * Variables. *

* * @param configurationAliases * The player parameters and aliases used as dynamic variables during session initialization. For more * information, see Domain Variables. * @return Returns a reference to this object so that method calls can be chained together. */ Builder configurationAliases(Map> configurationAliases); /** *

* The configuration for DASH content. *

* * @param dashConfiguration * The configuration for DASH content. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dashConfiguration(DashConfigurationForPut dashConfiguration); /** *

* The configuration for DASH content. *

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

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

* The configuration for pre-roll ad insertion. *

* * @param livePreRollConfiguration * The configuration for pre-roll ad insertion. * @return Returns a reference to this object so that method calls can be chained together. */ Builder livePreRollConfiguration(LivePreRollConfiguration livePreRollConfiguration); /** *

* The configuration for pre-roll ad insertion. *

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

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

* The configuration for manifest processing rules. Manifest processing rules enable customization of the * personalized manifests created by MediaTailor. *

* * @param manifestProcessingRules * The configuration for manifest processing rules. Manifest processing rules enable customization of the * personalized manifests created by MediaTailor. * @return Returns a reference to this object so that method calls can be chained together. */ Builder manifestProcessingRules(ManifestProcessingRules manifestProcessingRules); /** *

* The configuration for manifest processing rules. Manifest processing rules enable customization of the * personalized manifests created by MediaTailor. *

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

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

* The identifier for the playback configuration. *

* * @param name * The identifier for the playback configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

* Defines the maximum duration of underfilled ad time (in seconds) allowed in an ad break. If the duration of * underfilled ad time exceeds the personalization threshold, then the personalization of the ad break is * abandoned and the underlying content is shown. This feature applies to ad replacement in live and VOD * streams, rather than ad insertion, because it relies on an underlying content stream. For more information * about ad break behavior, including ad replacement and insertion, see Ad Behavior in AWS Elemental * MediaTailor. *

* * @param personalizationThresholdSeconds * Defines the maximum duration of underfilled ad time (in seconds) allowed in an ad break. If the * duration of underfilled ad time exceeds the personalization threshold, then the personalization of the * ad break is abandoned and the underlying content is shown. This feature applies to ad * replacement in live and VOD streams, rather than ad insertion, because it relies on an underlying * content stream. For more information about ad break behavior, including ad replacement and insertion, * see Ad Behavior in AWS * Elemental MediaTailor. * @return Returns a reference to this object so that method calls can be chained together. */ Builder personalizationThresholdSeconds(Integer personalizationThresholdSeconds); /** *

* The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. AWS * Elemental MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is optional for * non-VPAID configurations. For VPAID, the slate is required because MediaTailor provides it in the slots that * are designated for dynamic ad content. The slate must be a high-quality asset that contains both audio and * video. *

* * @param slateAdUrl * The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. * AWS Elemental MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is * optional for non-VPAID configurations. For VPAID, the slate is required because MediaTailor provides * it in the slots that are designated for dynamic ad content. The slate must be a high-quality asset * that contains both audio and video. * @return Returns a reference to this object so that method calls can be chained together. */ Builder slateAdUrl(String slateAdUrl); /** *

* The tags to assign to the playback configuration. Tags are key-value pairs that you can associate with Amazon * resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor * Resources. *

* * @param tags * The tags to assign to the playback configuration. Tags are key-value pairs that you can associate with * Amazon resources to help with organization, access control, and cost tracking. For more information, * see Tagging AWS Elemental * MediaTailor Resources. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Map tags); /** *

* The name that is used to associate this playback configuration with a custom transcode profile. This * overrides the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up custom * profiles with the help of AWS Support. *

* * @param transcodeProfileName * The name that is used to associate this playback configuration with a custom transcode profile. This * overrides the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up * custom profiles with the help of AWS Support. * @return Returns a reference to this object so that method calls can be chained together. */ Builder transcodeProfileName(String transcodeProfileName); /** *

* The URL prefix for the parent manifest for the stream, minus the asset ID. The maximum length is 512 * characters. *

* * @param videoContentSourceUrl * The URL prefix for the parent manifest for the stream, minus the asset ID. The maximum length is 512 * characters. * @return Returns a reference to this object so that method calls can be chained together. */ Builder videoContentSourceUrl(String videoContentSourceUrl); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends MediaTailorRequest.BuilderImpl implements Builder { private String adDecisionServerUrl; private AvailSuppression availSuppression; private Bumper bumper; private CdnConfiguration cdnConfiguration; private Map> configurationAliases = DefaultSdkAutoConstructMap.getInstance(); private DashConfigurationForPut dashConfiguration; private LivePreRollConfiguration livePreRollConfiguration; private ManifestProcessingRules manifestProcessingRules; private String name; private Integer personalizationThresholdSeconds; private String slateAdUrl; private Map tags = DefaultSdkAutoConstructMap.getInstance(); private String transcodeProfileName; private String videoContentSourceUrl; private BuilderImpl() { } private BuilderImpl(PutPlaybackConfigurationRequest model) { super(model); adDecisionServerUrl(model.adDecisionServerUrl); availSuppression(model.availSuppression); bumper(model.bumper); cdnConfiguration(model.cdnConfiguration); configurationAliases(model.configurationAliases); dashConfiguration(model.dashConfiguration); livePreRollConfiguration(model.livePreRollConfiguration); manifestProcessingRules(model.manifestProcessingRules); name(model.name); personalizationThresholdSeconds(model.personalizationThresholdSeconds); slateAdUrl(model.slateAdUrl); tags(model.tags); transcodeProfileName(model.transcodeProfileName); videoContentSourceUrl(model.videoContentSourceUrl); } public final String getAdDecisionServerUrl() { return adDecisionServerUrl; } public final void setAdDecisionServerUrl(String adDecisionServerUrl) { this.adDecisionServerUrl = adDecisionServerUrl; } @Override public final Builder adDecisionServerUrl(String adDecisionServerUrl) { this.adDecisionServerUrl = adDecisionServerUrl; return this; } public final AvailSuppression.Builder getAvailSuppression() { return availSuppression != null ? availSuppression.toBuilder() : null; } public final void setAvailSuppression(AvailSuppression.BuilderImpl availSuppression) { this.availSuppression = availSuppression != null ? availSuppression.build() : null; } @Override public final Builder availSuppression(AvailSuppression availSuppression) { this.availSuppression = availSuppression; return this; } public final Bumper.Builder getBumper() { return bumper != null ? bumper.toBuilder() : null; } public final void setBumper(Bumper.BuilderImpl bumper) { this.bumper = bumper != null ? bumper.build() : null; } @Override public final Builder bumper(Bumper bumper) { this.bumper = bumper; return this; } public final CdnConfiguration.Builder getCdnConfiguration() { return cdnConfiguration != null ? cdnConfiguration.toBuilder() : null; } public final void setCdnConfiguration(CdnConfiguration.BuilderImpl cdnConfiguration) { this.cdnConfiguration = cdnConfiguration != null ? cdnConfiguration.build() : null; } @Override public final Builder cdnConfiguration(CdnConfiguration cdnConfiguration) { this.cdnConfiguration = cdnConfiguration; return this; } public final Map> getConfigurationAliases() { if (configurationAliases instanceof SdkAutoConstructMap) { return null; } return configurationAliases; } public final void setConfigurationAliases(Map> configurationAliases) { this.configurationAliases = ConfigurationAliasesRequestCopier.copy(configurationAliases); } @Override public final Builder configurationAliases(Map> configurationAliases) { this.configurationAliases = ConfigurationAliasesRequestCopier.copy(configurationAliases); return this; } public final DashConfigurationForPut.Builder getDashConfiguration() { return dashConfiguration != null ? dashConfiguration.toBuilder() : null; } public final void setDashConfiguration(DashConfigurationForPut.BuilderImpl dashConfiguration) { this.dashConfiguration = dashConfiguration != null ? dashConfiguration.build() : null; } @Override public final Builder dashConfiguration(DashConfigurationForPut dashConfiguration) { this.dashConfiguration = dashConfiguration; return this; } public final LivePreRollConfiguration.Builder getLivePreRollConfiguration() { return livePreRollConfiguration != null ? livePreRollConfiguration.toBuilder() : null; } public final void setLivePreRollConfiguration(LivePreRollConfiguration.BuilderImpl livePreRollConfiguration) { this.livePreRollConfiguration = livePreRollConfiguration != null ? livePreRollConfiguration.build() : null; } @Override public final Builder livePreRollConfiguration(LivePreRollConfiguration livePreRollConfiguration) { this.livePreRollConfiguration = livePreRollConfiguration; return this; } public final ManifestProcessingRules.Builder getManifestProcessingRules() { return manifestProcessingRules != null ? manifestProcessingRules.toBuilder() : null; } public final void setManifestProcessingRules(ManifestProcessingRules.BuilderImpl manifestProcessingRules) { this.manifestProcessingRules = manifestProcessingRules != null ? manifestProcessingRules.build() : null; } @Override public final Builder manifestProcessingRules(ManifestProcessingRules manifestProcessingRules) { this.manifestProcessingRules = manifestProcessingRules; return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final Integer getPersonalizationThresholdSeconds() { return personalizationThresholdSeconds; } public final void setPersonalizationThresholdSeconds(Integer personalizationThresholdSeconds) { this.personalizationThresholdSeconds = personalizationThresholdSeconds; } @Override public final Builder personalizationThresholdSeconds(Integer personalizationThresholdSeconds) { this.personalizationThresholdSeconds = personalizationThresholdSeconds; return this; } public final String getSlateAdUrl() { return slateAdUrl; } public final void setSlateAdUrl(String slateAdUrl) { this.slateAdUrl = slateAdUrl; } @Override public final Builder slateAdUrl(String slateAdUrl) { this.slateAdUrl = slateAdUrl; return this; } public final Map getTags() { if (tags instanceof SdkAutoConstructMap) { return null; } return tags; } public final void setTags(Map tags) { this.tags = ___mapOf__stringCopier.copy(tags); } @Override public final Builder tags(Map tags) { this.tags = ___mapOf__stringCopier.copy(tags); return this; } public final String getTranscodeProfileName() { return transcodeProfileName; } public final void setTranscodeProfileName(String transcodeProfileName) { this.transcodeProfileName = transcodeProfileName; } @Override public final Builder transcodeProfileName(String transcodeProfileName) { this.transcodeProfileName = transcodeProfileName; return this; } public final String getVideoContentSourceUrl() { return videoContentSourceUrl; } public final void setVideoContentSourceUrl(String videoContentSourceUrl) { this.videoContentSourceUrl = videoContentSourceUrl; } @Override public final Builder videoContentSourceUrl(String videoContentSourceUrl) { this.videoContentSourceUrl = videoContentSourceUrl; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public PutPlaybackConfigurationRequest build() { return new PutPlaybackConfigurationRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy