Class: Thrift::Types::Annotation_definition::AnnotationDefinition

Inherits:
Object
  • Object
show all
Includes:
Struct, Struct_Union
Defined in:
lib/thrift/types/annotation_definition/annotation_definition_types.rb,
lib/thrift/types/annotation_definition/annotation_definition_types.rb

Constant Summary collapse

NAME =
'AnnotationDefinition'.freeze
NAMESPACE =
'types.annotation_definition'.freeze
LEGACY_ANNOTATIONS =
{
}.freeze
STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_INDEX_NAME =
1
THRIFT_FIELD_INDEX_STRUCTURED_ANNOTATIONS =
2
THRIFT_FIELD_INDEX_LEGACY_ANNOTATIONS =
3
THRIFT_FIELD_NAME_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_NAME_STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_STRUCTURED_ANNOTATIONS_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_STRUCTURED_ANNOTATIONS_STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_LEGACY_ANNOTATIONS_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_LEGACY_ANNOTATIONS_STRUCTURED_ANNOTATIONS =
[
].freeze
FIELDS =
{
  THRIFT_FIELD_INDEX_NAME => {type: ::Thrift::Types::STRING, name: 'name', legacy_annotations: THRIFT_FIELD_NAME_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_NAME_STRUCTURED_ANNOTATIONS},
  THRIFT_FIELD_INDEX_STRUCTURED_ANNOTATIONS => {type: ::Thrift::Types::LIST, name: 'structured_annotations', element: {type: ::Thrift::Types::STRUCT, class: ::Thrift::Types::Annotation_definition::StructuredAnnotationDefinition}, legacy_annotations: THRIFT_FIELD_STRUCTURED_ANNOTATIONS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_STRUCTURED_ANNOTATIONS_STRUCTURED_ANNOTATIONS},
  THRIFT_FIELD_INDEX_LEGACY_ANNOTATIONS => {type: ::Thrift::Types::MAP, name: 'legacy_annotations', key: {type: ::Thrift::Types::STRING}, value: {type: ::Thrift::Types::STRING}, legacy_annotations: THRIFT_FIELD_LEGACY_ANNOTATIONS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_LEGACY_ANNOTATIONS_STRUCTURED_ANNOTATIONS}
}.freeze

Constants included from Struct_Union

Struct_Union::CONTAINER_TYPES

Instance Method Summary collapse

Methods included from Struct

#<=>, #==, append_features, #differences, #eql?, field_accessor, #fields_with_default_values, generate_accessors, #hash, #initialize, #inspect, qmark_isset_method, #read, #write

Methods included from Struct_Union

#each_field, #field_info, #inspect_collection, #inspect_field, #is_container?, #name_to_id, #read_field, #sorted_field_ids, #write_container, #write_data

Instance Method Details

#struct_fieldsObject



102
# File 'lib/thrift/types/annotation_definition/annotation_definition_types.rb', line 102

def struct_fields; FIELDS; end

#validateObject



104
105
106
107
108
# File 'lib/thrift/types/annotation_definition/annotation_definition_types.rb', line 104

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field structured_annotations is unset!') unless @structured_annotations
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field legacy_annotations is unset!') unless @legacy_annotations
end