// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.workloads.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Gets or sets the provider properties. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "providerType")
@JsonTypeName("SapHana")
@Fluent
public final class HanaDbProviderInstanceProperties extends ProviderSpecificProperties {
    /*
     * Gets or sets the target virtual machine size.
     */
    @JsonProperty(value = "hostname")
    private String hostname;

    /*
     * Gets or sets the hana database name.
     */
    @JsonProperty(value = "dbName")
    private String dbName;

    /*
     * Gets or sets the database sql port.
     */
    @JsonProperty(value = "sqlPort")
    private String sqlPort;

    /*
     * Gets or sets the database instance number.
     */
    @JsonProperty(value = "instanceNumber")
    private String instanceNumber;

    /*
     * Gets or sets the database user name.
     */
    @JsonProperty(value = "dbUsername")
    private String dbUsername;

    /*
     * Gets or sets the database password.
     */
    @JsonProperty(value = "dbPassword")
    private String dbPassword;

    /*
     * Gets or sets the key vault URI to secret with the database password.
     */
    @JsonProperty(value = "dbPasswordUri")
    private String dbPasswordUri;

    /*
     * Gets or sets the blob URI to SSL certificate for the DB.
     */
    @JsonProperty(value = "sslCertificateUri")
    private String sslCertificateUri;

    /*
     * Gets or sets the hostname(s) in the SSL certificate.
     */
    @JsonProperty(value = "sslHostNameInCertificate")
    private String sslHostnameInCertificate;

    /*
     * Gets or sets certificate preference if secure communication is enabled.
     */
    @JsonProperty(value = "sslPreference")
    private SslPreference sslPreference;

    /*
     * Gets or sets the SAP System Identifier.
     */
    @JsonProperty(value = "sapSid")
    private String sapSid;

    /** Creates an instance of HanaDbProviderInstanceProperties class. */
    public HanaDbProviderInstanceProperties() {
    }

    /**
     * Get the hostname property: Gets or sets the target virtual machine size.
     *
     * @return the hostname value.
     */
    public String hostname() {
        return this.hostname;
    }

    /**
     * Set the hostname property: Gets or sets the target virtual machine size.
     *
     * @param hostname the hostname value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withHostname(String hostname) {
        this.hostname = hostname;
        return this;
    }

    /**
     * Get the dbName property: Gets or sets the hana database name.
     *
     * @return the dbName value.
     */
    public String dbName() {
        return this.dbName;
    }

    /**
     * Set the dbName property: Gets or sets the hana database name.
     *
     * @param dbName the dbName value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withDbName(String dbName) {
        this.dbName = dbName;
        return this;
    }

    /**
     * Get the sqlPort property: Gets or sets the database sql port.
     *
     * @return the sqlPort value.
     */
    public String sqlPort() {
        return this.sqlPort;
    }

    /**
     * Set the sqlPort property: Gets or sets the database sql port.
     *
     * @param sqlPort the sqlPort value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withSqlPort(String sqlPort) {
        this.sqlPort = sqlPort;
        return this;
    }

    /**
     * Get the instanceNumber property: Gets or sets the database instance number.
     *
     * @return the instanceNumber value.
     */
    public String instanceNumber() {
        return this.instanceNumber;
    }

    /**
     * Set the instanceNumber property: Gets or sets the database instance number.
     *
     * @param instanceNumber the instanceNumber value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withInstanceNumber(String instanceNumber) {
        this.instanceNumber = instanceNumber;
        return this;
    }

    /**
     * Get the dbUsername property: Gets or sets the database user name.
     *
     * @return the dbUsername value.
     */
    public String dbUsername() {
        return this.dbUsername;
    }

    /**
     * Set the dbUsername property: Gets or sets the database user name.
     *
     * @param dbUsername the dbUsername value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withDbUsername(String dbUsername) {
        this.dbUsername = dbUsername;
        return this;
    }

    /**
     * Get the dbPassword property: Gets or sets the database password.
     *
     * @return the dbPassword value.
     */
    public String dbPassword() {
        return this.dbPassword;
    }

    /**
     * Set the dbPassword property: Gets or sets the database password.
     *
     * @param dbPassword the dbPassword value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withDbPassword(String dbPassword) {
        this.dbPassword = dbPassword;
        return this;
    }

    /**
     * Get the dbPasswordUri property: Gets or sets the key vault URI to secret with the database password.
     *
     * @return the dbPasswordUri value.
     */
    public String dbPasswordUri() {
        return this.dbPasswordUri;
    }

    /**
     * Set the dbPasswordUri property: Gets or sets the key vault URI to secret with the database password.
     *
     * @param dbPasswordUri the dbPasswordUri value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withDbPasswordUri(String dbPasswordUri) {
        this.dbPasswordUri = dbPasswordUri;
        return this;
    }

    /**
     * Get the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the DB.
     *
     * @return the sslCertificateUri value.
     */
    public String sslCertificateUri() {
        return this.sslCertificateUri;
    }

    /**
     * Set the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the DB.
     *
     * @param sslCertificateUri the sslCertificateUri value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withSslCertificateUri(String sslCertificateUri) {
        this.sslCertificateUri = sslCertificateUri;
        return this;
    }

    /**
     * Get the sslHostnameInCertificate property: Gets or sets the hostname(s) in the SSL certificate.
     *
     * @return the sslHostnameInCertificate value.
     */
    public String sslHostnameInCertificate() {
        return this.sslHostnameInCertificate;
    }

    /**
     * Set the sslHostnameInCertificate property: Gets or sets the hostname(s) in the SSL certificate.
     *
     * @param sslHostnameInCertificate the sslHostnameInCertificate value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withSslHostnameInCertificate(String sslHostnameInCertificate) {
        this.sslHostnameInCertificate = sslHostnameInCertificate;
        return this;
    }

    /**
     * Get the sslPreference property: Gets or sets certificate preference if secure communication is enabled.
     *
     * @return the sslPreference value.
     */
    public SslPreference sslPreference() {
        return this.sslPreference;
    }

    /**
     * Set the sslPreference property: Gets or sets certificate preference if secure communication is enabled.
     *
     * @param sslPreference the sslPreference value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withSslPreference(SslPreference sslPreference) {
        this.sslPreference = sslPreference;
        return this;
    }

    /**
     * Get the sapSid property: Gets or sets the SAP System Identifier.
     *
     * @return the sapSid value.
     */
    public String sapSid() {
        return this.sapSid;
    }

    /**
     * Set the sapSid property: Gets or sets the SAP System Identifier.
     *
     * @param sapSid the sapSid value to set.
     * @return the HanaDbProviderInstanceProperties object itself.
     */
    public HanaDbProviderInstanceProperties withSapSid(String sapSid) {
        this.sapSid = sapSid;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}
