Class: Rafflesia::ObjectArtifactCacheEvictRequest

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/object_artifacts/object_artifact_cache_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,
  shards: :shards,
  target_dir: :target_dir
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ObjectArtifactCacheEvictRequest

Returns a new instance of ObjectArtifactCacheEvictRequest.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_request.rb', line 27

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
  @shards = (hash[:shards] || [])
  @target_dir = hash[:target_dir]
end

Instance Attribute Details

#dry_runObject

Returns the value of attribute dry_run.



18
19
20
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_request.rb', line 18

def dry_run
  @dry_run
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



18
19
20
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_request.rb', line 18

def manifest_object_id
  @manifest_object_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



18
19
20
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_request.rb', line 18

def manifest_path
  @manifest_path
end

#max_bytesObject

Returns the value of attribute max_bytes.



18
19
20
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_request.rb', line 18

def max_bytes
  @max_bytes
end

#policyObject

Returns the value of attribute policy.



18
19
20
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_request.rb', line 18

def policy
  @policy
end

#shardsObject

Returns the value of attribute shards.



18
19
20
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_request.rb', line 18

def shards
  @shards
end

#target_dirObject

Returns the value of attribute target_dir.



18
19
20
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_request.rb', line 18

def target_dir
  @target_dir
end