![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.netapp.models.BreakFileLocksRequest 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.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;
/**
* Break file locks request.
*/
@Fluent
public final class BreakFileLocksRequest implements JsonSerializable {
/*
* To clear file locks on a volume for a particular client
*/
private String clientIp;
/*
* Break File locks could be a disruptive operation for application as locks on the volume will be broken, if want
* to process, set to true.
*/
private Boolean confirmRunningDisruptiveOperation;
/**
* Creates an instance of BreakFileLocksRequest class.
*/
public BreakFileLocksRequest() {
}
/**
* Get the clientIp property: To clear file locks on a volume for a particular client.
*
* @return the clientIp value.
*/
public String clientIp() {
return this.clientIp;
}
/**
* Set the clientIp property: To clear file locks on a volume for a particular client.
*
* @param clientIp the clientIp value to set.
* @return the BreakFileLocksRequest object itself.
*/
public BreakFileLocksRequest withClientIp(String clientIp) {
this.clientIp = clientIp;
return this;
}
/**
* Get the confirmRunningDisruptiveOperation property: Break File locks could be a disruptive operation for
* application as locks on the volume will be broken, if want to process, set to true.
*
* @return the confirmRunningDisruptiveOperation value.
*/
public Boolean confirmRunningDisruptiveOperation() {
return this.confirmRunningDisruptiveOperation;
}
/**
* Set the confirmRunningDisruptiveOperation property: Break File locks could be a disruptive operation for
* application as locks on the volume will be broken, if want to process, set to true.
*
* @param confirmRunningDisruptiveOperation the confirmRunningDisruptiveOperation value to set.
* @return the BreakFileLocksRequest object itself.
*/
public BreakFileLocksRequest withConfirmRunningDisruptiveOperation(Boolean confirmRunningDisruptiveOperation) {
this.confirmRunningDisruptiveOperation = confirmRunningDisruptiveOperation;
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("clientIp", this.clientIp);
jsonWriter.writeBooleanField("confirmRunningDisruptiveOperation", this.confirmRunningDisruptiveOperation);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of BreakFileLocksRequest from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of BreakFileLocksRequest 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 BreakFileLocksRequest.
*/
public static BreakFileLocksRequest fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
BreakFileLocksRequest deserializedBreakFileLocksRequest = new BreakFileLocksRequest();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("clientIp".equals(fieldName)) {
deserializedBreakFileLocksRequest.clientIp = reader.getString();
} else if ("confirmRunningDisruptiveOperation".equals(fieldName)) {
deserializedBreakFileLocksRequest.confirmRunningDisruptiveOperation
= reader.getNullable(JsonReader::getBoolean);
} else {
reader.skipChildren();
}
}
return deserializedBreakFileLocksRequest;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy