azure_event_grid 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2018-01-01/generated/azure_event_grid.rb +37 -0
- data/lib/2018-01-01/generated/azure_event_grid/event_grid_client.rb +232 -0
- data/lib/2018-01-01/generated/azure_event_grid/models/event_grid_event.rb +124 -0
- data/lib/2018-01-01/generated/azure_event_grid/models/event_hub_capture_file_created_event_data.rb +135 -0
- data/lib/2018-01-01/generated/azure_event_grid/models/resource_delete_cancel_data.rb +158 -0
- data/lib/2018-01-01/generated/azure_event_grid/models/resource_delete_failure_data.rb +158 -0
- data/lib/2018-01-01/generated/azure_event_grid/models/resource_delete_success_data.rb +158 -0
- data/lib/2018-01-01/generated/azure_event_grid/models/resource_write_cancel_data.rb +158 -0
- data/lib/2018-01-01/generated/azure_event_grid/models/resource_write_failure_data.rb +158 -0
- data/lib/2018-01-01/generated/azure_event_grid/models/resource_write_success_data.rb +158 -0
- data/lib/2018-01-01/generated/azure_event_grid/models/storage_blob_created_event_data.rb +157 -0
- data/lib/2018-01-01/generated/azure_event_grid/models/storage_blob_deleted_event_data.rb +133 -0
- data/lib/2018-01-01/generated/azure_event_grid/module_definition.rb +8 -0
- data/lib/azure_event_grid.rb +6 -0
- data/lib/module_definition.rb +6 -0
- data/lib/profiles/latest/eventgrid_latest_profile_client.rb +38 -0
- data/lib/profiles/latest/eventgrid_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/eventgrid_profile_module.rb +89 -0
- data/lib/version.rb +7 -0
- metadata +138 -0
@@ -0,0 +1,157 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::EventGrid::V2018_01_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Schema of the Data property of an EventGridEvent for an
|
10
|
+
# Microsoft.Storage.BlobCreated event.
|
11
|
+
#
|
12
|
+
class StorageBlobCreatedEventData
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] The name of the API/operation that triggered this
|
17
|
+
# event.
|
18
|
+
attr_accessor :api
|
19
|
+
|
20
|
+
# @return [String] A request id provided by the client of the storage API
|
21
|
+
# operation that triggered this event.
|
22
|
+
attr_accessor :client_request_id
|
23
|
+
|
24
|
+
# @return [String] The request id generated by the Storage service for
|
25
|
+
# the storage API operation that triggered this event.
|
26
|
+
attr_accessor :request_id
|
27
|
+
|
28
|
+
# @return [String] The etag of the object at the time this event was
|
29
|
+
# triggered.
|
30
|
+
attr_accessor :e_tag
|
31
|
+
|
32
|
+
# @return [String] The content type of the blob. This is the same as what
|
33
|
+
# would be returned in the Content-Type header from the blob.
|
34
|
+
attr_accessor :content_type
|
35
|
+
|
36
|
+
# @return [Integer] The size of the blob in bytes. This is the same as
|
37
|
+
# what would be returned in the Content-Length header from the blob.
|
38
|
+
attr_accessor :content_length
|
39
|
+
|
40
|
+
# @return [String] The type of blob.
|
41
|
+
attr_accessor :blob_type
|
42
|
+
|
43
|
+
# @return [String] The path to the blob.
|
44
|
+
attr_accessor :url
|
45
|
+
|
46
|
+
# @return [String] An opaque string value representing the logical
|
47
|
+
# sequence of events for any particular blob name. Users can use standard
|
48
|
+
# string comparison to understand the relative sequence of two events on
|
49
|
+
# the same blob name.
|
50
|
+
attr_accessor :sequencer
|
51
|
+
|
52
|
+
# @return For service use only. Diagnostic data occasionally included by
|
53
|
+
# the Azure Storage service. This property should be ignored by event
|
54
|
+
# consumers.
|
55
|
+
attr_accessor :storage_diagnostics
|
56
|
+
|
57
|
+
|
58
|
+
#
|
59
|
+
# Mapper for StorageBlobCreatedEventData class as Ruby Hash.
|
60
|
+
# This will be used for serialization/deserialization.
|
61
|
+
#
|
62
|
+
def self.mapper()
|
63
|
+
{
|
64
|
+
client_side_validation: true,
|
65
|
+
required: false,
|
66
|
+
serialized_name: 'StorageBlobCreatedEventData',
|
67
|
+
type: {
|
68
|
+
name: 'Composite',
|
69
|
+
class_name: 'StorageBlobCreatedEventData',
|
70
|
+
model_properties: {
|
71
|
+
api: {
|
72
|
+
client_side_validation: true,
|
73
|
+
required: false,
|
74
|
+
serialized_name: 'api',
|
75
|
+
type: {
|
76
|
+
name: 'String'
|
77
|
+
}
|
78
|
+
},
|
79
|
+
client_request_id: {
|
80
|
+
client_side_validation: true,
|
81
|
+
required: false,
|
82
|
+
serialized_name: 'clientRequestId',
|
83
|
+
type: {
|
84
|
+
name: 'String'
|
85
|
+
}
|
86
|
+
},
|
87
|
+
request_id: {
|
88
|
+
client_side_validation: true,
|
89
|
+
required: false,
|
90
|
+
serialized_name: 'requestId',
|
91
|
+
type: {
|
92
|
+
name: 'String'
|
93
|
+
}
|
94
|
+
},
|
95
|
+
e_tag: {
|
96
|
+
client_side_validation: true,
|
97
|
+
required: false,
|
98
|
+
serialized_name: 'eTag',
|
99
|
+
type: {
|
100
|
+
name: 'String'
|
101
|
+
}
|
102
|
+
},
|
103
|
+
content_type: {
|
104
|
+
client_side_validation: true,
|
105
|
+
required: false,
|
106
|
+
serialized_name: 'contentType',
|
107
|
+
type: {
|
108
|
+
name: 'String'
|
109
|
+
}
|
110
|
+
},
|
111
|
+
content_length: {
|
112
|
+
client_side_validation: true,
|
113
|
+
required: false,
|
114
|
+
serialized_name: 'contentLength',
|
115
|
+
type: {
|
116
|
+
name: 'Number'
|
117
|
+
}
|
118
|
+
},
|
119
|
+
blob_type: {
|
120
|
+
client_side_validation: true,
|
121
|
+
required: false,
|
122
|
+
serialized_name: 'blobType',
|
123
|
+
type: {
|
124
|
+
name: 'String'
|
125
|
+
}
|
126
|
+
},
|
127
|
+
url: {
|
128
|
+
client_side_validation: true,
|
129
|
+
required: false,
|
130
|
+
serialized_name: 'url',
|
131
|
+
type: {
|
132
|
+
name: 'String'
|
133
|
+
}
|
134
|
+
},
|
135
|
+
sequencer: {
|
136
|
+
client_side_validation: true,
|
137
|
+
required: false,
|
138
|
+
serialized_name: 'sequencer',
|
139
|
+
type: {
|
140
|
+
name: 'String'
|
141
|
+
}
|
142
|
+
},
|
143
|
+
storage_diagnostics: {
|
144
|
+
client_side_validation: true,
|
145
|
+
required: false,
|
146
|
+
serialized_name: 'storageDiagnostics',
|
147
|
+
type: {
|
148
|
+
name: 'Object'
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
@@ -0,0 +1,133 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::EventGrid::V2018_01_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Schema of the Data property of an EventGridEvent for an
|
10
|
+
# Microsoft.Storage.BlobDeleted event.
|
11
|
+
#
|
12
|
+
class StorageBlobDeletedEventData
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] The name of the API/operation that triggered this
|
17
|
+
# event.
|
18
|
+
attr_accessor :api
|
19
|
+
|
20
|
+
# @return [String] A request id provided by the client of the storage API
|
21
|
+
# operation that triggered this event.
|
22
|
+
attr_accessor :client_request_id
|
23
|
+
|
24
|
+
# @return [String] The request id generated by the Storage service for
|
25
|
+
# the storage API operation that triggered this event.
|
26
|
+
attr_accessor :request_id
|
27
|
+
|
28
|
+
# @return [String] The content type of the blob. This is the same as what
|
29
|
+
# would be returned in the Content-Type header from the blob.
|
30
|
+
attr_accessor :content_type
|
31
|
+
|
32
|
+
# @return [String] The type of blob.
|
33
|
+
attr_accessor :blob_type
|
34
|
+
|
35
|
+
# @return [String] The path to the blob.
|
36
|
+
attr_accessor :url
|
37
|
+
|
38
|
+
# @return [String] An opaque string value representing the logical
|
39
|
+
# sequence of events for any particular blob name. Users can use standard
|
40
|
+
# string comparison to understand the relative sequence of two events on
|
41
|
+
# the same blob name.
|
42
|
+
attr_accessor :sequencer
|
43
|
+
|
44
|
+
# @return For service use only. Diagnostic data occasionally included by
|
45
|
+
# the Azure Storage service. This property should be ignored by event
|
46
|
+
# consumers.
|
47
|
+
attr_accessor :storage_diagnostics
|
48
|
+
|
49
|
+
|
50
|
+
#
|
51
|
+
# Mapper for StorageBlobDeletedEventData class as Ruby Hash.
|
52
|
+
# This will be used for serialization/deserialization.
|
53
|
+
#
|
54
|
+
def self.mapper()
|
55
|
+
{
|
56
|
+
client_side_validation: true,
|
57
|
+
required: false,
|
58
|
+
serialized_name: 'StorageBlobDeletedEventData',
|
59
|
+
type: {
|
60
|
+
name: 'Composite',
|
61
|
+
class_name: 'StorageBlobDeletedEventData',
|
62
|
+
model_properties: {
|
63
|
+
api: {
|
64
|
+
client_side_validation: true,
|
65
|
+
required: false,
|
66
|
+
serialized_name: 'api',
|
67
|
+
type: {
|
68
|
+
name: 'String'
|
69
|
+
}
|
70
|
+
},
|
71
|
+
client_request_id: {
|
72
|
+
client_side_validation: true,
|
73
|
+
required: false,
|
74
|
+
serialized_name: 'clientRequestId',
|
75
|
+
type: {
|
76
|
+
name: 'String'
|
77
|
+
}
|
78
|
+
},
|
79
|
+
request_id: {
|
80
|
+
client_side_validation: true,
|
81
|
+
required: false,
|
82
|
+
serialized_name: 'requestId',
|
83
|
+
type: {
|
84
|
+
name: 'String'
|
85
|
+
}
|
86
|
+
},
|
87
|
+
content_type: {
|
88
|
+
client_side_validation: true,
|
89
|
+
required: false,
|
90
|
+
serialized_name: 'contentType',
|
91
|
+
type: {
|
92
|
+
name: 'String'
|
93
|
+
}
|
94
|
+
},
|
95
|
+
blob_type: {
|
96
|
+
client_side_validation: true,
|
97
|
+
required: false,
|
98
|
+
serialized_name: 'blobType',
|
99
|
+
type: {
|
100
|
+
name: 'String'
|
101
|
+
}
|
102
|
+
},
|
103
|
+
url: {
|
104
|
+
client_side_validation: true,
|
105
|
+
required: false,
|
106
|
+
serialized_name: 'url',
|
107
|
+
type: {
|
108
|
+
name: 'String'
|
109
|
+
}
|
110
|
+
},
|
111
|
+
sequencer: {
|
112
|
+
client_side_validation: true,
|
113
|
+
required: false,
|
114
|
+
serialized_name: 'sequencer',
|
115
|
+
type: {
|
116
|
+
name: 'String'
|
117
|
+
}
|
118
|
+
},
|
119
|
+
storage_diagnostics: {
|
120
|
+
client_side_validation: true,
|
121
|
+
required: false,
|
122
|
+
serialized_name: 'storageDiagnostics',
|
123
|
+
type: {
|
124
|
+
name: 'Object'
|
125
|
+
}
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require '2018-01-01/generated/azure_event_grid'
|
6
|
+
require 'profiles/latest/eventgrid_latest_profile_client'
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'profiles/latest/eventgrid_module_definition'
|
6
|
+
require 'profiles/latest/modules/eventgrid_profile_module'
|
7
|
+
|
8
|
+
module Azure::EventGrid::Profiles::Latest
|
9
|
+
#
|
10
|
+
# Client class for the Latest profile SDK.
|
11
|
+
#
|
12
|
+
class Client < EventGridDataClass
|
13
|
+
include MsRestAzure::Common::Configurable
|
14
|
+
|
15
|
+
#
|
16
|
+
# Initializes a new instance of the Client class.
|
17
|
+
# @param options [Hash] hash of client options.
|
18
|
+
# options = {
|
19
|
+
# tenant_id: 'YOUR TENANT ID',
|
20
|
+
# client_id: 'YOUR CLIENT ID',
|
21
|
+
# client_secret: 'YOUR CLIENT SECRET',
|
22
|
+
# subscription_id: 'YOUR SUBSCRIPTION ID',
|
23
|
+
# credentials: credentials,
|
24
|
+
# active_directory_settings: active_directory_settings,
|
25
|
+
# base_url: 'YOUR BASE URL',
|
26
|
+
# options: options
|
27
|
+
# }
|
28
|
+
# 'credentials' are optional and if not passed in the hash, will be obtained
|
29
|
+
# from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
|
30
|
+
#
|
31
|
+
# Also, base_url, active_directory_settings & options are optional.
|
32
|
+
#
|
33
|
+
def initialize(options = {})
|
34
|
+
super(options)
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::EventGrid end
|
7
|
+
module Azure::EventGrid::Profiles end
|
8
|
+
module Azure::EventGrid::Profiles::Latest end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'azure_event_grid'
|
6
|
+
|
7
|
+
module Azure::EventGrid::Profiles::Latest
|
8
|
+
|
9
|
+
module Models
|
10
|
+
ResourceWriteCancelData = Azure::EventGrid::V2018_01_01::Models::ResourceWriteCancelData
|
11
|
+
StorageBlobCreatedEventData = Azure::EventGrid::V2018_01_01::Models::StorageBlobCreatedEventData
|
12
|
+
ResourceDeleteSuccessData = Azure::EventGrid::V2018_01_01::Models::ResourceDeleteSuccessData
|
13
|
+
EventHubCaptureFileCreatedEventData = Azure::EventGrid::V2018_01_01::Models::EventHubCaptureFileCreatedEventData
|
14
|
+
ResourceDeleteFailureData = Azure::EventGrid::V2018_01_01::Models::ResourceDeleteFailureData
|
15
|
+
ResourceWriteFailureData = Azure::EventGrid::V2018_01_01::Models::ResourceWriteFailureData
|
16
|
+
ResourceDeleteCancelData = Azure::EventGrid::V2018_01_01::Models::ResourceDeleteCancelData
|
17
|
+
ResourceWriteSuccessData = Azure::EventGrid::V2018_01_01::Models::ResourceWriteSuccessData
|
18
|
+
EventGridEvent = Azure::EventGrid::V2018_01_01::Models::EventGridEvent
|
19
|
+
StorageBlobDeletedEventData = Azure::EventGrid::V2018_01_01::Models::StorageBlobDeletedEventData
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
# EventGridDataClass
|
24
|
+
#
|
25
|
+
class EventGridDataClass
|
26
|
+
attr_reader :configurable, :base_url, :options, :model_classes
|
27
|
+
|
28
|
+
def initialize(options = {})
|
29
|
+
if options.is_a?(Hash) && options.length == 0
|
30
|
+
@options = setup_default_options
|
31
|
+
else
|
32
|
+
@options = options
|
33
|
+
end
|
34
|
+
|
35
|
+
reset!(options)
|
36
|
+
|
37
|
+
@configurable = self
|
38
|
+
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
39
|
+
@options = options[:options].nil? ? nil:options[:options]
|
40
|
+
|
41
|
+
client_0 = Azure::EventGrid::V2018_01_01::EventGridClient.new(configurable.credentials, options)
|
42
|
+
if(client_0.respond_to?(:subscription_id))
|
43
|
+
client_0.subscription_id = configurable.subscription_id
|
44
|
+
end
|
45
|
+
add_telemetry(client_0)
|
46
|
+
|
47
|
+
@model_classes = ModelClasses.new
|
48
|
+
end
|
49
|
+
|
50
|
+
def add_telemetry(client)
|
51
|
+
profile_information = 'Profiles/Latest/EventGrid'
|
52
|
+
client.add_user_agent_information(profile_information)
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
class ModelClasses
|
58
|
+
def resource_write_cancel_data
|
59
|
+
Azure::EventGrid::V2018_01_01::Models::ResourceWriteCancelData
|
60
|
+
end
|
61
|
+
def storage_blob_created_event_data
|
62
|
+
Azure::EventGrid::V2018_01_01::Models::StorageBlobCreatedEventData
|
63
|
+
end
|
64
|
+
def resource_delete_success_data
|
65
|
+
Azure::EventGrid::V2018_01_01::Models::ResourceDeleteSuccessData
|
66
|
+
end
|
67
|
+
def event_hub_capture_file_created_event_data
|
68
|
+
Azure::EventGrid::V2018_01_01::Models::EventHubCaptureFileCreatedEventData
|
69
|
+
end
|
70
|
+
def resource_delete_failure_data
|
71
|
+
Azure::EventGrid::V2018_01_01::Models::ResourceDeleteFailureData
|
72
|
+
end
|
73
|
+
def resource_write_failure_data
|
74
|
+
Azure::EventGrid::V2018_01_01::Models::ResourceWriteFailureData
|
75
|
+
end
|
76
|
+
def resource_delete_cancel_data
|
77
|
+
Azure::EventGrid::V2018_01_01::Models::ResourceDeleteCancelData
|
78
|
+
end
|
79
|
+
def resource_write_success_data
|
80
|
+
Azure::EventGrid::V2018_01_01::Models::ResourceWriteSuccessData
|
81
|
+
end
|
82
|
+
def event_grid_event
|
83
|
+
Azure::EventGrid::V2018_01_01::Models::EventGridEvent
|
84
|
+
end
|
85
|
+
def storage_blob_deleted_event_data
|
86
|
+
Azure::EventGrid::V2018_01_01::Models::StorageBlobDeletedEventData
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|