Class: Thrift::Types::Type_definition::TypeDefinition
- Inherits:
-
Union
- Object
- Union
- Thrift::Types::Type_definition::TypeDefinition
show all
- Includes:
- Struct_Union
- Defined in:
- lib/thrift/types/type_definition/type_definition_types.rb,
lib/thrift/types/type_definition/type_definition_types.rb
Constant Summary
collapse
- NAME =
'TypeDefinition'.freeze
- NAMESPACE =
'types.type_definition'.freeze
- LEGACY_ANNOTATIONS =
{
}.freeze
- STRUCTURED_ANNOTATIONS =
[
].freeze
- THRIFT_FIELD_INDEX_SCALAR_TYPE =
1
- THRIFT_FIELD_INDEX_LIST_TYPE =
2
- THRIFT_FIELD_INDEX_MAP_TYPE =
3
- THRIFT_FIELD_INDEX_SET_TYPE =
4
- THRIFT_FIELD_INDEX_REFERENCE_TYPE =
8
- THRIFT_FIELD_SCALAR_TYPE_LEGACY_ANNOTATIONS =
{
}.freeze
- THRIFT_FIELD_SCALAR_TYPE_STRUCTURED_ANNOTATIONS =
[
].freeze
- THRIFT_FIELD_LIST_TYPE_LEGACY_ANNOTATIONS =
{
}.freeze
- THRIFT_FIELD_LIST_TYPE_STRUCTURED_ANNOTATIONS =
[
].freeze
- THRIFT_FIELD_MAP_TYPE_LEGACY_ANNOTATIONS =
{
}.freeze
- THRIFT_FIELD_MAP_TYPE_STRUCTURED_ANNOTATIONS =
[
].freeze
- THRIFT_FIELD_SET_TYPE_LEGACY_ANNOTATIONS =
{
}.freeze
- THRIFT_FIELD_SET_TYPE_STRUCTURED_ANNOTATIONS =
[
].freeze
- THRIFT_FIELD_REFERENCE_TYPE_LEGACY_ANNOTATIONS =
{
}.freeze
- THRIFT_FIELD_REFERENCE_TYPE_STRUCTURED_ANNOTATIONS =
[
].freeze
- FIELDS =
{
THRIFT_FIELD_INDEX_SCALAR_TYPE => {type: ::Thrift::Types::I32, name: 'scalar_type', optional: true, enum_class: ::Thrift::Types::Type_definition::ScalarType, legacy_annotations: THRIFT_FIELD_SCALAR_TYPE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_SCALAR_TYPE_STRUCTURED_ANNOTATIONS},
THRIFT_FIELD_INDEX_LIST_TYPE => {type: ::Thrift::Types::STRUCT, name: 'list_type', class: ::Thrift::Types::Type_definition::ListTypeDefinition, optional: true, legacy_annotations: THRIFT_FIELD_LIST_TYPE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_LIST_TYPE_STRUCTURED_ANNOTATIONS},
THRIFT_FIELD_INDEX_MAP_TYPE => {type: ::Thrift::Types::STRUCT, name: 'map_type', class: ::Thrift::Types::Type_definition::MapTypeDefinition, optional: true, legacy_annotations: THRIFT_FIELD_MAP_TYPE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_MAP_TYPE_STRUCTURED_ANNOTATIONS},
THRIFT_FIELD_INDEX_SET_TYPE => {type: ::Thrift::Types::STRUCT, name: 'set_type', class: ::Thrift::Types::Type_definition::SetTypeDefinition, optional: true, legacy_annotations: THRIFT_FIELD_SET_TYPE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_SET_TYPE_STRUCTURED_ANNOTATIONS},
THRIFT_FIELD_INDEX_REFERENCE_TYPE => {type: ::Thrift::Types::STRUCT, name: 'reference_type', class: ::Thrift::Thrift::Types::Core::Reference, optional: true, legacy_annotations: THRIFT_FIELD_REFERENCE_TYPE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_REFERENCE_TYPE_STRUCTURED_ANNOTATIONS}
}.freeze
Struct_Union::CONTAINER_TYPES
Class Method Summary
collapse
Instance Method Summary
collapse
#each_field, #field_info, #inspect_collection, #inspect_field, #is_container?, #name_to_id, #read_field, #sorted_field_ids, #write_container, #write_data
Methods inherited from Union
#<=>, #==, field_accessor, generate_accessors, #get_set_field, #get_value, #hash, #initialize, #inspect, qmark_isset_method, #read, #write
Constructor Details
This class inherits a constructor from Thrift::Union
Class Method Details
.list_type(val) ⇒ Object
166
167
168
|
# File 'lib/thrift/types/type_definition/type_definition_types.rb', line 166
def list_type(val)
TypeDefinition.new(:list_type, val)
end
|
.map_type(val) ⇒ Object
170
171
172
|
# File 'lib/thrift/types/type_definition/type_definition_types.rb', line 170
def map_type(val)
TypeDefinition.new(:map_type, val)
end
|
.reference_type(val) ⇒ Object
178
179
180
|
# File 'lib/thrift/types/type_definition/type_definition_types.rb', line 178
def reference_type(val)
TypeDefinition.new(:reference_type, val)
end
|
.scalar_type(val) ⇒ Object
162
163
164
|
# File 'lib/thrift/types/type_definition/type_definition_types.rb', line 162
def scalar_type(val)
TypeDefinition.new(:scalar_type, val)
end
|
.set_type(val) ⇒ Object
174
175
176
|
# File 'lib/thrift/types/type_definition/type_definition_types.rb', line 174
def set_type(val)
TypeDefinition.new(:set_type, val)
end
|
Instance Method Details
#struct_fields ⇒ Object
227
|
# File 'lib/thrift/types/type_definition/type_definition_types.rb', line 227
def struct_fields; FIELDS; end
|