Class: SDM::GoogleGKE

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, endpoint: nil, certificate_authority: nil, certificate_authority_filename: nil, service_account_key: nil, service_account_key_filename: nil) ⇒ GoogleGKE

Returns a new instance of GoogleGKE.



1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
# File 'lib/models/porcelain.rb', line 1577

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  endpoint: nil,
  certificate_authority: nil,
  certificate_authority_filename: nil,
  service_account_key: nil,
  service_account_key_filename: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if healthy != nil
    @healthy = healthy
  end
  if endpoint != nil
    @endpoint = endpoint
  end
  if certificate_authority != nil
    @certificate_authority = certificate_authority
  end
  if certificate_authority_filename != nil
    @certificate_authority_filename = certificate_authority_filename
  end
  if  != nil
    @service_account_key = 
  end
  if  != nil
    @service_account_key_filename = 
  end
end

Instance Attribute Details

#certificate_authorityObject

Returns the value of attribute certificate_authority.



1569
1570
1571
# File 'lib/models/porcelain.rb', line 1569

def certificate_authority
  @certificate_authority
end

#certificate_authority_filenameObject

Returns the value of attribute certificate_authority_filename.



1571
1572
1573
# File 'lib/models/porcelain.rb', line 1571

def certificate_authority_filename
  @certificate_authority_filename
end

#endpointObject

Returns the value of attribute endpoint.



1567
1568
1569
# File 'lib/models/porcelain.rb', line 1567

def endpoint
  @endpoint
end

#healthyObject

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



1565
1566
1567
# File 'lib/models/porcelain.rb', line 1565

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



1561
1562
1563
# File 'lib/models/porcelain.rb', line 1561

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1563
1564
1565
# File 'lib/models/porcelain.rb', line 1563

def name
  @name
end

#service_account_keyObject

Returns the value of attribute service_account_key.



1573
1574
1575
# File 'lib/models/porcelain.rb', line 1573

def 
  @service_account_key
end

#service_account_key_filenameObject

Returns the value of attribute service_account_key_filename.



1575
1576
1577
# File 'lib/models/porcelain.rb', line 1575

def 
  @service_account_key_filename
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1613
1614
1615
1616
1617
1618
1619
# File 'lib/models/porcelain.rb', line 1613

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