Class: Square

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

Constant Summary collapse

MID =
1
NAME =
2
WELCOMEMESSAGE =
3
PROFILEIMAGEOBSHASH =
4
DESC =
5
SEARCHABLE =
6
TYPE =
7
CATEGORYID =
8
INVITATIONURL =
9
REVISION =
10
ABLETOUSEINVITATIONTICKET =
11
STATE =
12
EMBLEMS =
13
JOINMETHOD =
14
FIELDS =
{
  MID => {:type => ::Thrift::Types::STRING, :name => 'mid'},
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
  WELCOMEMESSAGE => {:type => ::Thrift::Types::STRING, :name => 'welcomeMessage'},
  PROFILEIMAGEOBSHASH => {:type => ::Thrift::Types::STRING, :name => 'profileImageObsHash'},
  DESC => {:type => ::Thrift::Types::STRING, :name => 'desc'},
  SEARCHABLE => {:type => ::Thrift::Types::BOOL, :name => 'searchable'},
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Com_linecorp_square_protocol_thrift_common_SquareType},
  CATEGORYID => {:type => ::Thrift::Types::I32, :name => 'categoryId'},
  INVITATIONURL => {:type => ::Thrift::Types::STRING, :name => 'invitationURL'},
  REVISION => {:type => ::Thrift::Types::I64, :name => 'revision'},
  ABLETOUSEINVITATIONTICKET => {:type => ::Thrift::Types::BOOL, :name => 'ableToUseInvitationTicket'},
  STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::Com_linecorp_square_protocol_thrift_common_SquareState},
  EMBLEMS => {:type => ::Thrift::Types::LIST, :name => 'emblems', :element => {:type => ::Thrift::Types::I32, :enum_class => ::Com_linecorp_square_protocol_thrift_common_SquareEmblem}, :optional => true},
  JOINMETHOD => {:type => ::Thrift::Types::STRUCT, :name => 'joinMethod', :class => ::SquareJoinMethod, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



9691
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 9691

def struct_fields; FIELDS; end

#validateObject



9693
9694
9695
9696
9697
9698
9699
9700
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 9693

def validate
  unless @type.nil? || ::Com_linecorp_square_protocol_thrift_common_SquareType::VALID_VALUES.include?(@type)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
  end
  unless @state.nil? || ::Com_linecorp_square_protocol_thrift_common_SquareState::VALID_VALUES.include?(@state)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
  end
end