Class: SDM::Athena

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

Returns a new instance of Athena.



653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
# File 'lib/models/porcelain.rb', line 653

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  access_key: nil,
  secret_access_key: nil,
  output: nil,
  port_override: nil,
  region: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if healthy != nil
    @healthy = healthy
  end
  if access_key != nil
    @access_key = access_key
  end
  if secret_access_key != nil
    @secret_access_key = secret_access_key
  end
  if output != nil
    @output = output
  end
  if port_override != nil
    @port_override = port_override
  end
  if region != nil
    @region = region
  end
end

Instance Attribute Details

#access_keyObject

Returns the value of attribute access_key.



643
644
645
# File 'lib/models/porcelain.rb', line 643

def access_key
  @access_key
end

#healthyObject

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



641
642
643
# File 'lib/models/porcelain.rb', line 641

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



637
638
639
# File 'lib/models/porcelain.rb', line 637

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



639
640
641
# File 'lib/models/porcelain.rb', line 639

def name
  @name
end

#outputObject

Returns the value of attribute output.



647
648
649
# File 'lib/models/porcelain.rb', line 647

def output
  @output
end

#port_overrideObject

Returns the value of attribute port_override.



649
650
651
# File 'lib/models/porcelain.rb', line 649

def port_override
  @port_override
end

#regionObject

Returns the value of attribute region.



651
652
653
# File 'lib/models/porcelain.rb', line 651

def region
  @region
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



645
646
647
# File 'lib/models/porcelain.rb', line 645

def secret_access_key
  @secret_access_key
end

Instance Method Details

#to_json(options = {}) ⇒ Object



689
690
691
692
693
694
695
# File 'lib/models/porcelain.rb', line 689

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