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

namespace Google\Cloud\ApiHub\V1;

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

/**
 * The attribute values associated with resource.
 *
 * Generated from protobuf message <code>google.cloud.apihub.v1.AttributeValues</code>
 */
class AttributeValues extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The name of the attribute.
     * Format: projects/{project}/locations/{location}/attributes/{attribute}
     *
     * Generated from protobuf field <code>string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    protected $attribute = '';
    protected $Value;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\ApiHub\V1\AttributeValues\EnumAttributeValues $enum_values
     *           The attribute values associated with a resource in case attribute data
     *           type is enum.
     *     @type \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues $string_values
     *           The attribute values associated with a resource in case attribute data
     *           type is string.
     *     @type \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues $json_values
     *           The attribute values associated with a resource in case attribute data
     *           type is JSON.
     *     @type \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues $uri_values
     *           The attribute values associated with a resource in case attribute data
     *           type is URL, URI or IP, like gs://bucket-name/object-name.
     *     @type string $attribute
     *           Output only. The name of the attribute.
     *           Format: projects/{project}/locations/{location}/attributes/{attribute}
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apihub\V1\CommonFields::initOnce();
        parent::__construct($data);
    }

    /**
     * The attribute values associated with a resource in case attribute data
     * type is enum.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues.EnumAttributeValues enum_values = 2;</code>
     * @return \Google\Cloud\ApiHub\V1\AttributeValues\EnumAttributeValues|null
     */
    public function getEnumValues()
    {
        return $this->readOneof(2);
    }

    public function hasEnumValues()
    {
        return $this->hasOneof(2);
    }

    /**
     * The attribute values associated with a resource in case attribute data
     * type is enum.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues.EnumAttributeValues enum_values = 2;</code>
     * @param \Google\Cloud\ApiHub\V1\AttributeValues\EnumAttributeValues $var
     * @return $this
     */
    public function setEnumValues($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\AttributeValues\EnumAttributeValues::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * The attribute values associated with a resource in case attribute data
     * type is string.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues.StringAttributeValues string_values = 3;</code>
     * @return \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues|null
     */
    public function getStringValues()
    {
        return $this->readOneof(3);
    }

    public function hasStringValues()
    {
        return $this->hasOneof(3);
    }

    /**
     * The attribute values associated with a resource in case attribute data
     * type is string.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues.StringAttributeValues string_values = 3;</code>
     * @param \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues $var
     * @return $this
     */
    public function setStringValues($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * The attribute values associated with a resource in case attribute data
     * type is JSON.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues.StringAttributeValues json_values = 4;</code>
     * @return \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues|null
     */
    public function getJsonValues()
    {
        return $this->readOneof(4);
    }

    public function hasJsonValues()
    {
        return $this->hasOneof(4);
    }

    /**
     * The attribute values associated with a resource in case attribute data
     * type is JSON.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues.StringAttributeValues json_values = 4;</code>
     * @param \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues $var
     * @return $this
     */
    public function setJsonValues($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * The attribute values associated with a resource in case attribute data
     * type is URL, URI or IP, like gs://bucket-name/object-name.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5;</code>
     * @return \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues|null
     */
    public function getUriValues()
    {
        return $this->readOneof(5);
    }

    public function hasUriValues()
    {
        return $this->hasOneof(5);
    }

    /**
     * The attribute values associated with a resource in case attribute data
     * type is URL, URI or IP, like gs://bucket-name/object-name.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5;</code>
     * @param \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues $var
     * @return $this
     */
    public function setUriValues($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\AttributeValues\StringAttributeValues::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Output only. The name of the attribute.
     * Format: projects/{project}/locations/{location}/attributes/{attribute}
     *
     * Generated from protobuf field <code>string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAttribute()
    {
        return $this->attribute;
    }

    /**
     * Output only. The name of the attribute.
     * Format: projects/{project}/locations/{location}/attributes/{attribute}
     *
     * Generated from protobuf field <code>string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAttribute($var)
    {
        GPBUtil::checkString($var, True);
        $this->attribute = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getValue()
    {
        return $this->whichOneof("Value");
    }

}

