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

com.pulumi.googlenative.apigee.v1.outputs.GetKeyResult Maven / Gradle / Ivy

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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.googlenative.apigee.v1.outputs.GoogleCloudApigeeV1AttributeResponse;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;

@CustomType
public final class GetKeyResult {
    /**
     * @return List of API products for which the credential can be used. **Note**: Do not specify the list of API products when creating a consumer key and secret for a developer app. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created.
     * 
     */
    private List apiProducts;
    /**
     * @return List of attributes associated with the credential.
     * 
     */
    private List attributes;
    /**
     * @return Consumer key.
     * 
     */
    private String consumerKey;
    /**
     * @return Secret key.
     * 
     */
    private String consumerSecret;
    /**
     * @return Time the developer app expires in milliseconds since epoch.
     * 
     */
    private String expiresAt;
    /**
     * @return Input only. Expiration time, in seconds, for the consumer key. If not set or left to the default value of `-1`, the API key never expires. The expiration time can't be updated after it is set.
     * 
     */
    private String expiresInSeconds;
    /**
     * @return Time the developer app was created in milliseconds since epoch.
     * 
     */
    private String issuedAt;
    /**
     * @return Scopes to apply to the app. The specified scope names must already be defined for the API product that you associate with the app.
     * 
     */
    private List scopes;
    /**
     * @return Status of the credential. Valid values include `approved` or `revoked`.
     * 
     */
    private String status;

    private GetKeyResult() {}
    /**
     * @return List of API products for which the credential can be used. **Note**: Do not specify the list of API products when creating a consumer key and secret for a developer app. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created.
     * 
     */
    public List apiProducts() {
        return this.apiProducts;
    }
    /**
     * @return List of attributes associated with the credential.
     * 
     */
    public List attributes() {
        return this.attributes;
    }
    /**
     * @return Consumer key.
     * 
     */
    public String consumerKey() {
        return this.consumerKey;
    }
    /**
     * @return Secret key.
     * 
     */
    public String consumerSecret() {
        return this.consumerSecret;
    }
    /**
     * @return Time the developer app expires in milliseconds since epoch.
     * 
     */
    public String expiresAt() {
        return this.expiresAt;
    }
    /**
     * @return Input only. Expiration time, in seconds, for the consumer key. If not set or left to the default value of `-1`, the API key never expires. The expiration time can't be updated after it is set.
     * 
     */
    public String expiresInSeconds() {
        return this.expiresInSeconds;
    }
    /**
     * @return Time the developer app was created in milliseconds since epoch.
     * 
     */
    public String issuedAt() {
        return this.issuedAt;
    }
    /**
     * @return Scopes to apply to the app. The specified scope names must already be defined for the API product that you associate with the app.
     * 
     */
    public List scopes() {
        return this.scopes;
    }
    /**
     * @return Status of the credential. Valid values include `approved` or `revoked`.
     * 
     */
    public String status() {
        return this.status;
    }

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

    public static Builder builder(GetKeyResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private List apiProducts;
        private List attributes;
        private String consumerKey;
        private String consumerSecret;
        private String expiresAt;
        private String expiresInSeconds;
        private String issuedAt;
        private List scopes;
        private String status;
        public Builder() {}
        public Builder(GetKeyResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.apiProducts = defaults.apiProducts;
    	      this.attributes = defaults.attributes;
    	      this.consumerKey = defaults.consumerKey;
    	      this.consumerSecret = defaults.consumerSecret;
    	      this.expiresAt = defaults.expiresAt;
    	      this.expiresInSeconds = defaults.expiresInSeconds;
    	      this.issuedAt = defaults.issuedAt;
    	      this.scopes = defaults.scopes;
    	      this.status = defaults.status;
        }

        @CustomType.Setter
        public Builder apiProducts(List apiProducts) {
            this.apiProducts = Objects.requireNonNull(apiProducts);
            return this;
        }
        public Builder apiProducts(Object... apiProducts) {
            return apiProducts(List.of(apiProducts));
        }
        @CustomType.Setter
        public Builder attributes(List attributes) {
            this.attributes = Objects.requireNonNull(attributes);
            return this;
        }
        public Builder attributes(GoogleCloudApigeeV1AttributeResponse... attributes) {
            return attributes(List.of(attributes));
        }
        @CustomType.Setter
        public Builder consumerKey(String consumerKey) {
            this.consumerKey = Objects.requireNonNull(consumerKey);
            return this;
        }
        @CustomType.Setter
        public Builder consumerSecret(String consumerSecret) {
            this.consumerSecret = Objects.requireNonNull(consumerSecret);
            return this;
        }
        @CustomType.Setter
        public Builder expiresAt(String expiresAt) {
            this.expiresAt = Objects.requireNonNull(expiresAt);
            return this;
        }
        @CustomType.Setter
        public Builder expiresInSeconds(String expiresInSeconds) {
            this.expiresInSeconds = Objects.requireNonNull(expiresInSeconds);
            return this;
        }
        @CustomType.Setter
        public Builder issuedAt(String issuedAt) {
            this.issuedAt = Objects.requireNonNull(issuedAt);
            return this;
        }
        @CustomType.Setter
        public Builder scopes(List scopes) {
            this.scopes = Objects.requireNonNull(scopes);
            return this;
        }
        public Builder scopes(String... scopes) {
            return scopes(List.of(scopes));
        }
        @CustomType.Setter
        public Builder status(String status) {
            this.status = Objects.requireNonNull(status);
            return this;
        }
        public GetKeyResult build() {
            final var o = new GetKeyResult();
            o.apiProducts = apiProducts;
            o.attributes = attributes;
            o.consumerKey = consumerKey;
            o.consumerSecret = consumerSecret;
            o.expiresAt = expiresAt;
            o.expiresInSeconds = expiresInSeconds;
            o.issuedAt = issuedAt;
            o.scopes = scopes;
            o.status = status;
            return o;
        }
    }
}