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

namespace Google\Cloud\Channel\V1;

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

/**
 * Provides contextual information about a
 * [google.longrunning.Operation][google.longrunning.Operation].
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.OperationMetadata</code>
 */
class OperationMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * The RPC that initiated this Long Running Operation.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1;</code>
     */
    private $operation_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $operation_type
     *           The RPC that initiated this Long Running Operation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\Operations::initOnce();
        parent::__construct($data);
    }

    /**
     * The RPC that initiated this Long Running Operation.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1;</code>
     * @return int
     */
    public function getOperationType()
    {
        return $this->operation_type;
    }

    /**
     * The RPC that initiated this Long Running Operation.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setOperationType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Channel\V1\OperationMetadata\OperationType::class);
        $this->operation_type = $var;

        return $this;
    }

}

