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

com.pulumi.azurenative.apicenter.ApiSourceArgs 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.ImportSpecificationOptions;
import com.pulumi.azurenative.apicenter.enums.LifecycleStage;
import com.pulumi.azurenative.apicenter.inputs.AzureApiManagementSourceArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ApiSourceArgs Empty = new ApiSourceArgs();

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

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

    /**
     * API source configuration for Azure API Management.
     * 
     */
    @Import(name="azureApiManagementSource")
    private @Nullable Output azureApiManagementSource;

    /**
     * @return API source configuration for Azure API Management.
     * 
     */
    public Optional> azureApiManagementSource() {
        return Optional.ofNullable(this.azureApiManagementSource);
    }

    /**
     * Indicates if the specification should be imported along with metadata.
     * 
     */
    @Import(name="importSpecification")
    private @Nullable Output> importSpecification;

    /**
     * @return Indicates if the specification should be imported along with metadata.
     * 
     */
    public Optional>> importSpecification() {
        return Optional.ofNullable(this.importSpecification);
    }

    /**
     * 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;
    }

    /**
     * The target environment resource ID.
     * 
     */
    @Import(name="targetEnvironmentId")
    private @Nullable Output targetEnvironmentId;

    /**
     * @return The target environment resource ID.
     * 
     */
    public Optional> targetEnvironmentId() {
        return Optional.ofNullable(this.targetEnvironmentId);
    }

    /**
     * The target lifecycle stage.
     * 
     */
    @Import(name="targetLifecycleStage")
    private @Nullable Output> targetLifecycleStage;

    /**
     * @return The target lifecycle stage.
     * 
     */
    public Optional>> targetLifecycleStage() {
        return Optional.ofNullable(this.targetLifecycleStage);
    }

    /**
     * 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 ApiSourceArgs() {}

    private ApiSourceArgs(ApiSourceArgs $) {
        this.apiSourceName = $.apiSourceName;
        this.azureApiManagementSource = $.azureApiManagementSource;
        this.importSpecification = $.importSpecification;
        this.resourceGroupName = $.resourceGroupName;
        this.serviceName = $.serviceName;
        this.targetEnvironmentId = $.targetEnvironmentId;
        this.targetLifecycleStage = $.targetLifecycleStage;
        this.workspaceName = $.workspaceName;
    }

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

    public static final class Builder {
        private ApiSourceArgs $;

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

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

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

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

        /**
         * @param azureApiManagementSource API source configuration for Azure API Management.
         * 
         * @return builder
         * 
         */
        public Builder azureApiManagementSource(@Nullable Output azureApiManagementSource) {
            $.azureApiManagementSource = azureApiManagementSource;
            return this;
        }

        /**
         * @param azureApiManagementSource API source configuration for Azure API Management.
         * 
         * @return builder
         * 
         */
        public Builder azureApiManagementSource(AzureApiManagementSourceArgs azureApiManagementSource) {
            return azureApiManagementSource(Output.of(azureApiManagementSource));
        }

        /**
         * @param importSpecification Indicates if the specification should be imported along with metadata.
         * 
         * @return builder
         * 
         */
        public Builder importSpecification(@Nullable Output> importSpecification) {
            $.importSpecification = importSpecification;
            return this;
        }

        /**
         * @param importSpecification Indicates if the specification should be imported along with metadata.
         * 
         * @return builder
         * 
         */
        public Builder importSpecification(Either importSpecification) {
            return importSpecification(Output.of(importSpecification));
        }

        /**
         * @param importSpecification Indicates if the specification should be imported along with metadata.
         * 
         * @return builder
         * 
         */
        public Builder importSpecification(String importSpecification) {
            return importSpecification(Either.ofLeft(importSpecification));
        }

        /**
         * @param importSpecification Indicates if the specification should be imported along with metadata.
         * 
         * @return builder
         * 
         */
        public Builder importSpecification(ImportSpecificationOptions importSpecification) {
            return importSpecification(Either.ofRight(importSpecification));
        }

        /**
         * @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 targetEnvironmentId The target environment resource ID.
         * 
         * @return builder
         * 
         */
        public Builder targetEnvironmentId(@Nullable Output targetEnvironmentId) {
            $.targetEnvironmentId = targetEnvironmentId;
            return this;
        }

        /**
         * @param targetEnvironmentId The target environment resource ID.
         * 
         * @return builder
         * 
         */
        public Builder targetEnvironmentId(String targetEnvironmentId) {
            return targetEnvironmentId(Output.of(targetEnvironmentId));
        }

        /**
         * @param targetLifecycleStage The target lifecycle stage.
         * 
         * @return builder
         * 
         */
        public Builder targetLifecycleStage(@Nullable Output> targetLifecycleStage) {
            $.targetLifecycleStage = targetLifecycleStage;
            return this;
        }

        /**
         * @param targetLifecycleStage The target lifecycle stage.
         * 
         * @return builder
         * 
         */
        public Builder targetLifecycleStage(Either targetLifecycleStage) {
            return targetLifecycleStage(Output.of(targetLifecycleStage));
        }

        /**
         * @param targetLifecycleStage The target lifecycle stage.
         * 
         * @return builder
         * 
         */
        public Builder targetLifecycleStage(String targetLifecycleStage) {
            return targetLifecycleStage(Either.ofLeft(targetLifecycleStage));
        }

        /**
         * @param targetLifecycleStage The target lifecycle stage.
         * 
         * @return builder
         * 
         */
        public Builder targetLifecycleStage(LifecycleStage targetLifecycleStage) {
            return targetLifecycleStage(Either.ofRight(targetLifecycleStage));
        }

        /**
         * @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 ApiSourceArgs build() {
            $.importSpecification = Codegen.stringProp("importSpecification").left(ImportSpecificationOptions.class).output().arg($.importSpecification).def("ondemand").getNullable();
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ApiSourceArgs", "resourceGroupName");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("ApiSourceArgs", "serviceName");
            }
            if ($.workspaceName == null) {
                throw new MissingRequiredPropertyException("ApiSourceArgs", "workspaceName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy