Class: Thrift::Types::Service_definition::ServiceDefinition

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

Constant Summary collapse

NAME =
'ServiceDefinition'.freeze
NAMESPACE =
'types.service_definition'.freeze
LEGACY_ANNOTATIONS =
{
}.freeze
STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_INDEX_ANNOTATION =
1
THRIFT_FIELD_INDEX_EXTENDS_ =
2
THRIFT_FIELD_INDEX_FUNCTIONS =
3
THRIFT_FIELD_ANNOTATION_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_ANNOTATION_STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_EXTENDS__LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_EXTENDS__STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_FUNCTIONS_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_FUNCTIONS_STRUCTURED_ANNOTATIONS =
[
].freeze
FIELDS =
{
  THRIFT_FIELD_INDEX_ANNOTATION => {type: ::Thrift::Types::STRUCT, name: 'annotation', class: ::Thrift::Types::Annotation_definition::AnnotationDefinition, legacy_annotations: THRIFT_FIELD_ANNOTATION_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_ANNOTATION_STRUCTURED_ANNOTATIONS},
  THRIFT_FIELD_INDEX_EXTENDS_ => {type: ::Thrift::Types::STRUCT, name: 'extends_', class: ::Thrift::Thrift::Types::Core::Reference, optional: true, legacy_annotations: THRIFT_FIELD_EXTENDS__LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_EXTENDS__STRUCTURED_ANNOTATIONS},
  THRIFT_FIELD_INDEX_FUNCTIONS => {type: ::Thrift::Types::LIST, name: 'functions', element: {type: ::Thrift::Types::STRUCT, class: ::Thrift::Types::Service_definition::FunctionDefinition}, legacy_annotations: THRIFT_FIELD_FUNCTIONS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_FUNCTIONS_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



147
# File 'lib/thrift/types/service_definition/service_definition_types.rb', line 147

def struct_fields; FIELDS; end

#validateObject



149
150
151
152
# File 'lib/thrift/types/service_definition/service_definition_types.rb', line 149

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