15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TABLE_CONFIG_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TABLE_CONFIG_H
18#include "google/cloud/bigtable/column_family.h"
19#include "google/cloud/bigtable/version.h"
20#include <google/bigtable/admin/v2/bigtable_table_admin.pb.h>
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
35 std::vector<std::string> initial_splits)
36 : column_families_(std::move(column_families)),
37 initial_splits_(std::move(initial_splits)),
46 using TimestampGranularity =
47 ::
google::bigtable::admin::v2::Table::TimestampGranularity;
49 constexpr static TimestampGranularity
MILLIS =
50 ::
google::bigtable::admin::v2::Table::MILLIS;
53 ::
google::bigtable::admin::v2::Table::TIMESTAMP_GRANULARITY_UNSPECIFIED;
58 return column_families_;
61 column_families_.emplace(std::move(column_family_name), std::move(gc_rule));
65 return initial_splits_;
68 initial_splits_.emplace_back(std::move(split));
72
73
74
75
76
77
81
82
83
84
85
86
87
89 granularity_ = new_value;
94 std::map<std::string,
GcRule> column_families_;
95 std::vector<std::string> initial_splits_;
96 ::
google::bigtable::admin::v2::Table::TimestampGranularity granularity_;
99GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Implement a thin wrapper around google::bigtable::admin::v2::GcRule.
Definition: column_family.h:36
Specify the initial schema for a new table.
Definition: table_config.h:30
::google::bigtable::admin::v2::CreateTableRequest as_proto() &&
Move the contents to the proto to create tables.
TableConfig()
Definition: table_config.h:32
void add_initial_split(std::string split)
Return the timestamp granularity parameter.
Definition: table_config.h:67
static constexpr TimestampGranularity MILLIS
Definition: table_config.h:49
TimestampGranularity timestamp_granularity() const
Return the timestamp granularity parameter.
Definition: table_config.h:78
TableConfig(std::map< std::string, GcRule > column_families, std::vector< std::string > initial_splits)
Definition: table_config.h:34
std::vector< std::string > const & initial_splits() const
Return the timestamp granularity parameter.
Definition: table_config.h:64
void set_timestamp_granularity(TimestampGranularity new_value)
Set the timestamp granularity parameter.
Definition: table_config.h:88
std::map< std::string, GcRule > const & column_families() const
Return the timestamp granularity parameter.
Definition: table_config.h:57
void add_column_family(std::string column_family_name, GcRule gc_rule)
Return the timestamp granularity parameter.
Definition: table_config.h:60
static constexpr TimestampGranularity TIMESTAMP_GRANULARITY_UNSPECIFIED
Definition: table_config.h:52
Contains all the Cloud Bigtable C++ client APIs.
Definition: admin_client.h:28