Class: OCI::DataConnectivity::Models::NetworkConnectivityStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_connectivity/models/network_connectivity_status.rb

Overview

The network validation status for a Private Endpoint - Data Asset pair.

Constant Summary collapse

NETWORK_VALIDATION_STATUS_ENUM_ENUM =
[
  NETWORK_VALIDATION_STATUS_ENUM_REACHABLE = 'REACHABLE'.freeze,
  NETWORK_VALIDATION_STATUS_ENUM_NOT_REACHABLE = 'NOT_REACHABLE'.freeze,
  NETWORK_VALIDATION_STATUS_ENUM_ERROR = 'ERROR'.freeze,
  NETWORK_VALIDATION_STATUS_ENUM_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ NetworkConnectivityStatus

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



75
76
77
78
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
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 75

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.data_asset_key = attributes[:'dataAssetKey'] if attributes[:'dataAssetKey']

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

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

  self.private_end_point_key = attributes[:'privateEndPointKey'] if attributes[:'privateEndPointKey']

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

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

  self.error_message = attributes[:'errorMessage'] if attributes[:'errorMessage']

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

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

  self.time_last_updated = attributes[:'timeLastUpdated'] if attributes[:'timeLastUpdated']

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

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

  self.network_validation_status_enum = attributes[:'networkValidationStatusEnum'] if attributes[:'networkValidationStatusEnum']

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

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

Instance Attribute Details

#data_asset_keyString

**[Required]** DataAsset key to which the NetworkValidationStatus belongs to.

Returns:

  • (String)


20
21
22
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 20

def data_asset_key
  @data_asset_key
end

#error_messageString

Exception or error message encountered while testing network reachability for the data asset.

Returns:

  • (String)


28
29
30
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 28

def error_message
  @error_message
end

#network_validation_status_enumString

Exception or error message encountered while testing network reachability for the data asset.

Returns:

  • (String)


36
37
38
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 36

def network_validation_status_enum
  @network_validation_status_enum
end

#private_end_point_keyString

PrivateEndpoint key, if any, to which the NetworkValidationStatus belongs to.

Returns:

  • (String)


24
25
26
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 24

def private_end_point_key
  @private_end_point_key
end

#time_last_updatedDateTime

Instant when the network validation was last done for the given DataAsset-PrivateEndpoint pair..

Returns:

  • (DateTime)


32
33
34
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 32

def time_last_updated
  @time_last_updated
end

Class Method Details

.attribute_mapObject

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



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 39

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'data_asset_key': :'dataAssetKey',
    'private_end_point_key': :'privateEndPointKey',
    'error_message': :'errorMessage',
    'time_last_updated': :'timeLastUpdated',
    'network_validation_status_enum': :'networkValidationStatusEnum'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 52

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'data_asset_key': :'String',
    'private_end_point_key': :'String',
    'error_message': :'String',
    'time_last_updated': :'DateTime',
    'network_validation_status_enum': :'String'
    # 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



132
133
134
135
136
137
138
139
140
141
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 132

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

  self.class == other.class &&
    data_asset_key == other.data_asset_key &&
    private_end_point_key == other.private_end_point_key &&
    error_message == other.error_message &&
    time_last_updated == other.time_last_updated &&
    network_validation_status_enum == other.network_validation_status_enum
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



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 166

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


146
147
148
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 146

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



155
156
157
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 155

def hash
  [data_asset_key, private_end_point_key, error_message, time_last_updated, network_validation_status_enum].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



199
200
201
202
203
204
205
206
207
208
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 199

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



193
194
195
# File 'lib/oci/data_connectivity/models/network_connectivity_status.rb', line 193

def to_s
  to_hash.to_s
end