Class: Azure::Signalr::Mgmt::V2020_05_01::Models::UpstreamTemplate
- Inherits:
-
Object
- Object
- Azure::Signalr::Mgmt::V2020_05_01::Models::UpstreamTemplate
- Includes:
- MsRestAzure
- Defined in:
- lib/2020-05-01/generated/azure_mgmt_signalr/models/upstream_template.rb
Overview
Upstream template item settings. It defines the Upstream URL of the incoming requests. The template defines the pattern of the event, the hub or the category of the incoming request that matches current URL template.
Instance Attribute Summary collapse
-
#category_pattern ⇒ String
If not set, it matches any category.
-
#event_pattern ⇒ String
not set, it matches any event.
-
#hub_pattern ⇒ String
not set, it matches any hub.
-
#url_template ⇒ String
predefined parameters hub, category event inside the template, the value of the Upstream URL is dynamically calculated when the client request comes in.
Class Method Summary collapse
-
.mapper ⇒ Object
Mapper for UpstreamTemplate class as Ruby Hash.
Instance Attribute Details
#category_pattern ⇒ String
If not set, it matches any category. There are 3 kind of patterns supported:
-
“*”, it to matches any category name
-
Combine multiple categories with “,”, for example
“connections,messages”, it matches category “connections” and “messages”
-
The single category name, for example, “connections”, it matches the
category “connections”
45 46 47 |
# File 'lib/2020-05-01/generated/azure_mgmt_signalr/models/upstream_template.rb', line 45 def category_pattern @category_pattern end |
#event_pattern ⇒ String
not set, it matches any event. There are 3 kind of patterns supported:
-
“*”, it to matches any event name
-
Combine multiple events with “,”, for example “connect,disconnect”,
it matches event “connect” and “disconnect”
-
The single event name, for example, “connect”, it matches “connect”
34 35 36 |
# File 'lib/2020-05-01/generated/azure_mgmt_signalr/models/upstream_template.rb', line 34 def event_pattern @event_pattern end |
#hub_pattern ⇒ String
not set, it matches any hub. There are 3 kind of patterns supported:
-
“*”, it to matches any hub name
-
Combine multiple hubs with “,”, for example “hub1,hub2”, it matches
“hub1” and “hub2”
-
The single hub name, for example, “hub1”, it matches “hub1”
25 26 27 |
# File 'lib/2020-05-01/generated/azure_mgmt_signalr/models/upstream_template.rb', line 25 def hub_pattern @hub_pattern end |
#url_template ⇒ String
predefined parameters hub, category event inside the template, the value of the Upstream URL is dynamically calculated when the client request comes in. For example, if the urlTemplate is ‘example.com/hub/api/event`, with a client request from hub `chat` connects, it will first POST to this URL: `example.com/chat/api/connect`.
55 56 57 |
# File 'lib/2020-05-01/generated/azure_mgmt_signalr/models/upstream_template.rb', line 55 def url_template @url_template end |
Class Method Details
.mapper ⇒ Object
Mapper for UpstreamTemplate class as Ruby Hash. This will be used for serialization/deserialization.
62 63 64 65 66 67 68 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 106 |
# File 'lib/2020-05-01/generated/azure_mgmt_signalr/models/upstream_template.rb', line 62 def self.mapper() { client_side_validation: true, required: false, serialized_name: 'UpstreamTemplate', type: { name: 'Composite', class_name: 'UpstreamTemplate', model_properties: { hub_pattern: { client_side_validation: true, required: false, serialized_name: 'hubPattern', type: { name: 'String' } }, event_pattern: { client_side_validation: true, required: false, serialized_name: 'eventPattern', type: { name: 'String' } }, category_pattern: { client_side_validation: true, required: false, serialized_name: 'categoryPattern', type: { name: 'String' } }, url_template: { client_side_validation: true, required: true, serialized_name: 'urlTemplate', type: { name: 'String' } } } } } end |