Class: OCI::Oda::Models::OdaPrivateEndpointScanProxySummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb

Overview

Details pertaining to a scan proxy instance created for a scan listener FQDN/IPs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ OdaPrivateEndpointScanProxySummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 79

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.id = attributes[:'id'] if attributes[:'id']

  self.scan_listener_type = attributes[:'scanListenerType'] if attributes[:'scanListenerType']

  raise 'You cannot provide both :scanListenerType and :scan_listener_type' if attributes.key?(:'scanListenerType') && attributes.key?(:'scan_listener_type')

  self.scan_listener_type = attributes[:'scan_listener_type'] if attributes[:'scan_listener_type']

  self.protocol = attributes[:'protocol'] if attributes[:'protocol']

  self.scan_listener_infos = attributes[:'scanListenerInfos'] if attributes[:'scanListenerInfos']

  raise 'You cannot provide both :scanListenerInfos and :scan_listener_infos' if attributes.key?(:'scanListenerInfos') && attributes.key?(:'scan_listener_infos')

  self.scan_listener_infos = attributes[:'scan_listener_infos'] if attributes[:'scan_listener_infos']

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

  raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')

  self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

  raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')

  self.time_created = attributes[:'time_created'] if attributes[:'time_created']
end

Instance Attribute Details

#idString

[Required] The OCID of the ODA Private Endpoint Scan Proxy.

Returns:

  • (String)


14
15
16
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 14

def id
  @id
end

#lifecycle_stateString

The current state of the ODA Private Endpoint Scan Proxy.

Returns:

  • (String)


33
34
35
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 33

def lifecycle_state
  @lifecycle_state
end

#protocolString

[Required] The protocol used for communication between client, scanProxy and RAC's scan listeners

Returns:

  • (String)


24
25
26
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 24

def protocol
  @protocol
end

#scan_listener_infosArray<OCI::Oda::Models::ScanListenerInfo>

[Required] The FQDN/IPs and port information of customer's Real Application Cluster (RAC)'s SCAN listeners.



29
30
31
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 29

def scan_listener_infos
  @scan_listener_infos
end

#scan_listener_typeString

[Required] Type indicating whether Scan listener is specified by its FQDN or list of IPs

Returns:

  • (String)


19
20
21
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 19

def scan_listener_type
  @scan_listener_type
end

#time_createdDateTime

When the resource was created. A date-time string as described in RFC 3339, section 14.29.

Returns:

  • (DateTime)


37
38
39
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 37

def time_created
  @time_created
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 40

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'scan_listener_type': :'scanListenerType',
    'protocol': :'protocol',
    'scan_listener_infos': :'scanListenerInfos',
    'lifecycle_state': :'lifecycleState',
    'time_created': :'timeCreated'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 54

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'scan_listener_type': :'String',
    'protocol': :'String',
    'scan_listener_infos': :'Array<OCI::Oda::Models::ScanListenerInfo>',
    'lifecycle_state': :'String',
    'time_created': :'DateTime'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



121
122
123
124
125
126
127
128
129
130
131
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 121

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    scan_listener_type == other.scan_listener_type &&
    protocol == other.protocol &&
    scan_listener_infos == other.scan_listener_infos &&
    lifecycle_state == other.lifecycle_state &&
    time_created == other.time_created
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 156

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


136
137
138
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 136

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



145
146
147
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 145

def hash
  [id, scan_listener_type, protocol, scan_listener_infos, lifecycle_state, time_created].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



189
190
191
192
193
194
195
196
197
198
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 189

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



183
184
185
# File 'lib/oci/oda/models/oda_private_endpoint_scan_proxy_summary.rb', line 183

def to_s
  to_hash.to_s
end