Class: ObjectReference

Inherits:
Object
  • Object
show all
Defined in:
lib/base/v1/ocpapi/ObjectReference.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObjectReference

Returns a new instance of ObjectReference.



29
30
31
32
# File 'lib/base/v1/ocpapi/ObjectReference.rb', line 29

def initialize
  @name = nil
  @kind = nil
end

Instance Attribute Details

#kindObject

Returns the value of attribute kind.



27
28
29
# File 'lib/base/v1/ocpapi/ObjectReference.rb', line 27

def kind
  @kind
end

#nameObject

Returns the value of attribute name.



26
27
28
# File 'lib/base/v1/ocpapi/ObjectReference.rb', line 26

def name
  @name
end

Instance Method Details

#get_hashObject



34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/base/v1/ocpapi/ObjectReference.rb', line 34

def get_hash
  metaHash = Hash.new
  unless @name.nil?
    metaHash[:name] = @name
  end

  unless @kind.nil?
    metaHash[:kind] = @kind
  end

  return metaHash
end

#get_jsonObject



47
48
49
# File 'lib/base/v1/ocpapi/ObjectReference.rb', line 47

def get_json
  return JSON.generate(get_hash)
end