Class: DataBlock

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

Constant Summary collapse

ID =
1
VALUE =
2
TYPE =
3
CREATEDAT =
4
UPDATEDAT =
5
FIELDS =
{
  ID => {:type => ::Thrift::Types::STRING, :name => 'id'},
  VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :optional => true},
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :optional => true, :enum_class => ::DataType},
  CREATEDAT => {:type => ::Thrift::Types::I64, :name => 'createdAt', :optional => true},
  UPDATEDAT => {:type => ::Thrift::Types::I64, :name => 'updatedAt', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



154
# File 'lib/airavata_workflow_model_types.rb', line 154

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


156
157
158
159
160
161
# File 'lib/airavata_workflow_model_types.rb', line 156

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
  unless @type.nil? || ::DataType::VALID_VALUES.include?(@type)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
  end
end