1 package storagedatalake
2
3
4
5
6
7
8
9 import (
10 "context"
11 "github.com/Azure/go-autorest/autorest"
12 "github.com/Azure/go-autorest/autorest/azure"
13 "github.com/Azure/go-autorest/autorest/validation"
14 "github.com/Azure/go-autorest/tracing"
15 "net/http"
16 )
17
18
19 type FilesystemClient struct {
20 BaseClient
21 }
22
23
24 func NewFilesystemClient(xMsVersion string, accountName string) FilesystemClient {
25 return FilesystemClient{New(xMsVersion, accountName)}
26 }
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 func (client FilesystemClient) Create(ctx context.Context, filesystem string, xMsProperties string, xMsClientRequestID string, timeout *int32, xMsDate string) (result autorest.Response, err error) {
43 if tracing.IsEnabled() {
44 ctx = tracing.StartSpan(ctx, fqdn+"/FilesystemClient.Create")
45 defer func() {
46 sc := -1
47 if result.Response != nil {
48 sc = result.Response.StatusCode
49 }
50 tracing.EndSpan(ctx, sc, err)
51 }()
52 }
53 if err := validation.Validate([]validation.Validation{
54 {TargetValue: filesystem,
55 Constraints: []validation.Constraint{{Target: "filesystem", Name: validation.MaxLength, Rule: 63, Chain: nil},
56 {Target: "filesystem", Name: validation.MinLength, Rule: 3, Chain: nil}}},
57 {TargetValue: xMsClientRequestID,
58 Constraints: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Empty, Rule: false,
59 Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}},
60 {TargetValue: timeout,
61 Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false,
62 Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil {
63 return result, validation.NewError("storagedatalake.FilesystemClient", "Create", err.Error())
64 }
65
66 req, err := client.CreatePreparer(ctx, filesystem, xMsProperties, xMsClientRequestID, timeout, xMsDate)
67 if err != nil {
68 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "Create", nil, "Failure preparing request")
69 return
70 }
71
72 resp, err := client.CreateSender(req)
73 if err != nil {
74 result.Response = resp
75 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "Create", resp, "Failure sending request")
76 return
77 }
78
79 result, err = client.CreateResponder(resp)
80 if err != nil {
81 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "Create", resp, "Failure responding to request")
82 return
83 }
84
85 return
86 }
87
88
89 func (client FilesystemClient) CreatePreparer(ctx context.Context, filesystem string, xMsProperties string, xMsClientRequestID string, timeout *int32, xMsDate string) (*http.Request, error) {
90 urlParameters := map[string]interface{}{
91 "accountName": client.AccountName,
92 "dnsSuffix": client.DNSSuffix,
93 }
94
95 pathParameters := map[string]interface{}{
96 "filesystem": autorest.Encode("path", filesystem),
97 }
98
99 queryParameters := map[string]interface{}{
100 "resource": autorest.Encode("query", "filesystem"),
101 }
102 if timeout != nil {
103 queryParameters["timeout"] = autorest.Encode("query", *timeout)
104 }
105
106 preparer := autorest.CreatePreparer(
107 autorest.AsPut(),
108 autorest.WithCustomBaseURL("https://{accountName}.{dnsSuffix}", urlParameters),
109 autorest.WithPathParameters("/{filesystem}", pathParameters),
110 autorest.WithQueryParameters(queryParameters))
111 if len(xMsProperties) > 0 {
112 preparer = autorest.DecoratePreparer(preparer,
113 autorest.WithHeader("x-ms-properties", autorest.String(xMsProperties)))
114 }
115 if len(xMsClientRequestID) > 0 {
116 preparer = autorest.DecoratePreparer(preparer,
117 autorest.WithHeader("x-ms-client-request-id", autorest.String(xMsClientRequestID)))
118 }
119 if len(xMsDate) > 0 {
120 preparer = autorest.DecoratePreparer(preparer,
121 autorest.WithHeader("x-ms-date", autorest.String(xMsDate)))
122 }
123 if len(client.XMsVersion) > 0 {
124 preparer = autorest.DecoratePreparer(preparer,
125 autorest.WithHeader("x-ms-version", autorest.String(client.XMsVersion)))
126 }
127 return preparer.Prepare((&http.Request{}).WithContext(ctx))
128 }
129
130
131
132 func (client FilesystemClient) CreateSender(req *http.Request) (*http.Response, error) {
133 return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
134 }
135
136
137
138 func (client FilesystemClient) CreateResponder(resp *http.Response) (result autorest.Response, err error) {
139 err = autorest.Respond(
140 resp,
141 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
142 autorest.ByClosing())
143 result.Response = resp
144 return
145 }
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168 func (client FilesystemClient) Delete(ctx context.Context, filesystem string, ifModifiedSince string, ifUnmodifiedSince string, xMsClientRequestID string, timeout *int32, xMsDate string) (result autorest.Response, err error) {
169 if tracing.IsEnabled() {
170 ctx = tracing.StartSpan(ctx, fqdn+"/FilesystemClient.Delete")
171 defer func() {
172 sc := -1
173 if result.Response != nil {
174 sc = result.Response.StatusCode
175 }
176 tracing.EndSpan(ctx, sc, err)
177 }()
178 }
179 if err := validation.Validate([]validation.Validation{
180 {TargetValue: filesystem,
181 Constraints: []validation.Constraint{{Target: "filesystem", Name: validation.MaxLength, Rule: 63, Chain: nil},
182 {Target: "filesystem", Name: validation.MinLength, Rule: 3, Chain: nil}}},
183 {TargetValue: xMsClientRequestID,
184 Constraints: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Empty, Rule: false,
185 Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}},
186 {TargetValue: timeout,
187 Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false,
188 Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil {
189 return result, validation.NewError("storagedatalake.FilesystemClient", "Delete", err.Error())
190 }
191
192 req, err := client.DeletePreparer(ctx, filesystem, ifModifiedSince, ifUnmodifiedSince, xMsClientRequestID, timeout, xMsDate)
193 if err != nil {
194 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "Delete", nil, "Failure preparing request")
195 return
196 }
197
198 resp, err := client.DeleteSender(req)
199 if err != nil {
200 result.Response = resp
201 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "Delete", resp, "Failure sending request")
202 return
203 }
204
205 result, err = client.DeleteResponder(resp)
206 if err != nil {
207 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "Delete", resp, "Failure responding to request")
208 return
209 }
210
211 return
212 }
213
214
215 func (client FilesystemClient) DeletePreparer(ctx context.Context, filesystem string, ifModifiedSince string, ifUnmodifiedSince string, xMsClientRequestID string, timeout *int32, xMsDate string) (*http.Request, error) {
216 urlParameters := map[string]interface{}{
217 "accountName": client.AccountName,
218 "dnsSuffix": client.DNSSuffix,
219 }
220
221 pathParameters := map[string]interface{}{
222 "filesystem": autorest.Encode("path", filesystem),
223 }
224
225 queryParameters := map[string]interface{}{
226 "resource": autorest.Encode("query", "filesystem"),
227 }
228 if timeout != nil {
229 queryParameters["timeout"] = autorest.Encode("query", *timeout)
230 }
231
232 preparer := autorest.CreatePreparer(
233 autorest.AsDelete(),
234 autorest.WithCustomBaseURL("https://{accountName}.{dnsSuffix}", urlParameters),
235 autorest.WithPathParameters("/{filesystem}", pathParameters),
236 autorest.WithQueryParameters(queryParameters))
237 if len(ifModifiedSince) > 0 {
238 preparer = autorest.DecoratePreparer(preparer,
239 autorest.WithHeader("If-Modified-Since", autorest.String(ifModifiedSince)))
240 }
241 if len(ifUnmodifiedSince) > 0 {
242 preparer = autorest.DecoratePreparer(preparer,
243 autorest.WithHeader("If-Unmodified-Since", autorest.String(ifUnmodifiedSince)))
244 }
245 if len(xMsClientRequestID) > 0 {
246 preparer = autorest.DecoratePreparer(preparer,
247 autorest.WithHeader("x-ms-client-request-id", autorest.String(xMsClientRequestID)))
248 }
249 if len(xMsDate) > 0 {
250 preparer = autorest.DecoratePreparer(preparer,
251 autorest.WithHeader("x-ms-date", autorest.String(xMsDate)))
252 }
253 if len(client.XMsVersion) > 0 {
254 preparer = autorest.DecoratePreparer(preparer,
255 autorest.WithHeader("x-ms-version", autorest.String(client.XMsVersion)))
256 }
257 return preparer.Prepare((&http.Request{}).WithContext(ctx))
258 }
259
260
261
262 func (client FilesystemClient) DeleteSender(req *http.Request) (*http.Response, error) {
263 return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
264 }
265
266
267
268 func (client FilesystemClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
269 err = autorest.Respond(
270 resp,
271 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
272 autorest.ByClosing())
273 result.Response = resp
274 return
275 }
276
277
278
279
280
281
282
283
284
285
286
287 func (client FilesystemClient) GetProperties(ctx context.Context, filesystem string, xMsClientRequestID string, timeout *int32, xMsDate string) (result autorest.Response, err error) {
288 if tracing.IsEnabled() {
289 ctx = tracing.StartSpan(ctx, fqdn+"/FilesystemClient.GetProperties")
290 defer func() {
291 sc := -1
292 if result.Response != nil {
293 sc = result.Response.StatusCode
294 }
295 tracing.EndSpan(ctx, sc, err)
296 }()
297 }
298 if err := validation.Validate([]validation.Validation{
299 {TargetValue: filesystem,
300 Constraints: []validation.Constraint{{Target: "filesystem", Name: validation.MaxLength, Rule: 63, Chain: nil},
301 {Target: "filesystem", Name: validation.MinLength, Rule: 3, Chain: nil}}},
302 {TargetValue: xMsClientRequestID,
303 Constraints: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Empty, Rule: false,
304 Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}},
305 {TargetValue: timeout,
306 Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false,
307 Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil {
308 return result, validation.NewError("storagedatalake.FilesystemClient", "GetProperties", err.Error())
309 }
310
311 req, err := client.GetPropertiesPreparer(ctx, filesystem, xMsClientRequestID, timeout, xMsDate)
312 if err != nil {
313 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "GetProperties", nil, "Failure preparing request")
314 return
315 }
316
317 resp, err := client.GetPropertiesSender(req)
318 if err != nil {
319 result.Response = resp
320 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "GetProperties", resp, "Failure sending request")
321 return
322 }
323
324 result, err = client.GetPropertiesResponder(resp)
325 if err != nil {
326 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "GetProperties", resp, "Failure responding to request")
327 return
328 }
329
330 return
331 }
332
333
334 func (client FilesystemClient) GetPropertiesPreparer(ctx context.Context, filesystem string, xMsClientRequestID string, timeout *int32, xMsDate string) (*http.Request, error) {
335 urlParameters := map[string]interface{}{
336 "accountName": client.AccountName,
337 "dnsSuffix": client.DNSSuffix,
338 }
339
340 pathParameters := map[string]interface{}{
341 "filesystem": autorest.Encode("path", filesystem),
342 }
343
344 queryParameters := map[string]interface{}{
345 "resource": autorest.Encode("query", "filesystem"),
346 }
347 if timeout != nil {
348 queryParameters["timeout"] = autorest.Encode("query", *timeout)
349 }
350
351 preparer := autorest.CreatePreparer(
352 autorest.AsHead(),
353 autorest.WithCustomBaseURL("https://{accountName}.{dnsSuffix}", urlParameters),
354 autorest.WithPathParameters("/{filesystem}", pathParameters),
355 autorest.WithQueryParameters(queryParameters))
356 if len(xMsClientRequestID) > 0 {
357 preparer = autorest.DecoratePreparer(preparer,
358 autorest.WithHeader("x-ms-client-request-id", autorest.String(xMsClientRequestID)))
359 }
360 if len(xMsDate) > 0 {
361 preparer = autorest.DecoratePreparer(preparer,
362 autorest.WithHeader("x-ms-date", autorest.String(xMsDate)))
363 }
364 if len(client.XMsVersion) > 0 {
365 preparer = autorest.DecoratePreparer(preparer,
366 autorest.WithHeader("x-ms-version", autorest.String(client.XMsVersion)))
367 }
368 return preparer.Prepare((&http.Request{}).WithContext(ctx))
369 }
370
371
372
373 func (client FilesystemClient) GetPropertiesSender(req *http.Request) (*http.Response, error) {
374 return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
375 }
376
377
378
379 func (client FilesystemClient) GetPropertiesResponder(resp *http.Response) (result autorest.Response, err error) {
380 err = autorest.Respond(
381 resp,
382 azure.WithErrorUnlessStatusCode(http.StatusOK),
383 autorest.ByClosing())
384 result.Response = resp
385 return
386 }
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402 func (client FilesystemClient) List(ctx context.Context, prefix string, continuation string, maxResults *int32, xMsClientRequestID string, timeout *int32, xMsDate string) (result FilesystemList, err error) {
403 if tracing.IsEnabled() {
404 ctx = tracing.StartSpan(ctx, fqdn+"/FilesystemClient.List")
405 defer func() {
406 sc := -1
407 if result.Response.Response != nil {
408 sc = result.Response.Response.StatusCode
409 }
410 tracing.EndSpan(ctx, sc, err)
411 }()
412 }
413 if err := validation.Validate([]validation.Validation{
414 {TargetValue: maxResults,
415 Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false,
416 Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}},
417 {TargetValue: xMsClientRequestID,
418 Constraints: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Empty, Rule: false,
419 Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}},
420 {TargetValue: timeout,
421 Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false,
422 Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil {
423 return result, validation.NewError("storagedatalake.FilesystemClient", "List", err.Error())
424 }
425
426 req, err := client.ListPreparer(ctx, prefix, continuation, maxResults, xMsClientRequestID, timeout, xMsDate)
427 if err != nil {
428 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "List", nil, "Failure preparing request")
429 return
430 }
431
432 resp, err := client.ListSender(req)
433 if err != nil {
434 result.Response = autorest.Response{Response: resp}
435 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "List", resp, "Failure sending request")
436 return
437 }
438
439 result, err = client.ListResponder(resp)
440 if err != nil {
441 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "List", resp, "Failure responding to request")
442 return
443 }
444
445 return
446 }
447
448
449 func (client FilesystemClient) ListPreparer(ctx context.Context, prefix string, continuation string, maxResults *int32, xMsClientRequestID string, timeout *int32, xMsDate string) (*http.Request, error) {
450 urlParameters := map[string]interface{}{
451 "accountName": client.AccountName,
452 "dnsSuffix": client.DNSSuffix,
453 }
454
455 queryParameters := map[string]interface{}{
456 "resource": autorest.Encode("query", "account"),
457 }
458 if len(prefix) > 0 {
459 queryParameters["prefix"] = autorest.Encode("query", prefix)
460 }
461 if len(continuation) > 0 {
462 queryParameters["continuation"] = autorest.Encode("query", continuation)
463 }
464 if maxResults != nil {
465 queryParameters["maxResults"] = autorest.Encode("query", *maxResults)
466 }
467 if timeout != nil {
468 queryParameters["timeout"] = autorest.Encode("query", *timeout)
469 }
470
471 preparer := autorest.CreatePreparer(
472 autorest.AsGet(),
473 autorest.WithCustomBaseURL("https://{accountName}.{dnsSuffix}", urlParameters),
474 autorest.WithPath("/"),
475 autorest.WithQueryParameters(queryParameters))
476 if len(xMsClientRequestID) > 0 {
477 preparer = autorest.DecoratePreparer(preparer,
478 autorest.WithHeader("x-ms-client-request-id", autorest.String(xMsClientRequestID)))
479 }
480 if len(xMsDate) > 0 {
481 preparer = autorest.DecoratePreparer(preparer,
482 autorest.WithHeader("x-ms-date", autorest.String(xMsDate)))
483 }
484 if len(client.XMsVersion) > 0 {
485 preparer = autorest.DecoratePreparer(preparer,
486 autorest.WithHeader("x-ms-version", autorest.String(client.XMsVersion)))
487 }
488 return preparer.Prepare((&http.Request{}).WithContext(ctx))
489 }
490
491
492
493 func (client FilesystemClient) ListSender(req *http.Request) (*http.Response, error) {
494 return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
495 }
496
497
498
499 func (client FilesystemClient) ListResponder(resp *http.Response) (result FilesystemList, err error) {
500 err = autorest.Respond(
501 resp,
502 azure.WithErrorUnlessStatusCode(http.StatusOK),
503 autorest.ByUnmarshallingJSON(&result),
504 autorest.ByClosing())
505 result.Response = autorest.Response{Response: resp}
506 return
507 }
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531 func (client FilesystemClient) SetProperties(ctx context.Context, filesystem string, xMsProperties string, ifModifiedSince string, ifUnmodifiedSince string, xMsClientRequestID string, timeout *int32, xMsDate string) (result autorest.Response, err error) {
532 if tracing.IsEnabled() {
533 ctx = tracing.StartSpan(ctx, fqdn+"/FilesystemClient.SetProperties")
534 defer func() {
535 sc := -1
536 if result.Response != nil {
537 sc = result.Response.StatusCode
538 }
539 tracing.EndSpan(ctx, sc, err)
540 }()
541 }
542 if err := validation.Validate([]validation.Validation{
543 {TargetValue: filesystem,
544 Constraints: []validation.Constraint{{Target: "filesystem", Name: validation.MaxLength, Rule: 63, Chain: nil},
545 {Target: "filesystem", Name: validation.MinLength, Rule: 3, Chain: nil}}},
546 {TargetValue: xMsClientRequestID,
547 Constraints: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Empty, Rule: false,
548 Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}},
549 {TargetValue: timeout,
550 Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false,
551 Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil {
552 return result, validation.NewError("storagedatalake.FilesystemClient", "SetProperties", err.Error())
553 }
554
555 req, err := client.SetPropertiesPreparer(ctx, filesystem, xMsProperties, ifModifiedSince, ifUnmodifiedSince, xMsClientRequestID, timeout, xMsDate)
556 if err != nil {
557 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "SetProperties", nil, "Failure preparing request")
558 return
559 }
560
561 resp, err := client.SetPropertiesSender(req)
562 if err != nil {
563 result.Response = resp
564 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "SetProperties", resp, "Failure sending request")
565 return
566 }
567
568 result, err = client.SetPropertiesResponder(resp)
569 if err != nil {
570 err = autorest.NewErrorWithError(err, "storagedatalake.FilesystemClient", "SetProperties", resp, "Failure responding to request")
571 return
572 }
573
574 return
575 }
576
577
578 func (client FilesystemClient) SetPropertiesPreparer(ctx context.Context, filesystem string, xMsProperties string, ifModifiedSince string, ifUnmodifiedSince string, xMsClientRequestID string, timeout *int32, xMsDate string) (*http.Request, error) {
579 urlParameters := map[string]interface{}{
580 "accountName": client.AccountName,
581 "dnsSuffix": client.DNSSuffix,
582 }
583
584 pathParameters := map[string]interface{}{
585 "filesystem": autorest.Encode("path", filesystem),
586 }
587
588 queryParameters := map[string]interface{}{
589 "resource": autorest.Encode("query", "filesystem"),
590 }
591 if timeout != nil {
592 queryParameters["timeout"] = autorest.Encode("query", *timeout)
593 }
594
595 preparer := autorest.CreatePreparer(
596 autorest.AsPatch(),
597 autorest.WithCustomBaseURL("https://{accountName}.{dnsSuffix}", urlParameters),
598 autorest.WithPathParameters("/{filesystem}", pathParameters),
599 autorest.WithQueryParameters(queryParameters))
600 if len(xMsProperties) > 0 {
601 preparer = autorest.DecoratePreparer(preparer,
602 autorest.WithHeader("x-ms-properties", autorest.String(xMsProperties)))
603 }
604 if len(ifModifiedSince) > 0 {
605 preparer = autorest.DecoratePreparer(preparer,
606 autorest.WithHeader("If-Modified-Since", autorest.String(ifModifiedSince)))
607 }
608 if len(ifUnmodifiedSince) > 0 {
609 preparer = autorest.DecoratePreparer(preparer,
610 autorest.WithHeader("If-Unmodified-Since", autorest.String(ifUnmodifiedSince)))
611 }
612 if len(xMsClientRequestID) > 0 {
613 preparer = autorest.DecoratePreparer(preparer,
614 autorest.WithHeader("x-ms-client-request-id", autorest.String(xMsClientRequestID)))
615 }
616 if len(xMsDate) > 0 {
617 preparer = autorest.DecoratePreparer(preparer,
618 autorest.WithHeader("x-ms-date", autorest.String(xMsDate)))
619 }
620 if len(client.XMsVersion) > 0 {
621 preparer = autorest.DecoratePreparer(preparer,
622 autorest.WithHeader("x-ms-version", autorest.String(client.XMsVersion)))
623 }
624 return preparer.Prepare((&http.Request{}).WithContext(ctx))
625 }
626
627
628
629 func (client FilesystemClient) SetPropertiesSender(req *http.Request) (*http.Response, error) {
630 return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
631 }
632
633
634
635 func (client FilesystemClient) SetPropertiesResponder(resp *http.Response) (result autorest.Response, err error) {
636 err = autorest.Respond(
637 resp,
638 azure.WithErrorUnlessStatusCode(http.StatusOK),
639 autorest.ByClosing())
640 result.Response = resp
641 return
642 }
643
View as plain text