<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/datalabeling/v1beta1/annotation.proto

namespace Google\Cloud\DataLabeling\V1beta1;

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

/**
 * Image segmentation annotation.
 *
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation</code>
 */
class ImageSegmentationAnnotation extends \Google\Protobuf\Internal\Message
{
    /**
     * The mapping between rgb color and annotation spec. The key is the rgb
     * color represented in format of rgb(0, 0, 0). The value is the
     * AnnotationSpec.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;</code>
     */
    private $annotation_colors;
    /**
     * Image format.
     *
     * Generated from protobuf field <code>string mime_type = 2;</code>
     */
    private $mime_type = '';
    /**
     * A byte string of a full image's color map.
     *
     * Generated from protobuf field <code>bytes image_bytes = 3;</code>
     */
    private $image_bytes = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array|\Google\Protobuf\Internal\MapField $annotation_colors
     *           The mapping between rgb color and annotation spec. The key is the rgb
     *           color represented in format of rgb(0, 0, 0). The value is the
     *           AnnotationSpec.
     *     @type string $mime_type
     *           Image format.
     *     @type string $image_bytes
     *           A byte string of a full image's color map.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\Annotation::initOnce();
        parent::__construct($data);
    }

    /**
     * The mapping between rgb color and annotation spec. The key is the rgb
     * color represented in format of rgb(0, 0, 0). The value is the
     * AnnotationSpec.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAnnotationColors()
    {
        return $this->annotation_colors;
    }

    /**
     * The mapping between rgb color and annotation spec. The key is the rgb
     * color represented in format of rgb(0, 0, 0). The value is the
     * AnnotationSpec.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAnnotationColors($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataLabeling\V1beta1\AnnotationSpec::class);
        $this->annotation_colors = $arr;

        return $this;
    }

    /**
     * Image format.
     *
     * Generated from protobuf field <code>string mime_type = 2;</code>
     * @return string
     */
    public function getMimeType()
    {
        return $this->mime_type;
    }

    /**
     * Image format.
     *
     * Generated from protobuf field <code>string mime_type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setMimeType($var)
    {
        GPBUtil::checkString($var, True);
        $this->mime_type = $var;

        return $this;
    }

    /**
     * A byte string of a full image's color map.
     *
     * Generated from protobuf field <code>bytes image_bytes = 3;</code>
     * @return string
     */
    public function getImageBytes()
    {
        return $this->image_bytes;
    }

    /**
     * A byte string of a full image's color map.
     *
     * Generated from protobuf field <code>bytes image_bytes = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setImageBytes($var)
    {
        GPBUtil::checkString($var, False);
        $this->image_bytes = $var;

        return $this;
    }

}

