Class: SDM::BigQuery

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, private_key: nil, project: nil, port_override: nil, endpoint: nil, username: nil) ⇒ BigQuery

Returns a new instance of BigQuery.



711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
# File 'lib/models/porcelain.rb', line 711

def initialize(
	id:nil \
,
	name:nil \
,
	healthy:nil \
,
	tags:nil \
,
	private_key:nil \
,
	project:nil \
,
	port_override:nil \
,
	endpoint:nil \
,
	username: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 private_key != nil
		@private_key = private_key
	end
	if project != nil
		@project = project
	end
	if port_override != nil
		@port_override = port_override
	end
	if endpoint != nil
		@endpoint = endpoint
	end
	if username != nil
		@username = username
	end
end

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint.



708
709
710
# File 'lib/models/porcelain.rb', line 708

def endpoint
  @endpoint
end

#healthyObject

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



698
699
700
# File 'lib/models/porcelain.rb', line 698

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



694
695
696
# File 'lib/models/porcelain.rb', line 694

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



696
697
698
# File 'lib/models/porcelain.rb', line 696

def name
  @name
end

#port_overrideObject

Returns the value of attribute port_override.



706
707
708
# File 'lib/models/porcelain.rb', line 706

def port_override
  @port_override
end

#private_keyObject

Returns the value of attribute private_key.



702
703
704
# File 'lib/models/porcelain.rb', line 702

def private_key
  @private_key
end

#projectObject

Returns the value of attribute project.



704
705
706
# File 'lib/models/porcelain.rb', line 704

def project
  @project
end

#tagsObject

Tags is a map of key, value pairs.



700
701
702
# File 'lib/models/porcelain.rb', line 700

def tags
  @tags
end

#usernameObject

Returns the value of attribute username.



710
711
712
# File 'lib/models/porcelain.rb', line 710

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



758
759
760
761
762
763
764
# File 'lib/models/porcelain.rb', line 758

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