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

com.ovhcloud.pulumi.ovh.Me.APIOAuth2ClientArgs Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show 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.ovhcloud.pulumi.ovh.Me;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final APIOAuth2ClientArgs Empty = new APIOAuth2ClientArgs();

    /**
     * List of callback urls when configuring the `AUTHORIZATION_CODE` flow.
     * 
     */
    @Import(name="callbackUrls")
    private @Nullable Output> callbackUrls;

    /**
     * @return List of callback urls when configuring the `AUTHORIZATION_CODE` flow.
     * 
     */
    public Optional>> callbackUrls() {
        return Optional.ofNullable(this.callbackUrls);
    }

    /**
     * OAuth2 client description.
     * 
     */
    @Import(name="description", required=true)
    private Output description;

    /**
     * @return OAuth2 client description.
     * 
     */
    public Output description() {
        return this.description;
    }

    /**
     * The OAuth2 flow to use. `AUTHORIZATION_CODE` or `CLIENT_CREDENTIALS` are supported at the moment.
     * 
     */
    @Import(name="flow", required=true)
    private Output flow;

    /**
     * @return The OAuth2 flow to use. `AUTHORIZATION_CODE` or `CLIENT_CREDENTIALS` are supported at the moment.
     * 
     */
    public Output flow() {
        return this.flow;
    }

    /**
     * OAuth2 client name.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return OAuth2 client name.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    private APIOAuth2ClientArgs() {}

    private APIOAuth2ClientArgs(APIOAuth2ClientArgs $) {
        this.callbackUrls = $.callbackUrls;
        this.description = $.description;
        this.flow = $.flow;
        this.name = $.name;
    }

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

    public static final class Builder {
        private APIOAuth2ClientArgs $;

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

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

        /**
         * @param callbackUrls List of callback urls when configuring the `AUTHORIZATION_CODE` flow.
         * 
         * @return builder
         * 
         */
        public Builder callbackUrls(@Nullable Output> callbackUrls) {
            $.callbackUrls = callbackUrls;
            return this;
        }

        /**
         * @param callbackUrls List of callback urls when configuring the `AUTHORIZATION_CODE` flow.
         * 
         * @return builder
         * 
         */
        public Builder callbackUrls(List callbackUrls) {
            return callbackUrls(Output.of(callbackUrls));
        }

        /**
         * @param callbackUrls List of callback urls when configuring the `AUTHORIZATION_CODE` flow.
         * 
         * @return builder
         * 
         */
        public Builder callbackUrls(String... callbackUrls) {
            return callbackUrls(List.of(callbackUrls));
        }

        /**
         * @param description OAuth2 client description.
         * 
         * @return builder
         * 
         */
        public Builder description(Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description OAuth2 client description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param flow The OAuth2 flow to use. `AUTHORIZATION_CODE` or `CLIENT_CREDENTIALS` are supported at the moment.
         * 
         * @return builder
         * 
         */
        public Builder flow(Output flow) {
            $.flow = flow;
            return this;
        }

        /**
         * @param flow The OAuth2 flow to use. `AUTHORIZATION_CODE` or `CLIENT_CREDENTIALS` are supported at the moment.
         * 
         * @return builder
         * 
         */
        public Builder flow(String flow) {
            return flow(Output.of(flow));
        }

        /**
         * @param name OAuth2 client name.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name OAuth2 client name.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        public APIOAuth2ClientArgs build() {
            if ($.description == null) {
                throw new MissingRequiredPropertyException("APIOAuth2ClientArgs", "description");
            }
            if ($.flow == null) {
                throw new MissingRequiredPropertyException("APIOAuth2ClientArgs", "flow");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy