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

import com.pulumi.azure.storage.outputs.AccountSharePropertiesCorsRule;
import com.pulumi.azure.storage.outputs.AccountSharePropertiesRetentionPolicy;
import com.pulumi.azure.storage.outputs.AccountSharePropertiesSmb;
import com.pulumi.core.annotations.CustomType;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class AccountShareProperties {
    /**
     * @return A `cors_rule` block as defined below.
     * 
     */
    private @Nullable List<AccountSharePropertiesCorsRule> corsRules;
    /**
     * @return A `retention_policy` block as defined below.
     * 
     */
    private @Nullable AccountSharePropertiesRetentionPolicy retentionPolicy;
    /**
     * @return A `smb` block as defined below.
     * 
     */
    private @Nullable AccountSharePropertiesSmb smb;

    private AccountShareProperties() {}
    /**
     * @return A `cors_rule` block as defined below.
     * 
     */
    public List<AccountSharePropertiesCorsRule> corsRules() {
        return this.corsRules == null ? List.of() : this.corsRules;
    }
    /**
     * @return A `retention_policy` block as defined below.
     * 
     */
    public Optional<AccountSharePropertiesRetentionPolicy> retentionPolicy() {
        return Optional.ofNullable(this.retentionPolicy);
    }
    /**
     * @return A `smb` block as defined below.
     * 
     */
    public Optional<AccountSharePropertiesSmb> smb() {
        return Optional.ofNullable(this.smb);
    }

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

    public static Builder builder(AccountShareProperties defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<AccountSharePropertiesCorsRule> corsRules;
        private @Nullable AccountSharePropertiesRetentionPolicy retentionPolicy;
        private @Nullable AccountSharePropertiesSmb smb;
        public Builder() {}
        public Builder(AccountShareProperties defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.corsRules = defaults.corsRules;
    	      this.retentionPolicy = defaults.retentionPolicy;
    	      this.smb = defaults.smb;
        }

        @CustomType.Setter
        public Builder corsRules(@Nullable List<AccountSharePropertiesCorsRule> corsRules) {
            this.corsRules = corsRules;
            return this;
        }
        public Builder corsRules(AccountSharePropertiesCorsRule... corsRules) {
            return corsRules(List.of(corsRules));
        }
        @CustomType.Setter
        public Builder retentionPolicy(@Nullable AccountSharePropertiesRetentionPolicy retentionPolicy) {
            this.retentionPolicy = retentionPolicy;
            return this;
        }
        @CustomType.Setter
        public Builder smb(@Nullable AccountSharePropertiesSmb smb) {
            this.smb = smb;
            return this;
        }
        public AccountShareProperties build() {
            final var o = new AccountShareProperties();
            o.corsRules = corsRules;
            o.retentionPolicy = retentionPolicy;
            o.smb = smb;
            return o;
        }
    }
}
