Class: Fog::AWS::DataPipeline::Real::JSONObject

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ JSONObject

Returns a new instance of JSONObject.



34
35
36
37
38
# File 'lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb', line 34

def initialize(object)
  @json_fields = object.clone
  @id = @json_fields.delete('id')
  @name = @json_fields.delete('name') || @id
end

Instance Method Details

#to_apiObject



40
41
42
43
44
45
46
# File 'lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb', line 40

def to_api
  {
    'id' => @id,
    'name' => @name,
    'fields' => fields
  }
end