<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/gkehub/v1beta1/membership.proto

namespace Google\Cloud\GkeHub\V1beta1;

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

/**
 * KubernetesMetadata provides informational metadata for Memberships
 * representing Kubernetes clusters.
 *
 * Generated from protobuf message <code>google.cloud.gkehub.v1beta1.KubernetesMetadata</code>
 */
class KubernetesMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Kubernetes API server version string as reported by '/version'.
     *
     * Generated from protobuf field <code>string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $kubernetes_api_server_version = '';
    /**
     * Output only. Node providerID as reported by the first node in the list of nodes on
     * the Kubernetes endpoint. On Kubernetes platforms that support zero-node
     * clusters (like GKE-on-GCP), the node_count will be zero and the
     * node_provider_id will be empty.
     *
     * Generated from protobuf field <code>string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $node_provider_id = '';
    /**
     * Output only. Node count as reported by Kubernetes nodes resources.
     *
     * Generated from protobuf field <code>int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $node_count = 0;
    /**
     * Output only. vCPU count as reported by Kubernetes nodes resources.
     *
     * Generated from protobuf field <code>int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $vcpu_count = 0;
    /**
     * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes
     * resources, defined in MB.
     *
     * Generated from protobuf field <code>int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $memory_mb = 0;
    /**
     * Output only. The time at which these details were last updated. This update_time is
     * different from the Membership-level update_time since EndpointDetails are
     * updated internally for API consumers.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $kubernetes_api_server_version
     *           Output only. Kubernetes API server version string as reported by '/version'.
     *     @type string $node_provider_id
     *           Output only. Node providerID as reported by the first node in the list of nodes on
     *           the Kubernetes endpoint. On Kubernetes platforms that support zero-node
     *           clusters (like GKE-on-GCP), the node_count will be zero and the
     *           node_provider_id will be empty.
     *     @type int $node_count
     *           Output only. Node count as reported by Kubernetes nodes resources.
     *     @type int $vcpu_count
     *           Output only. vCPU count as reported by Kubernetes nodes resources.
     *     @type int $memory_mb
     *           Output only. The total memory capacity as reported by the sum of all Kubernetes nodes
     *           resources, defined in MB.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The time at which these details were last updated. This update_time is
     *           different from the Membership-level update_time since EndpointDetails are
     *           updated internally for API consumers.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Kubernetes API server version string as reported by '/version'.
     *
     * Generated from protobuf field <code>string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getKubernetesApiServerVersion()
    {
        return $this->kubernetes_api_server_version;
    }

    /**
     * Output only. Kubernetes API server version string as reported by '/version'.
     *
     * Generated from protobuf field <code>string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setKubernetesApiServerVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->kubernetes_api_server_version = $var;

        return $this;
    }

    /**
     * Output only. Node providerID as reported by the first node in the list of nodes on
     * the Kubernetes endpoint. On Kubernetes platforms that support zero-node
     * clusters (like GKE-on-GCP), the node_count will be zero and the
     * node_provider_id will be empty.
     *
     * Generated from protobuf field <code>string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getNodeProviderId()
    {
        return $this->node_provider_id;
    }

    /**
     * Output only. Node providerID as reported by the first node in the list of nodes on
     * the Kubernetes endpoint. On Kubernetes platforms that support zero-node
     * clusters (like GKE-on-GCP), the node_count will be zero and the
     * node_provider_id will be empty.
     *
     * Generated from protobuf field <code>string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setNodeProviderId($var)
    {
        GPBUtil::checkString($var, True);
        $this->node_provider_id = $var;

        return $this;
    }

    /**
     * Output only. Node count as reported by Kubernetes nodes resources.
     *
     * Generated from protobuf field <code>int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getNodeCount()
    {
        return $this->node_count;
    }

    /**
     * Output only. Node count as reported by Kubernetes nodes resources.
     *
     * Generated from protobuf field <code>int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setNodeCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->node_count = $var;

        return $this;
    }

    /**
     * Output only. vCPU count as reported by Kubernetes nodes resources.
     *
     * Generated from protobuf field <code>int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getVcpuCount()
    {
        return $this->vcpu_count;
    }

    /**
     * Output only. vCPU count as reported by Kubernetes nodes resources.
     *
     * Generated from protobuf field <code>int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setVcpuCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->vcpu_count = $var;

        return $this;
    }

    /**
     * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes
     * resources, defined in MB.
     *
     * Generated from protobuf field <code>int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getMemoryMb()
    {
        return $this->memory_mb;
    }

    /**
     * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes
     * resources, defined in MB.
     *
     * Generated from protobuf field <code>int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setMemoryMb($var)
    {
        GPBUtil::checkInt32($var);
        $this->memory_mb = $var;

        return $this;
    }

    /**
     * Output only. The time at which these details were last updated. This update_time is
     * different from the Membership-level update_time since EndpointDetails are
     * updated internally for API consumers.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. The time at which these details were last updated. This update_time is
     * different from the Membership-level update_time since EndpointDetails are
     * updated internally for API consumers.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

}

