Class: Samsara::Types::CellConnectivityResponseResponseBody
- Inherits:
-
Object
- Object
- Samsara::Types::CellConnectivityResponseResponseBody
- Defined in:
- lib/samsara_api/types/cell_connectivity_response_response_body.rb
Overview
Gateway cellular connectivity information.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#operator ⇒ String
readonly
The cellular network provider name.
-
#signal_bar ⇒ Object
readonly
4/4,unknown.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Samsara::Types::CellConnectivityResponseResponseBody
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(operator: OMIT, signal_bar: OMIT, additional_properties: nil) ⇒ Samsara::Types::CellConnectivityResponseResponseBody constructor
- #to_json ⇒ String
Constructor Details
#initialize(operator: OMIT, signal_bar: OMIT, additional_properties: nil) ⇒ Samsara::Types::CellConnectivityResponseResponseBody
28 29 30 31 32 33 34 35 |
# File 'lib/samsara_api/types/cell_connectivity_response_response_body.rb', line 28 def initialize(operator: OMIT, signal_bar: OMIT, additional_properties: nil) @operator = operator if operator != OMIT = if != OMIT @additional_properties = additional_properties @_field_set = { "operator": operator, "signalBar": }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
16 17 18 |
# File 'lib/samsara_api/types/cell_connectivity_response_response_body.rb', line 16 def additional_properties @additional_properties end |
#operator ⇒ String (readonly)
Returns The cellular network provider name.
11 12 13 |
# File 'lib/samsara_api/types/cell_connectivity_response_response_body.rb', line 11 def operator @operator end |
#signal_bar ⇒ Object (readonly)
4/4, unknown
14 15 16 |
# File 'lib/samsara_api/types/cell_connectivity_response_response_body.rb', line 14 def end |
Class Method Details
.from_json(json_object:) ⇒ Samsara::Types::CellConnectivityResponseResponseBody
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/samsara_api/types/cell_connectivity_response_response_body.rb', line 40 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) operator = parsed_json["operator"] = parsed_json["signalBar"] new( operator: operator, signal_bar: , additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
63 64 65 66 |
# File 'lib/samsara_api/types/cell_connectivity_response_response_body.rb', line 63 def self.validate_raw(obj:) obj.operator&.is_a?(String) != false || raise("Passed value for field obj.operator is not the expected type, validation failed.") obj.&.is_a?(Samsara::Types::CellConnectivityResponseResponseBodySignalBar) != false || raise("Passed value for field obj.signal_bar is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
54 55 56 |
# File 'lib/samsara_api/types/cell_connectivity_response_response_body.rb', line 54 def to_json @_field_set&.to_json end |