Class: Etna::Clients::Metis::CopyFilesRequest

Inherits:
Struct
  • Object
show all
Includes:
JsonSerializableStruct
Defined in:
lib/etna/clients/metis/models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from JsonSerializableStruct

#as_json, included, #to_json

Constructor Details

#initialize(**args) ⇒ CopyFilesRequest

Returns a new instance of CopyFilesRequest.



200
201
202
# File 'lib/etna/clients/metis/models.rb', line 200

def initialize(**args)
  super({revisions: []}.update(args))
end

Instance Attribute Details

#project_nameObject

Returns the value of attribute project_name

Returns:

  • (Object)

    the current value of project_name



197
198
199
# File 'lib/etna/clients/metis/models.rb', line 197

def project_name
  @project_name
end

#revisionsObject

Returns the value of attribute revisions

Returns:

  • (Object)

    the current value of revisions



197
198
199
# File 'lib/etna/clients/metis/models.rb', line 197

def revisions
  @revisions
end

Instance Method Details

#add_revision(revision) ⇒ Object



204
205
206
# File 'lib/etna/clients/metis/models.rb', line 204

def add_revision(revision)
  revisions << revision
end

#to_hObject



208
209
210
211
212
# File 'lib/etna/clients/metis/models.rb', line 208

def to_h
  # The nested :revisions values don't get converted correctly with transform_values, so it's
  #   easier to do from a JSON string
  JSON.parse(to_json, :symbolize_names => true)
end