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

namespace Google\Cloud\SecurityCenterManagement\V1;

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

/**
 * Message for deleting a EventThreatDetectionCustomModule
 *
 * Generated from protobuf message <code>google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest</code>
 */
class DeleteEventThreatDetectionCustomModuleRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the ETD custom module.
     * Its format is:
     *   * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *   * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *   * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $name = '';
    /**
     * Optional. When set to true, only validations (including IAM checks) will
     * done for the request (module will not be deleted). An OK response indicates
     * the request is valid while an error response indicates the request is
     * invalid. Note that a subsequent request to actually delete the module could
     * still fail because 1. the state could have changed (e.g. IAM permission
     * lost) or
     * 2. A failure occurred while trying to delete the module.
     *
     * Generated from protobuf field <code>bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $validate_only = false;

    /**
     * @param string $name Required. The resource name of the ETD custom module.
     *
     *                     Its format is:
     *
     *                     * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *                     * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *                     * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. Please see
     *                     {@see SecurityCenterManagementClient::eventThreatDetectionCustomModuleName()} for help formatting this field.
     *
     * @return \Google\Cloud\SecurityCenterManagement\V1\DeleteEventThreatDetectionCustomModuleRequest
     *
     * @experimental
     */
    public static function build(string $name): self
    {
        return (new self())
            ->setName($name);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The resource name of the ETD custom module.
     *           Its format is:
     *             * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *             * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *             * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *     @type bool $validate_only
     *           Optional. When set to true, only validations (including IAM checks) will
     *           done for the request (module will not be deleted). An OK response indicates
     *           the request is valid while an error response indicates the request is
     *           invalid. Note that a subsequent request to actually delete the module could
     *           still fail because 1. the state could have changed (e.g. IAM permission
     *           lost) or
     *           2. A failure occurred while trying to delete the module.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycentermanagement\V1\SecurityCenterManagement::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the ETD custom module.
     * Its format is:
     *   * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *   * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *   * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The resource name of the ETD custom module.
     * Its format is:
     *   * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *   * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *   * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. When set to true, only validations (including IAM checks) will
     * done for the request (module will not be deleted). An OK response indicates
     * the request is valid while an error response indicates the request is
     * invalid. Note that a subsequent request to actually delete the module could
     * still fail because 1. the state could have changed (e.g. IAM permission
     * lost) or
     * 2. A failure occurred while trying to delete the module.
     *
     * Generated from protobuf field <code>bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getValidateOnly()
    {
        return $this->validate_only;
    }

    /**
     * Optional. When set to true, only validations (including IAM checks) will
     * done for the request (module will not be deleted). An OK response indicates
     * the request is valid while an error response indicates the request is
     * invalid. Note that a subsequent request to actually delete the module could
     * still fail because 1. the state could have changed (e.g. IAM permission
     * lost) or
     * 2. A failure occurred while trying to delete the module.
     *
     * Generated from protobuf field <code>bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setValidateOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->validate_only = $var;

        return $this;
    }

}

