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

namespace Google\Cloud\Datastore\V1;

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

/**
 * The set of arbitrarily nested property paths used to restrict an operation to
 * only a subset of properties in an entity.
 *
 * Generated from protobuf message <code>google.datastore.v1.PropertyMask</code>
 */
class PropertyMask extends \Google\Protobuf\Internal\Message
{
    /**
     * The paths to the properties covered by this mask.
     * A path is a list of property names separated by dots (`.`), for example
     * `foo.bar` means the property `bar` inside the entity property `foo` inside
     * the entity associated with this path.
     * If a property name contains a dot `.` or a backslash `\`, then that
     * name must be escaped.
     * A path must not be empty, and may not reference a value inside an
     * [array value][google.datastore.v1.Value.array_value].
     *
     * Generated from protobuf field <code>repeated string paths = 1;</code>
     */
    private $paths;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $paths
     *           The paths to the properties covered by this mask.
     *           A path is a list of property names separated by dots (`.`), for example
     *           `foo.bar` means the property `bar` inside the entity property `foo` inside
     *           the entity associated with this path.
     *           If a property name contains a dot `.` or a backslash `\`, then that
     *           name must be escaped.
     *           A path must not be empty, and may not reference a value inside an
     *           [array value][google.datastore.v1.Value.array_value].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Datastore\V1\Datastore::initOnce();
        parent::__construct($data);
    }

    /**
     * The paths to the properties covered by this mask.
     * A path is a list of property names separated by dots (`.`), for example
     * `foo.bar` means the property `bar` inside the entity property `foo` inside
     * the entity associated with this path.
     * If a property name contains a dot `.` or a backslash `\`, then that
     * name must be escaped.
     * A path must not be empty, and may not reference a value inside an
     * [array value][google.datastore.v1.Value.array_value].
     *
     * Generated from protobuf field <code>repeated string paths = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPaths()
    {
        return $this->paths;
    }

    /**
     * The paths to the properties covered by this mask.
     * A path is a list of property names separated by dots (`.`), for example
     * `foo.bar` means the property `bar` inside the entity property `foo` inside
     * the entity associated with this path.
     * If a property name contains a dot `.` or a backslash `\`, then that
     * name must be escaped.
     * A path must not be empty, and may not reference a value inside an
     * [array value][google.datastore.v1.Value.array_value].
     *
     * Generated from protobuf field <code>repeated string paths = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPaths($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->paths = $arr;

        return $this;
    }

}

