Module: Aserto::Directory::V3::Model
- Included in:
- Client
- Defined in:
- lib/aserto/directory/v3/model.rb
Instance Method Summary collapse
-
#delete_manifest ⇒ Aserto::Directory::Model::V3::DeleteManifestResponse
Deletes the manifest and all the data.
-
#get_manifest ⇒ Hash
Get the content of a manifest.
-
#set_manifest(body) ⇒ Aserto::Directory::Model::V3::SetManifestResponse
Set the content of a manifest.
Instance Method Details
#delete_manifest ⇒ Aserto::Directory::Model::V3::DeleteManifestResponse
Deletes the manifest and all the data
36 37 38 |
# File 'lib/aserto/directory/v3/model.rb', line 36 def delete_manifest @model.delete_manifest(Model::V3::DeleteManifestRequest.new) end |
#get_manifest ⇒ Hash
Get the content of a manifest
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/aserto/directory/v3/model.rb', line 11 def get_manifest response = {} manifest_enum = @model.get_manifest(Aserto::Directory::Model::V3::GetManifestRequest.new) manifest_enum.each do |resp| response[:body] = resp.body.data if resp.respond_to?(:body) && !resp.body.nil? if resp.respond_to?(:metadata) response[:updated_at] ||= resp.&.updated_at&.to_time response[:etag] ||= resp.&.etag end end response end |
#set_manifest(body) ⇒ Aserto::Directory::Model::V3::SetManifestResponse
Set the content of a manifest
28 29 30 |
# File 'lib/aserto/directory/v3/model.rb', line 28 def set_manifest(body) @model.set_manifest([Aserto::Directory::Model::V3::SetManifestRequest.new(body: { data: body })]) end |