Class: OCI::VnMonitoring::Models::DrgPromotionStatusResponse
- Inherits:
-
Object
- Object
- OCI::VnMonitoring::Models::DrgPromotionStatusResponse
- Defined in:
- lib/oci/vn_monitoring/models/drg_promotion_status_response.rb
Overview
The promotion/unpromotion status of a DRG
Constant Summary collapse
- DRG_PROMOTION_STATUS_ENUM =
[ DRG_PROMOTION_STATUS_UNPROMOTED = 'UNPROMOTED'.freeze, DRG_PROMOTION_STATUS_PROMOTING = 'PROMOTING'.freeze, DRG_PROMOTION_STATUS_PROMOTED = 'PROMOTED'.freeze, DRG_PROMOTION_STATUS_UNPROMOTING = 'UNPROMOTING'.freeze ].freeze
Instance Attribute Summary collapse
-
#drg_id ⇒ String
[Required] OCID of the DRG.
-
#drg_promotion_status ⇒ String
The promotion status of the DRG.
-
#ipsec_promotion_status ⇒ Hash<String, String>
A map of the promotion status of each IPSec connection on this DRG -> promo_status.
-
#rpc_promotion_status ⇒ Hash<String, String>
A map of the promotion status of each RPC connection on this DRG -> promo_status.
-
#vc_promotion_status ⇒ Hash<String, String>
A map of the promotion status of each VC on this DRG -> promo_status.
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 = {}) ⇒ DrgPromotionStatusResponse
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 = {}) ⇒ DrgPromotionStatusResponse
Initializes the object
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/vn_monitoring/models/drg_promotion_status_response.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.drg_id = attributes[:'drgId'] if attributes[:'drgId'] raise 'You cannot provide both :drgId and :drg_id' if attributes.key?(:'drgId') && attributes.key?(:'drg_id') self.drg_id = attributes[:'drg_id'] if attributes[:'drg_id'] self.drg_promotion_status = attributes[:'drgPromotionStatus'] if attributes[:'drgPromotionStatus'] raise 'You cannot provide both :drgPromotionStatus and :drg_promotion_status' if attributes.key?(:'drgPromotionStatus') && attributes.key?(:'drg_promotion_status') self.drg_promotion_status = attributes[:'drg_promotion_status'] if attributes[:'drg_promotion_status'] self.rpc_promotion_status = attributes[:'rpcPromotionStatus'] if attributes[:'rpcPromotionStatus'] raise 'You cannot provide both :rpcPromotionStatus and :rpc_promotion_status' if attributes.key?(:'rpcPromotionStatus') && attributes.key?(:'rpc_promotion_status') self.rpc_promotion_status = attributes[:'rpc_promotion_status'] if attributes[:'rpc_promotion_status'] self.vc_promotion_status = attributes[:'vcPromotionStatus'] if attributes[:'vcPromotionStatus'] raise 'You cannot provide both :vcPromotionStatus and :vc_promotion_status' if attributes.key?(:'vcPromotionStatus') && attributes.key?(:'vc_promotion_status') self.vc_promotion_status = attributes[:'vc_promotion_status'] if attributes[:'vc_promotion_status'] self.ipsec_promotion_status = attributes[:'ipsecPromotionStatus'] if attributes[:'ipsecPromotionStatus'] raise 'You cannot provide both :ipsecPromotionStatus and :ipsec_promotion_status' if attributes.key?(:'ipsecPromotionStatus') && attributes.key?(:'ipsec_promotion_status') self.ipsec_promotion_status = attributes[:'ipsec_promotion_status'] if attributes[:'ipsec_promotion_status'] end |
Instance Attribute Details
#drg_id ⇒ String
[Required] OCID of the DRG
20 21 22 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 20 def drg_id @drg_id end |
#drg_promotion_status ⇒ String
The promotion status of the DRG
24 25 26 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 24 def drg_promotion_status @drg_promotion_status end |
#ipsec_promotion_status ⇒ Hash<String, String>
A map of the promotion status of each IPSec connection on this DRG -> promo_status
36 37 38 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 36 def ipsec_promotion_status @ipsec_promotion_status end |
#rpc_promotion_status ⇒ Hash<String, String>
A map of the promotion status of each RPC connection on this DRG -> promo_status
28 29 30 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 28 def rpc_promotion_status @rpc_promotion_status end |
#vc_promotion_status ⇒ Hash<String, String>
A map of the promotion status of each VC on this DRG -> promo_status
32 33 34 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 32 def vc_promotion_status @vc_promotion_status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 39 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'drg_id': :'drgId', 'drg_promotion_status': :'drgPromotionStatus', 'rpc_promotion_status': :'rpcPromotionStatus', 'vc_promotion_status': :'vcPromotionStatus', 'ipsec_promotion_status': :'ipsecPromotionStatus' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 52 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'drg_id': :'String', 'drg_promotion_status': :'String', 'rpc_promotion_status': :'Hash<String, String>', 'vc_promotion_status': :'Hash<String, String>', 'ipsec_promotion_status': :'Hash<String, String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
127 128 129 130 131 132 133 134 135 136 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 127 def ==(other) return true if equal?(other) self.class == other.class && drg_id == other.drg_id && drg_promotion_status == other.drg_promotion_status && rpc_promotion_status == other.rpc_promotion_status && vc_promotion_status == other.vc_promotion_status && ipsec_promotion_status == other.ipsec_promotion_status end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 161 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
141 142 143 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 141 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
150 151 152 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 150 def hash [drg_id, drg_promotion_status, rpc_promotion_status, vc_promotion_status, ipsec_promotion_status].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 194 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
188 189 190 |
# File 'lib/oci/vn_monitoring/models/drg_promotion_status_response.rb', line 188 def to_s to_hash.to_s end |