Method: Harbor2LegacyClient::ProjectMetadata#initialize

Defined in:
lib/harbor2_legacy_client/models/project_metadata.rb

#initialize(attributes = {}) ⇒ ProjectMetadata

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
# File 'lib/harbor2_legacy_client/models/project_metadata.rb', line 61

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'public')
    self.public = attributes[:'public']
  end

  if attributes.has_key?(:'enable_content_trust')
    self.enable_content_trust = attributes[:'enable_content_trust']
  end

  if attributes.has_key?(:'prevent_vul')
    self.prevent_vul = attributes[:'prevent_vul']
  end

  if attributes.has_key?(:'severity')
    self.severity = attributes[:'severity']
  end

  if attributes.has_key?(:'auto_scan')
    self.auto_scan = attributes[:'auto_scan']
  end

  if attributes.has_key?(:'reuse_sys_cve_allowlist')
    self.reuse_sys_cve_allowlist = attributes[:'reuse_sys_cve_allowlist']
  end
end