com.azure.resourcemanager.mediaservices.fluent.models.TransformInner 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.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.mediaservices.models.TransformOutput;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.List;
/**
* A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by
* transcoding or by extracting insights. After the Transform is created, it can be applied to input media by creating
* Jobs.
*/
@Fluent
public final class TransformInner extends ProxyResource {
/*
* The resource properties.
*/
private TransformProperties innerProperties;
/*
* The system metadata relating to this resource.
*/
private SystemData systemData;
/*
* The type of the resource.
*/
private String type;
/*
* The name of the resource.
*/
private String name;
/*
* Fully qualified resource Id for the resource.
*/
private String id;
/**
* Creates an instance of TransformInner class.
*/
public TransformInner() {
}
/**
* Get the innerProperties property: The resource properties.
*
* @return the innerProperties value.
*/
private TransformProperties innerProperties() {
return this.innerProperties;
}
/**
* Get the systemData property: The system metadata relating to this resource.
*
* @return the systemData value.
*/
public SystemData systemData() {
return this.systemData;
}
/**
* Get the type property: The type of the resource.
*
* @return the type value.
*/
@Override
public String type() {
return this.type;
}
/**
* Get the name property: The name of the resource.
*
* @return the name value.
*/
@Override
public String name() {
return this.name;
}
/**
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the id value.
*/
@Override
public String id() {
return this.id;
}
/**
* Get the created property: The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format.
*
* @return the created value.
*/
public OffsetDateTime created() {
return this.innerProperties() == null ? null : this.innerProperties().created();
}
/**
* Get the description property: An optional verbose description of the Transform.
*
* @return the description value.
*/
public String description() {
return this.innerProperties() == null ? null : this.innerProperties().description();
}
/**
* Set the description property: An optional verbose description of the Transform.
*
* @param description the description value to set.
* @return the TransformInner object itself.
*/
public TransformInner withDescription(String description) {
if (this.innerProperties() == null) {
this.innerProperties = new TransformProperties();
}
this.innerProperties().withDescription(description);
return this;
}
/**
* Get the lastModified property: The UTC date and time when the Transform was last updated, in
* 'YYYY-MM-DDThh:mm:ssZ' format.
*
* @return the lastModified value.
*/
public OffsetDateTime lastModified() {
return this.innerProperties() == null ? null : this.innerProperties().lastModified();
}
/**
* Get the outputs property: An array of one or more TransformOutputs that the Transform should generate.
*
* @return the outputs value.
*/
public List outputs() {
return this.innerProperties() == null ? null : this.innerProperties().outputs();
}
/**
* Set the outputs property: An array of one or more TransformOutputs that the Transform should generate.
*
* @param outputs the outputs value to set.
* @return the TransformInner object itself.
*/
public TransformInner withOutputs(List outputs) {
if (this.innerProperties() == null) {
this.innerProperties = new TransformProperties();
}
this.innerProperties().withOutputs(outputs);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of TransformInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of TransformInner 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 TransformInner.
*/
public static TransformInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
TransformInner deserializedTransformInner = new TransformInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("id".equals(fieldName)) {
deserializedTransformInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedTransformInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedTransformInner.type = reader.getString();
} else if ("properties".equals(fieldName)) {
deserializedTransformInner.innerProperties = TransformProperties.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedTransformInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedTransformInner;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy