software.amazon.awssdk.services.mediaconvert.model.NexGuardFileMarkerSettings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mediaconvert Show documentation
Show all versions of mediaconvert Show documentation
The AWS Java SDK for AWS Elemental MediaConvert module holds the client classes that are used for
communicating
with AWS Elemental MediaConvert Service
/*
* 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.mediaconvert.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
* For forensic video watermarking, MediaConvert supports Nagra NexGuard File Marker watermarking. MediaConvert supports
* both PreRelease Content (NGPR/G2) and OTT Streaming workflows.
*/
@Generated("software.amazon.awssdk:codegen")
public final class NexGuardFileMarkerSettings implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField LICENSE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("License")
.getter(getter(NexGuardFileMarkerSettings::license)).setter(setter(Builder::license))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("license").build()).build();
private static final SdkField PAYLOAD_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("Payload").getter(getter(NexGuardFileMarkerSettings::payload)).setter(setter(Builder::payload))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("payload").build()).build();
private static final SdkField PRESET_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Preset")
.getter(getter(NexGuardFileMarkerSettings::preset)).setter(setter(Builder::preset))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("preset").build()).build();
private static final SdkField STRENGTH_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Strength").getter(getter(NexGuardFileMarkerSettings::strengthAsString))
.setter(setter(Builder::strength))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("strength").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(LICENSE_FIELD, PAYLOAD_FIELD,
PRESET_FIELD, STRENGTH_FIELD));
private static final long serialVersionUID = 1L;
private final String license;
private final Integer payload;
private final String preset;
private final String strength;
private NexGuardFileMarkerSettings(BuilderImpl builder) {
this.license = builder.license;
this.payload = builder.payload;
this.preset = builder.preset;
this.strength = builder.strength;
}
/**
* Use the base64 license string that Nagra provides you. Enter it directly in your JSON job specification or in the
* console. Required when you include Nagra NexGuard File Marker watermarking in your job.
*
* @return Use the base64 license string that Nagra provides you. Enter it directly in your JSON job specification
* or in the console. Required when you include Nagra NexGuard File Marker watermarking in your job.
*/
public final String license() {
return license;
}
/**
* Specify the payload ID that you want associated with this output. Valid values vary depending on your Nagra
* NexGuard forensic watermarking workflow. Required when you include Nagra NexGuard File Marker watermarking in
* your job. For PreRelease Content (NGPR/G2), specify an integer from 1 through 4,194,303. You must generate a
* unique ID for each asset you watermark, and keep a record of which ID you have assigned to each asset. Neither
* Nagra nor MediaConvert keep track of the relationship between output files and your IDs. For OTT Streaming,
* create two adaptive bitrate (ABR) stacks for each asset. Do this by setting up two output groups. For one output
* group, set the value of Payload ID to 0 in every output. For the other output group, set Payload ID to 1 in every
* output.
*
* @return Specify the payload ID that you want associated with this output. Valid values vary depending on your
* Nagra NexGuard forensic watermarking workflow. Required when you include Nagra NexGuard File Marker
* watermarking in your job. For PreRelease Content (NGPR/G2), specify an integer from 1 through 4,194,303.
* You must generate a unique ID for each asset you watermark, and keep a record of which ID you have
* assigned to each asset. Neither Nagra nor MediaConvert keep track of the relationship between output
* files and your IDs. For OTT Streaming, create two adaptive bitrate (ABR) stacks for each asset. Do this
* by setting up two output groups. For one output group, set the value of Payload ID to 0 in every output.
* For the other output group, set Payload ID to 1 in every output.
*/
public final Integer payload() {
return payload;
}
/**
* Enter one of the watermarking preset strings that Nagra provides you. Required when you include Nagra NexGuard
* File Marker watermarking in your job.
*
* @return Enter one of the watermarking preset strings that Nagra provides you. Required when you include Nagra
* NexGuard File Marker watermarking in your job.
*/
public final String preset() {
return preset;
}
/**
* Optional. Ignore this setting unless Nagra support directs you to specify a value. When you don't specify a value
* here, the Nagra NexGuard library uses its default value.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #strength} will
* return {@link WatermarkingStrength#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #strengthAsString}.
*
*
* @return Optional. Ignore this setting unless Nagra support directs you to specify a value. When you don't specify
* a value here, the Nagra NexGuard library uses its default value.
* @see WatermarkingStrength
*/
public final WatermarkingStrength strength() {
return WatermarkingStrength.fromValue(strength);
}
/**
* Optional. Ignore this setting unless Nagra support directs you to specify a value. When you don't specify a value
* here, the Nagra NexGuard library uses its default value.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #strength} will
* return {@link WatermarkingStrength#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #strengthAsString}.
*
*
* @return Optional. Ignore this setting unless Nagra support directs you to specify a value. When you don't specify
* a value here, the Nagra NexGuard library uses its default value.
* @see WatermarkingStrength
*/
public final String strengthAsString() {
return strength;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(license());
hashCode = 31 * hashCode + Objects.hashCode(payload());
hashCode = 31 * hashCode + Objects.hashCode(preset());
hashCode = 31 * hashCode + Objects.hashCode(strengthAsString());
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 NexGuardFileMarkerSettings)) {
return false;
}
NexGuardFileMarkerSettings other = (NexGuardFileMarkerSettings) obj;
return Objects.equals(license(), other.license()) && Objects.equals(payload(), other.payload())
&& Objects.equals(preset(), other.preset()) && Objects.equals(strengthAsString(), other.strengthAsString());
}
/**
* 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("NexGuardFileMarkerSettings").add("License", license()).add("Payload", payload())
.add("Preset", preset()).add("Strength", strengthAsString()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "License":
return Optional.ofNullable(clazz.cast(license()));
case "Payload":
return Optional.ofNullable(clazz.cast(payload()));
case "Preset":
return Optional.ofNullable(clazz.cast(preset()));
case "Strength":
return Optional.ofNullable(clazz.cast(strengthAsString()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function