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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.kms.outputs.GetKMSCryptoKeyVersionTemplate;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;

@CustomType
public final class GetKMSCryptoKeyResult {
    private String destroyScheduledDuration;
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    private String id;
    private Boolean importOnly;
    private String keyRing;
    private Map<String,String> labels;
    private String name;
    /**
     * @return Defines the cryptographic capabilities of the key.
     * 
     */
    private String purpose;
    /**
     * @return Every time this period passes, generate a new CryptoKeyVersion and set it as
     * the primary. The first rotation will take place after the specified period. The rotation period has the format
     * of a decimal number with up to 9 fractional digits, followed by the letter s (seconds).
     * 
     */
    private String rotationPeriod;
    private Boolean skipInitialVersionCreation;
    private List<GetKMSCryptoKeyVersionTemplate> versionTemplates;

    private GetKMSCryptoKeyResult() {}
    public String destroyScheduledDuration() {
        return this.destroyScheduledDuration;
    }
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    public String id() {
        return this.id;
    }
    public Boolean importOnly() {
        return this.importOnly;
    }
    public String keyRing() {
        return this.keyRing;
    }
    public Map<String,String> labels() {
        return this.labels;
    }
    public String name() {
        return this.name;
    }
    /**
     * @return Defines the cryptographic capabilities of the key.
     * 
     */
    public String purpose() {
        return this.purpose;
    }
    /**
     * @return Every time this period passes, generate a new CryptoKeyVersion and set it as
     * the primary. The first rotation will take place after the specified period. The rotation period has the format
     * of a decimal number with up to 9 fractional digits, followed by the letter s (seconds).
     * 
     */
    public String rotationPeriod() {
        return this.rotationPeriod;
    }
    public Boolean skipInitialVersionCreation() {
        return this.skipInitialVersionCreation;
    }
    public List<GetKMSCryptoKeyVersionTemplate> versionTemplates() {
        return this.versionTemplates;
    }

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

    public static Builder builder(GetKMSCryptoKeyResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String destroyScheduledDuration;
        private String id;
        private Boolean importOnly;
        private String keyRing;
        private Map<String,String> labels;
        private String name;
        private String purpose;
        private String rotationPeriod;
        private Boolean skipInitialVersionCreation;
        private List<GetKMSCryptoKeyVersionTemplate> versionTemplates;
        public Builder() {}
        public Builder(GetKMSCryptoKeyResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.destroyScheduledDuration = defaults.destroyScheduledDuration;
    	      this.id = defaults.id;
    	      this.importOnly = defaults.importOnly;
    	      this.keyRing = defaults.keyRing;
    	      this.labels = defaults.labels;
    	      this.name = defaults.name;
    	      this.purpose = defaults.purpose;
    	      this.rotationPeriod = defaults.rotationPeriod;
    	      this.skipInitialVersionCreation = defaults.skipInitialVersionCreation;
    	      this.versionTemplates = defaults.versionTemplates;
        }

        @CustomType.Setter
        public Builder destroyScheduledDuration(String destroyScheduledDuration) {
            this.destroyScheduledDuration = Objects.requireNonNull(destroyScheduledDuration);
            return this;
        }
        @CustomType.Setter
        public Builder id(String id) {
            this.id = Objects.requireNonNull(id);
            return this;
        }
        @CustomType.Setter
        public Builder importOnly(Boolean importOnly) {
            this.importOnly = Objects.requireNonNull(importOnly);
            return this;
        }
        @CustomType.Setter
        public Builder keyRing(String keyRing) {
            this.keyRing = Objects.requireNonNull(keyRing);
            return this;
        }
        @CustomType.Setter
        public Builder labels(Map<String,String> labels) {
            this.labels = Objects.requireNonNull(labels);
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            this.name = Objects.requireNonNull(name);
            return this;
        }
        @CustomType.Setter
        public Builder purpose(String purpose) {
            this.purpose = Objects.requireNonNull(purpose);
            return this;
        }
        @CustomType.Setter
        public Builder rotationPeriod(String rotationPeriod) {
            this.rotationPeriod = Objects.requireNonNull(rotationPeriod);
            return this;
        }
        @CustomType.Setter
        public Builder skipInitialVersionCreation(Boolean skipInitialVersionCreation) {
            this.skipInitialVersionCreation = Objects.requireNonNull(skipInitialVersionCreation);
            return this;
        }
        @CustomType.Setter
        public Builder versionTemplates(List<GetKMSCryptoKeyVersionTemplate> versionTemplates) {
            this.versionTemplates = Objects.requireNonNull(versionTemplates);
            return this;
        }
        public Builder versionTemplates(GetKMSCryptoKeyVersionTemplate... versionTemplates) {
            return versionTemplates(List.of(versionTemplates));
        }
        public GetKMSCryptoKeyResult build() {
            final var o = new GetKMSCryptoKeyResult();
            o.destroyScheduledDuration = destroyScheduledDuration;
            o.id = id;
            o.importOnly = importOnly;
            o.keyRing = keyRing;
            o.labels = labels;
            o.name = name;
            o.purpose = purpose;
            o.rotationPeriod = rotationPeriod;
            o.skipInitialVersionCreation = skipInitialVersionCreation;
            o.versionTemplates = versionTemplates;
            return o;
        }
    }
}
