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

namespace Google\Cloud\AIPlatform\V1\BatchPredictionJob;

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

/**
 * Configures the input to [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
 * See [Model.supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] for Model's supported input
 * formats, and how instances should be expressed via any of them.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig</code>
 */
class InputConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The format in which instances are given, must be one of the
     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
     *
     * Generated from protobuf field <code>string instances_format = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $instances_format = '';
    protected $source;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\GcsSource $gcs_source
     *           The Cloud Storage location for the input instances.
     *     @type \Google\Cloud\AIPlatform\V1\BigQuerySource $bigquery_source
     *           The BigQuery location of the input table.
     *           The schema of the table should be in the format described by the given
     *           context OpenAPI Schema, if one is provided. The table may contain
     *           additional columns that are not described by the schema, and they will
     *           be ignored.
     *     @type string $instances_format
     *           Required. The format in which instances are given, must be one of the
     *           [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
     *           [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\BatchPredictionJob::initOnce();
        parent::__construct($data);
    }

    /**
     * The Cloud Storage location for the input instances.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GcsSource gcs_source = 2;</code>
     * @return \Google\Cloud\AIPlatform\V1\GcsSource|null
     */
    public function getGcsSource()
    {
        return $this->readOneof(2);
    }

    public function hasGcsSource()
    {
        return $this->hasOneof(2);
    }

    /**
     * The Cloud Storage location for the input instances.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GcsSource gcs_source = 2;</code>
     * @param \Google\Cloud\AIPlatform\V1\GcsSource $var
     * @return $this
     */
    public function setGcsSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GcsSource::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * The BigQuery location of the input table.
     * The schema of the table should be in the format described by the given
     * context OpenAPI Schema, if one is provided. The table may contain
     * additional columns that are not described by the schema, and they will
     * be ignored.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3;</code>
     * @return \Google\Cloud\AIPlatform\V1\BigQuerySource|null
     */
    public function getBigquerySource()
    {
        return $this->readOneof(3);
    }

    public function hasBigquerySource()
    {
        return $this->hasOneof(3);
    }

    /**
     * The BigQuery location of the input table.
     * The schema of the table should be in the format described by the given
     * context OpenAPI Schema, if one is provided. The table may contain
     * additional columns that are not described by the schema, and they will
     * be ignored.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3;</code>
     * @param \Google\Cloud\AIPlatform\V1\BigQuerySource $var
     * @return $this
     */
    public function setBigquerySource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\BigQuerySource::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Required. The format in which instances are given, must be one of the
     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
     *
     * Generated from protobuf field <code>string instances_format = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getInstancesFormat()
    {
        return $this->instances_format;
    }

    /**
     * Required. The format in which instances are given, must be one of the
     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
     *
     * Generated from protobuf field <code>string instances_format = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setInstancesFormat($var)
    {
        GPBUtil::checkString($var, True);
        $this->instances_format = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getSource()
    {
        return $this->whichOneof("source");
    }

}


