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

namespace Google\Cloud\GkeMultiCloud\V1;

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

/**
 * Request message for `AttachedClusters.DeleteAttachedCluster` method.
 *
 * Generated from protobuf message <code>google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest</code>
 */
class DeleteAttachedClusterRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name the
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete.
     * `AttachedCluster` names are formatted as
     * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     * for more details on Google Cloud Platform resource names.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $name = '';
    /**
     * If set, only validate the request, but do not actually delete the resource.
     *
     * Generated from protobuf field <code>bool validate_only = 2;</code>
     */
    protected $validate_only = false;
    /**
     * If set to true, and the
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     * is not found, the request will succeed but no action will be taken on the
     * server and a completed [Operation][google.longrunning.Operation] will be
     * returned.
     * Useful for idempotent deletion.
     *
     * Generated from protobuf field <code>bool allow_missing = 3;</code>
     */
    protected $allow_missing = false;
    /**
     * If set to true, the deletion of
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     * will succeed even if errors occur during deleting in cluster resources.
     * Using this parameter may result in orphaned resources in the cluster.
     *
     * Generated from protobuf field <code>bool ignore_errors = 5;</code>
     */
    protected $ignore_errors = false;
    /**
     * The current etag of the
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].
     * Allows clients to perform deletions through optimistic concurrency control.
     * If the provided etag does not match the current etag of the cluster,
     * the request will fail and an ABORTED error will be returned.
     *
     * Generated from protobuf field <code>string etag = 4;</code>
     */
    protected $etag = '';

    /**
     * @param string $name Required. The resource name the
     *                     [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete.
     *
     *                     `AttachedCluster` names are formatted as
     *                     `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
     *
     *                     See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *                     for more details on Google Cloud Platform resource names. Please see
     *                     {@see AttachedClustersClient::attachedClusterName()} for help formatting this field.
     *
     * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAttachedClusterRequest
     *
     * @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 the
     *           [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete.
     *           `AttachedCluster` names are formatted as
     *           `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
     *           See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *           for more details on Google Cloud Platform resource names.
     *     @type bool $validate_only
     *           If set, only validate the request, but do not actually delete the resource.
     *     @type bool $allow_missing
     *           If set to true, and the
     *           [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     *           is not found, the request will succeed but no action will be taken on the
     *           server and a completed [Operation][google.longrunning.Operation] will be
     *           returned.
     *           Useful for idempotent deletion.
     *     @type bool $ignore_errors
     *           If set to true, the deletion of
     *           [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     *           will succeed even if errors occur during deleting in cluster resources.
     *           Using this parameter may result in orphaned resources in the cluster.
     *     @type string $etag
     *           The current etag of the
     *           [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].
     *           Allows clients to perform deletions through optimistic concurrency control.
     *           If the provided etag does not match the current etag of the cluster,
     *           the request will fail and an ABORTED error will be returned.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name the
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete.
     * `AttachedCluster` names are formatted as
     * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     * for more details on Google Cloud Platform resource names.
     *
     * 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 the
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete.
     * `AttachedCluster` names are formatted as
     * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     * for more details on Google Cloud Platform resource names.
     *
     * 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;
    }

    /**
     * If set, only validate the request, but do not actually delete the resource.
     *
     * Generated from protobuf field <code>bool validate_only = 2;</code>
     * @return bool
     */
    public function getValidateOnly()
    {
        return $this->validate_only;
    }

    /**
     * If set, only validate the request, but do not actually delete the resource.
     *
     * Generated from protobuf field <code>bool validate_only = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setValidateOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->validate_only = $var;

        return $this;
    }

    /**
     * If set to true, and the
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     * is not found, the request will succeed but no action will be taken on the
     * server and a completed [Operation][google.longrunning.Operation] will be
     * returned.
     * Useful for idempotent deletion.
     *
     * Generated from protobuf field <code>bool allow_missing = 3;</code>
     * @return bool
     */
    public function getAllowMissing()
    {
        return $this->allow_missing;
    }

    /**
     * If set to true, and the
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     * is not found, the request will succeed but no action will be taken on the
     * server and a completed [Operation][google.longrunning.Operation] will be
     * returned.
     * Useful for idempotent deletion.
     *
     * Generated from protobuf field <code>bool allow_missing = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setAllowMissing($var)
    {
        GPBUtil::checkBool($var);
        $this->allow_missing = $var;

        return $this;
    }

    /**
     * If set to true, the deletion of
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     * will succeed even if errors occur during deleting in cluster resources.
     * Using this parameter may result in orphaned resources in the cluster.
     *
     * Generated from protobuf field <code>bool ignore_errors = 5;</code>
     * @return bool
     */
    public function getIgnoreErrors()
    {
        return $this->ignore_errors;
    }

    /**
     * If set to true, the deletion of
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     * will succeed even if errors occur during deleting in cluster resources.
     * Using this parameter may result in orphaned resources in the cluster.
     *
     * Generated from protobuf field <code>bool ignore_errors = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setIgnoreErrors($var)
    {
        GPBUtil::checkBool($var);
        $this->ignore_errors = $var;

        return $this;
    }

    /**
     * The current etag of the
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].
     * Allows clients to perform deletions through optimistic concurrency control.
     * If the provided etag does not match the current etag of the cluster,
     * the request will fail and an ABORTED error will be returned.
     *
     * Generated from protobuf field <code>string etag = 4;</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * The current etag of the
     * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].
     * Allows clients to perform deletions through optimistic concurrency control.
     * If the provided etag does not match the current etag of the cluster,
     * the request will fail and an ABORTED error will be returned.
     *
     * Generated from protobuf field <code>string etag = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

}

