
com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-netapp Show documentation
Show all versions of azure-resourcemanager-netapp Show documentation
This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-preview-2024-07-01-preview.
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.netapp.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
/**
* Properties which represents actual subvolume model which is stored as a file in the system.
*/
@Fluent
public final class SubvolumeModelProperties implements JsonSerializable {
/*
* Path to the subvolume
*/
private String path;
/*
* Path to the parent subvolume
*/
private String parentPath;
/*
* Size of subvolume
*/
private Long size;
/*
* Bytes used
*/
private Long bytesUsed;
/*
* Permissions of the subvolume
*/
private String permissions;
/*
* Creation time and date
*/
private OffsetDateTime creationTimestamp;
/*
* Most recent access time and date
*/
private OffsetDateTime accessedTimestamp;
/*
* Most recent modification time and date
*/
private OffsetDateTime modifiedTimestamp;
/*
* Most recent change time and date
*/
private OffsetDateTime changedTimestamp;
/*
* Azure lifecycle management
*/
private String provisioningState;
/**
* Creates an instance of SubvolumeModelProperties class.
*/
public SubvolumeModelProperties() {
}
/**
* Get the path property: Path to the subvolume.
*
* @return the path value.
*/
public String path() {
return this.path;
}
/**
* Set the path property: Path to the subvolume.
*
* @param path the path value to set.
* @return the SubvolumeModelProperties object itself.
*/
public SubvolumeModelProperties withPath(String path) {
this.path = path;
return this;
}
/**
* Get the parentPath property: Path to the parent subvolume.
*
* @return the parentPath value.
*/
public String parentPath() {
return this.parentPath;
}
/**
* Set the parentPath property: Path to the parent subvolume.
*
* @param parentPath the parentPath value to set.
* @return the SubvolumeModelProperties object itself.
*/
public SubvolumeModelProperties withParentPath(String parentPath) {
this.parentPath = parentPath;
return this;
}
/**
* Get the size property: Size of subvolume.
*
* @return the size value.
*/
public Long size() {
return this.size;
}
/**
* Set the size property: Size of subvolume.
*
* @param size the size value to set.
* @return the SubvolumeModelProperties object itself.
*/
public SubvolumeModelProperties withSize(Long size) {
this.size = size;
return this;
}
/**
* Get the bytesUsed property: Bytes used.
*
* @return the bytesUsed value.
*/
public Long bytesUsed() {
return this.bytesUsed;
}
/**
* Set the bytesUsed property: Bytes used.
*
* @param bytesUsed the bytesUsed value to set.
* @return the SubvolumeModelProperties object itself.
*/
public SubvolumeModelProperties withBytesUsed(Long bytesUsed) {
this.bytesUsed = bytesUsed;
return this;
}
/**
* Get the permissions property: Permissions of the subvolume.
*
* @return the permissions value.
*/
public String permissions() {
return this.permissions;
}
/**
* Set the permissions property: Permissions of the subvolume.
*
* @param permissions the permissions value to set.
* @return the SubvolumeModelProperties object itself.
*/
public SubvolumeModelProperties withPermissions(String permissions) {
this.permissions = permissions;
return this;
}
/**
* Get the creationTimestamp property: Creation time and date.
*
* @return the creationTimestamp value.
*/
public OffsetDateTime creationTimestamp() {
return this.creationTimestamp;
}
/**
* Set the creationTimestamp property: Creation time and date.
*
* @param creationTimestamp the creationTimestamp value to set.
* @return the SubvolumeModelProperties object itself.
*/
public SubvolumeModelProperties withCreationTimestamp(OffsetDateTime creationTimestamp) {
this.creationTimestamp = creationTimestamp;
return this;
}
/**
* Get the accessedTimestamp property: Most recent access time and date.
*
* @return the accessedTimestamp value.
*/
public OffsetDateTime accessedTimestamp() {
return this.accessedTimestamp;
}
/**
* Set the accessedTimestamp property: Most recent access time and date.
*
* @param accessedTimestamp the accessedTimestamp value to set.
* @return the SubvolumeModelProperties object itself.
*/
public SubvolumeModelProperties withAccessedTimestamp(OffsetDateTime accessedTimestamp) {
this.accessedTimestamp = accessedTimestamp;
return this;
}
/**
* Get the modifiedTimestamp property: Most recent modification time and date.
*
* @return the modifiedTimestamp value.
*/
public OffsetDateTime modifiedTimestamp() {
return this.modifiedTimestamp;
}
/**
* Set the modifiedTimestamp property: Most recent modification time and date.
*
* @param modifiedTimestamp the modifiedTimestamp value to set.
* @return the SubvolumeModelProperties object itself.
*/
public SubvolumeModelProperties withModifiedTimestamp(OffsetDateTime modifiedTimestamp) {
this.modifiedTimestamp = modifiedTimestamp;
return this;
}
/**
* Get the changedTimestamp property: Most recent change time and date.
*
* @return the changedTimestamp value.
*/
public OffsetDateTime changedTimestamp() {
return this.changedTimestamp;
}
/**
* Set the changedTimestamp property: Most recent change time and date.
*
* @param changedTimestamp the changedTimestamp value to set.
* @return the SubvolumeModelProperties object itself.
*/
public SubvolumeModelProperties withChangedTimestamp(OffsetDateTime changedTimestamp) {
this.changedTimestamp = changedTimestamp;
return this;
}
/**
* Get the provisioningState property: Azure lifecycle management.
*
* @return the provisioningState value.
*/
public String provisioningState() {
return this.provisioningState;
}
/**
* Set the provisioningState property: Azure lifecycle management.
*
* @param provisioningState the provisioningState value to set.
* @return the SubvolumeModelProperties object itself.
*/
public SubvolumeModelProperties withProvisioningState(String provisioningState) {
this.provisioningState = provisioningState;
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("path", this.path);
jsonWriter.writeStringField("parentPath", this.parentPath);
jsonWriter.writeNumberField("size", this.size);
jsonWriter.writeNumberField("bytesUsed", this.bytesUsed);
jsonWriter.writeStringField("permissions", this.permissions);
jsonWriter.writeStringField("creationTimeStamp",
this.creationTimestamp == null
? null
: DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.creationTimestamp));
jsonWriter.writeStringField("accessedTimeStamp",
this.accessedTimestamp == null
? null
: DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.accessedTimestamp));
jsonWriter.writeStringField("modifiedTimeStamp",
this.modifiedTimestamp == null
? null
: DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.modifiedTimestamp));
jsonWriter.writeStringField("changedTimeStamp",
this.changedTimestamp == null
? null
: DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.changedTimestamp));
jsonWriter.writeStringField("provisioningState", this.provisioningState);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SubvolumeModelProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SubvolumeModelProperties 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 SubvolumeModelProperties.
*/
public static SubvolumeModelProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SubvolumeModelProperties deserializedSubvolumeModelProperties = new SubvolumeModelProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("path".equals(fieldName)) {
deserializedSubvolumeModelProperties.path = reader.getString();
} else if ("parentPath".equals(fieldName)) {
deserializedSubvolumeModelProperties.parentPath = reader.getString();
} else if ("size".equals(fieldName)) {
deserializedSubvolumeModelProperties.size = reader.getNullable(JsonReader::getLong);
} else if ("bytesUsed".equals(fieldName)) {
deserializedSubvolumeModelProperties.bytesUsed = reader.getNullable(JsonReader::getLong);
} else if ("permissions".equals(fieldName)) {
deserializedSubvolumeModelProperties.permissions = reader.getString();
} else if ("creationTimeStamp".equals(fieldName)) {
deserializedSubvolumeModelProperties.creationTimestamp = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("accessedTimeStamp".equals(fieldName)) {
deserializedSubvolumeModelProperties.accessedTimestamp = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("modifiedTimeStamp".equals(fieldName)) {
deserializedSubvolumeModelProperties.modifiedTimestamp = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("changedTimeStamp".equals(fieldName)) {
deserializedSubvolumeModelProperties.changedTimestamp = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("provisioningState".equals(fieldName)) {
deserializedSubvolumeModelProperties.provisioningState = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedSubvolumeModelProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy