com.azure.ai.metricsadvisor.implementation.models.DataLakeGen2SharedKeyParam Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-ai-metricsadvisor Show documentation
Show all versions of azure-ai-metricsadvisor Show documentation
This package contains the Microsoft Azure Cognitive Services Metrics Advisor SDK.
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.ai.metricsadvisor.implementation.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 DataLakeGen2SharedKeyParam model.
*/
@Fluent
public final class DataLakeGen2SharedKeyParam implements JsonSerializable {
/*
* The account key to access the Azure Data Lake Storage Gen2.
*/
private String accountKey;
/**
* Creates an instance of DataLakeGen2SharedKeyParam class.
*/
public DataLakeGen2SharedKeyParam() {
}
/**
* Get the accountKey property: The account key to access the Azure Data Lake Storage Gen2.
*
* @return the accountKey value.
*/
public String getAccountKey() {
return this.accountKey;
}
/**
* Set the accountKey property: The account key to access the Azure Data Lake Storage Gen2.
*
* @param accountKey the accountKey value to set.
* @return the DataLakeGen2SharedKeyParam object itself.
*/
public DataLakeGen2SharedKeyParam setAccountKey(String accountKey) {
this.accountKey = accountKey;
return this;
}
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("accountKey", this.accountKey);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of DataLakeGen2SharedKeyParam from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DataLakeGen2SharedKeyParam 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 DataLakeGen2SharedKeyParam.
*/
public static DataLakeGen2SharedKeyParam fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DataLakeGen2SharedKeyParam deserializedDataLakeGen2SharedKeyParam = new DataLakeGen2SharedKeyParam();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("accountKey".equals(fieldName)) {
deserializedDataLakeGen2SharedKeyParam.accountKey = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedDataLakeGen2SharedKeyParam;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy