Class: SDM::SSHCert

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, hostname: nil, username: nil, port: nil, port_forwarding: nil, allow_deprecated_key_exchanges: nil) ⇒ SSHCert

Returns a new instance of SSHCert.



3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
# File 'lib/models/porcelain.rb', line 3952

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  hostname: nil,
  username: nil,
  port: nil,
  port_forwarding: nil,
  allow_deprecated_key_exchanges: 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 hostname != nil
    @hostname = hostname
  end
  if username != nil
    @username = username
  end
  if port != nil
    @port = port
  end
  if port_forwarding != nil
    @port_forwarding = port_forwarding
  end
  if allow_deprecated_key_exchanges != nil
    @allow_deprecated_key_exchanges = allow_deprecated_key_exchanges
  end
end

Instance Attribute Details

#allow_deprecated_key_exchangesObject

Returns the value of attribute allow_deprecated_key_exchanges.



3950
3951
3952
# File 'lib/models/porcelain.rb', line 3950

def allow_deprecated_key_exchanges
  @allow_deprecated_key_exchanges
end

#healthyObject

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



3938
3939
3940
# File 'lib/models/porcelain.rb', line 3938

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



3942
3943
3944
# File 'lib/models/porcelain.rb', line 3942

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



3934
3935
3936
# File 'lib/models/porcelain.rb', line 3934

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



3936
3937
3938
# File 'lib/models/porcelain.rb', line 3936

def name
  @name
end

#portObject

Returns the value of attribute port.



3946
3947
3948
# File 'lib/models/porcelain.rb', line 3946

def port
  @port
end

#port_forwardingObject

Returns the value of attribute port_forwarding.



3948
3949
3950
# File 'lib/models/porcelain.rb', line 3948

def port_forwarding
  @port_forwarding
end

#tagsObject

Tags is a map of key, value pairs.



3940
3941
3942
# File 'lib/models/porcelain.rb', line 3940

def tags
  @tags
end

#usernameObject

Returns the value of attribute username.



3944
3945
3946
# File 'lib/models/porcelain.rb', line 3944

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3992
3993
3994
3995
3996
3997
3998
# File 'lib/models/porcelain.rb', line 3992

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