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

namespace Google\Cloud\Vision\V1;

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

/**
 * Request for async image annotation for a list of images.
 *
 * Generated from protobuf message <code>google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest</code>
 */
class AsyncBatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Individual image annotation requests for this batch.
     *
     * Generated from protobuf field <code>repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $requests;
    /**
     * Required. The desired output location and metadata (e.g. format).
     *
     * Generated from protobuf field <code>.google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $output_config = null;
    /**
     * Optional. Target project and location to make a call.
     * Format: `projects/{project-id}/locations/{location-id}`.
     * If no parent is specified, a region will be chosen automatically.
     * Supported location-ids:
     *     `us`: USA country only,
     *     `asia`: East asia areas, like Japan, Taiwan,
     *     `eu`: The European Union.
     * Example: `projects/project-A/locations/eu`.
     *
     * Generated from protobuf field <code>string parent = 4;</code>
     */
    private $parent = '';
    /**
     * Optional. The labels with user-defined metadata for the request.
     * Label keys and values can be no longer than 63 characters
     * (Unicode codepoints), can only contain lowercase letters, numeric
     * characters, underscores and dashes. International characters are allowed.
     * Label values are optional. Label keys must start with a letter.
     *
     * Generated from protobuf field <code>map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $labels;

    /**
     * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests     Required. Individual image annotation requests for this batch.
     * @param \Google\Cloud\Vision\V1\OutputConfig           $outputConfig Required. The desired output location and metadata (e.g. format).
     *
     * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesRequest
     *
     * @experimental
     */
    public static function build(array $requests, \Google\Cloud\Vision\V1\OutputConfig $outputConfig): self
    {
        return (new self())
            ->setRequests($requests)
            ->setOutputConfig($outputConfig);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $requests
     *           Required. Individual image annotation requests for this batch.
     *     @type \Google\Cloud\Vision\V1\OutputConfig $output_config
     *           Required. The desired output location and metadata (e.g. format).
     *     @type string $parent
     *           Optional. Target project and location to make a call.
     *           Format: `projects/{project-id}/locations/{location-id}`.
     *           If no parent is specified, a region will be chosen automatically.
     *           Supported location-ids:
     *               `us`: USA country only,
     *               `asia`: East asia areas, like Japan, Taiwan,
     *               `eu`: The European Union.
     *           Example: `projects/project-A/locations/eu`.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Optional. The labels with user-defined metadata for the request.
     *           Label keys and values can be no longer than 63 characters
     *           (Unicode codepoints), can only contain lowercase letters, numeric
     *           characters, underscores and dashes. International characters are allowed.
     *           Label values are optional. Label keys must start with a letter.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Individual image annotation requests for this batch.
     *
     * Generated from protobuf field <code>repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRequests()
    {
        return $this->requests;
    }

    /**
     * Required. Individual image annotation requests for this batch.
     *
     * Generated from protobuf field <code>repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRequests($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageRequest::class);
        $this->requests = $arr;

        return $this;
    }

    /**
     * Required. The desired output location and metadata (e.g. format).
     *
     * Generated from protobuf field <code>.google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Vision\V1\OutputConfig|null
     */
    public function getOutputConfig()
    {
        return $this->output_config;
    }

    public function hasOutputConfig()
    {
        return isset($this->output_config);
    }

    public function clearOutputConfig()
    {
        unset($this->output_config);
    }

    /**
     * Required. The desired output location and metadata (e.g. format).
     *
     * Generated from protobuf field <code>.google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Vision\V1\OutputConfig $var
     * @return $this
     */
    public function setOutputConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class);
        $this->output_config = $var;

        return $this;
    }

    /**
     * Optional. Target project and location to make a call.
     * Format: `projects/{project-id}/locations/{location-id}`.
     * If no parent is specified, a region will be chosen automatically.
     * Supported location-ids:
     *     `us`: USA country only,
     *     `asia`: East asia areas, like Japan, Taiwan,
     *     `eu`: The European Union.
     * Example: `projects/project-A/locations/eu`.
     *
     * Generated from protobuf field <code>string parent = 4;</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Optional. Target project and location to make a call.
     * Format: `projects/{project-id}/locations/{location-id}`.
     * If no parent is specified, a region will be chosen automatically.
     * Supported location-ids:
     *     `us`: USA country only,
     *     `asia`: East asia areas, like Japan, Taiwan,
     *     `eu`: The European Union.
     * Example: `projects/project-A/locations/eu`.
     *
     * Generated from protobuf field <code>string parent = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Optional. The labels with user-defined metadata for the request.
     * Label keys and values can be no longer than 63 characters
     * (Unicode codepoints), can only contain lowercase letters, numeric
     * characters, underscores and dashes. International characters are allowed.
     * Label values are optional. Label keys must start with a letter.
     *
     * Generated from protobuf field <code>map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Optional. The labels with user-defined metadata for the request.
     * Label keys and values can be no longer than 63 characters
     * (Unicode codepoints), can only contain lowercase letters, numeric
     * characters, underscores and dashes. International characters are allowed.
     * Label values are optional. Label keys must start with a letter.
     *
     * Generated from protobuf field <code>map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

}

