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

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.WorkloadIdentityConfig</code>
 */
class WorkloadIdentityConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string identity = 401109182;</code>
     */
    protected $identity = null;
    /**
     * Generated from protobuf field <code>optional bool identity_certificate_enabled = 342892440;</code>
     */
    protected $identity_certificate_enabled = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $identity
     *     @type bool $identity_certificate_enabled
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string identity = 401109182;</code>
     * @return string
     */
    public function getIdentity()
    {
        return isset($this->identity) ? $this->identity : '';
    }

    public function hasIdentity()
    {
        return isset($this->identity);
    }

    public function clearIdentity()
    {
        unset($this->identity);
    }

    /**
     * Generated from protobuf field <code>optional string identity = 401109182;</code>
     * @param string $var
     * @return $this
     */
    public function setIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->identity = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool identity_certificate_enabled = 342892440;</code>
     * @return bool
     */
    public function getIdentityCertificateEnabled()
    {
        return isset($this->identity_certificate_enabled) ? $this->identity_certificate_enabled : false;
    }

    public function hasIdentityCertificateEnabled()
    {
        return isset($this->identity_certificate_enabled);
    }

    public function clearIdentityCertificateEnabled()
    {
        unset($this->identity_certificate_enabled);
    }

    /**
     * Generated from protobuf field <code>optional bool identity_certificate_enabled = 342892440;</code>
     * @param bool $var
     * @return $this
     */
    public function setIdentityCertificateEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->identity_certificate_enabled = $var;

        return $this;
    }

}

