Class: Twitter::Thrift::ServiceInstance

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/gen-rb/thrift.rb,
lib/gen-rb/endpoint_types.rb

Constant Summary collapse

SERVICEENDPOINT =
1
ADDITIONALENDPOINTS =
2
STATUS =
3
FIELDS =
{
  SERVICEENDPOINT => {:type => ::Thrift::Types::STRUCT, :name => 'serviceEndpoint', :class => Twitter::Thrift::Endpoint},
  ADDITIONALENDPOINTS => {:type => ::Thrift::Types::MAP, :name => 'additionalEndpoints', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => Twitter::Thrift::Endpoint}},
  STATUS => {:type => ::Thrift::Types::I32, :name => 'status', :enum_class => Twitter::Thrift::Status}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



53
# File 'lib/gen-rb/thrift.rb', line 53

def struct_fields; FIELDS; end

#validateObject



55
56
57
58
59
# File 'lib/gen-rb/thrift.rb', line 55

def validate
  unless @status.nil? || Twitter::Thrift::Status::VALID_VALUES.include?(@status)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field status!')
  end
end