Class: OCI::VnMonitoring::Models::CpeDeviceShapeDetail
- Inherits:
-
Object
- Object
- OCI::VnMonitoring::Models::CpeDeviceShapeDetail
- Defined in:
- lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb
Overview
The detailed information about a particular CPE device type. Compare with CpeDeviceShapeSummary.
Instance Attribute Summary collapse
- #cpe_device_info ⇒ OCI::VnMonitoring::Models::CpeDeviceInfo
-
#cpe_device_shape_id ⇒ String
The OCID of the CPE device shape.
-
#parameters ⇒ Array<OCI::VnMonitoring::Models::CpeDeviceConfigQuestion>
For certain CPE devices types, the customer can provide answers to questions that are specific to the device type.
-
#template ⇒ String
A template of CPE device configuration information that will be merged with the customer's answers to the questions to render the final CPE device configuration content.
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 = {}) ⇒ CpeDeviceShapeDetail
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 = {}) ⇒ CpeDeviceShapeDetail
Initializes the object
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 76 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.cpe_device_shape_id = attributes[:'cpeDeviceShapeId'] if attributes[:'cpeDeviceShapeId'] raise 'You cannot provide both :cpeDeviceShapeId and :cpe_device_shape_id' if attributes.key?(:'cpeDeviceShapeId') && attributes.key?(:'cpe_device_shape_id') self.cpe_device_shape_id = attributes[:'cpe_device_shape_id'] if attributes[:'cpe_device_shape_id'] self.cpe_device_info = attributes[:'cpeDeviceInfo'] if attributes[:'cpeDeviceInfo'] raise 'You cannot provide both :cpeDeviceInfo and :cpe_device_info' if attributes.key?(:'cpeDeviceInfo') && attributes.key?(:'cpe_device_info') self.cpe_device_info = attributes[:'cpe_device_info'] if attributes[:'cpe_device_info'] self.parameters = attributes[:'parameters'] if attributes[:'parameters'] self.template = attributes[:'template'] if attributes[:'template'] end |
Instance Attribute Details
#cpe_device_info ⇒ OCI::VnMonitoring::Models::CpeDeviceInfo
20 21 22 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 20 def cpe_device_info @cpe_device_info end |
#cpe_device_shape_id ⇒ String
The OCID of the CPE device shape. This value uniquely identifies the type of CPE device.
17 18 19 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 17 def cpe_device_shape_id @cpe_device_shape_id end |
#parameters ⇒ Array<OCI::VnMonitoring::Models::CpeDeviceConfigQuestion>
For certain CPE devices types, the customer can provide answers to questions that are specific to the device type. This attribute contains a list of those questions. The Networking service merges the answers with other information and renders a set of CPE configuration content. To provide the answers, use update_tunnel_cpe_device_config.
30 31 32 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 30 def parameters @parameters end |
#template ⇒ String
A template of CPE device configuration information that will be merged with the customer's answers to the questions to render the final CPE device configuration content. Also see:
-
get_cpe_device_config_content
-
get_ipsec_cpe_device_config_content
-
get_tunnel_cpe_device_config_content
40 41 42 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 40 def template @template end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 43 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'cpe_device_shape_id': :'cpeDeviceShapeId', 'cpe_device_info': :'cpeDeviceInfo', 'parameters': :'parameters', 'template': :'template' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 55 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'cpe_device_shape_id': :'String', 'cpe_device_info': :'OCI::VnMonitoring::Models::CpeDeviceInfo', 'parameters': :'Array<OCI::VnMonitoring::Models::CpeDeviceConfigQuestion>', 'template': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
106 107 108 109 110 111 112 113 114 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 106 def ==(other) return true if equal?(other) self.class == other.class && cpe_device_shape_id == other.cpe_device_shape_id && cpe_device_info == other.cpe_device_info && parameters == other.parameters && template == other.template end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 139 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
119 120 121 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 119 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
128 129 130 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 128 def hash [cpe_device_shape_id, cpe_device_info, parameters, template].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
172 173 174 175 176 177 178 179 180 181 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 172 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
166 167 168 |
# File 'lib/oci/vn_monitoring/models/cpe_device_shape_detail.rb', line 166 def to_s to_hash.to_s end |