Class: Rafflesia::ObjectArtifacts
- Inherits:
-
Object
- Object
- Rafflesia::ObjectArtifacts
- Defined in:
- lib/rafflesia/object_artifacts.rb
Instance Method Summary collapse
-
#contract(request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactContractData
GET /v1/object-artifacts/contract.
-
#evict(dry_run: nil, manifest_object_id: nil, manifest_path: nil, max_bytes: nil, policy: nil, shards: nil, target_dir: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactCacheEvictData
POST /v1/object-artifacts/evict.
-
#initialize(client) ⇒ ObjectArtifacts
constructor
A new instance of ObjectArtifacts.
-
#inspect(manifest_object_id: nil, manifest_path: nil, shards: nil, target_dir: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactCacheInspectData
POST /v1/object-artifacts/inspect.
-
#materialize(manifest_object_id: nil, manifest_path: nil, shards: nil, target_dir: nil, verify: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactMaterializeData
POST /v1/object-artifacts/materialize.
Constructor Details
#initialize(client) ⇒ ObjectArtifacts
Returns a new instance of ObjectArtifacts.
9 10 11 |
# File 'lib/rafflesia/object_artifacts.rb', line 9 def initialize(client) @client = client end |
Instance Method Details
#contract(request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactContractData
GET /v1/object-artifacts/contract
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rafflesia/object_artifacts.rb', line 16 def contract(request_options: {}) response = @client.request( method: :get, path: '/v1/object-artifacts/contract', auth: true, request_options: ) result = Rafflesia::EnvelopeObjectArtifactContractData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#evict(dry_run: nil, manifest_object_id: nil, manifest_path: nil, max_bytes: nil, policy: nil, shards: nil, target_dir: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactCacheEvictData
POST /v1/object-artifacts/evict
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/rafflesia/object_artifacts.rb', line 38 def evict( dry_run: nil, manifest_object_id: nil, manifest_path: nil, max_bytes: nil, policy: nil, shards: nil, target_dir: nil, request_options: {} ) body = { '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 }.compact response = @client.request( method: :post, path: '/v1/object-artifacts/evict', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectArtifactCacheEvictData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#inspect(manifest_object_id: nil, manifest_path: nil, shards: nil, target_dir: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactCacheInspectData
POST /v1/object-artifacts/inspect
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/rafflesia/object_artifacts.rb', line 76 def inspect( manifest_object_id: nil, manifest_path: nil, shards: nil, target_dir: nil, request_options: {} ) body = { 'manifest_object_id' => manifest_object_id, 'manifest_path' => manifest_path, 'shards' => shards, 'target_dir' => target_dir }.compact response = @client.request( method: :post, path: '/v1/object-artifacts/inspect', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectArtifactCacheInspectData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#materialize(manifest_object_id: nil, manifest_path: nil, shards: nil, target_dir: nil, verify: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactMaterializeData
POST /v1/object-artifacts/materialize
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/rafflesia/object_artifacts.rb', line 109 def materialize( manifest_object_id: nil, manifest_path: nil, shards: nil, target_dir: nil, verify: nil, request_options: {} ) body = { 'manifest_object_id' => manifest_object_id, 'manifest_path' => manifest_path, 'shards' => shards, 'target_dir' => target_dir, 'verify' => verify }.compact response = @client.request( method: :post, path: '/v1/object-artifacts/materialize', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectArtifactMaterializeData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |