com.azure.resourcemanager.databoxedge.models.MountPointMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-databoxedge Show documentation
Show all versions of azure-resourcemanager-databoxedge Show documentation
This package contains Microsoft Azure SDK for DataBoxEdge Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2019-08.
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.databoxedge.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
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 share mount point.
*/
@Fluent
public final class MountPointMap implements JsonSerializable {
/*
* ID of the share mounted to the role VM.
*/
private String shareId;
/*
* ID of the role to which share is mounted.
*/
private String roleId;
/*
* Mount point for the share.
*/
private String mountPoint;
/*
* Role type.
*/
private RoleTypes roleType;
/**
* Creates an instance of MountPointMap class.
*/
public MountPointMap() {
}
/**
* Get the shareId property: ID of the share mounted to the role VM.
*
* @return the shareId value.
*/
public String shareId() {
return this.shareId;
}
/**
* Set the shareId property: ID of the share mounted to the role VM.
*
* @param shareId the shareId value to set.
* @return the MountPointMap object itself.
*/
public MountPointMap withShareId(String shareId) {
this.shareId = shareId;
return this;
}
/**
* Get the roleId property: ID of the role to which share is mounted.
*
* @return the roleId value.
*/
public String roleId() {
return this.roleId;
}
/**
* Get the mountPoint property: Mount point for the share.
*
* @return the mountPoint value.
*/
public String mountPoint() {
return this.mountPoint;
}
/**
* Get the roleType property: Role type.
*
* @return the roleType value.
*/
public RoleTypes roleType() {
return this.roleType;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (shareId() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException("Missing required property shareId in model MountPointMap"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(MountPointMap.class);
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("shareId", this.shareId);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of MountPointMap from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of MountPointMap 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 MountPointMap.
*/
public static MountPointMap fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
MountPointMap deserializedMountPointMap = new MountPointMap();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("shareId".equals(fieldName)) {
deserializedMountPointMap.shareId = reader.getString();
} else if ("roleId".equals(fieldName)) {
deserializedMountPointMap.roleId = reader.getString();
} else if ("mountPoint".equals(fieldName)) {
deserializedMountPointMap.mountPoint = reader.getString();
} else if ("roleType".equals(fieldName)) {
deserializedMountPointMap.roleType = RoleTypes.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedMountPointMap;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy