Class: DataProductModel

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

Constant Summary collapse

PRODUCTURI =
1
GATEWAYID =
2
PARENTPRODUCTURI =
3
PRODUCTNAME =
4
PRODUCTDESCRIPTION =
5
OWNERNAME =
6
DATAPRODUCTTYPE =
7
PRODUCTSIZE =
8
CREATIONTIME =
9
LASTMODIFIEDTIME =
10
PRODUCTMETADATA =
11
REPLICALOCATIONS =
12
FIELDS =
{
  PRODUCTURI => {:type => ::Thrift::Types::STRING, :name => 'productUri', :optional => true},
  GATEWAYID => {:type => ::Thrift::Types::STRING, :name => 'gatewayId', :optional => true},
  PARENTPRODUCTURI => {:type => ::Thrift::Types::STRING, :name => 'parentProductUri', :optional => true},
  PRODUCTNAME => {:type => ::Thrift::Types::STRING, :name => 'productName', :optional => true},
  PRODUCTDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'productDescription', :optional => true},
  OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName', :optional => true},
  DATAPRODUCTTYPE => {:type => ::Thrift::Types::I32, :name => 'dataProductType', :optional => true, :enum_class => ::DataProductType},
  PRODUCTSIZE => {:type => ::Thrift::Types::I32, :name => 'productSize', :optional => true},
  CREATIONTIME => {:type => ::Thrift::Types::I64, :name => 'creationTime', :optional => true},
  LASTMODIFIEDTIME => {:type => ::Thrift::Types::I64, :name => 'lastModifiedTime', :optional => true},
  PRODUCTMETADATA => {:type => ::Thrift::Types::MAP, :name => 'productMetadata', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
  REPLICALOCATIONS => {:type => ::Thrift::Types::LIST, :name => 'replicaLocations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::DataReplicaLocationModel}, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



106
# File 'lib/replica_catalog_models_types.rb', line 106

def struct_fields; FIELDS; end

#validateObject



108
109
110
111
112
# File 'lib/replica_catalog_models_types.rb', line 108

def validate
  unless @dataProductType.nil? || ::DataProductType::VALID_VALUES.include?(@dataProductType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field dataProductType!')
  end
end