<?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;

/**
 * Represents a reference to a resource.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.Reference</code>
 */
class Reference extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output Only] Type of the resource. Always compute#reference for references.
     *
     * Generated from protobuf field <code>string kind = 3292052;</code>
     */
    private $kind = null;
    /**
     * A description of the reference type with no implied semantics. Possible values include:
     * - MEMBER_OF
     *
     * Generated from protobuf field <code>string reference_type = 247521198;</code>
     */
    private $reference_type = null;
    /**
     * URL of the resource which refers to the target.
     *
     * Generated from protobuf field <code>string referrer = 351173663;</code>
     */
    private $referrer = null;
    /**
     * URL of the resource to which this reference points.
     *
     * Generated from protobuf field <code>string target = 192835985;</code>
     */
    private $target = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $kind
     *           [Output Only] Type of the resource. Always compute#reference for references.
     *     @type string $reference_type
     *           A description of the reference type with no implied semantics. Possible values include:
     *           - MEMBER_OF
     *     @type string $referrer
     *           URL of the resource which refers to the target.
     *     @type string $target
     *           URL of the resource to which this reference points.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * [Output Only] Type of the resource. Always compute#reference for references.
     *
     * Generated from protobuf field <code>string kind = 3292052;</code>
     * @return string
     */
    public function getKind()
    {
        return isset($this->kind) ? $this->kind : '';
    }

    public function hasKind()
    {
        return isset($this->kind);
    }

    public function clearKind()
    {
        unset($this->kind);
    }

    /**
     * [Output Only] Type of the resource. Always compute#reference for references.
     *
     * Generated from protobuf field <code>string kind = 3292052;</code>
     * @param string $var
     * @return $this
     */
    public function setKind($var)
    {
        GPBUtil::checkString($var, True);
        $this->kind = $var;

        return $this;
    }

    /**
     * A description of the reference type with no implied semantics. Possible values include:
     * - MEMBER_OF
     *
     * Generated from protobuf field <code>string reference_type = 247521198;</code>
     * @return string
     */
    public function getReferenceType()
    {
        return isset($this->reference_type) ? $this->reference_type : '';
    }

    public function hasReferenceType()
    {
        return isset($this->reference_type);
    }

    public function clearReferenceType()
    {
        unset($this->reference_type);
    }

    /**
     * A description of the reference type with no implied semantics. Possible values include:
     * - MEMBER_OF
     *
     * Generated from protobuf field <code>string reference_type = 247521198;</code>
     * @param string $var
     * @return $this
     */
    public function setReferenceType($var)
    {
        GPBUtil::checkString($var, True);
        $this->reference_type = $var;

        return $this;
    }

    /**
     * URL of the resource which refers to the target.
     *
     * Generated from protobuf field <code>string referrer = 351173663;</code>
     * @return string
     */
    public function getReferrer()
    {
        return isset($this->referrer) ? $this->referrer : '';
    }

    public function hasReferrer()
    {
        return isset($this->referrer);
    }

    public function clearReferrer()
    {
        unset($this->referrer);
    }

    /**
     * URL of the resource which refers to the target.
     *
     * Generated from protobuf field <code>string referrer = 351173663;</code>
     * @param string $var
     * @return $this
     */
    public function setReferrer($var)
    {
        GPBUtil::checkString($var, True);
        $this->referrer = $var;

        return $this;
    }

    /**
     * URL of the resource to which this reference points.
     *
     * Generated from protobuf field <code>string target = 192835985;</code>
     * @return string
     */
    public function getTarget()
    {
        return isset($this->target) ? $this->target : '';
    }

    public function hasTarget()
    {
        return isset($this->target);
    }

    public function clearTarget()
    {
        unset($this->target);
    }

    /**
     * URL of the resource to which this reference points.
     *
     * Generated from protobuf field <code>string target = 192835985;</code>
     * @param string $var
     * @return $this
     */
    public function setTarget($var)
    {
        GPBUtil::checkString($var, True);
        $this->target = $var;

        return $this;
    }

}

