Class: Azure::ARM::Scheduler::Models::ServiceBusTopicMessage
- Inherits:
-
ServiceBusMessage
- Object
- ServiceBusMessage
- Azure::ARM::Scheduler::Models::ServiceBusTopicMessage
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_scheduler/models/service_bus_topic_message.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#topic_path ⇒ String
Gets or sets the topic path.
Attributes inherited from ServiceBusMessage
#authentication, #brokered_message_properties, #custom_message_properties, #message, #namespace, #transport_type
Class Method Summary collapse
-
.deserialize_object(object) ⇒ ServiceBusTopicMessage
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#topic_path ⇒ String
Returns Gets or sets the topic path.
16 17 18 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_topic_message.rb', line 16 def topic_path @topic_path end |
Class Method Details
.deserialize_object(object) ⇒ ServiceBusTopicMessage
Deserializes given Ruby Hash into Model object.
69 70 71 72 73 74 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 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_topic_message.rb', line 69 def self.deserialize_object(object) return if object.nil? output_object = ServiceBusTopicMessage.new deserialized_property = object['authentication'] unless deserialized_property.nil? deserialized_property = ServiceBusAuthentication.deserialize_object(deserialized_property) end output_object.authentication = deserialized_property deserialized_property = object['brokeredMessageProperties'] unless deserialized_property.nil? deserialized_property = ServiceBusBrokeredMessageProperties.deserialize_object(deserialized_property) end output_object. = deserialized_property deserialized_property = object['customMessageProperties'] output_object. = deserialized_property deserialized_property = object['message'] output_object. = deserialized_property deserialized_property = object['namespace'] output_object.namespace = deserialized_property deserialized_property = object['transportType'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = ServiceBusTransportType.constants.any? { |e| ServiceBusTransportType.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum ServiceBusTransportType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.transport_type = deserialized_property deserialized_property = object['topicPath'] output_object.topic_path = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_topic_message.rb', line 30 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.authentication unless serialized_property.nil? serialized_property = ServiceBusAuthentication.serialize_object(serialized_property) end output_object['authentication'] = serialized_property unless serialized_property.nil? serialized_property = object. unless serialized_property.nil? serialized_property = ServiceBusBrokeredMessageProperties.serialize_object(serialized_property) end output_object['brokeredMessageProperties'] = serialized_property unless serialized_property.nil? serialized_property = object. output_object['customMessageProperties'] = serialized_property unless serialized_property.nil? serialized_property = object. output_object['message'] = serialized_property unless serialized_property.nil? serialized_property = object.namespace output_object['namespace'] = serialized_property unless serialized_property.nil? serialized_property = object.transport_type output_object['transportType'] = serialized_property unless serialized_property.nil? serialized_property = object.topic_path output_object['topicPath'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
21 22 23 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_topic_message.rb', line 21 def validate # Nothing to validate end |