Class: Rafflesia::FoldIndexEvictRequest

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/fold_index_evict_request.rb

Constant Summary collapse

HASH_ATTRS =
{
  dry_run: :dry_run,
  manifest_object_id: :manifest_object_id,
  manifest_path: :manifest_path,
  max_bytes: :max_bytes,
  policy: :policy,
  ref: :ref,
  segment_roles: :segment_roles,
  shards: :shards,
  target_dir: :target_dir
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldIndexEvictRequest

Returns a new instance of FoldIndexEvictRequest.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/proteins/fold_index_evict_request.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @dry_run = hash[:dry_run]
  @manifest_object_id = hash[:manifest_object_id]
  @manifest_path = hash[:manifest_path]
  @max_bytes = hash[:max_bytes]
  @policy = hash[:policy] ? Rafflesia::CacheEvictionPolicy.new(hash[:policy]) : nil
  @ref = hash[:ref]
  @segment_roles = (hash[:segment_roles] || [])
  @shards = (hash[:shards] || [])
  @target_dir = hash[:target_dir]
end

Instance Attribute Details

#dry_runObject

Returns the value of attribute dry_run.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_evict_request.rb', line 20

def dry_run
  @dry_run
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_evict_request.rb', line 20

def manifest_object_id
  @manifest_object_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_evict_request.rb', line 20

def manifest_path
  @manifest_path
end

#max_bytesObject

Returns the value of attribute max_bytes.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_evict_request.rb', line 20

def max_bytes
  @max_bytes
end

#policyObject

Returns the value of attribute policy.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_evict_request.rb', line 20

def policy
  @policy
end

#refObject

Returns the value of attribute ref.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_evict_request.rb', line 20

def ref
  @ref
end

#segment_rolesObject

Returns the value of attribute segment_roles.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_evict_request.rb', line 20

def segment_roles
  @segment_roles
end

#shardsObject

Returns the value of attribute shards.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_evict_request.rb', line 20

def shards
  @shards
end

#target_dirObject

Returns the value of attribute target_dir.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_evict_request.rb', line 20

def target_dir
  @target_dir
end