<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v23/services/automatically_created_asset_removal_service.proto

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Request message for
 * [AutomaticallyCreatedAssetRemovalService.RemoveCampaignAutomaticallyCreatedAsset][google.ads.googleads.v23.services.AutomaticallyCreatedAssetRemovalService.RemoveCampaignAutomaticallyCreatedAsset].
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.RemoveCampaignAutomaticallyCreatedAssetRequest</code>
 */
class RemoveCampaignAutomaticallyCreatedAssetRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The ID of the customer whose assets are being removed.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $customer_id = '';
    /**
     * Required. The list of operations.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.RemoveCampaignAutomaticallyCreatedAssetOperation operations = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $operations;
    /**
     * Required. If true, successful operations will be carried out and invalid
     * operations will return errors. If false, all operations will be carried
     * out in one transaction if and only if they are all valid.
     *
     * Generated from protobuf field <code>bool partial_failure = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $partial_failure = false;

    /**
     * @param string                                                                                $customerId     Required. The ID of the customer whose assets are being removed.
     * @param \Google\Ads\GoogleAds\V23\Services\RemoveCampaignAutomaticallyCreatedAssetOperation[] $operations     Required. The list of operations.
     * @param bool                                                                                  $partialFailure Required. If true, successful operations will be carried out and invalid
     *                                                                                                              operations will return errors. If false, all operations will be carried
     *                                                                                                              out in one transaction if and only if they are all valid.
     *
     * @return \Google\Ads\GoogleAds\V23\Services\RemoveCampaignAutomaticallyCreatedAssetRequest
     *
     * @experimental
     */
    public static function build(string $customerId, array $operations, bool $partialFailure): self
    {
        return (new self())
            ->setCustomerId($customerId)
            ->setOperations($operations)
            ->setPartialFailure($partialFailure);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $customer_id
     *           Required. The ID of the customer whose assets are being removed.
     *     @type array<\Google\Ads\GoogleAds\V23\Services\RemoveCampaignAutomaticallyCreatedAssetOperation>|\Google\Protobuf\Internal\RepeatedField $operations
     *           Required. The list of operations.
     *     @type bool $partial_failure
     *           Required. If true, successful operations will be carried out and invalid
     *           operations will return errors. If false, all operations will be carried
     *           out in one transaction if and only if they are all valid.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\AutomaticallyCreatedAssetRemovalService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The ID of the customer whose assets are being removed.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCustomerId()
    {
        return $this->customer_id;
    }

    /**
     * Required. The ID of the customer whose assets are being removed.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCustomerId($var)
    {
        GPBUtil::checkString($var, True);
        $this->customer_id = $var;

        return $this;
    }

    /**
     * Required. The list of operations.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.RemoveCampaignAutomaticallyCreatedAssetOperation operations = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getOperations()
    {
        return $this->operations;
    }

    /**
     * Required. The list of operations.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.RemoveCampaignAutomaticallyCreatedAssetOperation operations = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Ads\GoogleAds\V23\Services\RemoveCampaignAutomaticallyCreatedAssetOperation>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setOperations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Services\RemoveCampaignAutomaticallyCreatedAssetOperation::class);
        $this->operations = $arr;

        return $this;
    }

    /**
     * Required. If true, successful operations will be carried out and invalid
     * operations will return errors. If false, all operations will be carried
     * out in one transaction if and only if they are all valid.
     *
     * Generated from protobuf field <code>bool partial_failure = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return bool
     */
    public function getPartialFailure()
    {
        return $this->partial_failure;
    }

    /**
     * Required. If true, successful operations will be carried out and invalid
     * operations will return errors. If false, all operations will be carried
     * out in one transaction if and only if they are all valid.
     *
     * Generated from protobuf field <code>bool partial_failure = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param bool $var
     * @return $this
     */
    public function setPartialFailure($var)
    {
        GPBUtil::checkBool($var);
        $this->partial_failure = $var;

        return $this;
    }

}

