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

namespace Google\Cloud\Retail\V2;

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

/**
 * Request for
 * [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
 * method.
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.ListCatalogsRequest</code>
 */
class ListCatalogsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The account resource name with an associated location.
     * If the caller does not have permission to list
     * [Catalog][google.cloud.retail.v2.Catalog]s under this location, regardless
     * of whether or not this location exists, a PERMISSION_DENIED error is
     * returned.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Maximum number of [Catalog][google.cloud.retail.v2.Catalog]s to return. If
     * unspecified, defaults to 50. The maximum allowed value is 1000. Values
     * above 1000 will be coerced to 1000.
     * If this field is negative, an INVALID_ARGUMENT is returned.
     *
     * Generated from protobuf field <code>int32 page_size = 2;</code>
     */
    private $page_size = 0;
    /**
     * A page token
     * [ListCatalogsResponse.next_page_token][google.cloud.retail.v2.ListCatalogsResponse.next_page_token],
     * received from a previous
     * [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
     * call. Provide this to retrieve the subsequent page.
     * When paginating, all other parameters provided to
     * [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
     * must match the call that provided the page token. Otherwise, an
     * INVALID_ARGUMENT error is returned.
     *
     * Generated from protobuf field <code>string page_token = 3;</code>
     */
    private $page_token = '';

    /**
     * @param string $parent Required. The account resource name with an associated location.
     *
     *                       If the caller does not have permission to list
     *                       [Catalog][google.cloud.retail.v2.Catalog]s under this location, regardless
     *                       of whether or not this location exists, a PERMISSION_DENIED error is
     *                       returned. Please see
     *                       {@see CatalogServiceClient::locationName()} for help formatting this field.
     *
     * @return \Google\Cloud\Retail\V2\ListCatalogsRequest
     *
     * @experimental
     */
    public static function build(string $parent): self
    {
        return (new self())
            ->setParent($parent);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The account resource name with an associated location.
     *           If the caller does not have permission to list
     *           [Catalog][google.cloud.retail.v2.Catalog]s under this location, regardless
     *           of whether or not this location exists, a PERMISSION_DENIED error is
     *           returned.
     *     @type int $page_size
     *           Maximum number of [Catalog][google.cloud.retail.v2.Catalog]s to return. If
     *           unspecified, defaults to 50. The maximum allowed value is 1000. Values
     *           above 1000 will be coerced to 1000.
     *           If this field is negative, an INVALID_ARGUMENT is returned.
     *     @type string $page_token
     *           A page token
     *           [ListCatalogsResponse.next_page_token][google.cloud.retail.v2.ListCatalogsResponse.next_page_token],
     *           received from a previous
     *           [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
     *           call. Provide this to retrieve the subsequent page.
     *           When paginating, all other parameters provided to
     *           [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
     *           must match the call that provided the page token. Otherwise, an
     *           INVALID_ARGUMENT error is returned.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\CatalogService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The account resource name with an associated location.
     * If the caller does not have permission to list
     * [Catalog][google.cloud.retail.v2.Catalog]s under this location, regardless
     * of whether or not this location exists, a PERMISSION_DENIED error is
     * returned.
     *
     * 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 account resource name with an associated location.
     * If the caller does not have permission to list
     * [Catalog][google.cloud.retail.v2.Catalog]s under this location, regardless
     * of whether or not this location exists, a PERMISSION_DENIED error is
     * returned.
     *
     * 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;
    }

    /**
     * Maximum number of [Catalog][google.cloud.retail.v2.Catalog]s to return. If
     * unspecified, defaults to 50. The maximum allowed value is 1000. Values
     * above 1000 will be coerced to 1000.
     * If this field is negative, an INVALID_ARGUMENT is returned.
     *
     * Generated from protobuf field <code>int32 page_size = 2;</code>
     * @return int
     */
    public function getPageSize()
    {
        return $this->page_size;
    }

    /**
     * Maximum number of [Catalog][google.cloud.retail.v2.Catalog]s to return. If
     * unspecified, defaults to 50. The maximum allowed value is 1000. Values
     * above 1000 will be coerced to 1000.
     * If this field is negative, an INVALID_ARGUMENT is returned.
     *
     * 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;
    }

    /**
     * A page token
     * [ListCatalogsResponse.next_page_token][google.cloud.retail.v2.ListCatalogsResponse.next_page_token],
     * received from a previous
     * [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
     * call. Provide this to retrieve the subsequent page.
     * When paginating, all other parameters provided to
     * [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
     * must match the call that provided the page token. Otherwise, an
     * INVALID_ARGUMENT error is returned.
     *
     * Generated from protobuf field <code>string page_token = 3;</code>
     * @return string
     */
    public function getPageToken()
    {
        return $this->page_token;
    }

    /**
     * A page token
     * [ListCatalogsResponse.next_page_token][google.cloud.retail.v2.ListCatalogsResponse.next_page_token],
     * received from a previous
     * [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
     * call. Provide this to retrieve the subsequent page.
     * When paginating, all other parameters provided to
     * [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
     * must match the call that provided the page token. Otherwise, an
     * INVALID_ARGUMENT error is returned.
     *
     * 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;
    }

}

