Class: Azure::Signalr::Mgmt::V2020_05_01::Models::UpstreamTemplate

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Attribute Details

#category_patternString

If not set, it matches any category. There are 3 kind of patterns supported:

  1. “*”, it to matches any category name

  2. Combine multiple categories with “,”, for example

“connections,messages”, it matches category “connections” and “messages”

  1. The single category name, for example, “connections”, it matches the

category “connections”

Returns:

  • (String)

    Gets or sets the matching pattern for category names.



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_patternString

not set, it matches any event. There are 3 kind of patterns supported:

  1. “*”, it to matches any event name

  2. Combine multiple events with “,”, for example “connect,disconnect”,

it matches event “connect” and “disconnect”

  1. The single event name, for example, “connect”, it matches “connect”

Returns:

  • (String)

    Gets or sets the matching pattern for event names. If



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_patternString

not set, it matches any hub. There are 3 kind of patterns supported:

  1. “*”, it to matches any hub name

  2. Combine multiple hubs with “,”, for example “hub1,hub2”, it matches

“hub1” and “hub2”

  1. The single hub name, for example, “hub1”, it matches “hub1”

Returns:

  • (String)

    Gets or sets the matching pattern for hub names. If



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_templateString

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`.

Returns:

  • (String)

    Gets or sets the Upstream URL template. You can use 3



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

.mapperObject

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