com.azure.resourcemanager.qumulo.models.FileSystemResourceUpdateProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-qumulo Show documentation
Show all versions of azure-resourcemanager-qumulo Show documentation
This package contains Microsoft Azure SDK for Qumulo Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-06-19.
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.qumulo.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 updatable properties of the FileSystemResource.
*/
@Fluent
public final class FileSystemResourceUpdateProperties implements JsonSerializable {
/*
* Marketplace details
*/
private MarketplaceDetails marketplaceDetails;
/*
* User Details
*/
private UserDetails userDetails;
/*
* Delegated subnet id for Vnet injection
*/
private String delegatedSubnetId;
/**
* Creates an instance of FileSystemResourceUpdateProperties class.
*/
public FileSystemResourceUpdateProperties() {
}
/**
* Get the marketplaceDetails property: Marketplace details.
*
* @return the marketplaceDetails value.
*/
public MarketplaceDetails marketplaceDetails() {
return this.marketplaceDetails;
}
/**
* Set the marketplaceDetails property: Marketplace details.
*
* @param marketplaceDetails the marketplaceDetails value to set.
* @return the FileSystemResourceUpdateProperties object itself.
*/
public FileSystemResourceUpdateProperties withMarketplaceDetails(MarketplaceDetails marketplaceDetails) {
this.marketplaceDetails = marketplaceDetails;
return this;
}
/**
* Get the userDetails property: User Details.
*
* @return the userDetails value.
*/
public UserDetails userDetails() {
return this.userDetails;
}
/**
* Set the userDetails property: User Details.
*
* @param userDetails the userDetails value to set.
* @return the FileSystemResourceUpdateProperties object itself.
*/
public FileSystemResourceUpdateProperties withUserDetails(UserDetails userDetails) {
this.userDetails = userDetails;
return this;
}
/**
* Get the delegatedSubnetId property: Delegated subnet id for Vnet injection.
*
* @return the delegatedSubnetId value.
*/
public String delegatedSubnetId() {
return this.delegatedSubnetId;
}
/**
* Set the delegatedSubnetId property: Delegated subnet id for Vnet injection.
*
* @param delegatedSubnetId the delegatedSubnetId value to set.
* @return the FileSystemResourceUpdateProperties object itself.
*/
public FileSystemResourceUpdateProperties withDelegatedSubnetId(String delegatedSubnetId) {
this.delegatedSubnetId = delegatedSubnetId;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (marketplaceDetails() != null) {
marketplaceDetails().validate();
}
if (userDetails() != null) {
userDetails().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("marketplaceDetails", this.marketplaceDetails);
jsonWriter.writeJsonField("userDetails", this.userDetails);
jsonWriter.writeStringField("delegatedSubnetId", this.delegatedSubnetId);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of FileSystemResourceUpdateProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of FileSystemResourceUpdateProperties 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 FileSystemResourceUpdateProperties.
*/
public static FileSystemResourceUpdateProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
FileSystemResourceUpdateProperties deserializedFileSystemResourceUpdateProperties
= new FileSystemResourceUpdateProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("marketplaceDetails".equals(fieldName)) {
deserializedFileSystemResourceUpdateProperties.marketplaceDetails
= MarketplaceDetails.fromJson(reader);
} else if ("userDetails".equals(fieldName)) {
deserializedFileSystemResourceUpdateProperties.userDetails = UserDetails.fromJson(reader);
} else if ("delegatedSubnetId".equals(fieldName)) {
deserializedFileSystemResourceUpdateProperties.delegatedSubnetId = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedFileSystemResourceUpdateProperties;
});
}
}