All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.media.outputs.ContentKeyPolicyTokenRestrictionResponse Maven / Gradle / Ivy

The newest version!
// *** 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.azurenative.media.outputs;

import com.pulumi.azurenative.media.outputs.ContentKeyPolicyRsaTokenKeyResponse;
import com.pulumi.azurenative.media.outputs.ContentKeyPolicySymmetricTokenKeyResponse;
import com.pulumi.azurenative.media.outputs.ContentKeyPolicyTokenClaimResponse;
import com.pulumi.azurenative.media.outputs.ContentKeyPolicyX509CertificateTokenKeyResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ContentKeyPolicyTokenRestrictionResponse {
    /**
     * @return A list of alternative verification keys.
     * 
     */
    private @Nullable List alternateVerificationKeys;
    /**
     * @return The audience for the token.
     * 
     */
    private String audience;
    /**
     * @return The token issuer.
     * 
     */
    private String issuer;
    /**
     * @return The discriminator for derived types.
     * Expected value is '#Microsoft.Media.ContentKeyPolicyTokenRestriction'.
     * 
     */
    private String odataType;
    /**
     * @return The OpenID connect discovery document.
     * 
     */
    private @Nullable String openIdConnectDiscoveryDocument;
    /**
     * @return The primary verification key.
     * 
     */
    private Object primaryVerificationKey;
    /**
     * @return A list of required token claims.
     * 
     */
    private @Nullable List requiredClaims;
    /**
     * @return The type of token.
     * 
     */
    private String restrictionTokenType;

    private ContentKeyPolicyTokenRestrictionResponse() {}
    /**
     * @return A list of alternative verification keys.
     * 
     */
    public List alternateVerificationKeys() {
        return this.alternateVerificationKeys == null ? List.of() : this.alternateVerificationKeys;
    }
    /**
     * @return The audience for the token.
     * 
     */
    public String audience() {
        return this.audience;
    }
    /**
     * @return The token issuer.
     * 
     */
    public String issuer() {
        return this.issuer;
    }
    /**
     * @return The discriminator for derived types.
     * Expected value is '#Microsoft.Media.ContentKeyPolicyTokenRestriction'.
     * 
     */
    public String odataType() {
        return this.odataType;
    }
    /**
     * @return The OpenID connect discovery document.
     * 
     */
    public Optional openIdConnectDiscoveryDocument() {
        return Optional.ofNullable(this.openIdConnectDiscoveryDocument);
    }
    /**
     * @return The primary verification key.
     * 
     */
    public Object primaryVerificationKey() {
        return this.primaryVerificationKey;
    }
    /**
     * @return A list of required token claims.
     * 
     */
    public List requiredClaims() {
        return this.requiredClaims == null ? List.of() : this.requiredClaims;
    }
    /**
     * @return The type of token.
     * 
     */
    public String restrictionTokenType() {
        return this.restrictionTokenType;
    }

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

    public static Builder builder(ContentKeyPolicyTokenRestrictionResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List alternateVerificationKeys;
        private String audience;
        private String issuer;
        private String odataType;
        private @Nullable String openIdConnectDiscoveryDocument;
        private Object primaryVerificationKey;
        private @Nullable List requiredClaims;
        private String restrictionTokenType;
        public Builder() {}
        public Builder(ContentKeyPolicyTokenRestrictionResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.alternateVerificationKeys = defaults.alternateVerificationKeys;
    	      this.audience = defaults.audience;
    	      this.issuer = defaults.issuer;
    	      this.odataType = defaults.odataType;
    	      this.openIdConnectDiscoveryDocument = defaults.openIdConnectDiscoveryDocument;
    	      this.primaryVerificationKey = defaults.primaryVerificationKey;
    	      this.requiredClaims = defaults.requiredClaims;
    	      this.restrictionTokenType = defaults.restrictionTokenType;
        }

        @CustomType.Setter
        public Builder alternateVerificationKeys(@Nullable List alternateVerificationKeys) {

            this.alternateVerificationKeys = alternateVerificationKeys;
            return this;
        }
        public Builder alternateVerificationKeys(Object... alternateVerificationKeys) {
            return alternateVerificationKeys(List.of(alternateVerificationKeys));
        }
        @CustomType.Setter
        public Builder audience(String audience) {
            if (audience == null) {
              throw new MissingRequiredPropertyException("ContentKeyPolicyTokenRestrictionResponse", "audience");
            }
            this.audience = audience;
            return this;
        }
        @CustomType.Setter
        public Builder issuer(String issuer) {
            if (issuer == null) {
              throw new MissingRequiredPropertyException("ContentKeyPolicyTokenRestrictionResponse", "issuer");
            }
            this.issuer = issuer;
            return this;
        }
        @CustomType.Setter
        public Builder odataType(String odataType) {
            if (odataType == null) {
              throw new MissingRequiredPropertyException("ContentKeyPolicyTokenRestrictionResponse", "odataType");
            }
            this.odataType = odataType;
            return this;
        }
        @CustomType.Setter
        public Builder openIdConnectDiscoveryDocument(@Nullable String openIdConnectDiscoveryDocument) {

            this.openIdConnectDiscoveryDocument = openIdConnectDiscoveryDocument;
            return this;
        }
        @CustomType.Setter
        public Builder primaryVerificationKey(Object primaryVerificationKey) {
            if (primaryVerificationKey == null) {
              throw new MissingRequiredPropertyException("ContentKeyPolicyTokenRestrictionResponse", "primaryVerificationKey");
            }
            this.primaryVerificationKey = primaryVerificationKey;
            return this;
        }
        @CustomType.Setter
        public Builder requiredClaims(@Nullable List requiredClaims) {

            this.requiredClaims = requiredClaims;
            return this;
        }
        public Builder requiredClaims(ContentKeyPolicyTokenClaimResponse... requiredClaims) {
            return requiredClaims(List.of(requiredClaims));
        }
        @CustomType.Setter
        public Builder restrictionTokenType(String restrictionTokenType) {
            if (restrictionTokenType == null) {
              throw new MissingRequiredPropertyException("ContentKeyPolicyTokenRestrictionResponse", "restrictionTokenType");
            }
            this.restrictionTokenType = restrictionTokenType;
            return this;
        }
        public ContentKeyPolicyTokenRestrictionResponse build() {
            final var _resultValue = new ContentKeyPolicyTokenRestrictionResponse();
            _resultValue.alternateVerificationKeys = alternateVerificationKeys;
            _resultValue.audience = audience;
            _resultValue.issuer = issuer;
            _resultValue.odataType = odataType;
            _resultValue.openIdConnectDiscoveryDocument = openIdConnectDiscoveryDocument;
            _resultValue.primaryVerificationKey = primaryVerificationKey;
            _resultValue.requiredClaims = requiredClaims;
            _resultValue.restrictionTokenType = restrictionTokenType;
            return _resultValue;
        }
    }
}