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

namespace Google\Cloud\ApiHub\V1\HttpOperationDetails;

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

/**
 * HTTP Path parameter.
 *
 * Generated from protobuf message <code>google.cloud.apihub.v1.HttpOperationDetails.PathParam</code>
 */
class PathParam extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Segment location in the path, 1-indexed
     *
     * Generated from protobuf field <code>int32 position = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $position = 0;
    /**
     * Optional. Data type of path param
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.HttpOperationDetails.DataType data_type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $data_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $position
     *           Optional. Segment location in the path, 1-indexed
     *     @type int $data_type
     *           Optional. Data type of path param
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apihub\V1\CommonFields::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Segment location in the path, 1-indexed
     *
     * Generated from protobuf field <code>int32 position = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getPosition()
    {
        return $this->position;
    }

    /**
     * Optional. Segment location in the path, 1-indexed
     *
     * Generated from protobuf field <code>int32 position = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setPosition($var)
    {
        GPBUtil::checkInt32($var);
        $this->position = $var;

        return $this;
    }

    /**
     * Optional. Data type of path param
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.HttpOperationDetails.DataType data_type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getDataType()
    {
        return $this->data_type;
    }

    /**
     * Optional. Data type of path param
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.HttpOperationDetails.DataType data_type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setDataType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ApiHub\V1\HttpOperationDetails\DataType::class);
        $this->data_type = $var;

        return $this;
    }

}


