<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/orchestration/airflow/service/v1/environments.proto

namespace Google\Cloud\Orchestration\Airflow\Service\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The configuration of Cloud SQL instance that is used by the Apache Airflow
 * software.
 *
 * Generated from protobuf message <code>google.cloud.orchestration.airflow.service.v1.DatabaseConfig</code>
 */
class DatabaseConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Cloud SQL machine type used by Airflow database.
     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
     * Supported for Cloud Composer environments in versions
     * composer-1.*.*-airflow-*.*.*.
     *
     * Generated from protobuf field <code>string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $machine_type = '';
    /**
     * Optional. The Compute Engine zone where the Airflow database is created. If
     * zone is provided, it must be in the region selected for the environment. If
     * zone is not provided, a zone is automatically selected. The zone can only
     * be set during environment creation. Supported for Cloud Composer
     * environments in versions composer-2.*.*-airflow-*.*.*.
     *
     * Generated from protobuf field <code>string zone = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $zone = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $machine_type
     *           Optional. Cloud SQL machine type used by Airflow database.
     *           It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
     *           or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
     *           Supported for Cloud Composer environments in versions
     *           composer-1.*.*-airflow-*.*.*.
     *     @type string $zone
     *           Optional. The Compute Engine zone where the Airflow database is created. If
     *           zone is provided, it must be in the region selected for the environment. If
     *           zone is not provided, a zone is automatically selected. The zone can only
     *           be set during environment creation. Supported for Cloud Composer
     *           environments in versions composer-2.*.*-airflow-*.*.*.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Cloud SQL machine type used by Airflow database.
     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
     * Supported for Cloud Composer environments in versions
     * composer-1.*.*-airflow-*.*.*.
     *
     * Generated from protobuf field <code>string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getMachineType()
    {
        return $this->machine_type;
    }

    /**
     * Optional. Cloud SQL machine type used by Airflow database.
     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
     * Supported for Cloud Composer environments in versions
     * composer-1.*.*-airflow-*.*.*.
     *
     * Generated from protobuf field <code>string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setMachineType($var)
    {
        GPBUtil::checkString($var, True);
        $this->machine_type = $var;

        return $this;
    }

    /**
     * Optional. The Compute Engine zone where the Airflow database is created. If
     * zone is provided, it must be in the region selected for the environment. If
     * zone is not provided, a zone is automatically selected. The zone can only
     * be set during environment creation. Supported for Cloud Composer
     * environments in versions composer-2.*.*-airflow-*.*.*.
     *
     * Generated from protobuf field <code>string zone = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getZone()
    {
        return $this->zone;
    }

    /**
     * Optional. The Compute Engine zone where the Airflow database is created. If
     * zone is provided, it must be in the region selected for the environment. If
     * zone is not provided, a zone is automatically selected. The zone can only
     * be set during environment creation. Supported for Cloud Composer
     * environments in versions composer-2.*.*-airflow-*.*.*.
     *
     * Generated from protobuf field <code>string zone = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setZone($var)
    {
        GPBUtil::checkString($var, True);
        $this->zone = $var;

        return $this;
    }

}

