<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Describes the status of MACsec encryption on the link.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.InterconnectDiagnosticsMacsecStatus</code>
 */
class InterconnectDiagnosticsMacsecStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * Indicates the Connectivity Association Key Name (CKN) currently being used if MACsec is operational.
     *
     * Generated from protobuf field <code>optional string ckn = 98566;</code>
     */
    protected $ckn = null;
    /**
     * Indicates whether or not MACsec is operational on this link.
     *
     * Generated from protobuf field <code>optional bool operational = 129704914;</code>
     */
    protected $operational = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $ckn
     *           Indicates the Connectivity Association Key Name (CKN) currently being used if MACsec is operational.
     *     @type bool $operational
     *           Indicates whether or not MACsec is operational on this link.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Indicates the Connectivity Association Key Name (CKN) currently being used if MACsec is operational.
     *
     * Generated from protobuf field <code>optional string ckn = 98566;</code>
     * @return string
     */
    public function getCkn()
    {
        return isset($this->ckn) ? $this->ckn : '';
    }

    public function hasCkn()
    {
        return isset($this->ckn);
    }

    public function clearCkn()
    {
        unset($this->ckn);
    }

    /**
     * Indicates the Connectivity Association Key Name (CKN) currently being used if MACsec is operational.
     *
     * Generated from protobuf field <code>optional string ckn = 98566;</code>
     * @param string $var
     * @return $this
     */
    public function setCkn($var)
    {
        GPBUtil::checkString($var, True);
        $this->ckn = $var;

        return $this;
    }

    /**
     * Indicates whether or not MACsec is operational on this link.
     *
     * Generated from protobuf field <code>optional bool operational = 129704914;</code>
     * @return bool
     */
    public function getOperational()
    {
        return isset($this->operational) ? $this->operational : false;
    }

    public function hasOperational()
    {
        return isset($this->operational);
    }

    public function clearOperational()
    {
        unset($this->operational);
    }

    /**
     * Indicates whether or not MACsec is operational on this link.
     *
     * Generated from protobuf field <code>optional bool operational = 129704914;</code>
     * @param bool $var
     * @return $this
     */
    public function setOperational($var)
    {
        GPBUtil::checkBool($var);
        $this->operational = $var;

        return $this;
    }

}

