-
Notifications
You must be signed in to change notification settings - Fork 358
/
OperationsClient.g.cs
987 lines (900 loc) · 60.8 KB
/
OperationsClient.g.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
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
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Generated code. DO NOT EDIT!
#pragma warning disable CS8981
using gax = Google.Api.Gax;
using gaxgrpc = Google.Api.Gax.Grpc;
using proto = Google.Protobuf;
using wkt = Google.Protobuf.WellKnownTypes;
using grpccore = Grpc.Core;
using grpcinter = Grpc.Core.Interceptors;
using mel = Microsoft.Extensions.Logging;
using sys = System;
using sc = System.Collections;
using scg = System.Collections.Generic;
using sco = System.Collections.ObjectModel;
using st = System.Threading;
using stt = System.Threading.Tasks;
namespace Google.LongRunning
{
/// <summary>Settings for <see cref="OperationsClient"/> instances.</summary>
public sealed partial class OperationsSettings : gaxgrpc::ServiceSettingsBase
{
/// <summary>Get a new instance of the default <see cref="OperationsSettings"/>.</summary>
/// <returns>A new instance of the default <see cref="OperationsSettings"/>.</returns>
public static OperationsSettings GetDefault() => new OperationsSettings();
/// <summary>Constructs a new <see cref="OperationsSettings"/> object with default settings.</summary>
public OperationsSettings()
{
}
private OperationsSettings(OperationsSettings existing) : base(existing)
{
gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
ListOperationsSettings = existing.ListOperationsSettings;
GetOperationSettings = existing.GetOperationSettings;
DeleteOperationSettings = existing.DeleteOperationSettings;
CancelOperationSettings = existing.CancelOperationSettings;
WaitOperationSettings = existing.WaitOperationSettings;
OnCopy(existing);
}
partial void OnCopy(OperationsSettings existing);
/// <summary>
/// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to
/// <c>OperationsClient.ListOperations</c> and <c>OperationsClient.ListOperationsAsync</c>.
/// </summary>
/// <remarks>
/// <list type="bullet">
/// <item><description>Initial retry delay: 500 milliseconds.</description></item>
/// <item><description>Retry delay multiplier: 2</description></item>
/// <item><description>Retry maximum delay: 10000 milliseconds.</description></item>
/// <item><description>Maximum attempts: 5</description></item>
/// <item>
/// <description>Retriable status codes: <see cref="grpccore::StatusCode.Unavailable"/>.</description>
/// </item>
/// <item><description>Timeout: 10 seconds.</description></item>
/// </list>
/// </remarks>
public gaxgrpc::CallSettings ListOperationsSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(10000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(500), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 2, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable)));
/// <summary>
/// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to
/// <c>OperationsClient.GetOperation</c> and <c>OperationsClient.GetOperationAsync</c>.
/// </summary>
/// <remarks>
/// <list type="bullet">
/// <item><description>Initial retry delay: 500 milliseconds.</description></item>
/// <item><description>Retry delay multiplier: 2</description></item>
/// <item><description>Retry maximum delay: 10000 milliseconds.</description></item>
/// <item><description>Maximum attempts: 5</description></item>
/// <item>
/// <description>Retriable status codes: <see cref="grpccore::StatusCode.Unavailable"/>.</description>
/// </item>
/// <item><description>Timeout: 10 seconds.</description></item>
/// </list>
/// </remarks>
public gaxgrpc::CallSettings GetOperationSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(10000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(500), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 2, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable)));
/// <summary>
/// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to
/// <c>OperationsClient.DeleteOperation</c> and <c>OperationsClient.DeleteOperationAsync</c>.
/// </summary>
/// <remarks>
/// <list type="bullet">
/// <item><description>Initial retry delay: 500 milliseconds.</description></item>
/// <item><description>Retry delay multiplier: 2</description></item>
/// <item><description>Retry maximum delay: 10000 milliseconds.</description></item>
/// <item><description>Maximum attempts: 5</description></item>
/// <item>
/// <description>Retriable status codes: <see cref="grpccore::StatusCode.Unavailable"/>.</description>
/// </item>
/// <item><description>Timeout: 10 seconds.</description></item>
/// </list>
/// </remarks>
public gaxgrpc::CallSettings DeleteOperationSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(10000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(500), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 2, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable)));
/// <summary>
/// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to
/// <c>OperationsClient.CancelOperation</c> and <c>OperationsClient.CancelOperationAsync</c>.
/// </summary>
/// <remarks>
/// <list type="bullet">
/// <item><description>Initial retry delay: 500 milliseconds.</description></item>
/// <item><description>Retry delay multiplier: 2</description></item>
/// <item><description>Retry maximum delay: 10000 milliseconds.</description></item>
/// <item><description>Maximum attempts: 5</description></item>
/// <item>
/// <description>Retriable status codes: <see cref="grpccore::StatusCode.Unavailable"/>.</description>
/// </item>
/// <item><description>Timeout: 10 seconds.</description></item>
/// </list>
/// </remarks>
public gaxgrpc::CallSettings CancelOperationSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(10000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(500), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 2, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable)));
/// <summary>
/// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to
/// <c>OperationsClient.WaitOperation</c> and <c>OperationsClient.WaitOperationAsync</c>.
/// </summary>
/// <remarks>
/// <list type="bullet">
/// <item><description>This call will not be retried.</description></item>
/// <item><description>No timeout is applied.</description></item>
/// </list>
/// </remarks>
public gaxgrpc::CallSettings WaitOperationSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None);
/// <summary>Creates a deep clone of this object, with all the same property values.</summary>
/// <returns>A deep clone of this <see cref="OperationsSettings"/> object.</returns>
public OperationsSettings Clone() => new OperationsSettings(this);
}
/// <summary>
/// Builder class for <see cref="OperationsClient"/> to provide simple configuration of credentials, endpoint etc.
/// </summary>
public sealed partial class OperationsClientBuilder : gaxgrpc::ClientBuilderBase<OperationsClient>
{
/// <summary>The settings to use for RPCs, or <c>null</c> for the default settings.</summary>
public OperationsSettings Settings { get; set; }
/// <summary>Creates a new builder with default settings.</summary>
public OperationsClientBuilder() : base(OperationsClient.ServiceMetadata)
{
}
partial void InterceptBuild(ref OperationsClient client);
partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task<OperationsClient> task);
/// <summary>Builds the resulting client.</summary>
public override OperationsClient Build()
{
OperationsClient client = null;
InterceptBuild(ref client);
return client ?? BuildImpl();
}
/// <summary>Builds the resulting client asynchronously.</summary>
public override stt::Task<OperationsClient> BuildAsync(st::CancellationToken cancellationToken = default)
{
stt::Task<OperationsClient> task = null;
InterceptBuildAsync(cancellationToken, ref task);
return task ?? BuildAsyncImpl(cancellationToken);
}
private OperationsClient BuildImpl()
{
Validate();
grpccore::CallInvoker callInvoker = CreateCallInvoker();
return OperationsClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger);
}
private async stt::Task<OperationsClient> BuildAsyncImpl(st::CancellationToken cancellationToken)
{
Validate();
grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false);
return OperationsClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger);
}
/// <summary>Returns the channel pool to use when no other options are specified.</summary>
protected override gaxgrpc::ChannelPool GetChannelPool() => OperationsClient.ChannelPool;
}
/// <summary>Operations client wrapper, for convenient use.</summary>
/// <remarks>
/// Manages long-running operations with an API service.
///
/// When an API method normally takes long time to complete, it can be designed
/// to return [Operation][google.longrunning.Operation] to the client, and the client can use this
/// interface to receive the real response asynchronously by polling the
/// operation resource, or pass the operation resource to another API (such as
/// Google Cloud Pub/Sub API) to receive the response. Any API service that
/// returns long-running operations should implement the `Operations` interface
/// so developers can have a consistent client experience.
/// </remarks>
public abstract partial class OperationsClient
{
/// <summary>
/// The default endpoint for the Operations service, which is a host of "longrunning.googleapis.com" and a port
/// of 443.
/// </summary>
public static string DefaultEndpoint { get; } = "longrunning.googleapis.com:443";
/// <summary>The default Operations scopes.</summary>
/// <remarks>The default Operations scopes are:<list type="bullet"></list></remarks>
public static scg::IReadOnlyList<string> DefaultScopes { get; } = new sco::ReadOnlyCollection<string>(new string[] { });
/// <summary>The service metadata associated with this client type.</summary>
public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(Operations.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Grpc, PackageApiMetadata.ApiMetadata);
internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(ServiceMetadata);
/// <summary>
/// Asynchronously creates a <see cref="OperationsClient"/> using the default credentials, endpoint and
/// settings. To specify custom credentials or other settings, use <see cref="OperationsClientBuilder"/>.
/// </summary>
/// <param name="cancellationToken">
/// The <see cref="st::CancellationToken"/> to use while creating the client.
/// </param>
/// <returns>The task representing the created <see cref="OperationsClient"/>.</returns>
public static stt::Task<OperationsClient> CreateAsync(st::CancellationToken cancellationToken = default) =>
new OperationsClientBuilder().BuildAsync(cancellationToken);
/// <summary>
/// Synchronously creates a <see cref="OperationsClient"/> using the default credentials, endpoint and settings.
/// To specify custom credentials or other settings, use <see cref="OperationsClientBuilder"/>.
/// </summary>
/// <returns>The created <see cref="OperationsClient"/>.</returns>
public static OperationsClient Create() => new OperationsClientBuilder().Build();
/// <summary>
/// Creates a <see cref="OperationsClient"/> which uses the specified call invoker for remote operations.
/// </summary>
/// <param name="callInvoker">
/// The <see cref="grpccore::CallInvoker"/> for remote operations. Must not be null.
/// </param>
/// <param name="settings">Optional <see cref="OperationsSettings"/>.</param>
/// <param name="logger">Optional <see cref="mel::ILogger"/>.</param>
/// <returns>The created <see cref="OperationsClient"/>.</returns>
internal static OperationsClient Create(grpccore::CallInvoker callInvoker, OperationsSettings settings = null, mel::ILogger logger = null)
{
gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
grpcinter::Interceptor interceptor = settings?.Interceptor;
if (interceptor != null)
{
callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
}
Operations.OperationsClient grpcClient = new Operations.OperationsClient(callInvoker);
return new OperationsClientImpl(grpcClient, settings, logger);
}
/// <summary>
/// Shuts down any channels automatically created by <see cref="Create()"/> and
/// <see cref="CreateAsync(st::CancellationToken)"/>. Channels which weren't automatically created are not
/// affected.
/// </summary>
/// <remarks>
/// After calling this method, further calls to <see cref="Create()"/> and
/// <see cref="CreateAsync(st::CancellationToken)"/> will create new channels, which could in turn be shut down
/// by another call to this method.
/// </remarks>
/// <returns>A task representing the asynchronous shutdown operation.</returns>
public static stt::Task ShutdownDefaultChannelsAsync() => ChannelPool.ShutdownChannelsAsync();
/// <summary>The underlying gRPC Operations client</summary>
public virtual Operations.OperationsClient GrpcClient => throw new sys::NotImplementedException();
/// <summary>
/// Lists operations that match the specified filter in the request. If the
/// server doesn't support this method, it returns `UNIMPLEMENTED`.
///
/// NOTE: the `name` binding allows API services to override the binding
/// to use different resource name schemes, such as `users/*/operations`. To
/// override the binding, API services can add a binding such as
/// `"/v1/{name=users/*}/operations"` to their service configuration.
/// For backwards compatibility, the default name includes the operations
/// collection id, however overriding users must ensure the name binding
/// is the parent resource, without the operations collection id.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A pageable sequence of <see cref="Operation"/> resources.</returns>
public virtual gax::PagedEnumerable<ListOperationsResponse, Operation> ListOperations(ListOperationsRequest request, gaxgrpc::CallSettings callSettings = null) =>
throw new sys::NotImplementedException();
/// <summary>
/// Lists operations that match the specified filter in the request. If the
/// server doesn't support this method, it returns `UNIMPLEMENTED`.
///
/// NOTE: the `name` binding allows API services to override the binding
/// to use different resource name schemes, such as `users/*/operations`. To
/// override the binding, API services can add a binding such as
/// `"/v1/{name=users/*}/operations"` to their service configuration.
/// For backwards compatibility, the default name includes the operations
/// collection id, however overriding users must ensure the name binding
/// is the parent resource, without the operations collection id.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A pageable asynchronous sequence of <see cref="Operation"/> resources.</returns>
public virtual gax::PagedAsyncEnumerable<ListOperationsResponse, Operation> ListOperationsAsync(ListOperationsRequest request, gaxgrpc::CallSettings callSettings = null) =>
throw new sys::NotImplementedException();
/// <summary>
/// Lists operations that match the specified filter in the request. If the
/// server doesn't support this method, it returns `UNIMPLEMENTED`.
///
/// NOTE: the `name` binding allows API services to override the binding
/// to use different resource name schemes, such as `users/*/operations`. To
/// override the binding, API services can add a binding such as
/// `"/v1/{name=users/*}/operations"` to their service configuration.
/// For backwards compatibility, the default name includes the operations
/// collection id, however overriding users must ensure the name binding
/// is the parent resource, without the operations collection id.
/// </summary>
/// <param name="name">
/// The name of the operation's parent resource.
/// </param>
/// <param name="filter">
/// The standard list filter.
/// </param>
/// <param name="pageToken">
/// The token returned from the previous request. A value of <c>null</c> or an empty string retrieves the first
/// page.
/// </param>
/// <param name="pageSize">
/// The size of page to request. The response will not be larger than this, but may be smaller. A value of
/// <c>null</c> or <c>0</c> uses a server-defined page size.
/// </param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A pageable sequence of <see cref="Operation"/> resources.</returns>
public virtual gax::PagedEnumerable<ListOperationsResponse, Operation> ListOperations(string name, string filter, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
ListOperations(new ListOperationsRequest
{
Name = name ?? "",
Filter = filter ?? "",
PageToken = pageToken ?? "",
PageSize = pageSize ?? 0,
}, callSettings);
/// <summary>
/// Lists operations that match the specified filter in the request. If the
/// server doesn't support this method, it returns `UNIMPLEMENTED`.
///
/// NOTE: the `name` binding allows API services to override the binding
/// to use different resource name schemes, such as `users/*/operations`. To
/// override the binding, API services can add a binding such as
/// `"/v1/{name=users/*}/operations"` to their service configuration.
/// For backwards compatibility, the default name includes the operations
/// collection id, however overriding users must ensure the name binding
/// is the parent resource, without the operations collection id.
/// </summary>
/// <param name="name">
/// The name of the operation's parent resource.
/// </param>
/// <param name="filter">
/// The standard list filter.
/// </param>
/// <param name="pageToken">
/// The token returned from the previous request. A value of <c>null</c> or an empty string retrieves the first
/// page.
/// </param>
/// <param name="pageSize">
/// The size of page to request. The response will not be larger than this, but may be smaller. A value of
/// <c>null</c> or <c>0</c> uses a server-defined page size.
/// </param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A pageable asynchronous sequence of <see cref="Operation"/> resources.</returns>
public virtual gax::PagedAsyncEnumerable<ListOperationsResponse, Operation> ListOperationsAsync(string name, string filter, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
ListOperationsAsync(new ListOperationsRequest
{
Name = name ?? "",
Filter = filter ?? "",
PageToken = pageToken ?? "",
PageSize = pageSize ?? 0,
}, callSettings);
/// <summary>
/// Gets the latest state of a long-running operation. Clients can use this
/// method to poll the operation result at intervals as recommended by the API
/// service.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public virtual Operation GetOperation(GetOperationRequest request, gaxgrpc::CallSettings callSettings = null) =>
throw new sys::NotImplementedException();
/// <summary>
/// Gets the latest state of a long-running operation. Clients can use this
/// method to poll the operation result at intervals as recommended by the API
/// service.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task<Operation> GetOperationAsync(GetOperationRequest request, gaxgrpc::CallSettings callSettings = null) =>
throw new sys::NotImplementedException();
/// <summary>
/// Gets the latest state of a long-running operation. Clients can use this
/// method to poll the operation result at intervals as recommended by the API
/// service.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task<Operation> GetOperationAsync(GetOperationRequest request, st::CancellationToken cancellationToken) =>
GetOperationAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary>
/// Gets the latest state of a long-running operation. Clients can use this
/// method to poll the operation result at intervals as recommended by the API
/// service.
/// </summary>
/// <param name="name">
/// The name of the operation resource.
/// </param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public virtual Operation GetOperation(string name, gaxgrpc::CallSettings callSettings = null) =>
GetOperation(new GetOperationRequest { Name = name ?? "", }, callSettings);
/// <summary>
/// Gets the latest state of a long-running operation. Clients can use this
/// method to poll the operation result at intervals as recommended by the API
/// service.
/// </summary>
/// <param name="name">
/// The name of the operation resource.
/// </param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task<Operation> GetOperationAsync(string name, gaxgrpc::CallSettings callSettings = null) =>
GetOperationAsync(new GetOperationRequest { Name = name ?? "", }, callSettings);
/// <summary>
/// Gets the latest state of a long-running operation. Clients can use this
/// method to poll the operation result at intervals as recommended by the API
/// service.
/// </summary>
/// <param name="name">
/// The name of the operation resource.
/// </param>
/// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task<Operation> GetOperationAsync(string name, st::CancellationToken cancellationToken) =>
GetOperationAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary>
/// Deletes a long-running operation. This method indicates that the client is
/// no longer interested in the operation result. It does not cancel the
/// operation. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public virtual void DeleteOperation(DeleteOperationRequest request, gaxgrpc::CallSettings callSettings = null) =>
throw new sys::NotImplementedException();
/// <summary>
/// Deletes a long-running operation. This method indicates that the client is
/// no longer interested in the operation result. It does not cancel the
/// operation. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task DeleteOperationAsync(DeleteOperationRequest request, gaxgrpc::CallSettings callSettings = null) =>
throw new sys::NotImplementedException();
/// <summary>
/// Deletes a long-running operation. This method indicates that the client is
/// no longer interested in the operation result. It does not cancel the
/// operation. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task DeleteOperationAsync(DeleteOperationRequest request, st::CancellationToken cancellationToken) =>
DeleteOperationAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary>
/// Deletes a long-running operation. This method indicates that the client is
/// no longer interested in the operation result. It does not cancel the
/// operation. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// </summary>
/// <param name="name">
/// The name of the operation resource to be deleted.
/// </param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public virtual void DeleteOperation(string name, gaxgrpc::CallSettings callSettings = null) =>
DeleteOperation(new DeleteOperationRequest { Name = name ?? "", }, callSettings);
/// <summary>
/// Deletes a long-running operation. This method indicates that the client is
/// no longer interested in the operation result. It does not cancel the
/// operation. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// </summary>
/// <param name="name">
/// The name of the operation resource to be deleted.
/// </param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task DeleteOperationAsync(string name, gaxgrpc::CallSettings callSettings = null) =>
DeleteOperationAsync(new DeleteOperationRequest { Name = name ?? "", }, callSettings);
/// <summary>
/// Deletes a long-running operation. This method indicates that the client is
/// no longer interested in the operation result. It does not cancel the
/// operation. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// </summary>
/// <param name="name">
/// The name of the operation resource to be deleted.
/// </param>
/// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task DeleteOperationAsync(string name, st::CancellationToken cancellationToken) =>
DeleteOperationAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary>
/// Starts asynchronous cancellation on a long-running operation. The server
/// makes a best effort to cancel the operation, but success is not
/// guaranteed. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
/// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
/// other methods to check whether the cancellation succeeded or whether the
/// operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with
/// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
/// corresponding to `Code.CANCELLED`.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public virtual void CancelOperation(CancelOperationRequest request, gaxgrpc::CallSettings callSettings = null) =>
throw new sys::NotImplementedException();
/// <summary>
/// Starts asynchronous cancellation on a long-running operation. The server
/// makes a best effort to cancel the operation, but success is not
/// guaranteed. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
/// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
/// other methods to check whether the cancellation succeeded or whether the
/// operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with
/// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
/// corresponding to `Code.CANCELLED`.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task CancelOperationAsync(CancelOperationRequest request, gaxgrpc::CallSettings callSettings = null) =>
throw new sys::NotImplementedException();
/// <summary>
/// Starts asynchronous cancellation on a long-running operation. The server
/// makes a best effort to cancel the operation, but success is not
/// guaranteed. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
/// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
/// other methods to check whether the cancellation succeeded or whether the
/// operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with
/// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
/// corresponding to `Code.CANCELLED`.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task CancelOperationAsync(CancelOperationRequest request, st::CancellationToken cancellationToken) =>
CancelOperationAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary>
/// Starts asynchronous cancellation on a long-running operation. The server
/// makes a best effort to cancel the operation, but success is not
/// guaranteed. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
/// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
/// other methods to check whether the cancellation succeeded or whether the
/// operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with
/// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
/// corresponding to `Code.CANCELLED`.
/// </summary>
/// <param name="name">
/// The name of the operation resource to be cancelled.
/// </param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public virtual void CancelOperation(string name, gaxgrpc::CallSettings callSettings = null) =>
CancelOperation(new CancelOperationRequest { Name = name ?? "", }, callSettings);
/// <summary>
/// Starts asynchronous cancellation on a long-running operation. The server
/// makes a best effort to cancel the operation, but success is not
/// guaranteed. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
/// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
/// other methods to check whether the cancellation succeeded or whether the
/// operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with
/// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
/// corresponding to `Code.CANCELLED`.
/// </summary>
/// <param name="name">
/// The name of the operation resource to be cancelled.
/// </param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task CancelOperationAsync(string name, gaxgrpc::CallSettings callSettings = null) =>
CancelOperationAsync(new CancelOperationRequest { Name = name ?? "", }, callSettings);
/// <summary>
/// Starts asynchronous cancellation on a long-running operation. The server
/// makes a best effort to cancel the operation, but success is not
/// guaranteed. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
/// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
/// other methods to check whether the cancellation succeeded or whether the
/// operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with
/// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
/// corresponding to `Code.CANCELLED`.
/// </summary>
/// <param name="name">
/// The name of the operation resource to be cancelled.
/// </param>
/// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task CancelOperationAsync(string name, st::CancellationToken cancellationToken) =>
CancelOperationAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary>
/// Waits until the specified long-running operation is done or reaches at most
/// a specified timeout, returning the latest state. If the operation is
/// already done, the latest state is immediately returned. If the timeout
/// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
/// timeout is used. If the server does not support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// Note that this method is on a best-effort basis. It may return the latest
/// state before the specified timeout (including immediately), meaning even an
/// immediate response is no guarantee that the operation is done.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public virtual Operation WaitOperation(WaitOperationRequest request, gaxgrpc::CallSettings callSettings = null) =>
throw new sys::NotImplementedException();
/// <summary>
/// Waits until the specified long-running operation is done or reaches at most
/// a specified timeout, returning the latest state. If the operation is
/// already done, the latest state is immediately returned. If the timeout
/// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
/// timeout is used. If the server does not support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// Note that this method is on a best-effort basis. It may return the latest
/// state before the specified timeout (including immediately), meaning even an
/// immediate response is no guarantee that the operation is done.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task<Operation> WaitOperationAsync(WaitOperationRequest request, gaxgrpc::CallSettings callSettings = null) =>
throw new sys::NotImplementedException();
/// <summary>
/// Waits until the specified long-running operation is done or reaches at most
/// a specified timeout, returning the latest state. If the operation is
/// already done, the latest state is immediately returned. If the timeout
/// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
/// timeout is used. If the server does not support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// Note that this method is on a best-effort basis. It may return the latest
/// state before the specified timeout (including immediately), meaning even an
/// immediate response is no guarantee that the operation is done.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
/// <returns>A Task containing the RPC response.</returns>
public virtual stt::Task<Operation> WaitOperationAsync(WaitOperationRequest request, st::CancellationToken cancellationToken) =>
WaitOperationAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
}
/// <summary>Operations client wrapper implementation, for convenient use.</summary>
/// <remarks>
/// Manages long-running operations with an API service.
///
/// When an API method normally takes long time to complete, it can be designed
/// to return [Operation][google.longrunning.Operation] to the client, and the client can use this
/// interface to receive the real response asynchronously by polling the
/// operation resource, or pass the operation resource to another API (such as
/// Google Cloud Pub/Sub API) to receive the response. Any API service that
/// returns long-running operations should implement the `Operations` interface
/// so developers can have a consistent client experience.
/// </remarks>
public sealed partial class OperationsClientImpl : OperationsClient
{
private readonly gaxgrpc::ApiCall<ListOperationsRequest, ListOperationsResponse> _callListOperations;
private readonly gaxgrpc::ApiCall<GetOperationRequest, Operation> _callGetOperation;
private readonly gaxgrpc::ApiCall<DeleteOperationRequest, wkt::Empty> _callDeleteOperation;
private readonly gaxgrpc::ApiCall<CancelOperationRequest, wkt::Empty> _callCancelOperation;
private readonly gaxgrpc::ApiCall<WaitOperationRequest, Operation> _callWaitOperation;
/// <summary>
/// Constructs a client wrapper for the Operations service, with the specified gRPC client and settings.
/// </summary>
/// <param name="grpcClient">The underlying gRPC client.</param>
/// <param name="settings">The base <see cref="OperationsSettings"/> used within this client.</param>
/// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
public OperationsClientImpl(Operations.OperationsClient grpcClient, OperationsSettings settings, mel::ILogger logger)
{
GrpcClient = grpcClient;
OperationsSettings effectiveSettings = settings ?? OperationsSettings.GetDefault();
gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(new gaxgrpc::ClientHelper.Options
{
Settings = effectiveSettings,
Logger = logger,
});
_callListOperations = clientHelper.BuildApiCall<ListOperationsRequest, ListOperationsResponse>("ListOperations", grpcClient.ListOperationsAsync, grpcClient.ListOperations, effectiveSettings.ListOperationsSettings).WithGoogleRequestParam("name", request => request.Name);
Modify_ApiCall(ref _callListOperations);
Modify_ListOperationsApiCall(ref _callListOperations);
_callGetOperation = clientHelper.BuildApiCall<GetOperationRequest, Operation>("GetOperation", grpcClient.GetOperationAsync, grpcClient.GetOperation, effectiveSettings.GetOperationSettings).WithGoogleRequestParam("name", request => request.Name);
Modify_ApiCall(ref _callGetOperation);
Modify_GetOperationApiCall(ref _callGetOperation);
_callDeleteOperation = clientHelper.BuildApiCall<DeleteOperationRequest, wkt::Empty>("DeleteOperation", grpcClient.DeleteOperationAsync, grpcClient.DeleteOperation, effectiveSettings.DeleteOperationSettings).WithGoogleRequestParam("name", request => request.Name);
Modify_ApiCall(ref _callDeleteOperation);
Modify_DeleteOperationApiCall(ref _callDeleteOperation);
_callCancelOperation = clientHelper.BuildApiCall<CancelOperationRequest, wkt::Empty>("CancelOperation", grpcClient.CancelOperationAsync, grpcClient.CancelOperation, effectiveSettings.CancelOperationSettings).WithGoogleRequestParam("name", request => request.Name);
Modify_ApiCall(ref _callCancelOperation);
Modify_CancelOperationApiCall(ref _callCancelOperation);
_callWaitOperation = clientHelper.BuildApiCall<WaitOperationRequest, Operation>("WaitOperation", grpcClient.WaitOperationAsync, grpcClient.WaitOperation, effectiveSettings.WaitOperationSettings);
Modify_ApiCall(ref _callWaitOperation);
Modify_WaitOperationApiCall(ref _callWaitOperation);
OnConstruction(grpcClient, effectiveSettings, clientHelper);
}
partial void Modify_ApiCall<TRequest, TResponse>(ref gaxgrpc::ApiCall<TRequest, TResponse> call) where TRequest : class, proto::IMessage<TRequest> where TResponse : class, proto::IMessage<TResponse>;
partial void Modify_ListOperationsApiCall(ref gaxgrpc::ApiCall<ListOperationsRequest, ListOperationsResponse> call);
partial void Modify_GetOperationApiCall(ref gaxgrpc::ApiCall<GetOperationRequest, Operation> call);
partial void Modify_DeleteOperationApiCall(ref gaxgrpc::ApiCall<DeleteOperationRequest, wkt::Empty> call);
partial void Modify_CancelOperationApiCall(ref gaxgrpc::ApiCall<CancelOperationRequest, wkt::Empty> call);
partial void Modify_WaitOperationApiCall(ref gaxgrpc::ApiCall<WaitOperationRequest, Operation> call);
partial void OnConstruction(Operations.OperationsClient grpcClient, OperationsSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
/// <summary>The underlying gRPC Operations client</summary>
public override Operations.OperationsClient GrpcClient { get; }
partial void Modify_ListOperationsRequest(ref ListOperationsRequest request, ref gaxgrpc::CallSettings settings);
partial void Modify_GetOperationRequest(ref GetOperationRequest request, ref gaxgrpc::CallSettings settings);
partial void Modify_DeleteOperationRequest(ref DeleteOperationRequest request, ref gaxgrpc::CallSettings settings);
partial void Modify_CancelOperationRequest(ref CancelOperationRequest request, ref gaxgrpc::CallSettings settings);
partial void Modify_WaitOperationRequest(ref WaitOperationRequest request, ref gaxgrpc::CallSettings settings);
/// <summary>
/// Lists operations that match the specified filter in the request. If the
/// server doesn't support this method, it returns `UNIMPLEMENTED`.
///
/// NOTE: the `name` binding allows API services to override the binding
/// to use different resource name schemes, such as `users/*/operations`. To
/// override the binding, API services can add a binding such as
/// `"/v1/{name=users/*}/operations"` to their service configuration.
/// For backwards compatibility, the default name includes the operations
/// collection id, however overriding users must ensure the name binding
/// is the parent resource, without the operations collection id.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A pageable sequence of <see cref="Operation"/> resources.</returns>
public override gax::PagedEnumerable<ListOperationsResponse, Operation> ListOperations(ListOperationsRequest request, gaxgrpc::CallSettings callSettings = null)
{
Modify_ListOperationsRequest(ref request, ref callSettings);
return new gaxgrpc::GrpcPagedEnumerable<ListOperationsRequest, ListOperationsResponse, Operation>(_callListOperations, request, callSettings);
}
/// <summary>
/// Lists operations that match the specified filter in the request. If the
/// server doesn't support this method, it returns `UNIMPLEMENTED`.
///
/// NOTE: the `name` binding allows API services to override the binding
/// to use different resource name schemes, such as `users/*/operations`. To
/// override the binding, API services can add a binding such as
/// `"/v1/{name=users/*}/operations"` to their service configuration.
/// For backwards compatibility, the default name includes the operations
/// collection id, however overriding users must ensure the name binding
/// is the parent resource, without the operations collection id.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A pageable asynchronous sequence of <see cref="Operation"/> resources.</returns>
public override gax::PagedAsyncEnumerable<ListOperationsResponse, Operation> ListOperationsAsync(ListOperationsRequest request, gaxgrpc::CallSettings callSettings = null)
{
Modify_ListOperationsRequest(ref request, ref callSettings);
return new gaxgrpc::GrpcPagedAsyncEnumerable<ListOperationsRequest, ListOperationsResponse, Operation>(_callListOperations, request, callSettings);
}
/// <summary>
/// Gets the latest state of a long-running operation. Clients can use this
/// method to poll the operation result at intervals as recommended by the API
/// service.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public override Operation GetOperation(GetOperationRequest request, gaxgrpc::CallSettings callSettings = null)
{
Modify_GetOperationRequest(ref request, ref callSettings);
return _callGetOperation.Sync(request, callSettings);
}
/// <summary>
/// Gets the latest state of a long-running operation. Clients can use this
/// method to poll the operation result at intervals as recommended by the API
/// service.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public override stt::Task<Operation> GetOperationAsync(GetOperationRequest request, gaxgrpc::CallSettings callSettings = null)
{
Modify_GetOperationRequest(ref request, ref callSettings);
return _callGetOperation.Async(request, callSettings);
}
/// <summary>
/// Deletes a long-running operation. This method indicates that the client is
/// no longer interested in the operation result. It does not cancel the
/// operation. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public override void DeleteOperation(DeleteOperationRequest request, gaxgrpc::CallSettings callSettings = null)
{
Modify_DeleteOperationRequest(ref request, ref callSettings);
_callDeleteOperation.Sync(request, callSettings);
}
/// <summary>
/// Deletes a long-running operation. This method indicates that the client is
/// no longer interested in the operation result. It does not cancel the
/// operation. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public override stt::Task DeleteOperationAsync(DeleteOperationRequest request, gaxgrpc::CallSettings callSettings = null)
{
Modify_DeleteOperationRequest(ref request, ref callSettings);
return _callDeleteOperation.Async(request, callSettings);
}
/// <summary>
/// Starts asynchronous cancellation on a long-running operation. The server
/// makes a best effort to cancel the operation, but success is not
/// guaranteed. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
/// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
/// other methods to check whether the cancellation succeeded or whether the
/// operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with
/// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
/// corresponding to `Code.CANCELLED`.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public override void CancelOperation(CancelOperationRequest request, gaxgrpc::CallSettings callSettings = null)
{
Modify_CancelOperationRequest(ref request, ref callSettings);
_callCancelOperation.Sync(request, callSettings);
}
/// <summary>
/// Starts asynchronous cancellation on a long-running operation. The server
/// makes a best effort to cancel the operation, but success is not
/// guaranteed. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
/// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
/// other methods to check whether the cancellation succeeded or whether the
/// operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with
/// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
/// corresponding to `Code.CANCELLED`.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public override stt::Task CancelOperationAsync(CancelOperationRequest request, gaxgrpc::CallSettings callSettings = null)
{
Modify_CancelOperationRequest(ref request, ref callSettings);
return _callCancelOperation.Async(request, callSettings);
}
/// <summary>
/// Waits until the specified long-running operation is done or reaches at most
/// a specified timeout, returning the latest state. If the operation is
/// already done, the latest state is immediately returned. If the timeout
/// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
/// timeout is used. If the server does not support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// Note that this method is on a best-effort basis. It may return the latest
/// state before the specified timeout (including immediately), meaning even an
/// immediate response is no guarantee that the operation is done.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>The RPC response.</returns>
public override Operation WaitOperation(WaitOperationRequest request, gaxgrpc::CallSettings callSettings = null)
{
Modify_WaitOperationRequest(ref request, ref callSettings);
return _callWaitOperation.Sync(request, callSettings);
}
/// <summary>
/// Waits until the specified long-running operation is done or reaches at most
/// a specified timeout, returning the latest state. If the operation is
/// already done, the latest state is immediately returned. If the timeout
/// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
/// timeout is used. If the server does not support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`.
/// Note that this method is on a best-effort basis. It may return the latest
/// state before the specified timeout (including immediately), meaning even an
/// immediate response is no guarantee that the operation is done.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
/// <returns>A Task containing the RPC response.</returns>
public override stt::Task<Operation> WaitOperationAsync(WaitOperationRequest request, gaxgrpc::CallSettings callSettings = null)
{
Modify_WaitOperationRequest(ref request, ref callSettings);
return _callWaitOperation.Async(request, callSettings);
}
}
public partial class ListOperationsRequest : gaxgrpc::IPageRequest
{
}
public partial class ListOperationsResponse : gaxgrpc::IPageResponse<Operation>
{
/// <summary>Returns an enumerator that iterates through the resources in this response.</summary>
public scg::IEnumerator<Operation> GetEnumerator() => Operations.GetEnumerator();
sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator();
}
}