Class: DataStagingTaskModel
- Inherits:
-
Object
- Object
- DataStagingTaskModel
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/task_model_types.rb
Constant Summary collapse
- SOURCE =
1
- DESTINATION =
2
- TYPE =
3
- TRANSFERSTARTTIME =
4
- TRANSFERENDTIME =
5
- TRANSFERRATE =
6
- PROCESSINPUT =
7
- PROCESSOUTPUT =
8
- FIELDS =
{ SOURCE => {:type => ::Thrift::Types::STRING, :name => 'source'}, DESTINATION => {:type => ::Thrift::Types::STRING, :name => 'destination'}, TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::DataStageType}, TRANSFERSTARTTIME => {:type => ::Thrift::Types::I64, :name => 'transferStartTime', :optional => true}, TRANSFERENDTIME => {:type => ::Thrift::Types::I64, :name => 'transferEndTime', :optional => true}, TRANSFERRATE => {:type => ::Thrift::Types::STRING, :name => 'transferRate', :optional => true}, PROCESSINPUT => {:type => ::Thrift::Types::STRUCT, :name => 'processInput', :class => ::InputDataObjectType, :optional => true}, PROCESSOUTPUT => {:type => ::Thrift::Types::STRUCT, :name => 'processOutput', :class => ::OutputDataObjectType, :optional => true} }
Instance Method Summary collapse
Instance Method Details
#struct_fields ⇒ Object
111 |
# File 'lib/task_model_types.rb', line 111 def struct_fields; FIELDS; end |
#validate ⇒ Object
113 114 115 116 117 118 119 120 |
# File 'lib/task_model_types.rb', line 113 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field source is unset!') unless @source raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field destination is unset!') unless @destination raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type unless @type.nil? || ::DataStageType::VALID_VALUES.include?(@type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') end end |