Class: SDM::Sybase

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bind_interface: nil, egress_filter: nil, healthy: nil, hostname: nil, id: nil, name: nil, password: nil, port: nil, port_override: nil, proxy_cluster_id: nil, secret_store_id: nil, subdomain: nil, tags: nil, username: nil) ⇒ Sybase

Returns a new instance of Sybase.



17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
# File 'lib/models/porcelain.rb', line 17904

def initialize(
  bind_interface: nil,
  egress_filter: nil,
  healthy: nil,
  hostname: nil,
  id: nil,
  name: nil,
  password: nil,
  port: nil,
  port_override: nil,
  proxy_cluster_id: nil,
  secret_store_id: nil,
  subdomain: nil,
  tags: nil,
  username: nil
)
  @bind_interface = bind_interface == nil ? "" : bind_interface
  @egress_filter = egress_filter == nil ? "" : egress_filter
  @healthy = healthy == nil ? false : healthy
  @hostname = hostname == nil ? "" : hostname
  @id = id == nil ? "" : id
  @name = name == nil ? "" : name
  @password = password == nil ? "" : password
  @port = port == nil ? 0 : port
  @port_override = port_override == nil ? 0 : port_override
  @proxy_cluster_id = proxy_cluster_id == nil ? "" : proxy_cluster_id
  @secret_store_id = secret_store_id == nil ? "" : secret_store_id
  @subdomain = subdomain == nil ? "" : subdomain
  @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
  @username = username == nil ? "" : username
end

Instance Attribute Details

#bind_interfaceObject

The bind interface is the IP address to which the port override of a resource is bound (for example, 127.0.0.1). It is automatically generated if not provided and may also be set to one of the ResourceIPAllocationMode constants to select between VNM, loopback, or default allocation.



17876
17877
17878
# File 'lib/models/porcelain.rb', line 17876

def bind_interface
  @bind_interface
end

#egress_filterObject

A filter applied to the routing logic to pin datasource to nodes.



17878
17879
17880
# File 'lib/models/porcelain.rb', line 17878

def egress_filter
  @egress_filter
end

#healthyObject

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



17880
17881
17882
# File 'lib/models/porcelain.rb', line 17880

def healthy
  @healthy
end

#hostnameObject

The host to dial to initiate a connection from the egress node to this resource.



17882
17883
17884
# File 'lib/models/porcelain.rb', line 17882

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



17884
17885
17886
# File 'lib/models/porcelain.rb', line 17884

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



17886
17887
17888
# File 'lib/models/porcelain.rb', line 17886

def name
  @name
end

#passwordObject

The password to authenticate with.



17888
17889
17890
# File 'lib/models/porcelain.rb', line 17888

def password
  @password
end

#portObject

The port to dial to initiate a connection from the egress node to this resource.



17890
17891
17892
# File 'lib/models/porcelain.rb', line 17890

def port
  @port
end

#port_overrideObject

The local port used by clients to connect to this resource. It is automatically generated if not provided on create and may be re-generated on update by specifying a value of -1.



17892
17893
17894
# File 'lib/models/porcelain.rb', line 17892

def port_override
  @port_override
end

#proxy_cluster_idObject

ID of the proxy cluster for this resource, if any.



17894
17895
17896
# File 'lib/models/porcelain.rb', line 17894

def proxy_cluster_id
  @proxy_cluster_id
end

#secret_store_idObject

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



17896
17897
17898
# File 'lib/models/porcelain.rb', line 17896

def secret_store_id
  @secret_store_id
end

#subdomainObject

DNS subdomain through which this resource may be accessed on clients. (e.g. "app-prod1" allows the resource to be accessed at "app-prod1.your-org-name.sdm-proxy-domain"). Only applicable to HTTP-based resources or resources using virtual networking mode.



17898
17899
17900
# File 'lib/models/porcelain.rb', line 17898

def subdomain
  @subdomain
end

#tagsObject

Tags is a map of key, value pairs.



17900
17901
17902
# File 'lib/models/porcelain.rb', line 17900

def tags
  @tags
end

#usernameObject

The username to authenticate with.



17902
17903
17904
# File 'lib/models/porcelain.rb', line 17902

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



17936
17937
17938
17939
17940
17941
17942
# File 'lib/models/porcelain.rb', line 17936

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