Class: OCI::VnMonitoring::Models::UpdateDrgRouteRuleDetails
- Inherits:
 - 
      Object
      
        
- Object
 - OCI::VnMonitoring::Models::UpdateDrgRouteRuleDetails
 
 
- Defined in:
 - lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb
 
Overview
Details used to update a route rule in the DRG route table.
Constant Summary collapse
- DESTINATION_TYPE_ENUM =
 [ DESTINATION_TYPE_CIDR_BLOCK = 'CIDR_BLOCK'.freeze ].freeze
Instance Attribute Summary collapse
- 
  
    
      #destination  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The range of IP addresses used for matching when routing traffic.
 - 
  
    
      #destination_type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Type of destination for the rule.
 - 
  
    
      #id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
[Required] The Oracle-assigned ID of each DRG route rule to update.
 - 
  
    
      #next_hop_drg_attachment_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The OCID of the next hop DRG attachment.
 
Class Method Summary collapse
- 
  
    
      .attribute_map  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Attribute mapping from ruby-style variable name to JSON key.
 - 
  
    
      .swagger_types  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Attribute type mapping.
 
Instance Method Summary collapse
- 
  
    
      #==(other)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Checks equality by comparing each attribute.
 - 
  
    
      #build_from_hash(attributes)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Builds the object from hash.
 - #eql?(other) ⇒ Boolean
 - 
  
    
      #hash  ⇒ Fixnum 
    
    
  
  
  
  
  
  
  
  
  
    
Calculates hash code according to all attributes.
 - 
  
    
      #initialize(attributes = {})  ⇒ UpdateDrgRouteRuleDetails 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
Initializes the object.
 - 
  
    
      #to_hash  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
Returns the object in the form of hash.
 - 
  
    
      #to_s  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Returns the string representation of the object.
 
Constructor Details
#initialize(attributes = {}) ⇒ UpdateDrgRouteRuleDetails
Initializes the object
      77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 77 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.destination = attributes[:'destination'] if attributes[:'destination'] self.destination_type = attributes[:'destinationType'] if attributes[:'destinationType'] raise 'You cannot provide both :destinationType and :destination_type' if attributes.key?(:'destinationType') && attributes.key?(:'destination_type') self.destination_type = attributes[:'destination_type'] if attributes[:'destination_type'] self. = attributes[:'nextHopDrgAttachmentId'] if attributes[:'nextHopDrgAttachmentId'] raise 'You cannot provide both :nextHopDrgAttachmentId and :next_hop_drg_attachment_id' if attributes.key?(:'nextHopDrgAttachmentId') && attributes.key?(:'next_hop_drg_attachment_id') self. = attributes[:'next_hop_drg_attachment_id'] if attributes[:'next_hop_drg_attachment_id'] end  | 
  
Instance Attribute Details
#destination ⇒ String
The range of IP addresses used for matching when routing traffic.
Potential values:  * IP address range in CIDR notation. Can be an IPv4 or IPv6 CIDR. For example: 192.168.1.0/24  or 2001:0db8:0123:45::/56.
      28 29 30  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 28 def destination @destination end  | 
  
#destination_type ⇒ String
Type of destination for the rule. Allowed values:  * CIDR_BLOCK: If the rule's destination is an IP address range in CIDR notation.
      35 36 37  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 35 def destination_type @destination_type end  | 
  
#id ⇒ String
[Required] The Oracle-assigned ID of each DRG route rule to update.
      19 20 21  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 19 def id @id end  | 
  
#next_hop_drg_attachment_id ⇒ String
The OCID of the next hop DRG attachment. The next hop DRG attachment is responsible for reaching the network destination.
      41 42 43  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 41 def @next_hop_drg_attachment_id end  | 
  
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
      44 45 46 47 48 49 50 51 52 53  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 44 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'destination': :'destination', 'destination_type': :'destinationType', 'next_hop_drg_attachment_id': :'nextHopDrgAttachmentId' # rubocop:enable Style/SymbolLiteral } end  | 
  
.swagger_types ⇒ Object
Attribute type mapping.
      56 57 58 59 60 61 62 63 64 65  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 56 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'destination': :'String', 'destination_type': :'String', 'next_hop_drg_attachment_id': :'String' # rubocop:enable Style/SymbolLiteral } end  | 
  
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
      115 116 117 118 119 120 121 122 123  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 115 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && destination == other.destination && destination_type == other.destination_type && == other. end  | 
  
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
      148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 148 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
      128 129 130  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 128 def eql?(other) self == other end  | 
  
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
      137 138 139  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 137 def hash [id, destination, destination_type, ].hash end  | 
  
#to_hash ⇒ Hash
Returns the object in the form of hash
      181 182 183 184 185 186 187 188 189 190  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 181 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_s ⇒ String
Returns the string representation of the object
      175 176 177  | 
    
      # File 'lib/oci/vn_monitoring/models/update_drg_route_rule_details.rb', line 175 def to_s to_hash.to_s end  |