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 => ::J0_a_a_b_a_a_o1},
  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 => ::J0_a_a_b_a_a_y3},
  AVAILABILITY => {:type => ::Thrift::Types::I32, :name => 'availability', :enum_class => ::J0_a_a_b_a_a_z1},
  INTERACTIONEVENTPARAMETER => {:type => ::Thrift::Types::I32, :name => 'interactionEventParameter'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 7715

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