// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.loganalytics;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class LinkedServiceArgs extends com.pulumi.resources.ResourceArgs {

    public static final LinkedServiceArgs Empty = new LinkedServiceArgs();

    /**
     * The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
     * 
     */
    @Import(name="readAccessId")
    private @Nullable Output<String> readAccessId;

    /**
     * @return The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
     * 
     */
    public Optional<Output<String>> readAccessId() {
        return Optional.ofNullable(this.readAccessId);
    }

    /**
     * The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output<String> resourceGroupName;

    /**
     * @return The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.
     * 
     */
    @Import(name="workspaceId", required=true)
    private Output<String> workspaceId;

    /**
     * @return The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.
     * 
     */
    public Output<String> workspaceId() {
        return this.workspaceId;
    }

    /**
     * The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
     * 
     * &gt; **NOTE:** You must define at least one of the above access resource id attributes (e.g. `read_access_id` or `write_access_id`).
     * 
     */
    @Import(name="writeAccessId")
    private @Nullable Output<String> writeAccessId;

    /**
     * @return The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
     * 
     * &gt; **NOTE:** You must define at least one of the above access resource id attributes (e.g. `read_access_id` or `write_access_id`).
     * 
     */
    public Optional<Output<String>> writeAccessId() {
        return Optional.ofNullable(this.writeAccessId);
    }

    private LinkedServiceArgs() {}

    private LinkedServiceArgs(LinkedServiceArgs $) {
        this.readAccessId = $.readAccessId;
        this.resourceGroupName = $.resourceGroupName;
        this.workspaceId = $.workspaceId;
        this.writeAccessId = $.writeAccessId;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(LinkedServiceArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private LinkedServiceArgs $;

        public Builder() {
            $ = new LinkedServiceArgs();
        }

        public Builder(LinkedServiceArgs defaults) {
            $ = new LinkedServiceArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param readAccessId The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
         * 
         * @return builder
         * 
         */
        public Builder readAccessId(@Nullable Output<String> readAccessId) {
            $.readAccessId = readAccessId;
            return this;
        }

        /**
         * @param readAccessId The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
         * 
         * @return builder
         * 
         */
        public Builder readAccessId(String readAccessId) {
            return readAccessId(Output.of(readAccessId));
        }

        /**
         * @param resourceGroupName The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param workspaceId The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.
         * 
         * @return builder
         * 
         */
        public Builder workspaceId(Output<String> workspaceId) {
            $.workspaceId = workspaceId;
            return this;
        }

        /**
         * @param workspaceId The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.
         * 
         * @return builder
         * 
         */
        public Builder workspaceId(String workspaceId) {
            return workspaceId(Output.of(workspaceId));
        }

        /**
         * @param writeAccessId The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
         * 
         * &gt; **NOTE:** You must define at least one of the above access resource id attributes (e.g. `read_access_id` or `write_access_id`).
         * 
         * @return builder
         * 
         */
        public Builder writeAccessId(@Nullable Output<String> writeAccessId) {
            $.writeAccessId = writeAccessId;
            return this;
        }

        /**
         * @param writeAccessId The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
         * 
         * &gt; **NOTE:** You must define at least one of the above access resource id attributes (e.g. `read_access_id` or `write_access_id`).
         * 
         * @return builder
         * 
         */
        public Builder writeAccessId(String writeAccessId) {
            return writeAccessId(Output.of(writeAccessId));
        }

        public LinkedServiceArgs build() {
            $.resourceGroupName = Objects.requireNonNull($.resourceGroupName, "expected parameter 'resourceGroupName' to be non-null");
            $.workspaceId = Objects.requireNonNull($.workspaceId, "expected parameter 'workspaceId' to be non-null");
            return $;
        }
    }

}
