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

import com.pulumi.azure.media.inputs.ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ContentKeyPolicyPolicyOptionFairplayConfigurationArgs Empty = new ContentKeyPolicyPolicyOptionFairplayConfigurationArgs();

    /**
     * The key that must be used as FairPlay Application Secret key.
     * 
     */
    @Import(name="ask")
    private @Nullable Output<String> ask;

    /**
     * @return The key that must be used as FairPlay Application Secret key.
     * 
     */
    public Optional<Output<String>> ask() {
        return Optional.ofNullable(this.ask);
    }

    /**
     * A `offline_rental_configuration` block as defined below.
     * 
     */
    @Import(name="offlineRentalConfiguration")
    private @Nullable Output<ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs> offlineRentalConfiguration;

    /**
     * @return A `offline_rental_configuration` block as defined below.
     * 
     */
    public Optional<Output<ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs>> offlineRentalConfiguration() {
        return Optional.ofNullable(this.offlineRentalConfiguration);
    }

    /**
     * The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
     * 
     */
    @Import(name="pfx")
    private @Nullable Output<String> pfx;

    /**
     * @return The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
     * 
     */
    public Optional<Output<String>> pfx() {
        return Optional.ofNullable(this.pfx);
    }

    /**
     * The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
     * 
     */
    @Import(name="pfxPassword")
    private @Nullable Output<String> pfxPassword;

    /**
     * @return The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
     * 
     */
    public Optional<Output<String>> pfxPassword() {
        return Optional.ofNullable(this.pfxPassword);
    }

    /**
     * The rental and lease key type. Supported values are `DualExpiry`, `PersistentLimited`, `PersistentUnlimited` or `Undefined`.
     * 
     */
    @Import(name="rentalAndLeaseKeyType")
    private @Nullable Output<String> rentalAndLeaseKeyType;

    /**
     * @return The rental and lease key type. Supported values are `DualExpiry`, `PersistentLimited`, `PersistentUnlimited` or `Undefined`.
     * 
     */
    public Optional<Output<String>> rentalAndLeaseKeyType() {
        return Optional.ofNullable(this.rentalAndLeaseKeyType);
    }

    /**
     * The rental duration. Must be greater than 0.
     * 
     */
    @Import(name="rentalDurationSeconds")
    private @Nullable Output<Integer> rentalDurationSeconds;

    /**
     * @return The rental duration. Must be greater than 0.
     * 
     */
    public Optional<Output<Integer>> rentalDurationSeconds() {
        return Optional.ofNullable(this.rentalDurationSeconds);
    }

    private ContentKeyPolicyPolicyOptionFairplayConfigurationArgs() {}

    private ContentKeyPolicyPolicyOptionFairplayConfigurationArgs(ContentKeyPolicyPolicyOptionFairplayConfigurationArgs $) {
        this.ask = $.ask;
        this.offlineRentalConfiguration = $.offlineRentalConfiguration;
        this.pfx = $.pfx;
        this.pfxPassword = $.pfxPassword;
        this.rentalAndLeaseKeyType = $.rentalAndLeaseKeyType;
        this.rentalDurationSeconds = $.rentalDurationSeconds;
    }

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

    public static final class Builder {
        private ContentKeyPolicyPolicyOptionFairplayConfigurationArgs $;

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

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

        /**
         * @param ask The key that must be used as FairPlay Application Secret key.
         * 
         * @return builder
         * 
         */
        public Builder ask(@Nullable Output<String> ask) {
            $.ask = ask;
            return this;
        }

        /**
         * @param ask The key that must be used as FairPlay Application Secret key.
         * 
         * @return builder
         * 
         */
        public Builder ask(String ask) {
            return ask(Output.of(ask));
        }

        /**
         * @param offlineRentalConfiguration A `offline_rental_configuration` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder offlineRentalConfiguration(@Nullable Output<ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs> offlineRentalConfiguration) {
            $.offlineRentalConfiguration = offlineRentalConfiguration;
            return this;
        }

        /**
         * @param offlineRentalConfiguration A `offline_rental_configuration` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder offlineRentalConfiguration(ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs offlineRentalConfiguration) {
            return offlineRentalConfiguration(Output.of(offlineRentalConfiguration));
        }

        /**
         * @param pfx The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
         * 
         * @return builder
         * 
         */
        public Builder pfx(@Nullable Output<String> pfx) {
            $.pfx = pfx;
            return this;
        }

        /**
         * @param pfx The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
         * 
         * @return builder
         * 
         */
        public Builder pfx(String pfx) {
            return pfx(Output.of(pfx));
        }

        /**
         * @param pfxPassword The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
         * 
         * @return builder
         * 
         */
        public Builder pfxPassword(@Nullable Output<String> pfxPassword) {
            $.pfxPassword = pfxPassword;
            return this;
        }

        /**
         * @param pfxPassword The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
         * 
         * @return builder
         * 
         */
        public Builder pfxPassword(String pfxPassword) {
            return pfxPassword(Output.of(pfxPassword));
        }

        /**
         * @param rentalAndLeaseKeyType The rental and lease key type. Supported values are `DualExpiry`, `PersistentLimited`, `PersistentUnlimited` or `Undefined`.
         * 
         * @return builder
         * 
         */
        public Builder rentalAndLeaseKeyType(@Nullable Output<String> rentalAndLeaseKeyType) {
            $.rentalAndLeaseKeyType = rentalAndLeaseKeyType;
            return this;
        }

        /**
         * @param rentalAndLeaseKeyType The rental and lease key type. Supported values are `DualExpiry`, `PersistentLimited`, `PersistentUnlimited` or `Undefined`.
         * 
         * @return builder
         * 
         */
        public Builder rentalAndLeaseKeyType(String rentalAndLeaseKeyType) {
            return rentalAndLeaseKeyType(Output.of(rentalAndLeaseKeyType));
        }

        /**
         * @param rentalDurationSeconds The rental duration. Must be greater than 0.
         * 
         * @return builder
         * 
         */
        public Builder rentalDurationSeconds(@Nullable Output<Integer> rentalDurationSeconds) {
            $.rentalDurationSeconds = rentalDurationSeconds;
            return this;
        }

        /**
         * @param rentalDurationSeconds The rental duration. Must be greater than 0.
         * 
         * @return builder
         * 
         */
        public Builder rentalDurationSeconds(Integer rentalDurationSeconds) {
            return rentalDurationSeconds(Output.of(rentalDurationSeconds));
        }

        public ContentKeyPolicyPolicyOptionFairplayConfigurationArgs build() {
            return $;
        }
    }

}
