// *** 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.sql.inputs;

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


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

    public static final DatabaseInstanceCloneArgs Empty = new DatabaseInstanceCloneArgs();

    /**
     * The name of the allocated ip range for the private ip CloudSQL instance. For example: &#34;google-managed-services-default&#34;. If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
     * 
     */
    @Import(name="allocatedIpRange")
    private @Nullable Output<String> allocatedIpRange;

    /**
     * @return The name of the allocated ip range for the private ip CloudSQL instance. For example: &#34;google-managed-services-default&#34;. If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
     * 
     */
    public Optional<Output<String>> allocatedIpRange() {
        return Optional.ofNullable(this.allocatedIpRange);
    }

    /**
     * (SQL Server only, use with `point_in_time`) Clone only the specified databases from the source instance. Clone all databases if empty.
     * 
     */
    @Import(name="databaseNames")
    private @Nullable Output<List<String>> databaseNames;

    /**
     * @return (SQL Server only, use with `point_in_time`) Clone only the specified databases from the source instance. Clone all databases if empty.
     * 
     */
    public Optional<Output<List<String>>> databaseNames() {
        return Optional.ofNullable(this.databaseNames);
    }

    /**
     * The timestamp of the point in time that should be restored.
     * 
     * A timestamp in RFC3339 UTC &#34;Zulu&#34; format, with nanosecond resolution and up to nine fractional digits. Examples: &#34;2014-10-02T15:01:23Z&#34; and &#34;2014-10-02T15:01:23.045123456Z&#34;.
     * 
     */
    @Import(name="pointInTime")
    private @Nullable Output<String> pointInTime;

    /**
     * @return The timestamp of the point in time that should be restored.
     * 
     * A timestamp in RFC3339 UTC &#34;Zulu&#34; format, with nanosecond resolution and up to nine fractional digits. Examples: &#34;2014-10-02T15:01:23Z&#34; and &#34;2014-10-02T15:01:23.045123456Z&#34;.
     * 
     */
    public Optional<Output<String>> pointInTime() {
        return Optional.ofNullable(this.pointInTime);
    }

    /**
     * Name of the source instance which will be cloned.
     * 
     */
    @Import(name="sourceInstanceName", required=true)
    private Output<String> sourceInstanceName;

    /**
     * @return Name of the source instance which will be cloned.
     * 
     */
    public Output<String> sourceInstanceName() {
        return this.sourceInstanceName;
    }

    private DatabaseInstanceCloneArgs() {}

    private DatabaseInstanceCloneArgs(DatabaseInstanceCloneArgs $) {
        this.allocatedIpRange = $.allocatedIpRange;
        this.databaseNames = $.databaseNames;
        this.pointInTime = $.pointInTime;
        this.sourceInstanceName = $.sourceInstanceName;
    }

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

    public static final class Builder {
        private DatabaseInstanceCloneArgs $;

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

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

        /**
         * @param allocatedIpRange The name of the allocated ip range for the private ip CloudSQL instance. For example: &#34;google-managed-services-default&#34;. If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
         * 
         * @return builder
         * 
         */
        public Builder allocatedIpRange(@Nullable Output<String> allocatedIpRange) {
            $.allocatedIpRange = allocatedIpRange;
            return this;
        }

        /**
         * @param allocatedIpRange The name of the allocated ip range for the private ip CloudSQL instance. For example: &#34;google-managed-services-default&#34;. If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
         * 
         * @return builder
         * 
         */
        public Builder allocatedIpRange(String allocatedIpRange) {
            return allocatedIpRange(Output.of(allocatedIpRange));
        }

        /**
         * @param databaseNames (SQL Server only, use with `point_in_time`) Clone only the specified databases from the source instance. Clone all databases if empty.
         * 
         * @return builder
         * 
         */
        public Builder databaseNames(@Nullable Output<List<String>> databaseNames) {
            $.databaseNames = databaseNames;
            return this;
        }

        /**
         * @param databaseNames (SQL Server only, use with `point_in_time`) Clone only the specified databases from the source instance. Clone all databases if empty.
         * 
         * @return builder
         * 
         */
        public Builder databaseNames(List<String> databaseNames) {
            return databaseNames(Output.of(databaseNames));
        }

        /**
         * @param databaseNames (SQL Server only, use with `point_in_time`) Clone only the specified databases from the source instance. Clone all databases if empty.
         * 
         * @return builder
         * 
         */
        public Builder databaseNames(String... databaseNames) {
            return databaseNames(List.of(databaseNames));
        }

        /**
         * @param pointInTime The timestamp of the point in time that should be restored.
         * 
         * A timestamp in RFC3339 UTC &#34;Zulu&#34; format, with nanosecond resolution and up to nine fractional digits. Examples: &#34;2014-10-02T15:01:23Z&#34; and &#34;2014-10-02T15:01:23.045123456Z&#34;.
         * 
         * @return builder
         * 
         */
        public Builder pointInTime(@Nullable Output<String> pointInTime) {
            $.pointInTime = pointInTime;
            return this;
        }

        /**
         * @param pointInTime The timestamp of the point in time that should be restored.
         * 
         * A timestamp in RFC3339 UTC &#34;Zulu&#34; format, with nanosecond resolution and up to nine fractional digits. Examples: &#34;2014-10-02T15:01:23Z&#34; and &#34;2014-10-02T15:01:23.045123456Z&#34;.
         * 
         * @return builder
         * 
         */
        public Builder pointInTime(String pointInTime) {
            return pointInTime(Output.of(pointInTime));
        }

        /**
         * @param sourceInstanceName Name of the source instance which will be cloned.
         * 
         * @return builder
         * 
         */
        public Builder sourceInstanceName(Output<String> sourceInstanceName) {
            $.sourceInstanceName = sourceInstanceName;
            return this;
        }

        /**
         * @param sourceInstanceName Name of the source instance which will be cloned.
         * 
         * @return builder
         * 
         */
        public Builder sourceInstanceName(String sourceInstanceName) {
            return sourceInstanceName(Output.of(sourceInstanceName));
        }

        public DatabaseInstanceCloneArgs build() {
            $.sourceInstanceName = Objects.requireNonNull($.sourceInstanceName, "expected parameter 'sourceInstanceName' to be non-null");
            return $;
        }
    }

}
