15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INSTANCE_CONFIG_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INSTANCE_CONFIG_H
18#include "google/cloud/bigtable/cluster_config.h"
19#include "google/cloud/bigtable/version.h"
20#include <google/bigtable/admin/v2/bigtable_instance_admin.pb.h>
21#include <google/bigtable/admin/v2/common.pb.h>
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
34 proto_.set_instance_id(std::move(instance_id));
35 proto_.mutable_instance()->set_display_name(std::move(display_name));
36 for (
auto& kv : clusters) {
37 (*proto_.mutable_clusters())[kv.first] = std::move(kv.second)
.as_proto();
42 using InstanceType = ::
google::bigtable::admin::v2::Instance::Type;
45 google::bigtable::admin::v2::Instance::TYPE_UNSPECIFIED;
48 google::bigtable::admin::v2::Instance::PRODUCTION;
51 google::bigtable::admin::v2::Instance::DEVELOPMENT;
55 proto_.mutable_instance()->set_type(type);
60 std::string
const& value) {
61 (*proto_.mutable_instance()->mutable_labels())[key] = value;
66 (*proto_.mutable_instance()->mutable_labels())[key] = std::move(value);
71 google::bigtable::admin::v2::CreateInstanceRequest
const&
as_proto()
const& {
76 google::bigtable::admin::v2::CreateInstanceRequest&&
as_proto() && {
77 return std::move(proto_);
81 google::bigtable::admin::v2::CreateInstanceRequest proto_;
84GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Specify the initial configuration for a new cluster.
Definition: cluster_config.h:28
google::bigtable::admin::v2::Cluster && as_proto() &&
Definition: cluster_config.h:66
Specify the initial configuration for a new instance.
Definition: instance_config.h:30
InstanceConfig & emplace_label(std::string const &key, std::string value)
Definition: instance_config.h:65
static constexpr InstanceType TYPE_UNSPECIFIED
Definition: instance_config.h:44
static constexpr InstanceType DEVELOPMENT
Definition: instance_config.h:50
InstanceConfig & insert_label(std::string const &key, std::string const &value)
Definition: instance_config.h:59
static constexpr InstanceType PRODUCTION
Definition: instance_config.h:47
InstanceConfig(std::string instance_id, std::string display_name, std::map< std::string, ClusterConfig > clusters)
Definition: instance_config.h:32
google::bigtable::admin::v2::CreateInstanceRequest && as_proto() &&
Definition: instance_config.h:76
InstanceConfig & set_type(InstanceType type)
Definition: instance_config.h:54
google::bigtable::admin::v2::CreateInstanceRequest const & as_proto() const &
Definition: instance_config.h:71
Contains all the Cloud Bigtable C++ client APIs.
Definition: admin_client.h:28