Class: SDM::HTTPNoAuth

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id: nil, name: nil, healthy: nil, url: nil, healthcheck_path: nil, headers_blacklist: nil, default_path: nil, subdomain: nil) ⇒ HTTPNoAuth

Returns a new instance of HTTPNoAuth.



1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/models/porcelain.rb', line 1181

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  url: nil,
  healthcheck_path: nil,
  headers_blacklist: nil,
  default_path: nil,
  subdomain: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if healthy != nil
    @healthy = healthy
  end
  if url != nil
    @url = url
  end
  if healthcheck_path != nil
    @healthcheck_path = healthcheck_path
  end
  if headers_blacklist != nil
    @headers_blacklist = headers_blacklist
  end
  if default_path != nil
    @default_path = default_path
  end
  if subdomain != nil
    @subdomain = subdomain
  end
end

Instance Attribute Details

#default_pathObject

Returns the value of attribute default_path.



1177
1178
1179
# File 'lib/models/porcelain.rb', line 1177

def default_path
  @default_path
end

#headers_blacklistObject

Returns the value of attribute headers_blacklist.



1175
1176
1177
# File 'lib/models/porcelain.rb', line 1175

def headers_blacklist
  @headers_blacklist
end

#healthcheck_pathObject

Returns the value of attribute healthcheck_path.



1173
1174
1175
# File 'lib/models/porcelain.rb', line 1173

def healthcheck_path
  @healthcheck_path
end

#healthyObject

True if the datasource is reachable and the credentials are valid.



1169
1170
1171
# File 'lib/models/porcelain.rb', line 1169

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



1165
1166
1167
# File 'lib/models/porcelain.rb', line 1165

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1167
1168
1169
# File 'lib/models/porcelain.rb', line 1167

def name
  @name
end

#subdomainObject

Returns the value of attribute subdomain.



1179
1180
1181
# File 'lib/models/porcelain.rb', line 1179

def subdomain
  @subdomain
end

#urlObject

Returns the value of attribute url.



1171
1172
1173
# File 'lib/models/porcelain.rb', line 1171

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1217
1218
1219
1220
1221
1222
1223
# File 'lib/models/porcelain.rb', line 1217

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end