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

namespace Google\Cloud\Build\V1;

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

/**
 * Request to list builds.
 *
 * Generated from protobuf message <code>google.devtools.cloudbuild.v1.ListBuildsRequest</code>
 */
class ListBuildsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The parent of the collection of `Builds`.
     * Format: `projects/{project}/locations/location`
     *
     * Generated from protobuf field <code>string parent = 9 [(.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. ID of the project.
     *
     * Generated from protobuf field <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $project_id = '';
    /**
     * Number of results to return in the list.
     *
     * Generated from protobuf field <code>int32 page_size = 2;</code>
     */
    private $page_size = 0;
    /**
     * The page token for the next page of Builds.
     * If unspecified, the first page of results is returned.
     * If the token is rejected for any reason, INVALID_ARGUMENT will be thrown.
     * In this case, the token should be discarded, and pagination should be
     * restarted from the first page of results.
     * See https://google.aip.dev/158 for more.
     *
     * Generated from protobuf field <code>string page_token = 3;</code>
     */
    private $page_token = '';
    /**
     * The raw filter text to constrain the results.
     *
     * Generated from protobuf field <code>string filter = 8;</code>
     */
    private $filter = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           The parent of the collection of `Builds`.
     *           Format: `projects/{project}/locations/location`
     *     @type string $project_id
     *           Required. ID of the project.
     *     @type int $page_size
     *           Number of results to return in the list.
     *     @type string $page_token
     *           The page token for the next page of Builds.
     *           If unspecified, the first page of results is returned.
     *           If the token is rejected for any reason, INVALID_ARGUMENT will be thrown.
     *           In this case, the token should be discarded, and pagination should be
     *           restarted from the first page of results.
     *           See https://google.aip.dev/158 for more.
     *     @type string $filter
     *           The raw filter text to constrain the results.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Cloudbuild\V1\Cloudbuild::initOnce();
        parent::__construct($data);
    }

    /**
     * The parent of the collection of `Builds`.
     * Format: `projects/{project}/locations/location`
     *
     * Generated from protobuf field <code>string parent = 9 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * The parent of the collection of `Builds`.
     * Format: `projects/{project}/locations/location`
     *
     * Generated from protobuf field <code>string parent = 9 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. ID of the project.
     *
     * Generated from protobuf field <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getProjectId()
    {
        return $this->project_id;
    }

    /**
     * Required. ID of the project.
     *
     * Generated from protobuf field <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setProjectId($var)
    {
        GPBUtil::checkString($var, True);
        $this->project_id = $var;

        return $this;
    }

    /**
     * Number of results to return in the list.
     *
     * Generated from protobuf field <code>int32 page_size = 2;</code>
     * @return int
     */
    public function getPageSize()
    {
        return $this->page_size;
    }

    /**
     * Number of results to return in the list.
     *
     * Generated from protobuf field <code>int32 page_size = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setPageSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->page_size = $var;

        return $this;
    }

    /**
     * The page token for the next page of Builds.
     * If unspecified, the first page of results is returned.
     * If the token is rejected for any reason, INVALID_ARGUMENT will be thrown.
     * In this case, the token should be discarded, and pagination should be
     * restarted from the first page of results.
     * See https://google.aip.dev/158 for more.
     *
     * Generated from protobuf field <code>string page_token = 3;</code>
     * @return string
     */
    public function getPageToken()
    {
        return $this->page_token;
    }

    /**
     * The page token for the next page of Builds.
     * If unspecified, the first page of results is returned.
     * If the token is rejected for any reason, INVALID_ARGUMENT will be thrown.
     * In this case, the token should be discarded, and pagination should be
     * restarted from the first page of results.
     * See https://google.aip.dev/158 for more.
     *
     * Generated from protobuf field <code>string page_token = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->page_token = $var;

        return $this;
    }

    /**
     * The raw filter text to constrain the results.
     *
     * Generated from protobuf field <code>string filter = 8;</code>
     * @return string
     */
    public function getFilter()
    {
        return $this->filter;
    }

    /**
     * The raw filter text to constrain the results.
     *
     * Generated from protobuf field <code>string filter = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setFilter($var)
    {
        GPBUtil::checkString($var, True);
        $this->filter = $var;

        return $this;
    }

}

