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

com.pulumi.azurenative.apicenter.ApiArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.pulumi.azurenative.apicenter;

import com.pulumi.azurenative.apicenter.enums.ApiKind;
import com.pulumi.azurenative.apicenter.inputs.ContactArgs;
import com.pulumi.azurenative.apicenter.inputs.ExternalDocumentationArgs;
import com.pulumi.azurenative.apicenter.inputs.LicenseArgs;
import com.pulumi.azurenative.apicenter.inputs.TermsOfServiceArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
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;


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

    public static final ApiArgs Empty = new ApiArgs();

    /**
     * The name of the API.
     * 
     */
    @Import(name="apiName")
    private @Nullable Output apiName;

    /**
     * @return The name of the API.
     * 
     */
    public Optional> apiName() {
        return Optional.ofNullable(this.apiName);
    }

    /**
     * The set of contacts
     * 
     */
    @Import(name="contacts")
    private @Nullable Output> contacts;

    /**
     * @return The set of contacts
     * 
     */
    public Optional>> contacts() {
        return Optional.ofNullable(this.contacts);
    }

    /**
     * The custom metadata defined for API catalog entities.
     * 
     */
    @Import(name="customProperties")
    private @Nullable Output customProperties;

    /**
     * @return The custom metadata defined for API catalog entities.
     * 
     */
    public Optional> customProperties() {
        return Optional.ofNullable(this.customProperties);
    }

    /**
     * Description of the API.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Description of the API.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The set of external documentation
     * 
     */
    @Import(name="externalDocumentation")
    private @Nullable Output> externalDocumentation;

    /**
     * @return The set of external documentation
     * 
     */
    public Optional>> externalDocumentation() {
        return Optional.ofNullable(this.externalDocumentation);
    }

    /**
     * Kind of API. For example, REST or GraphQL.
     * 
     */
    @Import(name="kind", required=true)
    private Output> kind;

    /**
     * @return Kind of API. For example, REST or GraphQL.
     * 
     */
    public Output> kind() {
        return this.kind;
    }

    /**
     * The license information for the API.
     * 
     */
    @Import(name="license")
    private @Nullable Output license;

    /**
     * @return The license information for the API.
     * 
     */
    public Optional> license() {
        return Optional.ofNullable(this.license);
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The name of Azure API Center service.
     * 
     */
    @Import(name="serviceName", required=true)
    private Output serviceName;

    /**
     * @return The name of Azure API Center service.
     * 
     */
    public Output serviceName() {
        return this.serviceName;
    }

    /**
     * Short description of the API.
     * 
     */
    @Import(name="summary")
    private @Nullable Output summary;

    /**
     * @return Short description of the API.
     * 
     */
    public Optional> summary() {
        return Optional.ofNullable(this.summary);
    }

    /**
     * Terms of service for the API.
     * 
     */
    @Import(name="termsOfService")
    private @Nullable Output termsOfService;

    /**
     * @return Terms of service for the API.
     * 
     */
    public Optional> termsOfService() {
        return Optional.ofNullable(this.termsOfService);
    }

    /**
     * API title.
     * 
     */
    @Import(name="title", required=true)
    private Output title;

    /**
     * @return API title.
     * 
     */
    public Output title() {
        return this.title;
    }

    /**
     * The name of the workspace.
     * 
     */
    @Import(name="workspaceName", required=true)
    private Output workspaceName;

    /**
     * @return The name of the workspace.
     * 
     */
    public Output workspaceName() {
        return this.workspaceName;
    }

    private ApiArgs() {}

    private ApiArgs(ApiArgs $) {
        this.apiName = $.apiName;
        this.contacts = $.contacts;
        this.customProperties = $.customProperties;
        this.description = $.description;
        this.externalDocumentation = $.externalDocumentation;
        this.kind = $.kind;
        this.license = $.license;
        this.resourceGroupName = $.resourceGroupName;
        this.serviceName = $.serviceName;
        this.summary = $.summary;
        this.termsOfService = $.termsOfService;
        this.title = $.title;
        this.workspaceName = $.workspaceName;
    }

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

    public static final class Builder {
        private ApiArgs $;

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

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

        /**
         * @param apiName The name of the API.
         * 
         * @return builder
         * 
         */
        public Builder apiName(@Nullable Output apiName) {
            $.apiName = apiName;
            return this;
        }

        /**
         * @param apiName The name of the API.
         * 
         * @return builder
         * 
         */
        public Builder apiName(String apiName) {
            return apiName(Output.of(apiName));
        }

        /**
         * @param contacts The set of contacts
         * 
         * @return builder
         * 
         */
        public Builder contacts(@Nullable Output> contacts) {
            $.contacts = contacts;
            return this;
        }

        /**
         * @param contacts The set of contacts
         * 
         * @return builder
         * 
         */
        public Builder contacts(List contacts) {
            return contacts(Output.of(contacts));
        }

        /**
         * @param contacts The set of contacts
         * 
         * @return builder
         * 
         */
        public Builder contacts(ContactArgs... contacts) {
            return contacts(List.of(contacts));
        }

        /**
         * @param customProperties The custom metadata defined for API catalog entities.
         * 
         * @return builder
         * 
         */
        public Builder customProperties(@Nullable Output customProperties) {
            $.customProperties = customProperties;
            return this;
        }

        /**
         * @param customProperties The custom metadata defined for API catalog entities.
         * 
         * @return builder
         * 
         */
        public Builder customProperties(Object customProperties) {
            return customProperties(Output.of(customProperties));
        }

        /**
         * @param description Description of the API.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Description of the API.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param externalDocumentation The set of external documentation
         * 
         * @return builder
         * 
         */
        public Builder externalDocumentation(@Nullable Output> externalDocumentation) {
            $.externalDocumentation = externalDocumentation;
            return this;
        }

        /**
         * @param externalDocumentation The set of external documentation
         * 
         * @return builder
         * 
         */
        public Builder externalDocumentation(List externalDocumentation) {
            return externalDocumentation(Output.of(externalDocumentation));
        }

        /**
         * @param externalDocumentation The set of external documentation
         * 
         * @return builder
         * 
         */
        public Builder externalDocumentation(ExternalDocumentationArgs... externalDocumentation) {
            return externalDocumentation(List.of(externalDocumentation));
        }

        /**
         * @param kind Kind of API. For example, REST or GraphQL.
         * 
         * @return builder
         * 
         */
        public Builder kind(Output> kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind Kind of API. For example, REST or GraphQL.
         * 
         * @return builder
         * 
         */
        public Builder kind(Either kind) {
            return kind(Output.of(kind));
        }

        /**
         * @param kind Kind of API. For example, REST or GraphQL.
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Either.ofLeft(kind));
        }

        /**
         * @param kind Kind of API. For example, REST or GraphQL.
         * 
         * @return builder
         * 
         */
        public Builder kind(ApiKind kind) {
            return kind(Either.ofRight(kind));
        }

        /**
         * @param license The license information for the API.
         * 
         * @return builder
         * 
         */
        public Builder license(@Nullable Output license) {
            $.license = license;
            return this;
        }

        /**
         * @param license The license information for the API.
         * 
         * @return builder
         * 
         */
        public Builder license(LicenseArgs license) {
            return license(Output.of(license));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param serviceName The name of Azure API Center service.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(Output serviceName) {
            $.serviceName = serviceName;
            return this;
        }

        /**
         * @param serviceName The name of Azure API Center service.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(String serviceName) {
            return serviceName(Output.of(serviceName));
        }

        /**
         * @param summary Short description of the API.
         * 
         * @return builder
         * 
         */
        public Builder summary(@Nullable Output summary) {
            $.summary = summary;
            return this;
        }

        /**
         * @param summary Short description of the API.
         * 
         * @return builder
         * 
         */
        public Builder summary(String summary) {
            return summary(Output.of(summary));
        }

        /**
         * @param termsOfService Terms of service for the API.
         * 
         * @return builder
         * 
         */
        public Builder termsOfService(@Nullable Output termsOfService) {
            $.termsOfService = termsOfService;
            return this;
        }

        /**
         * @param termsOfService Terms of service for the API.
         * 
         * @return builder
         * 
         */
        public Builder termsOfService(TermsOfServiceArgs termsOfService) {
            return termsOfService(Output.of(termsOfService));
        }

        /**
         * @param title API title.
         * 
         * @return builder
         * 
         */
        public Builder title(Output title) {
            $.title = title;
            return this;
        }

        /**
         * @param title API title.
         * 
         * @return builder
         * 
         */
        public Builder title(String title) {
            return title(Output.of(title));
        }

        /**
         * @param workspaceName The name of the workspace.
         * 
         * @return builder
         * 
         */
        public Builder workspaceName(Output workspaceName) {
            $.workspaceName = workspaceName;
            return this;
        }

        /**
         * @param workspaceName The name of the workspace.
         * 
         * @return builder
         * 
         */
        public Builder workspaceName(String workspaceName) {
            return workspaceName(Output.of(workspaceName));
        }

        public ApiArgs build() {
            if ($.kind == null) {
                throw new MissingRequiredPropertyException("ApiArgs", "kind");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ApiArgs", "resourceGroupName");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("ApiArgs", "serviceName");
            }
            if ($.title == null) {
                throw new MissingRequiredPropertyException("ApiArgs", "title");
            }
            if ($.workspaceName == null) {
                throw new MissingRequiredPropertyException("ApiArgs", "workspaceName");
            }
            return $;
        }
    }

}