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

namespace Google\Cloud\AlloyDb\V1beta;

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

/**
 * Message for metadata that is specific to BatchCreateInstances API.
 * NEXT_ID: 3
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1beta.BatchCreateInstancesMetadata</code>
 */
class BatchCreateInstancesMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * The instances being created in the API call. Each string in this list
     * is the server defined resource path for target instances in the request
     * and for the format of each string, see the comment on the Instance.name
     * field.
     *
     * Generated from protobuf field <code>repeated string instance_targets = 1;</code>
     */
    private $instance_targets;
    /**
     * A map representing state of the instances involved in the
     * BatchCreateInstances operation during the operation execution.
     * The instance state will be in STATE_UNSPECIFIED state if the instance has
     * not yet been picked up for processing.
     * The key of the map is the name of the instance resource.
     * For the format, see the comment on the Instance.name field.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.alloydb.v1beta.BatchCreateInstanceStatus> instance_statuses = 2;</code>
     */
    private $instance_statuses;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $instance_targets
     *           The instances being created in the API call. Each string in this list
     *           is the server defined resource path for target instances in the request
     *           and for the format of each string, see the comment on the Instance.name
     *           field.
     *     @type array|\Google\Protobuf\Internal\MapField $instance_statuses
     *           A map representing state of the instances involved in the
     *           BatchCreateInstances operation during the operation execution.
     *           The instance state will be in STATE_UNSPECIFIED state if the instance has
     *           not yet been picked up for processing.
     *           The key of the map is the name of the instance resource.
     *           For the format, see the comment on the Instance.name field.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1Beta\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * The instances being created in the API call. Each string in this list
     * is the server defined resource path for target instances in the request
     * and for the format of each string, see the comment on the Instance.name
     * field.
     *
     * Generated from protobuf field <code>repeated string instance_targets = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInstanceTargets()
    {
        return $this->instance_targets;
    }

    /**
     * The instances being created in the API call. Each string in this list
     * is the server defined resource path for target instances in the request
     * and for the format of each string, see the comment on the Instance.name
     * field.
     *
     * Generated from protobuf field <code>repeated string instance_targets = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setInstanceTargets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->instance_targets = $arr;

        return $this;
    }

    /**
     * A map representing state of the instances involved in the
     * BatchCreateInstances operation during the operation execution.
     * The instance state will be in STATE_UNSPECIFIED state if the instance has
     * not yet been picked up for processing.
     * The key of the map is the name of the instance resource.
     * For the format, see the comment on the Instance.name field.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.alloydb.v1beta.BatchCreateInstanceStatus> instance_statuses = 2;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getInstanceStatuses()
    {
        return $this->instance_statuses;
    }

    /**
     * A map representing state of the instances involved in the
     * BatchCreateInstances operation during the operation execution.
     * The instance state will be in STATE_UNSPECIFIED state if the instance has
     * not yet been picked up for processing.
     * The key of the map is the name of the instance resource.
     * For the format, see the comment on the Instance.name field.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.alloydb.v1beta.BatchCreateInstanceStatus> instance_statuses = 2;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setInstanceStatuses($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AlloyDb\V1beta\BatchCreateInstanceStatus::class);
        $this->instance_statuses = $arr;

        return $this;
    }

}

