Class: Google::Apis::BigtableadminV2::Type
- Inherits:
-
Object
- Object
- Google::Apis::BigtableadminV2::Type
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/bigtableadmin_v2/classes.rb,
lib/google/apis/bigtableadmin_v2/representations.rb,
lib/google/apis/bigtableadmin_v2/representations.rb
Overview
Type represents the type of data that is written to, read from, or stored in
Bigtable. It is heavily based on the GoogleSQL standard to help maintain
familiarity and consistency across products and features. For compatibility
with Bigtable's existing untyped APIs, each Type includes an Encoding
which describes how to convert to or from the underlying data. Each encoding
can operate in one of two modes: - Sorted: In this mode, Bigtable guarantees
that Encode(X) <= Encode(Y) if and only if X <= Y. This is useful anywhere
sort order is important, for example when encoding keys. - Distinct: In this
mode, Bigtable guarantees that if X != Y then Encode(X) != Encode(Y).
However, the converse is not guaranteed. For example, both 'foo': '1', 'bar':
'2' and 'bar': '2', 'foo': '1' are valid encodings of the same JSON
value. The API clearly documents which mode is used wherever an encoding can
be configured. Each encoding also documents which values are supported in
which modes. For example, when encoding INT64 as a numeric STRING, negative
numbers cannot be encoded in sorted mode. This is because INT64(1) > INT64(-1)
, but STRING("-00001") > STRING("00001").
Instance Attribute Summary collapse
-
#aggregate_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeAggregate
A value that combines incremental updates into a summarized value.
-
#array_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeArray
An ordered list of elements of a given type.
-
#bool_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeBool
bool Values of type
Boolare stored inValue.bool_value. -
#bytes_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeBytes
Bytes Values of type
Bytesare stored inValue.bytes_value. -
#date_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeDate
Date Values of type
Dateare stored inValue.date_value. -
#enum_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeEnum
A protobuf enum type.
-
#float32_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeFloat32
Float32 Values of type
Float32are stored inValue.float_value. -
#float64_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeFloat64
Float64 Values of type
Float64are stored inValue.float_value. -
#geography_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeGeography
A geography type, representing a point or region on Earth.
-
#int32_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeInt32
Int32 Values of type
Int32are stored inValue.int_value. -
#int64_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeInt64
Int64 Values of type
Int64are stored inValue.int_value. -
#map_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeMap
A mapping of keys to values of a given type.
-
#proto_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeProto
A protobuf message type.
-
#string_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeString
String Values of type
Stringare stored inValue.string_value. -
#struct_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeStruct
A structured data value, consisting of fields which map to dynamically typed values.
-
#timestamp_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeTimestamp
Timestamp Values of type
Timestampare stored inValue.timestamp_value.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Type
constructor
A new instance of Type.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Type
Returns a new instance of Type.
4730 4731 4732 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4730 def initialize(**args) update!(**args) end |
Instance Attribute Details
#aggregate_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeAggregate
A value that combines incremental updates into a summarized value. Data is
never directly written or read using type Aggregate. Writes provide either
the input_type or state_type, and reads always return the state_type .
Corresponds to the JSON property aggregateType
4643 4644 4645 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4643 def aggregate_type @aggregate_type end |
#array_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeArray
An ordered list of elements of a given type. Values of type Array are stored
in Value.array_value.
Corresponds to the JSON property arrayType
4649 4650 4651 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4649 def array_type @array_type end |
#bool_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeBool
bool Values of type Bool are stored in Value.bool_value.
Corresponds to the JSON property boolType
4654 4655 4656 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4654 def bool_type @bool_type end |
#bytes_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeBytes
Bytes Values of type Bytes are stored in Value.bytes_value.
Corresponds to the JSON property bytesType
4659 4660 4661 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4659 def bytes_type @bytes_type end |
#date_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeDate
Date Values of type Date are stored in Value.date_value.
Corresponds to the JSON property dateType
4664 4665 4666 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4664 def date_type @date_type end |
#enum_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeEnum
A protobuf enum type. Values of type Enum are stored in Value.int_value.
Corresponds to the JSON property enumType
4669 4670 4671 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4669 def enum_type @enum_type end |
#float32_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeFloat32
Float32 Values of type Float32 are stored in Value.float_value.
Corresponds to the JSON property float32Type
4674 4675 4676 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4674 def float32_type @float32_type end |
#float64_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeFloat64
Float64 Values of type Float64 are stored in Value.float_value.
Corresponds to the JSON property float64Type
4679 4680 4681 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4679 def float64_type @float64_type end |
#geography_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeGeography
A geography type, representing a point or region on Earth. The value is stored
in Value.bytes_value as Well-Known Binary (WKB) bytes.
Corresponds to the JSON property geographyType
4685 4686 4687 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4685 def geography_type @geography_type end |
#int32_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeInt32
Int32 Values of type Int32 are stored in Value.int_value.
Corresponds to the JSON property int32Type
4690 4691 4692 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4690 def int32_type @int32_type end |
#int64_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeInt64
Int64 Values of type Int64 are stored in Value.int_value.
Corresponds to the JSON property int64Type
4695 4696 4697 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4695 def int64_type @int64_type end |
#map_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeMap
A mapping of keys to values of a given type. Values of type Map are stored
in a Value.array_value where each entry is another Value.array_value with
two elements (the key and the value, in that order). Normally encoded Map
values won't have repeated keys, however, clients are expected to handle the
case in which they do. If the same key appears multiple times, the last
value takes precedence.
Corresponds to the JSON property mapType
4705 4706 4707 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4705 def map_type @map_type end |
#proto_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeProto
A protobuf message type. Values of type Proto are stored in Value.
bytes_value.
Corresponds to the JSON property protoType
4711 4712 4713 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4711 def proto_type @proto_type end |
#string_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeString
String Values of type String are stored in Value.string_value.
Corresponds to the JSON property stringType
4716 4717 4718 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4716 def string_type @string_type end |
#struct_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeStruct
A structured data value, consisting of fields which map to dynamically typed
values. Values of type Struct are stored in Value.array_value where
entries are in the same order and number as field_types.
Corresponds to the JSON property structType
4723 4724 4725 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4723 def struct_type @struct_type end |
#timestamp_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeTimestamp
Timestamp Values of type Timestamp are stored in Value.timestamp_value.
Corresponds to the JSON property timestampType
4728 4729 4730 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4728 def @timestamp_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 4735 def update!(**args) @aggregate_type = args[:aggregate_type] if args.key?(:aggregate_type) @array_type = args[:array_type] if args.key?(:array_type) @bool_type = args[:bool_type] if args.key?(:bool_type) @bytes_type = args[:bytes_type] if args.key?(:bytes_type) @date_type = args[:date_type] if args.key?(:date_type) @enum_type = args[:enum_type] if args.key?(:enum_type) @float32_type = args[:float32_type] if args.key?(:float32_type) @float64_type = args[:float64_type] if args.key?(:float64_type) @geography_type = args[:geography_type] if args.key?(:geography_type) @int32_type = args[:int32_type] if args.key?(:int32_type) @int64_type = args[:int64_type] if args.key?(:int64_type) @map_type = args[:map_type] if args.key?(:map_type) @proto_type = args[:proto_type] if args.key?(:proto_type) @string_type = args[:string_type] if args.key?(:string_type) @struct_type = args[:struct_type] if args.key?(:struct_type) @timestamp_type = args[:timestamp_type] if args.key?(:timestamp_type) end |