Class: SDM::HTTPBasicAuth

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, username: nil, password: nil, headers_blacklist: nil, default_path: nil, subdomain: nil) ⇒ HTTPBasicAuth

Returns a new instance of HTTPBasicAuth.



1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
# File 'lib/models/porcelain.rb', line 1110

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  url: nil,
  healthcheck_path: nil,
  username: nil,
  password: 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 username != nil
    @username = username
  end
  if password != nil
    @password = password
  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.



1106
1107
1108
# File 'lib/models/porcelain.rb', line 1106

def default_path
  @default_path
end

#headers_blacklistObject

Returns the value of attribute headers_blacklist.



1104
1105
1106
# File 'lib/models/porcelain.rb', line 1104

def headers_blacklist
  @headers_blacklist
end

#healthcheck_pathObject

Returns the value of attribute healthcheck_path.



1098
1099
1100
# File 'lib/models/porcelain.rb', line 1098

def healthcheck_path
  @healthcheck_path
end

#healthyObject

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



1094
1095
1096
# File 'lib/models/porcelain.rb', line 1094

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



1090
1091
1092
# File 'lib/models/porcelain.rb', line 1090

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1092
1093
1094
# File 'lib/models/porcelain.rb', line 1092

def name
  @name
end

#passwordObject

Returns the value of attribute password.



1102
1103
1104
# File 'lib/models/porcelain.rb', line 1102

def password
  @password
end

#subdomainObject

Returns the value of attribute subdomain.



1108
1109
1110
# File 'lib/models/porcelain.rb', line 1108

def subdomain
  @subdomain
end

#urlObject

Returns the value of attribute url.



1096
1097
1098
# File 'lib/models/porcelain.rb', line 1096

def url
  @url
end

#usernameObject

Returns the value of attribute username.



1100
1101
1102
# File 'lib/models/porcelain.rb', line 1100

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1154
1155
1156
1157
1158
1159
1160
# File 'lib/models/porcelain.rb', line 1154

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