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

namespace Google\Cloud\GkeBackup\V1\RestoreConfig;

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

/**
 * ResourceFilter specifies matching criteria to limit the scope of a
 * change to a specific set of kubernetes resources that are selected for
 * restoration from a backup.
 *
 * Generated from protobuf message <code>google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter</code>
 */
class ResourceFilter extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. (Filtering parameter) Any resource subject to transformation
     * must be contained within one of the listed Kubernetes Namespace in the
     * Backup. If this field is not provided, no namespace filtering will be
     * performed (all resources in all Namespaces, including all cluster-scoped
     * resources, will be candidates for transformation).
     *
     * Generated from protobuf field <code>repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $namespaces;
    /**
     * Optional. (Filtering parameter) Any resource subject to transformation
     * must belong to one of the listed "types". If this field is not provided,
     * no type filtering will be performed (all resources of all types matching
     * previous filtering parameters will be candidates for transformation).
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $group_kinds;
    /**
     * Optional. This is a [JSONPath]
     * (https://github.com/json-path/JsonPath/blob/master/README.md)
     * expression that matches specific fields of candidate
     * resources and it operates as a filtering parameter (resources that
     * are not matched with this expression will not be candidates for
     * transformation).
     *
     * Generated from protobuf field <code>string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $json_path = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[] $namespaces
     *           Optional. (Filtering parameter) Any resource subject to transformation
     *           must be contained within one of the listed Kubernetes Namespace in the
     *           Backup. If this field is not provided, no namespace filtering will be
     *           performed (all resources in all Namespaces, including all cluster-scoped
     *           resources, will be candidates for transformation).
     *     @type \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind[] $group_kinds
     *           Optional. (Filtering parameter) Any resource subject to transformation
     *           must belong to one of the listed "types". If this field is not provided,
     *           no type filtering will be performed (all resources of all types matching
     *           previous filtering parameters will be candidates for transformation).
     *     @type string $json_path
     *           Optional. This is a [JSONPath]
     *           (https://github.com/json-path/JsonPath/blob/master/README.md)
     *           expression that matches specific fields of candidate
     *           resources and it operates as a filtering parameter (resources that
     *           are not matched with this expression will not be candidates for
     *           transformation).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. (Filtering parameter) Any resource subject to transformation
     * must be contained within one of the listed Kubernetes Namespace in the
     * Backup. If this field is not provided, no namespace filtering will be
     * performed (all resources in all Namespaces, including all cluster-scoped
     * resources, will be candidates for transformation).
     *
     * Generated from protobuf field <code>repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<string>
     */
    public function getNamespaces()
    {
        return $this->namespaces;
    }

    /**
     * Optional. (Filtering parameter) Any resource subject to transformation
     * must be contained within one of the listed Kubernetes Namespace in the
     * Backup. If this field is not provided, no namespace filtering will be
     * performed (all resources in all Namespaces, including all cluster-scoped
     * resources, will be candidates for transformation).
     *
     * Generated from protobuf field <code>repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string[] $var
     * @return $this
     */
    public function setNamespaces($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->namespaces = $arr;

        return $this;
    }

    /**
     * Optional. (Filtering parameter) Any resource subject to transformation
     * must belong to one of the listed "types". If this field is not provided,
     * no type filtering will be performed (all resources of all types matching
     * previous filtering parameters will be candidates for transformation).
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>
     */
    public function getGroupKinds()
    {
        return $this->group_kinds;
    }

    /**
     * Optional. (Filtering parameter) Any resource subject to transformation
     * must belong to one of the listed "types". If this field is not provided,
     * no type filtering will be performed (all resources of all types matching
     * previous filtering parameters will be candidates for transformation).
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind[] $var
     * @return $this
     */
    public function setGroupKinds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class);
        $this->group_kinds = $arr;

        return $this;
    }

    /**
     * Optional. This is a [JSONPath]
     * (https://github.com/json-path/JsonPath/blob/master/README.md)
     * expression that matches specific fields of candidate
     * resources and it operates as a filtering parameter (resources that
     * are not matched with this expression will not be candidates for
     * transformation).
     *
     * Generated from protobuf field <code>string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getJsonPath()
    {
        return $this->json_path;
    }

    /**
     * Optional. This is a [JSONPath]
     * (https://github.com/json-path/JsonPath/blob/master/README.md)
     * expression that matches specific fields of candidate
     * resources and it operates as a filtering parameter (resources that
     * are not matched with this expression will not be candidates for
     * transformation).
     *
     * Generated from protobuf field <code>string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setJsonPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->json_path = $var;

        return $this;
    }

}

