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

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

@CustomType
public final class ApplicationPlan {
    /**
     * @return Specifies the name of the plan from the marketplace. Changing this forces a new resource to be created.
     * 
     */
    private String name;
    /**
     * @return Specifies the product of the plan from the marketplace. Changing this forces a new resource to be created.
     * 
     */
    private String product;
    /**
     * @return Specifies the promotion code to use with the plan. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** When `plan` is specified, legal terms must be accepted for this item on this subscription before creating the Managed Application. The `azure.marketplace.Agreement` resource or AZ CLI tool can be used to do this.
     * 
     */
    private @Nullable String promotionCode;
    /**
     * @return Specifies the publisher of the plan. Changing this forces a new resource to be created.
     * 
     */
    private String publisher;
    /**
     * @return Specifies the version of the plan from the marketplace. Changing this forces a new resource to be created.
     * 
     */
    private String version;

    private ApplicationPlan() {}
    /**
     * @return Specifies the name of the plan from the marketplace. Changing this forces a new resource to be created.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return Specifies the product of the plan from the marketplace. Changing this forces a new resource to be created.
     * 
     */
    public String product() {
        return this.product;
    }
    /**
     * @return Specifies the promotion code to use with the plan. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** When `plan` is specified, legal terms must be accepted for this item on this subscription before creating the Managed Application. The `azure.marketplace.Agreement` resource or AZ CLI tool can be used to do this.
     * 
     */
    public Optional<String> promotionCode() {
        return Optional.ofNullable(this.promotionCode);
    }
    /**
     * @return Specifies the publisher of the plan. Changing this forces a new resource to be created.
     * 
     */
    public String publisher() {
        return this.publisher;
    }
    /**
     * @return Specifies the version of the plan from the marketplace. Changing this forces a new resource to be created.
     * 
     */
    public String version() {
        return this.version;
    }

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

    public static Builder builder(ApplicationPlan defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String name;
        private String product;
        private @Nullable String promotionCode;
        private String publisher;
        private String version;
        public Builder() {}
        public Builder(ApplicationPlan defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.name = defaults.name;
    	      this.product = defaults.product;
    	      this.promotionCode = defaults.promotionCode;
    	      this.publisher = defaults.publisher;
    	      this.version = defaults.version;
        }

        @CustomType.Setter
        public Builder name(String name) {
            this.name = Objects.requireNonNull(name);
            return this;
        }
        @CustomType.Setter
        public Builder product(String product) {
            this.product = Objects.requireNonNull(product);
            return this;
        }
        @CustomType.Setter
        public Builder promotionCode(@Nullable String promotionCode) {
            this.promotionCode = promotionCode;
            return this;
        }
        @CustomType.Setter
        public Builder publisher(String publisher) {
            this.publisher = Objects.requireNonNull(publisher);
            return this;
        }
        @CustomType.Setter
        public Builder version(String version) {
            this.version = Objects.requireNonNull(version);
            return this;
        }
        public ApplicationPlan build() {
            final var o = new ApplicationPlan();
            o.name = name;
            o.product = product;
            o.promotionCode = promotionCode;
            o.publisher = publisher;
            o.version = version;
            return o;
        }
    }
}
