Class: SDM::DB2LUW

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, tags: nil, secret_store_id: nil, hostname: nil, username: nil, password: nil, database: nil, port_override: nil, port: nil) ⇒ DB2LUW

Returns a new instance of DB2LUW.



1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
# File 'lib/models/porcelain.rb', line 1065

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  secret_store_id: nil,
  hostname: nil,
  username: nil,
  password: nil,
  database: nil,
  port_override: nil,
  port: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if healthy != nil
    @healthy = healthy
  end
  if tags != nil
    @tags = tags
  end
  if secret_store_id != nil
    @secret_store_id = secret_store_id
  end
  if hostname != nil
    @hostname = hostname
  end
  if username != nil
    @username = username
  end
  if password != nil
    @password = password
  end
  if database != nil
    @database = database
  end
  if port_override != nil
    @port_override = port_override
  end
  if port != nil
    @port = port
  end
end

Instance Attribute Details

#databaseObject

Returns the value of attribute database.



1059
1060
1061
# File 'lib/models/porcelain.rb', line 1059

def database
  @database
end

#healthyObject

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



1047
1048
1049
# File 'lib/models/porcelain.rb', line 1047

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



1053
1054
1055
# File 'lib/models/porcelain.rb', line 1053

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



1043
1044
1045
# File 'lib/models/porcelain.rb', line 1043

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1045
1046
1047
# File 'lib/models/porcelain.rb', line 1045

def name
  @name
end

#passwordObject

Returns the value of attribute password.



1057
1058
1059
# File 'lib/models/porcelain.rb', line 1057

def password
  @password
end

#portObject

Returns the value of attribute port.



1063
1064
1065
# File 'lib/models/porcelain.rb', line 1063

def port
  @port
end

#port_overrideObject

Returns the value of attribute port_override.



1061
1062
1063
# File 'lib/models/porcelain.rb', line 1061

def port_override
  @port_override
end

#secret_store_idObject

ID of the secret store containing credentials for this resource, if any.



1051
1052
1053
# File 'lib/models/porcelain.rb', line 1051

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



1049
1050
1051
# File 'lib/models/porcelain.rb', line 1049

def tags
  @tags
end

#usernameObject

Returns the value of attribute username.



1055
1056
1057
# File 'lib/models/porcelain.rb', line 1055

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1113
1114
1115
1116
1117
1118
1119
# File 'lib/models/porcelain.rb', line 1113

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