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

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


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

    public static final SpringCloudServiceConfigServerGitSettingSshAuthArgs Empty = new SpringCloudServiceConfigServerGitSettingSshAuthArgs();

    /**
     * The host key of the Git repository server, should not include the algorithm prefix as covered by `host-key-algorithm`.
     * 
     */
    @Import(name="hostKey")
    private @Nullable Output<String> hostKey;

    /**
     * @return The host key of the Git repository server, should not include the algorithm prefix as covered by `host-key-algorithm`.
     * 
     */
    public Optional<Output<String>> hostKey() {
        return Optional.ofNullable(this.hostKey);
    }

    /**
     * The host key algorithm, should be `ssh-dss`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`. Required only if `host-key` exists.
     * 
     */
    @Import(name="hostKeyAlgorithm")
    private @Nullable Output<String> hostKeyAlgorithm;

    /**
     * @return The host key algorithm, should be `ssh-dss`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`. Required only if `host-key` exists.
     * 
     */
    public Optional<Output<String>> hostKeyAlgorithm() {
        return Optional.ofNullable(this.hostKeyAlgorithm);
    }

    /**
     * The SSH private key to access the Git repository, required when the URI starts with `git@` or `ssh://`.
     * 
     */
    @Import(name="privateKey", required=true)
    private Output<String> privateKey;

    /**
     * @return The SSH private key to access the Git repository, required when the URI starts with `git@` or `ssh://`.
     * 
     */
    public Output<String> privateKey() {
        return this.privateKey;
    }

    /**
     * Indicates whether the Config Server instance will fail to start if the host_key does not match. Defaults to `true`.
     * 
     */
    @Import(name="strictHostKeyCheckingEnabled")
    private @Nullable Output<Boolean> strictHostKeyCheckingEnabled;

    /**
     * @return Indicates whether the Config Server instance will fail to start if the host_key does not match. Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> strictHostKeyCheckingEnabled() {
        return Optional.ofNullable(this.strictHostKeyCheckingEnabled);
    }

    private SpringCloudServiceConfigServerGitSettingSshAuthArgs() {}

    private SpringCloudServiceConfigServerGitSettingSshAuthArgs(SpringCloudServiceConfigServerGitSettingSshAuthArgs $) {
        this.hostKey = $.hostKey;
        this.hostKeyAlgorithm = $.hostKeyAlgorithm;
        this.privateKey = $.privateKey;
        this.strictHostKeyCheckingEnabled = $.strictHostKeyCheckingEnabled;
    }

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

    public static final class Builder {
        private SpringCloudServiceConfigServerGitSettingSshAuthArgs $;

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

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

        /**
         * @param hostKey The host key of the Git repository server, should not include the algorithm prefix as covered by `host-key-algorithm`.
         * 
         * @return builder
         * 
         */
        public Builder hostKey(@Nullable Output<String> hostKey) {
            $.hostKey = hostKey;
            return this;
        }

        /**
         * @param hostKey The host key of the Git repository server, should not include the algorithm prefix as covered by `host-key-algorithm`.
         * 
         * @return builder
         * 
         */
        public Builder hostKey(String hostKey) {
            return hostKey(Output.of(hostKey));
        }

        /**
         * @param hostKeyAlgorithm The host key algorithm, should be `ssh-dss`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`. Required only if `host-key` exists.
         * 
         * @return builder
         * 
         */
        public Builder hostKeyAlgorithm(@Nullable Output<String> hostKeyAlgorithm) {
            $.hostKeyAlgorithm = hostKeyAlgorithm;
            return this;
        }

        /**
         * @param hostKeyAlgorithm The host key algorithm, should be `ssh-dss`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`. Required only if `host-key` exists.
         * 
         * @return builder
         * 
         */
        public Builder hostKeyAlgorithm(String hostKeyAlgorithm) {
            return hostKeyAlgorithm(Output.of(hostKeyAlgorithm));
        }

        /**
         * @param privateKey The SSH private key to access the Git repository, required when the URI starts with `git@` or `ssh://`.
         * 
         * @return builder
         * 
         */
        public Builder privateKey(Output<String> privateKey) {
            $.privateKey = privateKey;
            return this;
        }

        /**
         * @param privateKey The SSH private key to access the Git repository, required when the URI starts with `git@` or `ssh://`.
         * 
         * @return builder
         * 
         */
        public Builder privateKey(String privateKey) {
            return privateKey(Output.of(privateKey));
        }

        /**
         * @param strictHostKeyCheckingEnabled Indicates whether the Config Server instance will fail to start if the host_key does not match. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder strictHostKeyCheckingEnabled(@Nullable Output<Boolean> strictHostKeyCheckingEnabled) {
            $.strictHostKeyCheckingEnabled = strictHostKeyCheckingEnabled;
            return this;
        }

        /**
         * @param strictHostKeyCheckingEnabled Indicates whether the Config Server instance will fail to start if the host_key does not match. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder strictHostKeyCheckingEnabled(Boolean strictHostKeyCheckingEnabled) {
            return strictHostKeyCheckingEnabled(Output.of(strictHostKeyCheckingEnabled));
        }

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

}
