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

com.azure.resourcemanager.datafactory.models.LinkedIntegrationRuntime Maven / Gradle / Ivy

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.datafactory.models;

import com.azure.core.annotation.Immutable;
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;

/**
 * The linked integration runtime information.
 */
@Immutable
public final class LinkedIntegrationRuntime implements JsonSerializable {
    /*
     * The name of the linked integration runtime.
     */
    private String name;

    /*
     * The subscription ID for which the linked integration runtime belong to.
     */
    private String subscriptionId;

    /*
     * The name of the data factory for which the linked integration runtime belong to.
     */
    private String dataFactoryName;

    /*
     * The location of the data factory for which the linked integration runtime belong to.
     */
    private String dataFactoryLocation;

    /*
     * The creating time of the linked integration runtime.
     */
    private OffsetDateTime createTime;

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

    /**
     * Get the name property: The name of the linked integration runtime.
     * 
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the subscriptionId property: The subscription ID for which the linked integration runtime belong to.
     * 
     * @return the subscriptionId value.
     */
    public String subscriptionId() {
        return this.subscriptionId;
    }

    /**
     * Get the dataFactoryName property: The name of the data factory for which the linked integration runtime belong
     * to.
     * 
     * @return the dataFactoryName value.
     */
    public String dataFactoryName() {
        return this.dataFactoryName;
    }

    /**
     * Get the dataFactoryLocation property: The location of the data factory for which the linked integration runtime
     * belong to.
     * 
     * @return the dataFactoryLocation value.
     */
    public String dataFactoryLocation() {
        return this.dataFactoryLocation;
    }

    /**
     * Get the createTime property: The creating time of the linked integration runtime.
     * 
     * @return the createTime value.
     */
    public OffsetDateTime createTime() {
        return this.createTime;
    }

    /**
     * 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();
        return jsonWriter.writeEndObject();
    }

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

                if ("name".equals(fieldName)) {
                    deserializedLinkedIntegrationRuntime.name = reader.getString();
                } else if ("subscriptionId".equals(fieldName)) {
                    deserializedLinkedIntegrationRuntime.subscriptionId = reader.getString();
                } else if ("dataFactoryName".equals(fieldName)) {
                    deserializedLinkedIntegrationRuntime.dataFactoryName = reader.getString();
                } else if ("dataFactoryLocation".equals(fieldName)) {
                    deserializedLinkedIntegrationRuntime.dataFactoryLocation = reader.getString();
                } else if ("createTime".equals(fieldName)) {
                    deserializedLinkedIntegrationRuntime.createTime = reader
                        .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedLinkedIntegrationRuntime;
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy