com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-mediaservices Show documentation
Show all versions of azure-resourcemanager-mediaservices Show documentation
This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-account-2023-01.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.mediaservices.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady
* Compliance Rules.
*/
@Fluent
public final class ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction
implements JsonSerializable {
/*
* Indicates whether this restriction is enforced on a Best Effort basis.
*/
private boolean bestEffort;
/*
* Configures the restriction control bits. Must be between 0 and 3 inclusive.
*/
private int configurationData;
/**
* Creates an instance of ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction class.
*/
public ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction() {
}
/**
* Get the bestEffort property: Indicates whether this restriction is enforced on a Best Effort basis.
*
* @return the bestEffort value.
*/
public boolean bestEffort() {
return this.bestEffort;
}
/**
* Set the bestEffort property: Indicates whether this restriction is enforced on a Best Effort basis.
*
* @param bestEffort the bestEffort value to set.
* @return the ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction object itself.
*/
public ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction withBestEffort(boolean bestEffort) {
this.bestEffort = bestEffort;
return this;
}
/**
* Get the configurationData property: Configures the restriction control bits. Must be between 0 and 3 inclusive.
*
* @return the configurationData value.
*/
public int configurationData() {
return this.configurationData;
}
/**
* Set the configurationData property: Configures the restriction control bits. Must be between 0 and 3 inclusive.
*
* @param configurationData the configurationData value to set.
* @return the ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction object itself.
*/
public ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction withConfigurationData(int configurationData) {
this.configurationData = configurationData;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeBooleanField("bestEffort", this.bestEffort);
jsonWriter.writeIntField("configurationData", this.configurationData);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction if the JsonReader was
* pointing to an instance of it, or null if it was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the
* ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.
*/
public static ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction fromJson(JsonReader jsonReader)
throws IOException {
return jsonReader.readObject(reader -> {
ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction deserializedContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction
= new ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("bestEffort".equals(fieldName)) {
deserializedContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.bestEffort
= reader.getBoolean();
} else if ("configurationData".equals(fieldName)) {
deserializedContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.configurationData
= reader.getInt();
} else {
reader.skipChildren();
}
}
return deserializedContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy