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

namespace Google\Cloud\SecurityCenterManagement\V1\CustomConfig;

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

/**
 * Resource for selecting resource type.
 *
 * Generated from protobuf message <code>google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector</code>
 */
class ResourceSelector extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The resource types to run the detector on.
     *
     * Generated from protobuf field <code>repeated string resource_types = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $resource_types;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $resource_types
     *           Optional. The resource types to run the detector on.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The resource types to run the detector on.
     *
     * Generated from protobuf field <code>repeated string resource_types = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getResourceTypes()
    {
        return $this->resource_types;
    }

    /**
     * Optional. The resource types to run the detector on.
     *
     * Generated from protobuf field <code>repeated string resource_types = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setResourceTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->resource_types = $arr;

        return $this;
    }

}


