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

namespace Google\Cloud\DataCatalog\V1\RoutineSpec;

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

/**
 * Input or output argument of a function or stored procedure.
 *
 * Generated from protobuf message <code>google.cloud.datacatalog.v1.RoutineSpec.Argument</code>
 */
class Argument extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the argument. A return argument of a function might not have
     * a name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Specifies whether the argument is input or output.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode mode = 2;</code>
     */
    private $mode = 0;
    /**
     * Type of the argument. The exact value depends on the source system and
     * the language.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     */
    private $type = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of the argument. A return argument of a function might not have
     *           a name.
     *     @type int $mode
     *           Specifies whether the argument is input or output.
     *     @type string $type
     *           Type of the argument. The exact value depends on the source system and
     *           the language.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the argument. A return argument of a function might not have
     * a name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of the argument. A return argument of a function might not have
     * a name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Specifies whether the argument is input or output.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode mode = 2;</code>
     * @return int
     */
    public function getMode()
    {
        return $this->mode;
    }

    /**
     * Specifies whether the argument is input or output.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode mode = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\RoutineSpec\Argument\Mode::class);
        $this->mode = $var;

        return $this;
    }

    /**
     * Type of the argument. The exact value depends on the source system and
     * the language.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Type of the argument. The exact value depends on the source system and
     * the language.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Argument::class, \Google\Cloud\DataCatalog\V1\RoutineSpec_Argument::class);

