com.azure.resourcemanager.mediaservices.fluent.models.AssetInner 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.AssetStorageEncryptionFormat;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.UUID;
/**
* An Asset.
*/
@Fluent
public final class AssetInner extends ProxyResource {
/*
* The resource properties.
*/
private AssetProperties 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 AssetInner class.
*/
public AssetInner() {
}
/**
* Get the innerProperties property: The resource properties.
*
* @return the innerProperties value.
*/
private AssetProperties 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 assetId property: The Asset ID.
*
* @return the assetId value.
*/
public UUID assetId() {
return this.innerProperties() == null ? null : this.innerProperties().assetId();
}
/**
* Get the created property: The creation date of the Asset.
*
* @return the created value.
*/
public OffsetDateTime created() {
return this.innerProperties() == null ? null : this.innerProperties().created();
}
/**
* Get the lastModified property: The last modified date of the Asset.
*
* @return the lastModified value.
*/
public OffsetDateTime lastModified() {
return this.innerProperties() == null ? null : this.innerProperties().lastModified();
}
/**
* Get the alternateId property: The alternate ID of the Asset.
*
* @return the alternateId value.
*/
public String alternateId() {
return this.innerProperties() == null ? null : this.innerProperties().alternateId();
}
/**
* Set the alternateId property: The alternate ID of the Asset.
*
* @param alternateId the alternateId value to set.
* @return the AssetInner object itself.
*/
public AssetInner withAlternateId(String alternateId) {
if (this.innerProperties() == null) {
this.innerProperties = new AssetProperties();
}
this.innerProperties().withAlternateId(alternateId);
return this;
}
/**
* Get the description property: The Asset description.
*
* @return the description value.
*/
public String description() {
return this.innerProperties() == null ? null : this.innerProperties().description();
}
/**
* Set the description property: The Asset description.
*
* @param description the description value to set.
* @return the AssetInner object itself.
*/
public AssetInner withDescription(String description) {
if (this.innerProperties() == null) {
this.innerProperties = new AssetProperties();
}
this.innerProperties().withDescription(description);
return this;
}
/**
* Get the container property: The name of the asset blob container.
*
* @return the container value.
*/
public String container() {
return this.innerProperties() == null ? null : this.innerProperties().container();
}
/**
* Set the container property: The name of the asset blob container.
*
* @param container the container value to set.
* @return the AssetInner object itself.
*/
public AssetInner withContainer(String container) {
if (this.innerProperties() == null) {
this.innerProperties = new AssetProperties();
}
this.innerProperties().withContainer(container);
return this;
}
/**
* Get the storageAccountName property: The name of the storage account.
*
* @return the storageAccountName value.
*/
public String storageAccountName() {
return this.innerProperties() == null ? null : this.innerProperties().storageAccountName();
}
/**
* Set the storageAccountName property: The name of the storage account.
*
* @param storageAccountName the storageAccountName value to set.
* @return the AssetInner object itself.
*/
public AssetInner withStorageAccountName(String storageAccountName) {
if (this.innerProperties() == null) {
this.innerProperties = new AssetProperties();
}
this.innerProperties().withStorageAccountName(storageAccountName);
return this;
}
/**
* Get the storageEncryptionFormat property: The Asset encryption format. One of None or MediaStorageEncryption.
*
* @return the storageEncryptionFormat value.
*/
public AssetStorageEncryptionFormat storageEncryptionFormat() {
return this.innerProperties() == null ? null : this.innerProperties().storageEncryptionFormat();
}
/**
* 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 AssetInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AssetInner 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 AssetInner.
*/
public static AssetInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AssetInner deserializedAssetInner = new AssetInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("id".equals(fieldName)) {
deserializedAssetInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedAssetInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedAssetInner.type = reader.getString();
} else if ("properties".equals(fieldName)) {
deserializedAssetInner.innerProperties = AssetProperties.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedAssetInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedAssetInner;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy