Class: Notification

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

Constant Summary collapse

NOTIFICATIONID =
1
GATEWAYID =
2
TITLE =
3
NOTIFICATIONMESSAGE =
4
CREATIONTIME =
5
PUBLISHEDTIME =
6
EXPIRATIONTIME =
7
PRIORITY =
8
FIELDS =
{
  NOTIFICATIONID => {:type => ::Thrift::Types::STRING, :name => 'notificationId', :optional => true},
  GATEWAYID => {:type => ::Thrift::Types::STRING, :name => 'gatewayId'},
  TITLE => {:type => ::Thrift::Types::STRING, :name => 'title'},
  NOTIFICATIONMESSAGE => {:type => ::Thrift::Types::STRING, :name => 'notificationMessage'},
  CREATIONTIME => {:type => ::Thrift::Types::I64, :name => 'creationTime', :optional => true},
  PUBLISHEDTIME => {:type => ::Thrift::Types::I64, :name => 'publishedTime', :optional => true},
  EXPIRATIONTIME => {:type => ::Thrift::Types::I64, :name => 'expirationTime', :optional => true},
  PRIORITY => {:type => ::Thrift::Types::I32, :name => 'priority', :optional => true, :enum_class => ::NotificationPriority}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



217
# File 'lib/workspace_model_types.rb', line 217

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


219
220
221
222
223
224
225
226
# File 'lib/workspace_model_types.rb', line 219

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field gatewayId is unset!') unless @gatewayId
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field title is unset!') unless @title
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field notificationMessage is unset!') unless @notificationMessage
  unless @priority.nil? || ::NotificationPriority::VALID_VALUES.include?(@priority)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field priority!')
  end
end