<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/devtools/cloudtrace/v2/trace.proto

namespace Google\Cloud\Trace\V2;

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

/**
 * Binary module.
 *
 * Generated from protobuf message <code>google.devtools.cloudtrace.v2.Module</code>
 */
class Module extends \Google\Protobuf\Internal\Message
{
    /**
     * For example: main binary, kernel modules, and dynamic libraries
     * such as libc.so, sharedlib.so (up to 256 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString module = 1;</code>
     */
    private $module = null;
    /**
     * A unique identifier for the module, usually a hash of its
     * contents (up to 128 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString build_id = 2;</code>
     */
    private $build_id = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Trace\V2\TruncatableString $module
     *           For example: main binary, kernel modules, and dynamic libraries
     *           such as libc.so, sharedlib.so (up to 256 bytes).
     *     @type \Google\Cloud\Trace\V2\TruncatableString $build_id
     *           A unique identifier for the module, usually a hash of its
     *           contents (up to 128 bytes).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce();
        parent::__construct($data);
    }

    /**
     * For example: main binary, kernel modules, and dynamic libraries
     * such as libc.so, sharedlib.so (up to 256 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString module = 1;</code>
     * @return \Google\Cloud\Trace\V2\TruncatableString|null
     */
    public function getModule()
    {
        return $this->module;
    }

    public function hasModule()
    {
        return isset($this->module);
    }

    public function clearModule()
    {
        unset($this->module);
    }

    /**
     * For example: main binary, kernel modules, and dynamic libraries
     * such as libc.so, sharedlib.so (up to 256 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString module = 1;</code>
     * @param \Google\Cloud\Trace\V2\TruncatableString $var
     * @return $this
     */
    public function setModule($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class);
        $this->module = $var;

        return $this;
    }

    /**
     * A unique identifier for the module, usually a hash of its
     * contents (up to 128 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString build_id = 2;</code>
     * @return \Google\Cloud\Trace\V2\TruncatableString|null
     */
    public function getBuildId()
    {
        return $this->build_id;
    }

    public function hasBuildId()
    {
        return isset($this->build_id);
    }

    public function clearBuildId()
    {
        unset($this->build_id);
    }

    /**
     * A unique identifier for the module, usually a hash of its
     * contents (up to 128 bytes).
     *
     * Generated from protobuf field <code>.google.devtools.cloudtrace.v2.TruncatableString build_id = 2;</code>
     * @param \Google\Cloud\Trace\V2\TruncatableString $var
     * @return $this
     */
    public function setBuildId($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class);
        $this->build_id = $var;

        return $this;
    }

}

