Class: Rafflesia::Objects
- Inherits:
-
Object
- Object
- Rafflesia::Objects
- Defined in:
- lib/rafflesia/objects.rb
Instance Method Summary collapse
-
#artifactsImport(kind:, allow_incomplete: nil, archive_inventory_object_id: nil, archive_inventory_path: nil, archive_required_member_paths: nil, dataset_name: nil, dataset_version: nil, dependency_manifest_ids: nil, is_collection: nil, layout_prefix: nil, license: nil, marker_paths: nil, mount_path: nil, name: nil, output_dir: nil, path: nil, shard_size_bytes: nil, source_uri: nil, tool_name: nil, tool_version: nil, version: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactImportData
POST /v1/objects/artifacts/import.
-
#artifactsMaterialize(manifest_object_id: nil, manifest_path: nil, shards: nil, target_dir: nil, verify: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactMaterializeData
POST /v1/objects/artifacts/materialize.
-
#contentGet(object_id:, filename: nil, request_options: {}) ⇒ String
Return raw content-addressed object bytes.
-
#download(url:, allow_network: nil, content_type: nil, file_name: nil, kind: nil, max_download_bytes: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectDownloadData
POST /v1/objects/download.
-
#gc(candidate_object_ids: nil, delete: nil, dry_run: nil, max_candidates: nil, max_delete: nil, max_scan_object_bytes: nil, older_than_seconds: nil, protect_object_ids: nil, scan_object_contents: nil, scan_records: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectGcData
POST /v1/objects/gc.
-
#get(object_id:, filename: nil, request_options: {}) ⇒ String
Return raw content-addressed object bytes.
-
#hash(path:, content_type: nil, kind: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectHashData
POST /v1/objects/hash.
-
#head(object_id:, encoding: nil, limit: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectHeadData
POST /v1/objects/head.
-
#initialize(client) ⇒ Objects
constructor
A new instance of Objects.
-
#jsonGet(object_id:, limit: nil, max_bytes: nil, path: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectJsonGetData
POST /v1/objects/json/get.
-
#jsonInspect(object_id:, max_bytes: nil, max_children: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectJsonInspectData
POST /v1/objects/json/inspect.
-
#lineage(object_id:, request_options: {}) ⇒ Rafflesia::EnvelopeObjectLineageData
POST /v1/objects/lineage.
-
#metadata(object_id:, request_options: {}) ⇒ Rafflesia::EnvelopeObjectMetadataData
POST /v1/objects/metadata.
-
#put(path:, content_type: nil, kind: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectPutData
POST /v1/objects/put.
Constructor Details
#initialize(client) ⇒ Objects
Returns a new instance of Objects.
9 10 11 |
# File 'lib/rafflesia/objects.rb', line 9 def initialize(client) @client = client end |
Instance Method Details
#artifactsImport(kind:, allow_incomplete: nil, archive_inventory_object_id: nil, archive_inventory_path: nil, archive_required_member_paths: nil, dataset_name: nil, dataset_version: nil, dependency_manifest_ids: nil, is_collection: nil, layout_prefix: nil, license: nil, marker_paths: nil, mount_path: nil, name: nil, output_dir: nil, path: nil, shard_size_bytes: nil, source_uri: nil, tool_name: nil, tool_version: nil, version: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactImportData
POST /v1/objects/artifacts/import
37 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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/rafflesia/objects.rb', line 37 def artifactsImport( kind:, allow_incomplete: nil, archive_inventory_object_id: nil, archive_inventory_path: nil, archive_required_member_paths: nil, dataset_name: nil, dataset_version: nil, dependency_manifest_ids: nil, is_collection: nil, layout_prefix: nil, license: nil, marker_paths: nil, mount_path: nil, name: nil, output_dir: nil, path: nil, shard_size_bytes: nil, source_uri: nil, tool_name: nil, tool_version: nil, version: nil, request_options: {} ) body = { 'allow_incomplete' => allow_incomplete, 'archive_inventory_object_id' => archive_inventory_object_id, 'archive_inventory_path' => archive_inventory_path, 'archive_required_member_paths' => archive_required_member_paths, 'dataset_name' => dataset_name, 'dataset_version' => dataset_version, 'dependency_manifest_ids' => dependency_manifest_ids, 'is_collection' => is_collection, 'kind' => kind, 'layout_prefix' => layout_prefix, 'license' => license, 'marker_paths' => marker_paths, 'mount_path' => mount_path, 'name' => name, 'output_dir' => output_dir, 'path' => path, 'shard_size_bytes' => shard_size_bytes, 'source_uri' => source_uri, 'tool_name' => tool_name, 'tool_version' => tool_version, 'version' => version }.compact response = @client.request( method: :post, path: '/v1/objects/artifacts/import', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectArtifactImportData.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 |
#artifactsMaterialize(manifest_object_id: nil, manifest_path: nil, shards: nil, target_dir: nil, verify: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectArtifactMaterializeData
POST /v1/objects/artifacts/materialize
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/rafflesia/objects.rb', line 104 def artifactsMaterialize( 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/objects/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 |
#contentGet(object_id:, filename: nil, request_options: {}) ⇒ String
Return raw content-addressed object bytes.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/rafflesia/objects.rb', line 136 def contentGet( object_id:, filename: nil, request_options: {} ) params = { 'object_id' => object_id, 'filename' => filename }.compact response = @client.request( method: :get, path: '/v1/objects/content/get', auth: true, params: params, request_options: ) response.body end |
#download(url:, allow_network: nil, content_type: nil, file_name: nil, kind: nil, max_download_bytes: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectDownloadData
POST /v1/objects/download
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/rafflesia/objects.rb', line 164 def download( url:, allow_network: nil, content_type: nil, file_name: nil, kind: nil, max_download_bytes: nil, request_options: {} ) body = { 'allow_network' => allow_network, 'content_type' => content_type, 'file_name' => file_name, 'kind' => kind, 'max_download_bytes' => max_download_bytes, 'url' => url }.compact response = @client.request( method: :post, path: '/v1/objects/download', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectDownloadData.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 |
#gc(candidate_object_ids: nil, delete: nil, dry_run: nil, max_candidates: nil, max_delete: nil, max_scan_object_bytes: nil, older_than_seconds: nil, protect_object_ids: nil, scan_object_contents: nil, scan_records: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectGcData
POST /v1/objects/gc
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/rafflesia/objects.rb', line 206 def gc( candidate_object_ids: nil, delete: nil, dry_run: nil, max_candidates: nil, max_delete: nil, max_scan_object_bytes: nil, older_than_seconds: nil, protect_object_ids: nil, scan_object_contents: nil, scan_records: nil, request_options: {} ) body = { 'candidate_object_ids' => candidate_object_ids, 'delete' => delete, 'dry_run' => dry_run, 'max_candidates' => max_candidates, 'max_delete' => max_delete, 'max_scan_object_bytes' => max_scan_object_bytes, 'older_than_seconds' => older_than_seconds, 'protect_object_ids' => protect_object_ids, 'scan_object_contents' => scan_object_contents, 'scan_records' => scan_records }.compact response = @client.request( method: :post, path: '/v1/objects/gc', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectGcData.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 |
#get(object_id:, filename: nil, request_options: {}) ⇒ String
Return raw content-addressed object bytes.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/rafflesia/objects.rb', line 248 def get( object_id:, filename: nil, request_options: {} ) params = { 'object_id' => object_id, 'filename' => filename }.compact response = @client.request( method: :get, path: '/v1/objects/get', auth: true, params: params, request_options: ) response.body end |
#hash(path:, content_type: nil, kind: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectHashData
POST /v1/objects/hash
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/rafflesia/objects.rb', line 273 def hash( path:, content_type: nil, kind: nil, request_options: {} ) body = { 'content_type' => content_type, 'kind' => kind, 'path' => path }.compact response = @client.request( method: :post, path: '/v1/objects/hash', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectHashData.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 |
#head(object_id:, encoding: nil, limit: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectHeadData
POST /v1/objects/head
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/rafflesia/objects.rb', line 302 def head( object_id:, encoding: nil, limit: nil, request_options: {} ) body = { 'encoding' => encoding, 'limit' => limit, 'object_id' => object_id }.compact response = @client.request( method: :post, path: '/v1/objects/head', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectHeadData.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 |
#jsonGet(object_id:, limit: nil, max_bytes: nil, path: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectJsonGetData
POST /v1/objects/json/get
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/rafflesia/objects.rb', line 332 def jsonGet( object_id:, limit: nil, max_bytes: nil, path: nil, request_options: {} ) body = { 'limit' => limit, 'max_bytes' => max_bytes, 'object_id' => object_id, 'path' => path }.compact response = @client.request( method: :post, path: '/v1/objects/json/get', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectJsonGetData.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 |
#jsonInspect(object_id:, max_bytes: nil, max_children: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectJsonInspectData
POST /v1/objects/json/inspect
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/rafflesia/objects.rb', line 363 def jsonInspect( object_id:, max_bytes: nil, max_children: nil, request_options: {} ) body = { 'max_bytes' => max_bytes, 'max_children' => max_children, 'object_id' => object_id }.compact response = @client.request( method: :post, path: '/v1/objects/json/inspect', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectJsonInspectData.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 |
#lineage(object_id:, request_options: {}) ⇒ Rafflesia::EnvelopeObjectLineageData
POST /v1/objects/lineage
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/rafflesia/objects.rb', line 390 def lineage( object_id:, request_options: {} ) body = { 'object_id' => object_id } response = @client.request( method: :post, path: '/v1/objects/lineage', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectLineageData.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 |
#metadata(object_id:, request_options: {}) ⇒ Rafflesia::EnvelopeObjectMetadataData
POST /v1/objects/metadata
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/rafflesia/objects.rb', line 413 def ( object_id:, request_options: {} ) body = { 'object_id' => object_id } response = @client.request( method: :post, path: '/v1/objects/metadata', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectMetadataData.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 |
#put(path:, content_type: nil, kind: nil, request_options: {}) ⇒ Rafflesia::EnvelopeObjectPutData
POST /v1/objects/put
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 |
# File 'lib/rafflesia/objects.rb', line 438 def put( path:, content_type: nil, kind: nil, request_options: {} ) body = { 'content_type' => content_type, 'kind' => kind, 'path' => path }.compact response = @client.request( method: :post, path: '/v1/objects/put', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeObjectPutData.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 |