Class: SDM::AmazonES

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, region: nil, secret_access_key: nil, endpoint: nil, access_key: nil, port_override: nil) ⇒ AmazonES

Returns a new instance of AmazonES.



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
# File 'lib/models/porcelain.rb', line 1093

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  region: nil,
  secret_access_key: nil,
  endpoint: nil,
  access_key: nil,
  port_override: 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 region != nil
    @region = region
  end
  if secret_access_key != nil
    @secret_access_key = secret_access_key
  end
  if endpoint != nil
    @endpoint = endpoint
  end
  if access_key != nil
    @access_key = access_key
  end
  if port_override != nil
    @port_override = port_override
  end
end

Instance Attribute Details

#access_keyObject

Returns the value of attribute access_key.



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

def access_key
  @access_key
end

#endpointObject

Returns the value of attribute endpoint.



1087
1088
1089
# File 'lib/models/porcelain.rb', line 1087

def endpoint
  @endpoint
end

#healthyObject

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



1079
1080
1081
# File 'lib/models/porcelain.rb', line 1079

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



1075
1076
1077
# File 'lib/models/porcelain.rb', line 1075

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1077
1078
1079
# File 'lib/models/porcelain.rb', line 1077

def name
  @name
end

#port_overrideObject

Returns the value of attribute port_override.



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

def port_override
  @port_override
end

#regionObject

Returns the value of attribute region.



1083
1084
1085
# File 'lib/models/porcelain.rb', line 1083

def region
  @region
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



1085
1086
1087
# File 'lib/models/porcelain.rb', line 1085

def secret_access_key
  @secret_access_key
end

#tagsObject

Tags is a map of key, value pairs.



1081
1082
1083
# File 'lib/models/porcelain.rb', line 1081

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1133
1134
1135
1136
1137
1138
1139
# File 'lib/models/porcelain.rb', line 1133

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