// *** 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.iot.inputs;

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


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

    public static final TimeSeriesInsightsAccessPolicyState Empty = new TimeSeriesInsightsAccessPolicyState();

    /**
     * The description of the Azure IoT Time Series Insights Access Policy.
     * 
     */
    @Import(name="description")
    private @Nullable Output<String> description;

    /**
     * @return The description of the Azure IoT Time Series Insights Access Policy.
     * 
     */
    public Optional<Output<String>> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The id of the principal in Azure Active Directory. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="principalObjectId")
    private @Nullable Output<String> principalObjectId;

    /**
     * @return The id of the principal in Azure Active Directory. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> principalObjectId() {
        return Optional.ofNullable(this.principalObjectId);
    }

    /**
     * A list of roles to apply to the Access Policy. Valid values include `Contributor` and `Reader`.
     * 
     */
    @Import(name="roles")
    private @Nullable Output<List<String>> roles;

    /**
     * @return A list of roles to apply to the Access Policy. Valid values include `Contributor` and `Reader`.
     * 
     */
    public Optional<Output<List<String>>> roles() {
        return Optional.ofNullable(this.roles);
    }

    /**
     * The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="timeSeriesInsightsEnvironmentId")
    private @Nullable Output<String> timeSeriesInsightsEnvironmentId;

    /**
     * @return The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> timeSeriesInsightsEnvironmentId() {
        return Optional.ofNullable(this.timeSeriesInsightsEnvironmentId);
    }

    private TimeSeriesInsightsAccessPolicyState() {}

    private TimeSeriesInsightsAccessPolicyState(TimeSeriesInsightsAccessPolicyState $) {
        this.description = $.description;
        this.name = $.name;
        this.principalObjectId = $.principalObjectId;
        this.roles = $.roles;
        this.timeSeriesInsightsEnvironmentId = $.timeSeriesInsightsEnvironmentId;
    }

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

    public static final class Builder {
        private TimeSeriesInsightsAccessPolicyState $;

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

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

        /**
         * @param description The description of the Azure IoT Time Series Insights Access Policy.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output<String> description) {
            $.description = description;
            return this;
        }

        /**
         * @param description The description of the Azure IoT Time Series Insights Access Policy.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param name Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param principalObjectId The id of the principal in Azure Active Directory. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder principalObjectId(@Nullable Output<String> principalObjectId) {
            $.principalObjectId = principalObjectId;
            return this;
        }

        /**
         * @param principalObjectId The id of the principal in Azure Active Directory. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder principalObjectId(String principalObjectId) {
            return principalObjectId(Output.of(principalObjectId));
        }

        /**
         * @param roles A list of roles to apply to the Access Policy. Valid values include `Contributor` and `Reader`.
         * 
         * @return builder
         * 
         */
        public Builder roles(@Nullable Output<List<String>> roles) {
            $.roles = roles;
            return this;
        }

        /**
         * @param roles A list of roles to apply to the Access Policy. Valid values include `Contributor` and `Reader`.
         * 
         * @return builder
         * 
         */
        public Builder roles(List<String> roles) {
            return roles(Output.of(roles));
        }

        /**
         * @param roles A list of roles to apply to the Access Policy. Valid values include `Contributor` and `Reader`.
         * 
         * @return builder
         * 
         */
        public Builder roles(String... roles) {
            return roles(List.of(roles));
        }

        /**
         * @param timeSeriesInsightsEnvironmentId The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder timeSeriesInsightsEnvironmentId(@Nullable Output<String> timeSeriesInsightsEnvironmentId) {
            $.timeSeriesInsightsEnvironmentId = timeSeriesInsightsEnvironmentId;
            return this;
        }

        /**
         * @param timeSeriesInsightsEnvironmentId The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder timeSeriesInsightsEnvironmentId(String timeSeriesInsightsEnvironmentId) {
            return timeSeriesInsightsEnvironmentId(Output.of(timeSeriesInsightsEnvironmentId));
        }

        public TimeSeriesInsightsAccessPolicyState build() {
            return $;
        }
    }

}
