All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.ai.metricsadvisor.implementation.models.DataLakeGen2SharedKeyParamPatch Maven / Gradle / Ivy

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 DataLakeGen2SharedKeyParamPatch model.
 */
@Fluent
public final class DataLakeGen2SharedKeyParamPatch implements JsonSerializable {
    /*
     * The account key to access the Azure Data Lake Storage Gen2.
     */
    private String accountKey;

    /**
     * Creates an instance of DataLakeGen2SharedKeyParamPatch class.
     */
    public DataLakeGen2SharedKeyParamPatch() {
    }

    /**
     * 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 DataLakeGen2SharedKeyParamPatch object itself.
     */
    public DataLakeGen2SharedKeyParamPatch 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 DataLakeGen2SharedKeyParamPatch from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of DataLakeGen2SharedKeyParamPatch 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 DataLakeGen2SharedKeyParamPatch.
     */
    public static DataLakeGen2SharedKeyParamPatch fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            DataLakeGen2SharedKeyParamPatch deserializedDataLakeGen2SharedKeyParamPatch
                = new DataLakeGen2SharedKeyParamPatch();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("accountKey".equals(fieldName)) {
                    deserializedDataLakeGen2SharedKeyParamPatch.accountKey = reader.getString();
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedDataLakeGen2SharedKeyParamPatch;
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy