azure_mgmt_scheduler 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -49,6 +49,8 @@ module Azure::Scheduler::Mgmt::V2016_03_01
49
49
  serialized_name: 'authentication',
50
50
  type: {
51
51
  name: 'Composite',
52
+ polymorphic_discriminator: 'type',
53
+ uber_parent: 'HttpAuthentication',
52
54
  class_name: 'HttpAuthentication'
53
55
  }
54
56
  },
@@ -13,6 +13,13 @@ module Azure::Scheduler::Mgmt::V2016_03_01
13
13
 
14
14
  include MsRestAzure
15
15
 
16
+
17
+ def initialize
18
+ @type = "ActiveDirectoryOAuth"
19
+ end
20
+
21
+ attr_accessor :type
22
+
16
23
  # @return [String] Gets or sets the secret, return value will always be
17
24
  # empty.
18
25
  attr_accessor :secret
@@ -35,18 +42,17 @@ module Azure::Scheduler::Mgmt::V2016_03_01
35
42
  {
36
43
  client_side_validation: true,
37
44
  required: false,
38
- serialized_name: 'OAuthAuthentication',
45
+ serialized_name: 'ActiveDirectoryOAuth',
39
46
  type: {
40
47
  name: 'Composite',
41
48
  class_name: 'OAuthAuthentication',
42
49
  model_properties: {
43
50
  type: {
44
51
  client_side_validation: true,
45
- required: false,
52
+ required: true,
46
53
  serialized_name: 'type',
47
54
  type: {
48
- name: 'Enum',
49
- module: 'HttpAuthenticationType'
55
+ name: 'String'
50
56
  }
51
57
  },
52
58
  secret: {
@@ -108,6 +108,9 @@ module Azure::Scheduler::Mgmt::V2016_03_01
108
108
  fail ArgumentError, 'path is nil' if path.nil?
109
109
 
110
110
  request_url = options[:base_url] || @base_url
111
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
112
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
113
+ end
111
114
 
112
115
  request_headers = @request_headers
113
116
  request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
@@ -124,7 +127,7 @@ module Azure::Scheduler::Mgmt::V2016_03_01
124
127
  #
125
128
  def add_telemetry
126
129
  sdk_information = 'azure_mgmt_scheduler'
127
- sdk_information = "#{sdk_information}/0.15.2"
130
+ sdk_information = "#{sdk_information}/0.16.0"
128
131
  add_user_agent_information(sdk_information)
129
132
  end
130
133
  end
@@ -4,7 +4,8 @@
4
4
 
5
5
  require 'azure_mgmt_scheduler'
6
6
 
7
- module Azure::Scheduler::Profiles::Latest::Mgmt
7
+ module Azure::Scheduler::Profiles::Latest
8
+ module Mgmt
8
9
  JobCollections = Azure::Scheduler::Mgmt::V2016_03_01::JobCollections
9
10
  Jobs = Azure::Scheduler::Mgmt::V2016_03_01::Jobs
10
11
 
@@ -45,7 +46,6 @@ module Azure::Scheduler::Profiles::Latest::Mgmt
45
46
  JobCollectionState = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionState
46
47
  RecurrenceFrequency = Azure::Scheduler::Mgmt::V2016_03_01::Models::RecurrenceFrequency
47
48
  JobActionType = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobActionType
48
- HttpAuthenticationType = Azure::Scheduler::Mgmt::V2016_03_01::Models::HttpAuthenticationType
49
49
  RetryType = Azure::Scheduler::Mgmt::V2016_03_01::Models::RetryType
50
50
  DayOfWeek = Azure::Scheduler::Mgmt::V2016_03_01::Models::DayOfWeek
51
51
  JobScheduleDay = Azure::Scheduler::Mgmt::V2016_03_01::Models::JobScheduleDay
@@ -57,9 +57,9 @@ module Azure::Scheduler::Profiles::Latest::Mgmt
57
57
  end
58
58
 
59
59
  #
60
- # Scheduler
60
+ # SchedulerManagementClass
61
61
  #
62
- class SchedulerClass
62
+ class SchedulerManagementClass
63
63
  attr_reader :job_collections, :jobs, :configurable, :base_url, :options, :model_classes
64
64
 
65
65
  def initialize(options = {})
@@ -71,154 +71,169 @@ module Azure::Scheduler::Profiles::Latest::Mgmt
71
71
 
72
72
  reset!(options)
73
73
 
74
- @configurable, @base_url, @options = self, nil, nil
74
+ @configurable = self
75
+ @base_url = options[:base_url].nil? ? nil:options[:base_url]
76
+ @options = options[:options].nil? ? nil:options[:options]
75
77
 
76
- client_0 = Azure::Scheduler::Mgmt::V2016_03_01::SchedulerManagementClient.new(configurable.credentials, base_url, options)
77
- if(client_0.respond_to?(:subscription_id))
78
- client_0.subscription_id = configurable.subscription_id
78
+ @client_0 = Azure::Scheduler::Mgmt::V2016_03_01::SchedulerManagementClient.new(configurable.credentials, base_url, options)
79
+ if(@client_0.respond_to?(:subscription_id))
80
+ @client_0.subscription_id = configurable.subscription_id
79
81
  end
80
- @job_collections = client_0.job_collections
81
- @jobs = client_0.jobs
82
+ add_telemetry(@client_0)
83
+ @job_collections = @client_0.job_collections
84
+ @jobs = @client_0.jobs
82
85
 
83
86
  @model_classes = ModelClasses.new
84
87
  end
85
88
 
86
- class ModelClasses
87
- def job_recurrence
88
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobRecurrence
89
- end
90
- def sku
91
- Azure::Scheduler::Mgmt::V2016_03_01::Models::Sku
92
- end
93
- def job_status
94
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobStatus
95
- end
96
- def job_collection_quota
97
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionQuota
98
- end
99
- def job_properties
100
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobProperties
101
- end
102
- def job_collection_definition
103
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionDefinition
104
- end
105
- def job_definition
106
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobDefinition
107
- end
108
- def http_authentication
109
- Azure::Scheduler::Mgmt::V2016_03_01::Models::HttpAuthentication
110
- end
111
- def job_list_result
112
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobListResult
113
- end
114
- def storage_queue_message
115
- Azure::Scheduler::Mgmt::V2016_03_01::Models::StorageQueueMessage
116
- end
117
- def job_history_definition_properties
118
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryDefinitionProperties
119
- end
120
- def http_request
121
- Azure::Scheduler::Mgmt::V2016_03_01::Models::HttpRequest
122
- end
123
- def retry_policy
124
- Azure::Scheduler::Mgmt::V2016_03_01::Models::RetryPolicy
125
- end
126
- def service_bus_brokered_message_properties
127
- Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusBrokeredMessageProperties
128
- end
129
- def job_action
130
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobAction
131
- end
132
- def job_recurrence_schedule
133
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobRecurrenceSchedule
134
- end
135
- def job_history_definition
136
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryDefinition
137
- end
138
- def job_collection_properties
139
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionProperties
140
- end
141
- def job_history_list_result
142
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryListResult
143
- end
144
- def job_error_action
145
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobErrorAction
146
- end
147
- def job_history_filter
148
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryFilter
149
- end
150
- def job_max_recurrence
151
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobMaxRecurrence
152
- end
153
- def job_state_filter
154
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobStateFilter
155
- end
156
- def job_recurrence_schedule_monthly_occurrence
157
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobRecurrenceScheduleMonthlyOccurrence
158
- end
159
- def service_bus_message
160
- Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusMessage
161
- end
162
- def job_collection_list_result
163
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionListResult
164
- end
165
- def service_bus_authentication
166
- Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusAuthentication
167
- end
168
- def service_bus_queue_message
169
- Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusQueueMessage
170
- end
171
- def service_bus_topic_message
172
- Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusTopicMessage
173
- end
174
- def client_cert_authentication
175
- Azure::Scheduler::Mgmt::V2016_03_01::Models::ClientCertAuthentication
176
- end
177
- def basic_authentication
178
- Azure::Scheduler::Mgmt::V2016_03_01::Models::BasicAuthentication
179
- end
180
- def oauth_authentication
181
- Azure::Scheduler::Mgmt::V2016_03_01::Models::OAuthAuthentication
182
- end
183
- def sku_definition
184
- Azure::Scheduler::Mgmt::V2016_03_01::Models::SkuDefinition
185
- end
186
- def job_collection_state
187
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionState
188
- end
189
- def recurrence_frequency
190
- Azure::Scheduler::Mgmt::V2016_03_01::Models::RecurrenceFrequency
191
- end
192
- def job_action_type
193
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobActionType
194
- end
195
- def http_authentication_type
196
- Azure::Scheduler::Mgmt::V2016_03_01::Models::HttpAuthenticationType
197
- end
198
- def retry_type
199
- Azure::Scheduler::Mgmt::V2016_03_01::Models::RetryType
200
- end
201
- def day_of_week
202
- Azure::Scheduler::Mgmt::V2016_03_01::Models::DayOfWeek
203
- end
204
- def job_schedule_day
205
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobScheduleDay
206
- end
207
- def job_state
208
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobState
209
- end
210
- def job_history_action_name
211
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryActionName
212
- end
213
- def job_execution_status
214
- Azure::Scheduler::Mgmt::V2016_03_01::Models::JobExecutionStatus
215
- end
216
- def service_bus_authentication_type
217
- Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusAuthenticationType
218
- end
219
- def service_bus_transport_type
220
- Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusTransportType
89
+ def add_telemetry(client)
90
+ profile_information = 'Profiles/Latest/Scheduler/Mgmt'
91
+ client.add_user_agent_information(profile_information)
92
+ end
93
+
94
+ def method_missing(method, *args)
95
+ if @client_0.respond_to?method
96
+ @client_0.send(method, *args)
97
+ else
98
+ super
221
99
  end
222
100
  end
101
+
102
+ end
103
+
104
+ class ModelClasses
105
+ def job_recurrence
106
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobRecurrence
107
+ end
108
+ def sku
109
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::Sku
110
+ end
111
+ def job_status
112
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobStatus
113
+ end
114
+ def job_collection_quota
115
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionQuota
116
+ end
117
+ def job_properties
118
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobProperties
119
+ end
120
+ def job_collection_definition
121
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionDefinition
122
+ end
123
+ def job_definition
124
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobDefinition
125
+ end
126
+ def http_authentication
127
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::HttpAuthentication
128
+ end
129
+ def job_list_result
130
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobListResult
131
+ end
132
+ def storage_queue_message
133
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::StorageQueueMessage
134
+ end
135
+ def job_history_definition_properties
136
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryDefinitionProperties
137
+ end
138
+ def http_request
139
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::HttpRequest
140
+ end
141
+ def retry_policy
142
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::RetryPolicy
143
+ end
144
+ def service_bus_brokered_message_properties
145
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusBrokeredMessageProperties
146
+ end
147
+ def job_action
148
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobAction
149
+ end
150
+ def job_recurrence_schedule
151
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobRecurrenceSchedule
152
+ end
153
+ def job_history_definition
154
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryDefinition
155
+ end
156
+ def job_collection_properties
157
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionProperties
158
+ end
159
+ def job_history_list_result
160
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryListResult
161
+ end
162
+ def job_error_action
163
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobErrorAction
164
+ end
165
+ def job_history_filter
166
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryFilter
167
+ end
168
+ def job_max_recurrence
169
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobMaxRecurrence
170
+ end
171
+ def job_state_filter
172
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobStateFilter
173
+ end
174
+ def job_recurrence_schedule_monthly_occurrence
175
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobRecurrenceScheduleMonthlyOccurrence
176
+ end
177
+ def service_bus_message
178
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusMessage
179
+ end
180
+ def job_collection_list_result
181
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionListResult
182
+ end
183
+ def service_bus_authentication
184
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusAuthentication
185
+ end
186
+ def service_bus_queue_message
187
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusQueueMessage
188
+ end
189
+ def service_bus_topic_message
190
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusTopicMessage
191
+ end
192
+ def client_cert_authentication
193
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::ClientCertAuthentication
194
+ end
195
+ def basic_authentication
196
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::BasicAuthentication
197
+ end
198
+ def oauth_authentication
199
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::OAuthAuthentication
200
+ end
201
+ def sku_definition
202
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::SkuDefinition
203
+ end
204
+ def job_collection_state
205
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobCollectionState
206
+ end
207
+ def recurrence_frequency
208
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::RecurrenceFrequency
209
+ end
210
+ def job_action_type
211
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobActionType
212
+ end
213
+ def retry_type
214
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::RetryType
215
+ end
216
+ def day_of_week
217
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::DayOfWeek
218
+ end
219
+ def job_schedule_day
220
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobScheduleDay
221
+ end
222
+ def job_state
223
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobState
224
+ end
225
+ def job_history_action_name
226
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobHistoryActionName
227
+ end
228
+ def job_execution_status
229
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::JobExecutionStatus
230
+ end
231
+ def service_bus_authentication_type
232
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusAuthenticationType
233
+ end
234
+ def service_bus_transport_type
235
+ Azure::Scheduler::Mgmt::V2016_03_01::Models::ServiceBusTransportType
236
+ end
223
237
  end
238
+ end
224
239
  end
@@ -5,17 +5,36 @@
5
5
  require 'profiles/latest/scheduler_module_definition'
6
6
  require 'profiles/latest/modules/scheduler_profile_module'
7
7
 
8
- module Azure::Scheduler::Profiles::Latest::Mgmt
9
- #
10
- # Client class for the Latest profile SDK.
11
- #
12
- class Client < SchedulerClass
13
- include MsRestAzure::Common::Configurable
8
+ module Azure::Scheduler::Profiles::Latest
9
+ module Mgmt
10
+ #
11
+ # Client class for the Latest profile SDK.
12
+ #
13
+ class Client < SchedulerManagementClass
14
+ include MsRestAzure::Common::Configurable
14
15
 
16
+ #
17
+ # Initializes a new instance of the Client class.
18
+ # @param options [Hash] hash of client options.
19
+ # options = {
20
+ # tenant_id: 'YOUR TENANT ID',
21
+ # client_id: 'YOUR CLIENT ID',
22
+ # client_secret: 'YOUR CLIENT SECRET',
23
+ # subscription_id: 'YOUR SUBSCRIPTION ID',
24
+ # credentials: credentials,
25
+ # active_directory_settings: active_directory_settings,
26
+ # base_url: 'YOUR BASE URL',
27
+ # options: options
28
+ # }
29
+ # 'credentials' are optional and if not passed in the hash, will be obtained
30
+ # from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
31
+ #
32
+ # Also, base_url, active_directory_settings & options are optional.
33
+ #
34
+ def initialize(options = {})
35
+ super(options)
36
+ end
15
37
 
16
- def initialize(options = {})
17
- super(options)
18
38
  end
19
-
20
39
  end
21
40
  end
@@ -6,4 +6,3 @@ module Azure end
6
6
  module Azure::Scheduler end
7
7
  module Azure::Scheduler::Profiles end
8
8
  module Azure::Scheduler::Profiles::Latest end
9
- module Azure::Scheduler::Profiles::Latest::Mgmt end