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

import com.pulumi.azure.managedapplication.inputs.DefinitionAuthorizationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final DefinitionState Empty = new DefinitionState();

    /**
     * One or more `authorization` block defined below.
     * 
     */
    @Import(name="authorizations")
    private @Nullable Output<List<DefinitionAuthorizationArgs>> authorizations;

    /**
     * @return One or more `authorization` block defined below.
     * 
     */
    public Optional<Output<List<DefinitionAuthorizationArgs>>> authorizations() {
        return Optional.ofNullable(this.authorizations);
    }

    /**
     * Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource.
     * 
     */
    @Import(name="createUiDefinition")
    private @Nullable Output<String> createUiDefinition;

    /**
     * @return Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource.
     * 
     */
    public Optional<Output<String>> createUiDefinition() {
        return Optional.ofNullable(this.createUiDefinition);
    }

    /**
     * Specifies the managed application definition description.
     * 
     */
    @Import(name="description")
    private @Nullable Output<String> description;

    /**
     * @return Specifies the managed application definition description.
     * 
     */
    public Optional<Output<String>> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Specifies the managed application definition display name.
     * 
     */
    @Import(name="displayName")
    private @Nullable Output<String> displayName;

    /**
     * @return Specifies the managed application definition display name.
     * 
     */
    public Optional<Output<String>> displayName() {
        return Optional.ofNullable(this.displayName);
    }

    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output<String> location;

    /**
     * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="lockLevel")
    private @Nullable Output<String> lockLevel;

    /**
     * @return Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> lockLevel() {
        return Optional.ofNullable(this.lockLevel);
    }

    /**
     * Specifies the inline main template JSON which has resources to be provisioned.
     * 
     */
    @Import(name="mainTemplate")
    private @Nullable Output<String> mainTemplate;

    /**
     * @return Specifies the inline main template JSON which has resources to be provisioned.
     * 
     */
    public Optional<Output<String>> mainTemplate() {
        return Optional.ofNullable(this.mainTemplate);
    }

    /**
     * Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Is the package enabled? Defaults to `true`.
     * 
     */
    @Import(name="packageEnabled")
    private @Nullable Output<Boolean> packageEnabled;

    /**
     * @return Is the package enabled? Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> packageEnabled() {
        return Optional.ofNullable(this.packageEnabled);
    }

    /**
     * Specifies the managed application definition package file Uri.
     * 
     */
    @Import(name="packageFileUri")
    private @Nullable Output<String> packageFileUri;

    /**
     * @return Specifies the managed application definition package file Uri.
     * 
     */
    public Optional<Output<String>> packageFileUri() {
        return Optional.ofNullable(this.packageFileUri);
    }

    /**
     * The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName")
    private @Nullable Output<String> resourceGroupName;

    /**
     * @return The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> resourceGroupName() {
        return Optional.ofNullable(this.resourceGroupName);
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     * &gt; **NOTE:** If either `create_ui_definition` or `main_template` is set they both must be set.
     * 
     */
    @Import(name="tags")
    private @Nullable Output<Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     * &gt; **NOTE:** If either `create_ui_definition` or `main_template` is set they both must be set.
     * 
     */
    public Optional<Output<Map<String,String>>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private DefinitionState() {}

    private DefinitionState(DefinitionState $) {
        this.authorizations = $.authorizations;
        this.createUiDefinition = $.createUiDefinition;
        this.description = $.description;
        this.displayName = $.displayName;
        this.location = $.location;
        this.lockLevel = $.lockLevel;
        this.mainTemplate = $.mainTemplate;
        this.name = $.name;
        this.packageEnabled = $.packageEnabled;
        this.packageFileUri = $.packageFileUri;
        this.resourceGroupName = $.resourceGroupName;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private DefinitionState $;

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

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

        /**
         * @param authorizations One or more `authorization` block defined below.
         * 
         * @return builder
         * 
         */
        public Builder authorizations(@Nullable Output<List<DefinitionAuthorizationArgs>> authorizations) {
            $.authorizations = authorizations;
            return this;
        }

        /**
         * @param authorizations One or more `authorization` block defined below.
         * 
         * @return builder
         * 
         */
        public Builder authorizations(List<DefinitionAuthorizationArgs> authorizations) {
            return authorizations(Output.of(authorizations));
        }

        /**
         * @param authorizations One or more `authorization` block defined below.
         * 
         * @return builder
         * 
         */
        public Builder authorizations(DefinitionAuthorizationArgs... authorizations) {
            return authorizations(List.of(authorizations));
        }

        /**
         * @param createUiDefinition Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource.
         * 
         * @return builder
         * 
         */
        public Builder createUiDefinition(@Nullable Output<String> createUiDefinition) {
            $.createUiDefinition = createUiDefinition;
            return this;
        }

        /**
         * @param createUiDefinition Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource.
         * 
         * @return builder
         * 
         */
        public Builder createUiDefinition(String createUiDefinition) {
            return createUiDefinition(Output.of(createUiDefinition));
        }

        /**
         * @param description Specifies the managed application definition description.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output<String> description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Specifies the managed application definition description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param displayName Specifies the managed application definition display name.
         * 
         * @return builder
         * 
         */
        public Builder displayName(@Nullable Output<String> displayName) {
            $.displayName = displayName;
            return this;
        }

        /**
         * @param displayName Specifies the managed application definition display name.
         * 
         * @return builder
         * 
         */
        public Builder displayName(String displayName) {
            return displayName(Output.of(displayName));
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output<String> location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param lockLevel Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder lockLevel(@Nullable Output<String> lockLevel) {
            $.lockLevel = lockLevel;
            return this;
        }

        /**
         * @param lockLevel Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder lockLevel(String lockLevel) {
            return lockLevel(Output.of(lockLevel));
        }

        /**
         * @param mainTemplate Specifies the inline main template JSON which has resources to be provisioned.
         * 
         * @return builder
         * 
         */
        public Builder mainTemplate(@Nullable Output<String> mainTemplate) {
            $.mainTemplate = mainTemplate;
            return this;
        }

        /**
         * @param mainTemplate Specifies the inline main template JSON which has resources to be provisioned.
         * 
         * @return builder
         * 
         */
        public Builder mainTemplate(String mainTemplate) {
            return mainTemplate(Output.of(mainTemplate));
        }

        /**
         * @param name Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param packageEnabled Is the package enabled? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder packageEnabled(@Nullable Output<Boolean> packageEnabled) {
            $.packageEnabled = packageEnabled;
            return this;
        }

        /**
         * @param packageEnabled Is the package enabled? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder packageEnabled(Boolean packageEnabled) {
            return packageEnabled(Output.of(packageEnabled));
        }

        /**
         * @param packageFileUri Specifies the managed application definition package file Uri.
         * 
         * @return builder
         * 
         */
        public Builder packageFileUri(@Nullable Output<String> packageFileUri) {
            $.packageFileUri = packageFileUri;
            return this;
        }

        /**
         * @param packageFileUri Specifies the managed application definition package file Uri.
         * 
         * @return builder
         * 
         */
        public Builder packageFileUri(String packageFileUri) {
            return packageFileUri(Output.of(packageFileUri));
        }

        /**
         * @param resourceGroupName The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(@Nullable Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * &gt; **NOTE:** If either `create_ui_definition` or `main_template` is set they both must be set.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output<Map<String,String>> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * &gt; **NOTE:** If either `create_ui_definition` or `main_template` is set they both must be set.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map<String,String> tags) {
            return tags(Output.of(tags));
        }

        public DefinitionState build() {
            return $;
        }
    }

}
