com.azure.resourcemanager.storagecache.models.ApiOperationDisplay Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-storagecache Show documentation
Show all versions of azure-resourcemanager-storagecache Show documentation
This package contains Microsoft Azure SDK for StorageCache Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Managed Lustre provides a fully managed Lustre® file system, integrated with Blob storage, for use on demand. These operations create and manage Azure Managed Lustre file systems. Package tag package-2024-03.
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.storagecache.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;
/**
* The object that represents the operation.
*/
@Fluent
public final class ApiOperationDisplay implements JsonSerializable {
/*
* Operation type: Read, write, delete, etc.
*/
private String operation;
/*
* Service provider: Microsoft.StorageCache
*/
private String provider;
/*
* Resource on which the operation is performed: Cache, etc.
*/
private String resource;
/*
* The description of the operation
*/
private String description;
/**
* Creates an instance of ApiOperationDisplay class.
*/
public ApiOperationDisplay() {
}
/**
* Get the operation property: Operation type: Read, write, delete, etc.
*
* @return the operation value.
*/
public String operation() {
return this.operation;
}
/**
* Set the operation property: Operation type: Read, write, delete, etc.
*
* @param operation the operation value to set.
* @return the ApiOperationDisplay object itself.
*/
public ApiOperationDisplay withOperation(String operation) {
this.operation = operation;
return this;
}
/**
* Get the provider property: Service provider: Microsoft.StorageCache.
*
* @return the provider value.
*/
public String provider() {
return this.provider;
}
/**
* Set the provider property: Service provider: Microsoft.StorageCache.
*
* @param provider the provider value to set.
* @return the ApiOperationDisplay object itself.
*/
public ApiOperationDisplay withProvider(String provider) {
this.provider = provider;
return this;
}
/**
* Get the resource property: Resource on which the operation is performed: Cache, etc.
*
* @return the resource value.
*/
public String resource() {
return this.resource;
}
/**
* Set the resource property: Resource on which the operation is performed: Cache, etc.
*
* @param resource the resource value to set.
* @return the ApiOperationDisplay object itself.
*/
public ApiOperationDisplay withResource(String resource) {
this.resource = resource;
return this;
}
/**
* Get the description property: The description of the operation.
*
* @return the description value.
*/
public String description() {
return this.description;
}
/**
* Set the description property: The description of the operation.
*
* @param description the description value to set.
* @return the ApiOperationDisplay object itself.
*/
public ApiOperationDisplay withDescription(String description) {
this.description = description;
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.writeStringField("operation", this.operation);
jsonWriter.writeStringField("provider", this.provider);
jsonWriter.writeStringField("resource", this.resource);
jsonWriter.writeStringField("description", this.description);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ApiOperationDisplay from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ApiOperationDisplay if the JsonReader was pointing to an instance of it, or null if it was
* pointing to JSON null.
* @throws IOException If an error occurs while reading the ApiOperationDisplay.
*/
public static ApiOperationDisplay fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ApiOperationDisplay deserializedApiOperationDisplay = new ApiOperationDisplay();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("operation".equals(fieldName)) {
deserializedApiOperationDisplay.operation = reader.getString();
} else if ("provider".equals(fieldName)) {
deserializedApiOperationDisplay.provider = reader.getString();
} else if ("resource".equals(fieldName)) {
deserializedApiOperationDisplay.resource = reader.getString();
} else if ("description".equals(fieldName)) {
deserializedApiOperationDisplay.description = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedApiOperationDisplay;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy