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

com.pulumi.azurenative.resources.ResourceArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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.resources;

import com.pulumi.azurenative.resources.inputs.ExtendedLocationArgs;
import com.pulumi.azurenative.resources.inputs.IdentityArgs;
import com.pulumi.azurenative.resources.inputs.PlanArgs;
import com.pulumi.azurenative.resources.inputs.SkuArgs;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ResourceArgs Empty = new ResourceArgs();

    /**
     * Resource extended location.
     * 
     */
    @Import(name="extendedLocation")
    private @Nullable Output extendedLocation;

    /**
     * @return Resource extended location.
     * 
     */
    public Optional> extendedLocation() {
        return Optional.ofNullable(this.extendedLocation);
    }

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

    /**
     * @return The identity of the resource.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

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

    /**
     * @return The kind of the resource.
     * 
     */
    public Optional> kind() {
        return Optional.ofNullable(this.kind);
    }

    /**
     * Resource location
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Resource location
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * ID of the resource that manages this resource.
     * 
     */
    @Import(name="managedBy")
    private @Nullable Output managedBy;

    /**
     * @return ID of the resource that manages this resource.
     * 
     */
    public Optional> managedBy() {
        return Optional.ofNullable(this.managedBy);
    }

    /**
     * The parent resource identity.
     * 
     */
    @Import(name="parentResourcePath", required=true)
    private Output parentResourcePath;

    /**
     * @return The parent resource identity.
     * 
     */
    public Output parentResourcePath() {
        return this.parentResourcePath;
    }

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

    /**
     * @return The plan of the resource.
     * 
     */
    public Optional> plan() {
        return Optional.ofNullable(this.plan);
    }

    /**
     * The resource properties.
     * 
     */
    @Import(name="properties")
    private @Nullable Output properties;

    /**
     * @return The resource properties.
     * 
     */
    public Optional> properties() {
        return Optional.ofNullable(this.properties);
    }

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

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

    /**
     * The name of the resource to create.
     * 
     */
    @Import(name="resourceName")
    private @Nullable Output resourceName;

    /**
     * @return The name of the resource to create.
     * 
     */
    public Optional> resourceName() {
        return Optional.ofNullable(this.resourceName);
    }

    /**
     * The namespace of the resource provider.
     * 
     */
    @Import(name="resourceProviderNamespace", required=true)
    private Output resourceProviderNamespace;

    /**
     * @return The namespace of the resource provider.
     * 
     */
    public Output resourceProviderNamespace() {
        return this.resourceProviderNamespace;
    }

    /**
     * The resource type of the resource to create.
     * 
     */
    @Import(name="resourceType", required=true)
    private Output resourceType;

    /**
     * @return The resource type of the resource to create.
     * 
     */
    public Output resourceType() {
        return this.resourceType;
    }

    /**
     * The SKU of the resource.
     * 
     */
    @Import(name="sku")
    private @Nullable Output sku;

    /**
     * @return The SKU of the resource.
     * 
     */
    public Optional> sku() {
        return Optional.ofNullable(this.sku);
    }

    /**
     * Resource tags
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private ResourceArgs() {}

    private ResourceArgs(ResourceArgs $) {
        this.extendedLocation = $.extendedLocation;
        this.identity = $.identity;
        this.kind = $.kind;
        this.location = $.location;
        this.managedBy = $.managedBy;
        this.parentResourcePath = $.parentResourcePath;
        this.plan = $.plan;
        this.properties = $.properties;
        this.resourceGroupName = $.resourceGroupName;
        this.resourceName = $.resourceName;
        this.resourceProviderNamespace = $.resourceProviderNamespace;
        this.resourceType = $.resourceType;
        this.sku = $.sku;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private ResourceArgs $;

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

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

        /**
         * @param extendedLocation Resource extended location.
         * 
         * @return builder
         * 
         */
        public Builder extendedLocation(@Nullable Output extendedLocation) {
            $.extendedLocation = extendedLocation;
            return this;
        }

        /**
         * @param extendedLocation Resource extended location.
         * 
         * @return builder
         * 
         */
        public Builder extendedLocation(ExtendedLocationArgs extendedLocation) {
            return extendedLocation(Output.of(extendedLocation));
        }

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

        /**
         * @param identity The identity of the resource.
         * 
         * @return builder
         * 
         */
        public Builder identity(IdentityArgs identity) {
            return identity(Output.of(identity));
        }

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

        /**
         * @param kind The kind of the resource.
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Output.of(kind));
        }

        /**
         * @param location Resource location
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

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

        /**
         * @param managedBy ID of the resource that manages this resource.
         * 
         * @return builder
         * 
         */
        public Builder managedBy(@Nullable Output managedBy) {
            $.managedBy = managedBy;
            return this;
        }

        /**
         * @param managedBy ID of the resource that manages this resource.
         * 
         * @return builder
         * 
         */
        public Builder managedBy(String managedBy) {
            return managedBy(Output.of(managedBy));
        }

        /**
         * @param parentResourcePath The parent resource identity.
         * 
         * @return builder
         * 
         */
        public Builder parentResourcePath(Output parentResourcePath) {
            $.parentResourcePath = parentResourcePath;
            return this;
        }

        /**
         * @param parentResourcePath The parent resource identity.
         * 
         * @return builder
         * 
         */
        public Builder parentResourcePath(String parentResourcePath) {
            return parentResourcePath(Output.of(parentResourcePath));
        }

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

        /**
         * @param plan The plan of the resource.
         * 
         * @return builder
         * 
         */
        public Builder plan(PlanArgs plan) {
            return plan(Output.of(plan));
        }

        /**
         * @param properties The resource properties.
         * 
         * @return builder
         * 
         */
        public Builder properties(@Nullable Output properties) {
            $.properties = properties;
            return this;
        }

        /**
         * @param properties The resource properties.
         * 
         * @return builder
         * 
         */
        public Builder properties(Object properties) {
            return properties(Output.of(properties));
        }

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

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

        /**
         * @param resourceName The name of the resource to create.
         * 
         * @return builder
         * 
         */
        public Builder resourceName(@Nullable Output resourceName) {
            $.resourceName = resourceName;
            return this;
        }

        /**
         * @param resourceName The name of the resource to create.
         * 
         * @return builder
         * 
         */
        public Builder resourceName(String resourceName) {
            return resourceName(Output.of(resourceName));
        }

        /**
         * @param resourceProviderNamespace The namespace of the resource provider.
         * 
         * @return builder
         * 
         */
        public Builder resourceProviderNamespace(Output resourceProviderNamespace) {
            $.resourceProviderNamespace = resourceProviderNamespace;
            return this;
        }

        /**
         * @param resourceProviderNamespace The namespace of the resource provider.
         * 
         * @return builder
         * 
         */
        public Builder resourceProviderNamespace(String resourceProviderNamespace) {
            return resourceProviderNamespace(Output.of(resourceProviderNamespace));
        }

        /**
         * @param resourceType The resource type of the resource to create.
         * 
         * @return builder
         * 
         */
        public Builder resourceType(Output resourceType) {
            $.resourceType = resourceType;
            return this;
        }

        /**
         * @param resourceType The resource type of the resource to create.
         * 
         * @return builder
         * 
         */
        public Builder resourceType(String resourceType) {
            return resourceType(Output.of(resourceType));
        }

        /**
         * @param sku The SKU of the resource.
         * 
         * @return builder
         * 
         */
        public Builder sku(@Nullable Output sku) {
            $.sku = sku;
            return this;
        }

        /**
         * @param sku The SKU of the resource.
         * 
         * @return builder
         * 
         */
        public Builder sku(SkuArgs sku) {
            return sku(Output.of(sku));
        }

        /**
         * @param tags Resource tags
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        public ResourceArgs build() {
            if ($.parentResourcePath == null) {
                throw new MissingRequiredPropertyException("ResourceArgs", "parentResourcePath");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ResourceArgs", "resourceGroupName");
            }
            if ($.resourceProviderNamespace == null) {
                throw new MissingRequiredPropertyException("ResourceArgs", "resourceProviderNamespace");
            }
            if ($.resourceType == null) {
                throw new MissingRequiredPropertyException("ResourceArgs", "resourceType");
            }
            return $;
        }
    }

}