<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: grafeas/v1/common.proto

namespace Grafeas\V1;

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

/**
 * Digest information.
 *
 * Generated from protobuf message <code>grafeas.v1.Digest</code>
 */
class Digest extends \Google\Protobuf\Internal\Message
{
    /**
     * `SHA1`, `SHA512` etc.
     *
     * Generated from protobuf field <code>string algo = 1;</code>
     */
    private $algo = '';
    /**
     * Value of the digest.
     *
     * Generated from protobuf field <code>bytes digest_bytes = 2;</code>
     */
    private $digest_bytes = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $algo
     *           `SHA1`, `SHA512` etc.
     *     @type string $digest_bytes
     *           Value of the digest.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Grafeas\V1\Common::initOnce();
        parent::__construct($data);
    }

    /**
     * `SHA1`, `SHA512` etc.
     *
     * Generated from protobuf field <code>string algo = 1;</code>
     * @return string
     */
    public function getAlgo()
    {
        return $this->algo;
    }

    /**
     * `SHA1`, `SHA512` etc.
     *
     * Generated from protobuf field <code>string algo = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setAlgo($var)
    {
        GPBUtil::checkString($var, True);
        $this->algo = $var;

        return $this;
    }

    /**
     * Value of the digest.
     *
     * Generated from protobuf field <code>bytes digest_bytes = 2;</code>
     * @return string
     */
    public function getDigestBytes()
    {
        return $this->digest_bytes;
    }

    /**
     * Value of the digest.
     *
     * Generated from protobuf field <code>bytes digest_bytes = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDigestBytes($var)
    {
        GPBUtil::checkString($var, False);
        $this->digest_bytes = $var;

        return $this;
    }

}

