Class: Azure::ARM::Scheduler::Models::ServiceBusMessage
- Inherits:
-
Object
- Object
- Azure::ARM::Scheduler::Models::ServiceBusMessage
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_scheduler/models/service_bus_message.rb
Overview
Model object.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#authentication ⇒ ServiceBusAuthentication
Gets or sets the authentication.
-
#brokered_message_properties ⇒ ServiceBusBrokeredMessageProperties
brokered message properties.
-
#custom_message_properties ⇒ Hash{String => String}
properties.
-
#message ⇒ String
Gets or sets the message.
-
#namespace ⇒ String
Gets or sets the namespace.
-
#transport_type ⇒ ServiceBusTransportType
Possible values include: ‘NotSpecified’, ‘NetMessaging’, ‘AMQP’.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ ServiceBusMessage
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
#authentication ⇒ ServiceBusAuthentication
Returns Gets or sets the authentication.
16 17 18 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_message.rb', line 16 def authentication @authentication end |
#brokered_message_properties ⇒ ServiceBusBrokeredMessageProperties
brokered message properties.
20 21 22 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_message.rb', line 20 def end |
#custom_message_properties ⇒ Hash{String => String}
properties.
24 25 26 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_message.rb', line 24 def end |
#message ⇒ String
Returns Gets or sets the message.
27 28 29 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_message.rb', line 27 def end |
#namespace ⇒ String
Returns Gets or sets the namespace.
30 31 32 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_message.rb', line 30 def namespace @namespace end |
#transport_type ⇒ ServiceBusTransportType
Possible values include: ‘NotSpecified’, ‘NetMessaging’, ‘AMQP’
34 35 36 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_message.rb', line 34 def transport_type @transport_type end |
Class Method Details
.deserialize_object(object) ⇒ ServiceBusMessage
Deserializes given Ruby Hash into Model object.
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 111 112 113 114 115 116 117 118 119 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_message.rb', line 86 def self.deserialize_object(object) return if object.nil? output_object = ServiceBusMessage.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 output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_message.rb', line 50 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? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
39 40 41 42 43 |
# File 'lib/azure_mgmt_scheduler/models/service_bus_message.rb', line 39 def validate @authentication.validate unless @authentication.nil? .validate unless .nil? .each{ |e| e.validate if e.respond_to?(:validate) } unless .nil? end |