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

Returns a new instance of BigQuery.



870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
# File 'lib/models/porcelain.rb', line 870

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  secret_store_id: 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 secret_store_id != nil
    @secret_store_id = secret_store_id
  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.



866
867
868
# File 'lib/models/porcelain.rb', line 866

def endpoint
  @endpoint
end

#healthyObject

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



854
855
856
# File 'lib/models/porcelain.rb', line 854

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



850
851
852
# File 'lib/models/porcelain.rb', line 850

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



852
853
854
# File 'lib/models/porcelain.rb', line 852

def name
  @name
end

#port_overrideObject

Returns the value of attribute port_override.



864
865
866
# File 'lib/models/porcelain.rb', line 864

def port_override
  @port_override
end

#private_keyObject

Returns the value of attribute private_key.



860
861
862
# File 'lib/models/porcelain.rb', line 860

def private_key
  @private_key
end

#projectObject

Returns the value of attribute project.



862
863
864
# File 'lib/models/porcelain.rb', line 862

def project
  @project
end

#secret_store_idObject

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



858
859
860
# File 'lib/models/porcelain.rb', line 858

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



856
857
858
# File 'lib/models/porcelain.rb', line 856

def tags
  @tags
end

#usernameObject

Returns the value of attribute username.



868
869
870
# File 'lib/models/porcelain.rb', line 868

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



914
915
916
917
918
919
920
# File 'lib/models/porcelain.rb', line 914

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