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

namespace Google\Cloud\DataCatalog\Lineage\V1;

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

/**
 * Request message for
 * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks].
 *
 * Generated from protobuf message <code>google.cloud.datacatalog.lineage.v1.SearchLinksRequest</code>
 */
class SearchLinksRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The project and location you want search in.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Optional. The maximum number of links to return in a single page of the
     * response. A page may contain fewer links than this value. If unspecified,
     * at most 10 links are returned.
     * Maximum value is 100; values greater than 100 are reduced to 100.
     *
     * Generated from protobuf field <code>int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $page_size = 0;
    /**
     * Optional. The page token received from a previous `SearchLinksRequest`
     * call. Use it to get the next page.
     * When requesting subsequent pages of a response, remember that
     * all parameters must match the values you provided
     * in the original request.
     *
     * Generated from protobuf field <code>string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $page_token = '';
    protected $criteria;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The project and location you want search in.
     *     @type \Google\Cloud\DataCatalog\Lineage\V1\EntityReference $source
     *           Optional. Send asset information in the **source** field to retrieve all
     *           links that lead from the specified asset to downstream assets.
     *     @type \Google\Cloud\DataCatalog\Lineage\V1\EntityReference $target
     *           Optional. Send asset information in the **target** field to retrieve all
     *           links that lead from upstream assets to the specified asset.
     *     @type int $page_size
     *           Optional. The maximum number of links to return in a single page of the
     *           response. A page may contain fewer links than this value. If unspecified,
     *           at most 10 links are returned.
     *           Maximum value is 100; values greater than 100 are reduced to 100.
     *     @type string $page_token
     *           Optional. The page token received from a previous `SearchLinksRequest`
     *           call. Use it to get the next page.
     *           When requesting subsequent pages of a response, remember that
     *           all parameters must match the values you provided
     *           in the original request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datacatalog\Lineage\V1\Lineage::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The project and location you want search in.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The project and location you want search in.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Optional. Send asset information in the **source** field to retrieve all
     * links that lead from the specified asset to downstream assets.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\DataCatalog\Lineage\V1\EntityReference|null
     */
    public function getSource()
    {
        return $this->readOneof(4);
    }

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

    /**
     * Optional. Send asset information in the **source** field to retrieve all
     * links that lead from the specified asset to downstream assets.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\DataCatalog\Lineage\V1\EntityReference $var
     * @return $this
     */
    public function setSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\Lineage\V1\EntityReference::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Optional. Send asset information in the **target** field to retrieve all
     * links that lead from upstream assets to the specified asset.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\DataCatalog\Lineage\V1\EntityReference|null
     */
    public function getTarget()
    {
        return $this->readOneof(5);
    }

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

    /**
     * Optional. Send asset information in the **target** field to retrieve all
     * links that lead from upstream assets to the specified asset.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\DataCatalog\Lineage\V1\EntityReference $var
     * @return $this
     */
    public function setTarget($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\Lineage\V1\EntityReference::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Optional. The maximum number of links to return in a single page of the
     * response. A page may contain fewer links than this value. If unspecified,
     * at most 10 links are returned.
     * Maximum value is 100; values greater than 100 are reduced to 100.
     *
     * Generated from protobuf field <code>int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getPageSize()
    {
        return $this->page_size;
    }

    /**
     * Optional. The maximum number of links to return in a single page of the
     * response. A page may contain fewer links than this value. If unspecified,
     * at most 10 links are returned.
     * Maximum value is 100; values greater than 100 are reduced to 100.
     *
     * Generated from protobuf field <code>int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setPageSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->page_size = $var;

        return $this;
    }

    /**
     * Optional. The page token received from a previous `SearchLinksRequest`
     * call. Use it to get the next page.
     * When requesting subsequent pages of a response, remember that
     * all parameters must match the values you provided
     * in the original request.
     *
     * Generated from protobuf field <code>string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getPageToken()
    {
        return $this->page_token;
    }

    /**
     * Optional. The page token received from a previous `SearchLinksRequest`
     * call. Use it to get the next page.
     * When requesting subsequent pages of a response, remember that
     * all parameters must match the values you provided
     * in the original request.
     *
     * Generated from protobuf field <code>string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->page_token = $var;

        return $this;
    }

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

}

