Class: ProductSearchSummary

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

ID =
1
TYPE =
2
NAME =
3
AUTHOR =
4
PROMOTIONINFO =
5
VERSION =
6
NEWFLAG =
7
PRICETIER =
8
PRICEINLINECOIN =
9
PROPERTY =
10
SUBTYPE =
11
ONSALE =
12
AVAILABLEFORPRESENT =
13
AVAILABLEFORPURCHASE =
14
VALIDDAYS =
15
AUTHORID =
16
BARGAINFLAG =
17
18
AVAILABILITY =
19
INTERACTIONEVENTPARAMETER =
20
FIELDS =
{
  ID => {:type => ::Thrift::Types::BYTE, :name => 'id'},
  TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'},
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
  AUTHOR => {:type => ::Thrift::Types::I32, :name => 'author', :enum_class => ::P0_a_a_b_a_a_i1},
  PROMOTIONINFO => {:type => ::Thrift::Types::BOOL, :name => 'promotionInfo'},
  VERSION => {:type => ::Thrift::Types::BOOL, :name => 'version'},
  NEWFLAG => {:type => ::Thrift::Types::BOOL, :name => 'newFlag'},
  PRICETIER => {:type => ::Thrift::Types::STRING, :name => 'priceTier'},
  PRICEINLINECOIN => {:type => ::Thrift::Types::STRING, :name => 'priceInLineCoin'},
  PROPERTY => {:type => ::Thrift::Types::STRING, :name => 'property'},
  SUBTYPE => {:type => ::Thrift::Types::STRING, :name => 'subType'},
  ONSALE => {:type => ::Thrift::Types::BOOL, :name => 'onSale'},
  AVAILABLEFORPRESENT => {:type => ::Thrift::Types::BOOL, :name => 'availableForPresent'},
  AVAILABLEFORPURCHASE => {:type => ::Thrift::Types::BOOL, :name => 'availableForPurchase'},
  VALIDDAYS => {:type => ::Thrift::Types::I32, :name => 'validDays'},
  AUTHORID => {:type => ::Thrift::Types::STRUCT, :name => 'authorId', :class => ::PromotionInfo},
  BARGAINFLAG => {:type => ::Thrift::Types::STRUCT, :name => 'bargainFlag', :class => ::ProductProperty},
  COPYRIGHT => {:type => ::Thrift::Types::I32, :name => 'copyright', :enum_class => ::P0_a_a_b_a_a_t3},
  AVAILABILITY => {:type => ::Thrift::Types::I32, :name => 'availability', :enum_class => ::P0_a_a_b_a_a_t1},
  INTERACTIONEVENTPARAMETER => {:type => ::Thrift::Types::I32, :name => 'interactionEventParameter'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 9279

def validate
  unless @author.nil? || ::P0_a_a_b_a_a_i1::VALID_VALUES.include?(@author)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field author!')
  end
  unless @copyright.nil? || ::P0_a_a_b_a_a_t3::VALID_VALUES.include?(@copyright)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field copyright!')
  end
  unless @availability.nil? || ::P0_a_a_b_a_a_t1::VALID_VALUES.include?(@availability)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field availability!')
  end
end