// *** 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.gcp.cloudrun;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.cloudrun.inputs.DomainMappingMetadataArgs;
import com.pulumi.gcp.cloudrun.inputs.DomainMappingSpecArgs;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final DomainMappingArgs Empty = new DomainMappingArgs();

    /**
     * The location of the cloud run instance. eg us-central1
     * 
     */
    @Import(name="location", required=true)
    private Output<String> location;

    /**
     * @return The location of the cloud run instance. eg us-central1
     * 
     */
    public Output<String> location() {
        return this.location;
    }

    /**
     * Metadata associated with this DomainMapping.
     * Structure is documented below.
     * 
     */
    @Import(name="metadata", required=true)
    private Output<DomainMappingMetadataArgs> metadata;

    /**
     * @return Metadata associated with this DomainMapping.
     * Structure is documented below.
     * 
     */
    public Output<DomainMappingMetadataArgs> metadata() {
        return this.metadata;
    }

    /**
     * Name should be a [verified](https://support.google.com/webmasters/answer/9008080) domain
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Name should be a [verified](https://support.google.com/webmasters/answer/9008080) domain
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Import(name="project")
    private @Nullable Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Optional<Output<String>> project() {
        return Optional.ofNullable(this.project);
    }

    /**
     * The spec for this DomainMapping.
     * Structure is documented below.
     * 
     */
    @Import(name="spec", required=true)
    private Output<DomainMappingSpecArgs> spec;

    /**
     * @return The spec for this DomainMapping.
     * Structure is documented below.
     * 
     */
    public Output<DomainMappingSpecArgs> spec() {
        return this.spec;
    }

    private DomainMappingArgs() {}

    private DomainMappingArgs(DomainMappingArgs $) {
        this.location = $.location;
        this.metadata = $.metadata;
        this.name = $.name;
        this.project = $.project;
        this.spec = $.spec;
    }

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

    public static final class Builder {
        private DomainMappingArgs $;

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

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

        /**
         * @param location The location of the cloud run instance. eg us-central1
         * 
         * @return builder
         * 
         */
        public Builder location(Output<String> location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The location of the cloud run instance. eg us-central1
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param metadata Metadata associated with this DomainMapping.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder metadata(Output<DomainMappingMetadataArgs> metadata) {
            $.metadata = metadata;
            return this;
        }

        /**
         * @param metadata Metadata associated with this DomainMapping.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder metadata(DomainMappingMetadataArgs metadata) {
            return metadata(Output.of(metadata));
        }

        /**
         * @param name Name should be a [verified](https://support.google.com/webmasters/answer/9008080) domain
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name should be a [verified](https://support.google.com/webmasters/answer/9008080) domain
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param project The ID of the project in which the resource belongs.
         * If it is not provided, the provider project is used.
         * 
         * @return builder
         * 
         */
        public Builder project(@Nullable Output<String> project) {
            $.project = project;
            return this;
        }

        /**
         * @param project The ID of the project in which the resource belongs.
         * If it is not provided, the provider project is used.
         * 
         * @return builder
         * 
         */
        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param spec The spec for this DomainMapping.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder spec(Output<DomainMappingSpecArgs> spec) {
            $.spec = spec;
            return this;
        }

        /**
         * @param spec The spec for this DomainMapping.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder spec(DomainMappingSpecArgs spec) {
            return spec(Output.of(spec));
        }

        public DomainMappingArgs build() {
            $.location = Objects.requireNonNull($.location, "expected parameter 'location' to be non-null");
            $.metadata = Objects.requireNonNull($.metadata, "expected parameter 'metadata' to be non-null");
            $.spec = Objects.requireNonNull($.spec, "expected parameter 'spec' to be non-null");
            return $;
        }
    }

}
