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

namespace Google\Cloud\Ces\V1\Action;

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

/**
 * Entity CRUD operation specification.
 *
 * Generated from protobuf message <code>google.cloud.ces.v1.Action.EntityOperation</code>
 */
class EntityOperation extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. ID of the entity.
     *
     * Generated from protobuf field <code>string entity_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $entity_id = '';
    /**
     * Required. Operation to perform on the entity.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.Action.EntityOperation.OperationType operation = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $operation = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $entity_id
     *           Required. ID of the entity.
     *     @type int $operation
     *           Required. Operation to perform on the entity.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Ces\V1\ConnectorTool::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. ID of the entity.
     *
     * Generated from protobuf field <code>string entity_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getEntityId()
    {
        return $this->entity_id;
    }

    /**
     * Required. ID of the entity.
     *
     * Generated from protobuf field <code>string entity_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setEntityId($var)
    {
        GPBUtil::checkString($var, True);
        $this->entity_id = $var;

        return $this;
    }

    /**
     * Required. Operation to perform on the entity.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.Action.EntityOperation.OperationType operation = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getOperation()
    {
        return $this->operation;
    }

    /**
     * Required. Operation to perform on the entity.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.Action.EntityOperation.OperationType operation = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setOperation($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Ces\V1\Action\EntityOperation\OperationType::class);
        $this->operation = $var;

        return $this;
    }

}


