<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/modelarmor/v1beta/service.proto

namespace Google\Cloud\ModelArmor\V1beta;

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

/**
 * Represents Byte Data item.
 *
 * Generated from protobuf message <code>google.cloud.modelarmor.v1beta.ByteDataItem</code>
 */
class ByteDataItem extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The type of byte data
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.ByteDataItem.ByteItemType byte_data_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $byte_data_type = 0;
    /**
     * Required. Bytes Data
     *
     * Generated from protobuf field <code>bytes byte_data = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $byte_data = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $byte_data_type
     *           Required. The type of byte data
     *     @type string $byte_data
     *           Required. Bytes Data
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Modelarmor\V1Beta\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The type of byte data
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.ByteDataItem.ByteItemType byte_data_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getByteDataType()
    {
        return $this->byte_data_type;
    }

    /**
     * Required. The type of byte data
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.ByteDataItem.ByteItemType byte_data_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setByteDataType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ModelArmor\V1beta\ByteDataItem\ByteItemType::class);
        $this->byte_data_type = $var;

        return $this;
    }

    /**
     * Required. Bytes Data
     *
     * Generated from protobuf field <code>bytes byte_data = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getByteData()
    {
        return $this->byte_data;
    }

    /**
     * Required. Bytes Data
     *
     * Generated from protobuf field <code>bytes byte_data = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setByteData($var)
    {
        GPBUtil::checkString($var, False);
        $this->byte_data = $var;

        return $this;
    }

}

