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

/**
 * An API resource in the API Hub.
 *
 * Generated from protobuf message <code>google.cloud.apihub.v1.Api</code>
 */
class Api extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The name of the API resource in the API Hub.
     * Format:
     * `projects/{project}/locations/{location}/apis/{api}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Required. The display name of the API resource.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $display_name = '';
    /**
     * Optional. The description of the API resource.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $description = '';
    /**
     * Optional. The documentation for the API resource.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.Documentation documentation = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $documentation = null;
    /**
     * Optional. Owner details for the API resource.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.Owner owner = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $owner = null;
    /**
     * Output only. The list of versions present in an API resource.
     * Note: An API resource can be associated with more than 1 version.
     * Format is
     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
     *
     * Generated from protobuf field <code>repeated string versions = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    private $versions;
    /**
     * Output only. The time at which the API resource was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. The time at which the API resource was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Optional. The target users for the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-target-user`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues target_user = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $target_user = null;
    /**
     * Optional. The team owning the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-team`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues team = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $team = null;
    /**
     * Optional. The business unit owning the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-business-unit`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues business_unit = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $business_unit = null;
    /**
     * Optional. The maturity level of the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-maturity-level`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues maturity_level = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $maturity_level = null;
    /**
     * Optional. The list of user defined attributes associated with the API
     * resource. The key is the attribute name. It will be of the format:
     * `projects/{project}/locations/{location}/attributes/{attribute}`.
     * The value is the attribute values associated with the resource.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $attributes;
    /**
     * Optional. The style of the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-api-style`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues api_style = 14 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $api_style = null;
    /**
     * Optional. The selected version for an API resource.
     * This can be used when special handling is needed on client side for
     * particular version of the API. Format is
     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
     *
     * Generated from protobuf field <code>string selected_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    protected $selected_version = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The name of the API resource in the API Hub.
     *           Format:
     *           `projects/{project}/locations/{location}/apis/{api}`
     *     @type string $display_name
     *           Required. The display name of the API resource.
     *     @type string $description
     *           Optional. The description of the API resource.
     *     @type \Google\Cloud\ApiHub\V1\Documentation $documentation
     *           Optional. The documentation for the API resource.
     *     @type \Google\Cloud\ApiHub\V1\Owner $owner
     *           Optional. Owner details for the API resource.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $versions
     *           Output only. The list of versions present in an API resource.
     *           Note: An API resource can be associated with more than 1 version.
     *           Format is
     *           `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The time at which the API resource was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The time at which the API resource was last updated.
     *     @type \Google\Cloud\ApiHub\V1\AttributeValues $target_user
     *           Optional. The target users for the API.
     *           This maps to the following system defined attribute:
     *           `projects/{project}/locations/{location}/attributes/system-target-user`
     *           attribute.
     *           The number of values for this attribute will be based on the
     *           cardinality of the attribute. The same can be retrieved via GetAttribute
     *           API. All values should be from the list of allowed values defined for the
     *           attribute.
     *     @type \Google\Cloud\ApiHub\V1\AttributeValues $team
     *           Optional. The team owning the API.
     *           This maps to the following system defined attribute:
     *           `projects/{project}/locations/{location}/attributes/system-team`
     *           attribute.
     *           The number of values for this attribute will be based on the
     *           cardinality of the attribute. The same can be retrieved via GetAttribute
     *           API. All values should be from the list of allowed values defined for the
     *           attribute.
     *     @type \Google\Cloud\ApiHub\V1\AttributeValues $business_unit
     *           Optional. The business unit owning the API.
     *           This maps to the following system defined attribute:
     *           `projects/{project}/locations/{location}/attributes/system-business-unit`
     *           attribute.
     *           The number of values for this attribute will be based on the
     *           cardinality of the attribute. The same can be retrieved via GetAttribute
     *           API. All values should be from the list of allowed values defined for the
     *           attribute.
     *     @type \Google\Cloud\ApiHub\V1\AttributeValues $maturity_level
     *           Optional. The maturity level of the API.
     *           This maps to the following system defined attribute:
     *           `projects/{project}/locations/{location}/attributes/system-maturity-level`
     *           attribute.
     *           The number of values for this attribute will be based on the
     *           cardinality of the attribute. The same can be retrieved via GetAttribute
     *           API. All values should be from the list of allowed values defined for the
     *           attribute.
     *     @type array|\Google\Protobuf\Internal\MapField $attributes
     *           Optional. The list of user defined attributes associated with the API
     *           resource. The key is the attribute name. It will be of the format:
     *           `projects/{project}/locations/{location}/attributes/{attribute}`.
     *           The value is the attribute values associated with the resource.
     *     @type \Google\Cloud\ApiHub\V1\AttributeValues $api_style
     *           Optional. The style of the API.
     *           This maps to the following system defined attribute:
     *           `projects/{project}/locations/{location}/attributes/system-api-style`
     *           attribute.
     *           The number of values for this attribute will be based on the
     *           cardinality of the attribute. The same can be retrieved via GetAttribute
     *           API. All values should be from the list of allowed values defined for the
     *           attribute.
     *     @type string $selected_version
     *           Optional. The selected version for an API resource.
     *           This can be used when special handling is needed on client side for
     *           particular version of the API. Format is
     *           `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apihub\V1\CommonFields::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The name of the API resource in the API Hub.
     * Format:
     * `projects/{project}/locations/{location}/apis/{api}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The name of the API resource in the API Hub.
     * Format:
     * `projects/{project}/locations/{location}/apis/{api}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The display name of the API resource.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Required. The display name of the API resource.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Optional. The description of the API resource.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. The description of the API resource.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Optional. The documentation for the API resource.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.Documentation documentation = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\ApiHub\V1\Documentation|null
     */
    public function getDocumentation()
    {
        return $this->documentation;
    }

    public function hasDocumentation()
    {
        return isset($this->documentation);
    }

    public function clearDocumentation()
    {
        unset($this->documentation);
    }

    /**
     * Optional. The documentation for the API resource.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.Documentation documentation = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\ApiHub\V1\Documentation $var
     * @return $this
     */
    public function setDocumentation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\Documentation::class);
        $this->documentation = $var;

        return $this;
    }

    /**
     * Optional. Owner details for the API resource.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.Owner owner = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\ApiHub\V1\Owner|null
     */
    public function getOwner()
    {
        return $this->owner;
    }

    public function hasOwner()
    {
        return isset($this->owner);
    }

    public function clearOwner()
    {
        unset($this->owner);
    }

    /**
     * Optional. Owner details for the API resource.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.Owner owner = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\ApiHub\V1\Owner $var
     * @return $this
     */
    public function setOwner($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\Owner::class);
        $this->owner = $var;

        return $this;
    }

    /**
     * Output only. The list of versions present in an API resource.
     * Note: An API resource can be associated with more than 1 version.
     * Format is
     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
     *
     * Generated from protobuf field <code>repeated string versions = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getVersions()
    {
        return $this->versions;
    }

    /**
     * Output only. The list of versions present in an API resource.
     * Note: An API resource can be associated with more than 1 version.
     * Format is
     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
     *
     * Generated from protobuf field <code>repeated string versions = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setVersions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->versions = $arr;

        return $this;
    }

    /**
     * Output only. The time at which the API resource was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. The time at which the API resource was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. The time at which the API resource was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 8 [(.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 the API resource was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 8 [(.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;
    }

    /**
     * Optional. The target users for the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-target-user`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues target_user = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\ApiHub\V1\AttributeValues|null
     */
    public function getTargetUser()
    {
        return $this->target_user;
    }

    public function hasTargetUser()
    {
        return isset($this->target_user);
    }

    public function clearTargetUser()
    {
        unset($this->target_user);
    }

    /**
     * Optional. The target users for the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-target-user`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues target_user = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\ApiHub\V1\AttributeValues $var
     * @return $this
     */
    public function setTargetUser($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\AttributeValues::class);
        $this->target_user = $var;

        return $this;
    }

    /**
     * Optional. The team owning the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-team`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues team = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\ApiHub\V1\AttributeValues|null
     */
    public function getTeam()
    {
        return $this->team;
    }

    public function hasTeam()
    {
        return isset($this->team);
    }

    public function clearTeam()
    {
        unset($this->team);
    }

    /**
     * Optional. The team owning the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-team`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues team = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\ApiHub\V1\AttributeValues $var
     * @return $this
     */
    public function setTeam($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\AttributeValues::class);
        $this->team = $var;

        return $this;
    }

    /**
     * Optional. The business unit owning the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-business-unit`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues business_unit = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\ApiHub\V1\AttributeValues|null
     */
    public function getBusinessUnit()
    {
        return $this->business_unit;
    }

    public function hasBusinessUnit()
    {
        return isset($this->business_unit);
    }

    public function clearBusinessUnit()
    {
        unset($this->business_unit);
    }

    /**
     * Optional. The business unit owning the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-business-unit`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues business_unit = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\ApiHub\V1\AttributeValues $var
     * @return $this
     */
    public function setBusinessUnit($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\AttributeValues::class);
        $this->business_unit = $var;

        return $this;
    }

    /**
     * Optional. The maturity level of the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-maturity-level`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues maturity_level = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\ApiHub\V1\AttributeValues|null
     */
    public function getMaturityLevel()
    {
        return $this->maturity_level;
    }

    public function hasMaturityLevel()
    {
        return isset($this->maturity_level);
    }

    public function clearMaturityLevel()
    {
        unset($this->maturity_level);
    }

    /**
     * Optional. The maturity level of the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-maturity-level`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues maturity_level = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\ApiHub\V1\AttributeValues $var
     * @return $this
     */
    public function setMaturityLevel($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\AttributeValues::class);
        $this->maturity_level = $var;

        return $this;
    }

    /**
     * Optional. The list of user defined attributes associated with the API
     * resource. The key is the attribute name. It will be of the format:
     * `projects/{project}/locations/{location}/attributes/{attribute}`.
     * The value is the attribute values associated with the resource.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAttributes()
    {
        return $this->attributes;
    }

    /**
     * Optional. The list of user defined attributes associated with the API
     * resource. The key is the attribute name. It will be of the format:
     * `projects/{project}/locations/{location}/attributes/{attribute}`.
     * The value is the attribute values associated with the resource.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAttributes($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ApiHub\V1\AttributeValues::class);
        $this->attributes = $arr;

        return $this;
    }

    /**
     * Optional. The style of the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-api-style`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues api_style = 14 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\ApiHub\V1\AttributeValues|null
     */
    public function getApiStyle()
    {
        return $this->api_style;
    }

    public function hasApiStyle()
    {
        return isset($this->api_style);
    }

    public function clearApiStyle()
    {
        unset($this->api_style);
    }

    /**
     * Optional. The style of the API.
     * This maps to the following system defined attribute:
     * `projects/{project}/locations/{location}/attributes/system-api-style`
     * attribute.
     * The number of values for this attribute will be based on the
     * cardinality of the attribute. The same can be retrieved via GetAttribute
     * API. All values should be from the list of allowed values defined for the
     * attribute.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.AttributeValues api_style = 14 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\ApiHub\V1\AttributeValues $var
     * @return $this
     */
    public function setApiStyle($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\AttributeValues::class);
        $this->api_style = $var;

        return $this;
    }

    /**
     * Optional. The selected version for an API resource.
     * This can be used when special handling is needed on client side for
     * particular version of the API. Format is
     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
     *
     * Generated from protobuf field <code>string selected_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getSelectedVersion()
    {
        return $this->selected_version;
    }

    /**
     * Optional. The selected version for an API resource.
     * This can be used when special handling is needed on client side for
     * particular version of the API. Format is
     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
     *
     * Generated from protobuf field <code>string selected_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setSelectedVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->selected_version = $var;

        return $this;
    }

}

