Class: Types::Service_definition::FunctionDefinition

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

Constant Summary collapse

NAME =
'FunctionDefinition'.freeze
NAMESPACE =
'types.service_definition'.freeze
LEGACY_ANNOTATIONS =
{
}.freeze
STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_INDEX_ANNOTATION =
1
THRIFT_FIELD_INDEX_ARGUMENTS =
2
THRIFT_FIELD_INDEX_RETURN_TYPE =
3
THRIFT_FIELD_INDEX_EXCEPTIONS =
4
THRIFT_FIELD_INDEX_ONEWAY_ =
5
THRIFT_FIELD_INDEX_SINK_TYPE =
6
THRIFT_FIELD_INDEX_STREAM_TYPE =
7
THRIFT_FIELD_ANNOTATION_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_ANNOTATION_STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_ARGUMENTS_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_ARGUMENTS_STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_RETURN_TYPE_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_RETURN_TYPE_STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_EXCEPTIONS_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_EXCEPTIONS_STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_ONEWAY__LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_ONEWAY__STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_SINK_TYPE_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_SINK_TYPE_STRUCTURED_ANNOTATIONS =
[
].freeze
THRIFT_FIELD_STREAM_TYPE_LEGACY_ANNOTATIONS =
{
}.freeze
THRIFT_FIELD_STREAM_TYPE_STRUCTURED_ANNOTATIONS =
[
].freeze
FIELDS =
{
  THRIFT_FIELD_INDEX_ANNOTATION => {type: ::Thrift::Types::STRUCT, name: 'annotation', class: ::Types::Annotation_definition::AnnotationDefinition, legacy_annotations: THRIFT_FIELD_ANNOTATION_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_ANNOTATION_STRUCTURED_ANNOTATIONS},
  THRIFT_FIELD_INDEX_ARGUMENTS => {type: ::Thrift::Types::LIST, name: 'arguments', element: {type: ::Thrift::Types::STRUCT, class: ::Types::Struct_definition::FieldDefinition}, legacy_annotations: THRIFT_FIELD_ARGUMENTS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_ARGUMENTS_STRUCTURED_ANNOTATIONS},
  THRIFT_FIELD_INDEX_RETURN_TYPE => {type: ::Thrift::Types::STRUCT, name: 'return_type', class: ::Types::Type_definition::TypeDefinition, legacy_annotations: THRIFT_FIELD_RETURN_TYPE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_RETURN_TYPE_STRUCTURED_ANNOTATIONS},
  THRIFT_FIELD_INDEX_EXCEPTIONS => {type: ::Thrift::Types::LIST, name: 'exceptions', element: {type: ::Thrift::Types::STRUCT, class: ::Thrift::Types::Core::Reference}, legacy_annotations: THRIFT_FIELD_EXCEPTIONS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_EXCEPTIONS_STRUCTURED_ANNOTATIONS},
  THRIFT_FIELD_INDEX_ONEWAY_ => {type: ::Thrift::Types::BOOL, name: 'oneway_', legacy_annotations: THRIFT_FIELD_ONEWAY__LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_ONEWAY__STRUCTURED_ANNOTATIONS},
  THRIFT_FIELD_INDEX_SINK_TYPE => {type: ::Thrift::Types::STRUCT, name: 'sink_type', class: ::Types::Type_definition::TypeDefinition, optional: true, legacy_annotations: THRIFT_FIELD_SINK_TYPE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_SINK_TYPE_STRUCTURED_ANNOTATIONS},
  THRIFT_FIELD_INDEX_STREAM_TYPE => {type: ::Thrift::Types::STRUCT, name: 'stream_type', class: ::Types::Type_definition::TypeDefinition, optional: true, legacy_annotations: THRIFT_FIELD_STREAM_TYPE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_STREAM_TYPE_STRUCTURED_ANNOTATIONS}
}.freeze

Constants included from Thrift::Struct_Union

Thrift::Struct_Union::CONTAINER_TYPES

Instance Method Summary collapse

Methods included from Thrift::Struct

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

Methods included from Thrift::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



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

def struct_fields; FIELDS; end

#validateObject



94
95
96
97
98
99
100
# File 'lib/types/service_definition/service_definition_types.rb', line 94

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 arguments is unset!') unless @arguments
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field return_type is unset!') unless @return_type
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field exceptions is unset!') unless @exceptions
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field oneway_ is unset!') if @oneway_.nil?
end