Method: Harbor2Client::ScannerRegistrationReq#initialize

Defined in:
lib/harbor2_client/models/scanner_registration_req.rb

#initialize(attributes = {}) ⇒ ScannerRegistrationReq

Initializes the object

Parameters:

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

    Model attributes in the form of hash



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/harbor2_client/models/scanner_registration_req.rb', line 71

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?(:'name')
    self.name = attributes[:'name']
  end

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

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

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

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

  if attributes.has_key?(:'skip_certVerify')
    self.skip_cert_verify = attributes[:'skip_certVerify']
  else
    self.skip_cert_verify = false
  end

  if attributes.has_key?(:'use_internal_addr')
    self.use_internal_addr = attributes[:'use_internal_addr']
  else
    self.use_internal_addr = false
  end

  if attributes.has_key?(:'disabled')
    self.disabled = attributes[:'disabled']
  else
    self.disabled = false
  end
end