<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/oracledatabase/v1/db_node.proto

namespace Google\Cloud\OracleDatabase\V1;

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

/**
 * Various properties and settings associated with Db node.
 *
 * Generated from protobuf message <code>google.cloud.oracledatabase.v1.DbNodeProperties</code>
 */
class DbNodeProperties extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. OCID of database node.
     *
     * Generated from protobuf field <code>string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $ocid = '';
    /**
     * Optional. OCPU count per database node.
     *
     * Generated from protobuf field <code>int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $ocpu_count = 0;
    /**
     * Memory allocated in GBs.
     *
     * Generated from protobuf field <code>int32 memory_size_gb = 3;</code>
     */
    protected $memory_size_gb = 0;
    /**
     * Optional. Local storage per database node.
     *
     * Generated from protobuf field <code>int32 db_node_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $db_node_storage_size_gb = 0;
    /**
     * Optional. Database server OCID.
     *
     * Generated from protobuf field <code>string db_server_ocid = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $db_server_ocid = '';
    /**
     * Optional. DNS
     *
     * Generated from protobuf field <code>string hostname = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $hostname = '';
    /**
     * Output only. State of the database node.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.DbNodeProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;
    /**
     * Total CPU core count of the database node.
     *
     * Generated from protobuf field <code>int32 total_cpu_core_count = 10;</code>
     */
    protected $total_cpu_core_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $ocid
     *           Output only. OCID of database node.
     *     @type int $ocpu_count
     *           Optional. OCPU count per database node.
     *     @type int $memory_size_gb
     *           Memory allocated in GBs.
     *     @type int $db_node_storage_size_gb
     *           Optional. Local storage per database node.
     *     @type string $db_server_ocid
     *           Optional. Database server OCID.
     *     @type string $hostname
     *           Optional. DNS
     *     @type int $state
     *           Output only. State of the database node.
     *     @type int $total_cpu_core_count
     *           Total CPU core count of the database node.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbNode::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. OCID of database node.
     *
     * Generated from protobuf field <code>string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getOcid()
    {
        return $this->ocid;
    }

    /**
     * Output only. OCID of database node.
     *
     * Generated from protobuf field <code>string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setOcid($var)
    {
        GPBUtil::checkString($var, True);
        $this->ocid = $var;

        return $this;
    }

    /**
     * Optional. OCPU count per database node.
     *
     * Generated from protobuf field <code>int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getOcpuCount()
    {
        return $this->ocpu_count;
    }

    /**
     * Optional. OCPU count per database node.
     *
     * Generated from protobuf field <code>int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setOcpuCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->ocpu_count = $var;

        return $this;
    }

    /**
     * Memory allocated in GBs.
     *
     * Generated from protobuf field <code>int32 memory_size_gb = 3;</code>
     * @return int
     */
    public function getMemorySizeGb()
    {
        return $this->memory_size_gb;
    }

    /**
     * Memory allocated in GBs.
     *
     * Generated from protobuf field <code>int32 memory_size_gb = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setMemorySizeGb($var)
    {
        GPBUtil::checkInt32($var);
        $this->memory_size_gb = $var;

        return $this;
    }

    /**
     * Optional. Local storage per database node.
     *
     * Generated from protobuf field <code>int32 db_node_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getDbNodeStorageSizeGb()
    {
        return $this->db_node_storage_size_gb;
    }

    /**
     * Optional. Local storage per database node.
     *
     * Generated from protobuf field <code>int32 db_node_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setDbNodeStorageSizeGb($var)
    {
        GPBUtil::checkInt32($var);
        $this->db_node_storage_size_gb = $var;

        return $this;
    }

    /**
     * Optional. Database server OCID.
     *
     * Generated from protobuf field <code>string db_server_ocid = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDbServerOcid()
    {
        return $this->db_server_ocid;
    }

    /**
     * Optional. Database server OCID.
     *
     * Generated from protobuf field <code>string db_server_ocid = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDbServerOcid($var)
    {
        GPBUtil::checkString($var, True);
        $this->db_server_ocid = $var;

        return $this;
    }

    /**
     * Optional. DNS
     *
     * Generated from protobuf field <code>string hostname = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getHostname()
    {
        return $this->hostname;
    }

    /**
     * Optional. DNS
     *
     * Generated from protobuf field <code>string hostname = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setHostname($var)
    {
        GPBUtil::checkString($var, True);
        $this->hostname = $var;

        return $this;
    }

    /**
     * Output only. State of the database node.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.DbNodeProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. State of the database node.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.DbNodeProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DbNodeProperties\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Total CPU core count of the database node.
     *
     * Generated from protobuf field <code>int32 total_cpu_core_count = 10;</code>
     * @return int
     */
    public function getTotalCpuCoreCount()
    {
        return $this->total_cpu_core_count;
    }

    /**
     * Total CPU core count of the database node.
     *
     * Generated from protobuf field <code>int32 total_cpu_core_count = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setTotalCpuCoreCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->total_cpu_core_count = $var;

        return $this;
    }

}

