-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
CloudDeployStubSettings.java
2747 lines (2460 loc) · 129 KB
/
CloudDeployStubSettings.java
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
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2023 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.
*/
package com.google.cloud.deploy.v1.stub;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListCustomTargetTypesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.GaxGrpcProperties;
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.grpc.ProtoOperationTransformers;
import com.google.api.gax.httpjson.GaxHttpJsonProperties;
import com.google.api.gax.httpjson.HttpJsonTransportChannel;
import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.longrunning.OperationSnapshot;
import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
import com.google.api.gax.retrying.RetrySettings;
import com.google.api.gax.rpc.ApiCallContext;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallSettings;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.PagedListDescriptor;
import com.google.api.gax.rpc.PagedListResponseFactory;
import com.google.api.gax.rpc.StatusCode;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.deploy.v1.AbandonReleaseRequest;
import com.google.cloud.deploy.v1.AbandonReleaseResponse;
import com.google.cloud.deploy.v1.AdvanceRolloutRequest;
import com.google.cloud.deploy.v1.AdvanceRolloutResponse;
import com.google.cloud.deploy.v1.ApproveRolloutRequest;
import com.google.cloud.deploy.v1.ApproveRolloutResponse;
import com.google.cloud.deploy.v1.Automation;
import com.google.cloud.deploy.v1.AutomationRun;
import com.google.cloud.deploy.v1.CancelAutomationRunRequest;
import com.google.cloud.deploy.v1.CancelAutomationRunResponse;
import com.google.cloud.deploy.v1.CancelRolloutRequest;
import com.google.cloud.deploy.v1.CancelRolloutResponse;
import com.google.cloud.deploy.v1.Config;
import com.google.cloud.deploy.v1.CreateAutomationRequest;
import com.google.cloud.deploy.v1.CreateCustomTargetTypeRequest;
import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.CreateReleaseRequest;
import com.google.cloud.deploy.v1.CreateRolloutRequest;
import com.google.cloud.deploy.v1.CreateTargetRequest;
import com.google.cloud.deploy.v1.CustomTargetType;
import com.google.cloud.deploy.v1.DeleteAutomationRequest;
import com.google.cloud.deploy.v1.DeleteCustomTargetTypeRequest;
import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.DeleteTargetRequest;
import com.google.cloud.deploy.v1.DeliveryPipeline;
import com.google.cloud.deploy.v1.GetAutomationRequest;
import com.google.cloud.deploy.v1.GetAutomationRunRequest;
import com.google.cloud.deploy.v1.GetConfigRequest;
import com.google.cloud.deploy.v1.GetCustomTargetTypeRequest;
import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.GetJobRunRequest;
import com.google.cloud.deploy.v1.GetReleaseRequest;
import com.google.cloud.deploy.v1.GetRolloutRequest;
import com.google.cloud.deploy.v1.GetTargetRequest;
import com.google.cloud.deploy.v1.IgnoreJobRequest;
import com.google.cloud.deploy.v1.IgnoreJobResponse;
import com.google.cloud.deploy.v1.JobRun;
import com.google.cloud.deploy.v1.ListAutomationRunsRequest;
import com.google.cloud.deploy.v1.ListAutomationRunsResponse;
import com.google.cloud.deploy.v1.ListAutomationsRequest;
import com.google.cloud.deploy.v1.ListAutomationsResponse;
import com.google.cloud.deploy.v1.ListCustomTargetTypesRequest;
import com.google.cloud.deploy.v1.ListCustomTargetTypesResponse;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse;
import com.google.cloud.deploy.v1.ListJobRunsRequest;
import com.google.cloud.deploy.v1.ListJobRunsResponse;
import com.google.cloud.deploy.v1.ListReleasesRequest;
import com.google.cloud.deploy.v1.ListReleasesResponse;
import com.google.cloud.deploy.v1.ListRolloutsRequest;
import com.google.cloud.deploy.v1.ListRolloutsResponse;
import com.google.cloud.deploy.v1.ListTargetsRequest;
import com.google.cloud.deploy.v1.ListTargetsResponse;
import com.google.cloud.deploy.v1.OperationMetadata;
import com.google.cloud.deploy.v1.Release;
import com.google.cloud.deploy.v1.RetryJobRequest;
import com.google.cloud.deploy.v1.RetryJobResponse;
import com.google.cloud.deploy.v1.RollbackTargetRequest;
import com.google.cloud.deploy.v1.RollbackTargetResponse;
import com.google.cloud.deploy.v1.Rollout;
import com.google.cloud.deploy.v1.Target;
import com.google.cloud.deploy.v1.TerminateJobRunRequest;
import com.google.cloud.deploy.v1.TerminateJobRunResponse;
import com.google.cloud.deploy.v1.UpdateAutomationRequest;
import com.google.cloud.deploy.v1.UpdateCustomTargetTypeRequest;
import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.UpdateTargetRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
import javax.annotation.Generated;
import org.threeten.bp.Duration;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Settings class to configure an instance of {@link CloudDeployStub}.
*
* <p>The default instance has everything set to sensible defaults:
*
* <ul>
* <li>The default service address (clouddeploy.googleapis.com) and default port (443) are used.
* <li>Credentials are acquired automatically through Application Default Credentials.
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
* </ul>
*
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
* <p>For example, to set the total timeout of getDeliveryPipeline to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* CloudDeployStubSettings.Builder cloudDeploySettingsBuilder =
* CloudDeployStubSettings.newBuilder();
* cloudDeploySettingsBuilder
* .getDeliveryPipelineSettings()
* .setRetrySettings(
* cloudDeploySettingsBuilder
* .getDeliveryPipelineSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* CloudDeployStubSettings cloudDeploySettings = cloudDeploySettingsBuilder.build();
* }</pre>
*/
@Generated("by gapic-generator-java")
public class CloudDeployStubSettings extends StubSettings<CloudDeployStubSettings> {
/** The default scopes of the service. */
private static final ImmutableList<String> DEFAULT_SERVICE_SCOPES =
ImmutableList.<String>builder().add("https://www.googleapis.com/auth/cloud-platform").build();
private final PagedCallSettings<
ListDeliveryPipelinesRequest,
ListDeliveryPipelinesResponse,
ListDeliveryPipelinesPagedResponse>
listDeliveryPipelinesSettings;
private final UnaryCallSettings<GetDeliveryPipelineRequest, DeliveryPipeline>
getDeliveryPipelineSettings;
private final UnaryCallSettings<CreateDeliveryPipelineRequest, Operation>
createDeliveryPipelineSettings;
private final OperationCallSettings<
CreateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata>
createDeliveryPipelineOperationSettings;
private final UnaryCallSettings<UpdateDeliveryPipelineRequest, Operation>
updateDeliveryPipelineSettings;
private final OperationCallSettings<
UpdateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata>
updateDeliveryPipelineOperationSettings;
private final UnaryCallSettings<DeleteDeliveryPipelineRequest, Operation>
deleteDeliveryPipelineSettings;
private final OperationCallSettings<DeleteDeliveryPipelineRequest, Empty, OperationMetadata>
deleteDeliveryPipelineOperationSettings;
private final PagedCallSettings<ListTargetsRequest, ListTargetsResponse, ListTargetsPagedResponse>
listTargetsSettings;
private final UnaryCallSettings<RollbackTargetRequest, RollbackTargetResponse>
rollbackTargetSettings;
private final UnaryCallSettings<GetTargetRequest, Target> getTargetSettings;
private final UnaryCallSettings<CreateTargetRequest, Operation> createTargetSettings;
private final OperationCallSettings<CreateTargetRequest, Target, OperationMetadata>
createTargetOperationSettings;
private final UnaryCallSettings<UpdateTargetRequest, Operation> updateTargetSettings;
private final OperationCallSettings<UpdateTargetRequest, Target, OperationMetadata>
updateTargetOperationSettings;
private final UnaryCallSettings<DeleteTargetRequest, Operation> deleteTargetSettings;
private final OperationCallSettings<DeleteTargetRequest, Empty, OperationMetadata>
deleteTargetOperationSettings;
private final PagedCallSettings<
ListCustomTargetTypesRequest,
ListCustomTargetTypesResponse,
ListCustomTargetTypesPagedResponse>
listCustomTargetTypesSettings;
private final UnaryCallSettings<GetCustomTargetTypeRequest, CustomTargetType>
getCustomTargetTypeSettings;
private final UnaryCallSettings<CreateCustomTargetTypeRequest, Operation>
createCustomTargetTypeSettings;
private final OperationCallSettings<
CreateCustomTargetTypeRequest, CustomTargetType, OperationMetadata>
createCustomTargetTypeOperationSettings;
private final UnaryCallSettings<UpdateCustomTargetTypeRequest, Operation>
updateCustomTargetTypeSettings;
private final OperationCallSettings<
UpdateCustomTargetTypeRequest, CustomTargetType, OperationMetadata>
updateCustomTargetTypeOperationSettings;
private final UnaryCallSettings<DeleteCustomTargetTypeRequest, Operation>
deleteCustomTargetTypeSettings;
private final OperationCallSettings<DeleteCustomTargetTypeRequest, Empty, OperationMetadata>
deleteCustomTargetTypeOperationSettings;
private final PagedCallSettings<
ListReleasesRequest, ListReleasesResponse, ListReleasesPagedResponse>
listReleasesSettings;
private final UnaryCallSettings<GetReleaseRequest, Release> getReleaseSettings;
private final UnaryCallSettings<CreateReleaseRequest, Operation> createReleaseSettings;
private final OperationCallSettings<CreateReleaseRequest, Release, OperationMetadata>
createReleaseOperationSettings;
private final UnaryCallSettings<AbandonReleaseRequest, AbandonReleaseResponse>
abandonReleaseSettings;
private final UnaryCallSettings<ApproveRolloutRequest, ApproveRolloutResponse>
approveRolloutSettings;
private final UnaryCallSettings<AdvanceRolloutRequest, AdvanceRolloutResponse>
advanceRolloutSettings;
private final UnaryCallSettings<CancelRolloutRequest, CancelRolloutResponse>
cancelRolloutSettings;
private final PagedCallSettings<
ListRolloutsRequest, ListRolloutsResponse, ListRolloutsPagedResponse>
listRolloutsSettings;
private final UnaryCallSettings<GetRolloutRequest, Rollout> getRolloutSettings;
private final UnaryCallSettings<CreateRolloutRequest, Operation> createRolloutSettings;
private final OperationCallSettings<CreateRolloutRequest, Rollout, OperationMetadata>
createRolloutOperationSettings;
private final UnaryCallSettings<IgnoreJobRequest, IgnoreJobResponse> ignoreJobSettings;
private final UnaryCallSettings<RetryJobRequest, RetryJobResponse> retryJobSettings;
private final PagedCallSettings<ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse>
listJobRunsSettings;
private final UnaryCallSettings<GetJobRunRequest, JobRun> getJobRunSettings;
private final UnaryCallSettings<TerminateJobRunRequest, TerminateJobRunResponse>
terminateJobRunSettings;
private final UnaryCallSettings<GetConfigRequest, Config> getConfigSettings;
private final UnaryCallSettings<CreateAutomationRequest, Operation> createAutomationSettings;
private final OperationCallSettings<CreateAutomationRequest, Automation, OperationMetadata>
createAutomationOperationSettings;
private final UnaryCallSettings<UpdateAutomationRequest, Operation> updateAutomationSettings;
private final OperationCallSettings<UpdateAutomationRequest, Automation, OperationMetadata>
updateAutomationOperationSettings;
private final UnaryCallSettings<DeleteAutomationRequest, Operation> deleteAutomationSettings;
private final OperationCallSettings<DeleteAutomationRequest, Empty, OperationMetadata>
deleteAutomationOperationSettings;
private final UnaryCallSettings<GetAutomationRequest, Automation> getAutomationSettings;
private final PagedCallSettings<
ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>
listAutomationsSettings;
private final UnaryCallSettings<GetAutomationRunRequest, AutomationRun> getAutomationRunSettings;
private final PagedCallSettings<
ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse>
listAutomationRunsSettings;
private final UnaryCallSettings<CancelAutomationRunRequest, CancelAutomationRunResponse>
cancelAutomationRunSettings;
private final PagedCallSettings<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
private final UnaryCallSettings<GetLocationRequest, Location> getLocationSettings;
private final UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings;
private final UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings;
private final UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsSettings;
private static final PagedListDescriptor<
ListDeliveryPipelinesRequest, ListDeliveryPipelinesResponse, DeliveryPipeline>
LIST_DELIVERY_PIPELINES_PAGE_STR_DESC =
new PagedListDescriptor<
ListDeliveryPipelinesRequest, ListDeliveryPipelinesResponse, DeliveryPipeline>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListDeliveryPipelinesRequest injectToken(
ListDeliveryPipelinesRequest payload, String token) {
return ListDeliveryPipelinesRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListDeliveryPipelinesRequest injectPageSize(
ListDeliveryPipelinesRequest payload, int pageSize) {
return ListDeliveryPipelinesRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListDeliveryPipelinesRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListDeliveryPipelinesResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable<DeliveryPipeline> extractResources(
ListDeliveryPipelinesResponse payload) {
return payload.getDeliveryPipelinesList() == null
? ImmutableList.<DeliveryPipeline>of()
: payload.getDeliveryPipelinesList();
}
};
private static final PagedListDescriptor<ListTargetsRequest, ListTargetsResponse, Target>
LIST_TARGETS_PAGE_STR_DESC =
new PagedListDescriptor<ListTargetsRequest, ListTargetsResponse, Target>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListTargetsRequest injectToken(ListTargetsRequest payload, String token) {
return ListTargetsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListTargetsRequest injectPageSize(ListTargetsRequest payload, int pageSize) {
return ListTargetsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListTargetsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListTargetsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable<Target> extractResources(ListTargetsResponse payload) {
return payload.getTargetsList() == null
? ImmutableList.<Target>of()
: payload.getTargetsList();
}
};
private static final PagedListDescriptor<
ListCustomTargetTypesRequest, ListCustomTargetTypesResponse, CustomTargetType>
LIST_CUSTOM_TARGET_TYPES_PAGE_STR_DESC =
new PagedListDescriptor<
ListCustomTargetTypesRequest, ListCustomTargetTypesResponse, CustomTargetType>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListCustomTargetTypesRequest injectToken(
ListCustomTargetTypesRequest payload, String token) {
return ListCustomTargetTypesRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListCustomTargetTypesRequest injectPageSize(
ListCustomTargetTypesRequest payload, int pageSize) {
return ListCustomTargetTypesRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListCustomTargetTypesRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListCustomTargetTypesResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable<CustomTargetType> extractResources(
ListCustomTargetTypesResponse payload) {
return payload.getCustomTargetTypesList() == null
? ImmutableList.<CustomTargetType>of()
: payload.getCustomTargetTypesList();
}
};
private static final PagedListDescriptor<ListReleasesRequest, ListReleasesResponse, Release>
LIST_RELEASES_PAGE_STR_DESC =
new PagedListDescriptor<ListReleasesRequest, ListReleasesResponse, Release>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListReleasesRequest injectToken(ListReleasesRequest payload, String token) {
return ListReleasesRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListReleasesRequest injectPageSize(ListReleasesRequest payload, int pageSize) {
return ListReleasesRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListReleasesRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListReleasesResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable<Release> extractResources(ListReleasesResponse payload) {
return payload.getReleasesList() == null
? ImmutableList.<Release>of()
: payload.getReleasesList();
}
};
private static final PagedListDescriptor<ListRolloutsRequest, ListRolloutsResponse, Rollout>
LIST_ROLLOUTS_PAGE_STR_DESC =
new PagedListDescriptor<ListRolloutsRequest, ListRolloutsResponse, Rollout>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListRolloutsRequest injectToken(ListRolloutsRequest payload, String token) {
return ListRolloutsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListRolloutsRequest injectPageSize(ListRolloutsRequest payload, int pageSize) {
return ListRolloutsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListRolloutsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListRolloutsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable<Rollout> extractResources(ListRolloutsResponse payload) {
return payload.getRolloutsList() == null
? ImmutableList.<Rollout>of()
: payload.getRolloutsList();
}
};
private static final PagedListDescriptor<ListJobRunsRequest, ListJobRunsResponse, JobRun>
LIST_JOB_RUNS_PAGE_STR_DESC =
new PagedListDescriptor<ListJobRunsRequest, ListJobRunsResponse, JobRun>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListJobRunsRequest injectToken(ListJobRunsRequest payload, String token) {
return ListJobRunsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListJobRunsRequest injectPageSize(ListJobRunsRequest payload, int pageSize) {
return ListJobRunsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListJobRunsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListJobRunsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable<JobRun> extractResources(ListJobRunsResponse payload) {
return payload.getJobRunsList() == null
? ImmutableList.<JobRun>of()
: payload.getJobRunsList();
}
};
private static final PagedListDescriptor<
ListAutomationsRequest, ListAutomationsResponse, Automation>
LIST_AUTOMATIONS_PAGE_STR_DESC =
new PagedListDescriptor<ListAutomationsRequest, ListAutomationsResponse, Automation>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListAutomationsRequest injectToken(
ListAutomationsRequest payload, String token) {
return ListAutomationsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListAutomationsRequest injectPageSize(
ListAutomationsRequest payload, int pageSize) {
return ListAutomationsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListAutomationsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListAutomationsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable<Automation> extractResources(ListAutomationsResponse payload) {
return payload.getAutomationsList() == null
? ImmutableList.<Automation>of()
: payload.getAutomationsList();
}
};
private static final PagedListDescriptor<
ListAutomationRunsRequest, ListAutomationRunsResponse, AutomationRun>
LIST_AUTOMATION_RUNS_PAGE_STR_DESC =
new PagedListDescriptor<
ListAutomationRunsRequest, ListAutomationRunsResponse, AutomationRun>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListAutomationRunsRequest injectToken(
ListAutomationRunsRequest payload, String token) {
return ListAutomationRunsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListAutomationRunsRequest injectPageSize(
ListAutomationRunsRequest payload, int pageSize) {
return ListAutomationRunsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListAutomationRunsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListAutomationRunsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable<AutomationRun> extractResources(ListAutomationRunsResponse payload) {
return payload.getAutomationRunsList() == null
? ImmutableList.<AutomationRun>of()
: payload.getAutomationRunsList();
}
};
private static final PagedListDescriptor<ListLocationsRequest, ListLocationsResponse, Location>
LIST_LOCATIONS_PAGE_STR_DESC =
new PagedListDescriptor<ListLocationsRequest, ListLocationsResponse, Location>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) {
return ListLocationsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) {
return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListLocationsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListLocationsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable<Location> extractResources(ListLocationsResponse payload) {
return payload.getLocationsList() == null
? ImmutableList.<Location>of()
: payload.getLocationsList();
}
};
private static final PagedListResponseFactory<
ListDeliveryPipelinesRequest,
ListDeliveryPipelinesResponse,
ListDeliveryPipelinesPagedResponse>
LIST_DELIVERY_PIPELINES_PAGE_STR_FACT =
new PagedListResponseFactory<
ListDeliveryPipelinesRequest,
ListDeliveryPipelinesResponse,
ListDeliveryPipelinesPagedResponse>() {
@Override
public ApiFuture<ListDeliveryPipelinesPagedResponse> getFuturePagedResponse(
UnaryCallable<ListDeliveryPipelinesRequest, ListDeliveryPipelinesResponse> callable,
ListDeliveryPipelinesRequest request,
ApiCallContext context,
ApiFuture<ListDeliveryPipelinesResponse> futureResponse) {
PageContext<
ListDeliveryPipelinesRequest, ListDeliveryPipelinesResponse, DeliveryPipeline>
pageContext =
PageContext.create(
callable, LIST_DELIVERY_PIPELINES_PAGE_STR_DESC, request, context);
return ListDeliveryPipelinesPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListTargetsRequest, ListTargetsResponse, ListTargetsPagedResponse>
LIST_TARGETS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListTargetsRequest, ListTargetsResponse, ListTargetsPagedResponse>() {
@Override
public ApiFuture<ListTargetsPagedResponse> getFuturePagedResponse(
UnaryCallable<ListTargetsRequest, ListTargetsResponse> callable,
ListTargetsRequest request,
ApiCallContext context,
ApiFuture<ListTargetsResponse> futureResponse) {
PageContext<ListTargetsRequest, ListTargetsResponse, Target> pageContext =
PageContext.create(callable, LIST_TARGETS_PAGE_STR_DESC, request, context);
return ListTargetsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListCustomTargetTypesRequest,
ListCustomTargetTypesResponse,
ListCustomTargetTypesPagedResponse>
LIST_CUSTOM_TARGET_TYPES_PAGE_STR_FACT =
new PagedListResponseFactory<
ListCustomTargetTypesRequest,
ListCustomTargetTypesResponse,
ListCustomTargetTypesPagedResponse>() {
@Override
public ApiFuture<ListCustomTargetTypesPagedResponse> getFuturePagedResponse(
UnaryCallable<ListCustomTargetTypesRequest, ListCustomTargetTypesResponse> callable,
ListCustomTargetTypesRequest request,
ApiCallContext context,
ApiFuture<ListCustomTargetTypesResponse> futureResponse) {
PageContext<
ListCustomTargetTypesRequest, ListCustomTargetTypesResponse, CustomTargetType>
pageContext =
PageContext.create(
callable, LIST_CUSTOM_TARGET_TYPES_PAGE_STR_DESC, request, context);
return ListCustomTargetTypesPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListReleasesRequest, ListReleasesResponse, ListReleasesPagedResponse>
LIST_RELEASES_PAGE_STR_FACT =
new PagedListResponseFactory<
ListReleasesRequest, ListReleasesResponse, ListReleasesPagedResponse>() {
@Override
public ApiFuture<ListReleasesPagedResponse> getFuturePagedResponse(
UnaryCallable<ListReleasesRequest, ListReleasesResponse> callable,
ListReleasesRequest request,
ApiCallContext context,
ApiFuture<ListReleasesResponse> futureResponse) {
PageContext<ListReleasesRequest, ListReleasesResponse, Release> pageContext =
PageContext.create(callable, LIST_RELEASES_PAGE_STR_DESC, request, context);
return ListReleasesPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListRolloutsRequest, ListRolloutsResponse, ListRolloutsPagedResponse>
LIST_ROLLOUTS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListRolloutsRequest, ListRolloutsResponse, ListRolloutsPagedResponse>() {
@Override
public ApiFuture<ListRolloutsPagedResponse> getFuturePagedResponse(
UnaryCallable<ListRolloutsRequest, ListRolloutsResponse> callable,
ListRolloutsRequest request,
ApiCallContext context,
ApiFuture<ListRolloutsResponse> futureResponse) {
PageContext<ListRolloutsRequest, ListRolloutsResponse, Rollout> pageContext =
PageContext.create(callable, LIST_ROLLOUTS_PAGE_STR_DESC, request, context);
return ListRolloutsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse>
LIST_JOB_RUNS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse>() {
@Override
public ApiFuture<ListJobRunsPagedResponse> getFuturePagedResponse(
UnaryCallable<ListJobRunsRequest, ListJobRunsResponse> callable,
ListJobRunsRequest request,
ApiCallContext context,
ApiFuture<ListJobRunsResponse> futureResponse) {
PageContext<ListJobRunsRequest, ListJobRunsResponse, JobRun> pageContext =
PageContext.create(callable, LIST_JOB_RUNS_PAGE_STR_DESC, request, context);
return ListJobRunsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>
LIST_AUTOMATIONS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>() {
@Override
public ApiFuture<ListAutomationsPagedResponse> getFuturePagedResponse(
UnaryCallable<ListAutomationsRequest, ListAutomationsResponse> callable,
ListAutomationsRequest request,
ApiCallContext context,
ApiFuture<ListAutomationsResponse> futureResponse) {
PageContext<ListAutomationsRequest, ListAutomationsResponse, Automation> pageContext =
PageContext.create(callable, LIST_AUTOMATIONS_PAGE_STR_DESC, request, context);
return ListAutomationsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse>
LIST_AUTOMATION_RUNS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListAutomationRunsRequest,
ListAutomationRunsResponse,
ListAutomationRunsPagedResponse>() {
@Override
public ApiFuture<ListAutomationRunsPagedResponse> getFuturePagedResponse(
UnaryCallable<ListAutomationRunsRequest, ListAutomationRunsResponse> callable,
ListAutomationRunsRequest request,
ApiCallContext context,
ApiFuture<ListAutomationRunsResponse> futureResponse) {
PageContext<ListAutomationRunsRequest, ListAutomationRunsResponse, AutomationRun>
pageContext =
PageContext.create(
callable, LIST_AUTOMATION_RUNS_PAGE_STR_DESC, request, context);
return ListAutomationRunsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
LIST_LOCATIONS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() {
@Override
public ApiFuture<ListLocationsPagedResponse> getFuturePagedResponse(
UnaryCallable<ListLocationsRequest, ListLocationsResponse> callable,
ListLocationsRequest request,
ApiCallContext context,
ApiFuture<ListLocationsResponse> futureResponse) {
PageContext<ListLocationsRequest, ListLocationsResponse, Location> pageContext =
PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context);
return ListLocationsPagedResponse.createAsync(pageContext, futureResponse);
}
};
/** Returns the object with the settings used for calls to listDeliveryPipelines. */
public PagedCallSettings<
ListDeliveryPipelinesRequest,
ListDeliveryPipelinesResponse,
ListDeliveryPipelinesPagedResponse>
listDeliveryPipelinesSettings() {
return listDeliveryPipelinesSettings;
}
/** Returns the object with the settings used for calls to getDeliveryPipeline. */
public UnaryCallSettings<GetDeliveryPipelineRequest, DeliveryPipeline>
getDeliveryPipelineSettings() {
return getDeliveryPipelineSettings;
}
/** Returns the object with the settings used for calls to createDeliveryPipeline. */
public UnaryCallSettings<CreateDeliveryPipelineRequest, Operation>
createDeliveryPipelineSettings() {
return createDeliveryPipelineSettings;
}
/** Returns the object with the settings used for calls to createDeliveryPipeline. */
public OperationCallSettings<CreateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata>
createDeliveryPipelineOperationSettings() {
return createDeliveryPipelineOperationSettings;
}
/** Returns the object with the settings used for calls to updateDeliveryPipeline. */
public UnaryCallSettings<UpdateDeliveryPipelineRequest, Operation>
updateDeliveryPipelineSettings() {
return updateDeliveryPipelineSettings;
}
/** Returns the object with the settings used for calls to updateDeliveryPipeline. */
public OperationCallSettings<UpdateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata>
updateDeliveryPipelineOperationSettings() {
return updateDeliveryPipelineOperationSettings;
}
/** Returns the object with the settings used for calls to deleteDeliveryPipeline. */
public UnaryCallSettings<DeleteDeliveryPipelineRequest, Operation>
deleteDeliveryPipelineSettings() {
return deleteDeliveryPipelineSettings;
}
/** Returns the object with the settings used for calls to deleteDeliveryPipeline. */
public OperationCallSettings<DeleteDeliveryPipelineRequest, Empty, OperationMetadata>
deleteDeliveryPipelineOperationSettings() {
return deleteDeliveryPipelineOperationSettings;
}
/** Returns the object with the settings used for calls to listTargets. */
public PagedCallSettings<ListTargetsRequest, ListTargetsResponse, ListTargetsPagedResponse>
listTargetsSettings() {
return listTargetsSettings;
}
/** Returns the object with the settings used for calls to rollbackTarget. */
public UnaryCallSettings<RollbackTargetRequest, RollbackTargetResponse> rollbackTargetSettings() {
return rollbackTargetSettings;
}
/** Returns the object with the settings used for calls to getTarget. */
public UnaryCallSettings<GetTargetRequest, Target> getTargetSettings() {
return getTargetSettings;
}
/** Returns the object with the settings used for calls to createTarget. */
public UnaryCallSettings<CreateTargetRequest, Operation> createTargetSettings() {
return createTargetSettings;
}
/** Returns the object with the settings used for calls to createTarget. */
public OperationCallSettings<CreateTargetRequest, Target, OperationMetadata>
createTargetOperationSettings() {
return createTargetOperationSettings;
}
/** Returns the object with the settings used for calls to updateTarget. */
public UnaryCallSettings<UpdateTargetRequest, Operation> updateTargetSettings() {
return updateTargetSettings;
}
/** Returns the object with the settings used for calls to updateTarget. */
public OperationCallSettings<UpdateTargetRequest, Target, OperationMetadata>
updateTargetOperationSettings() {
return updateTargetOperationSettings;
}
/** Returns the object with the settings used for calls to deleteTarget. */
public UnaryCallSettings<DeleteTargetRequest, Operation> deleteTargetSettings() {
return deleteTargetSettings;
}
/** Returns the object with the settings used for calls to deleteTarget. */
public OperationCallSettings<DeleteTargetRequest, Empty, OperationMetadata>
deleteTargetOperationSettings() {
return deleteTargetOperationSettings;
}
/** Returns the object with the settings used for calls to listCustomTargetTypes. */
public PagedCallSettings<
ListCustomTargetTypesRequest,
ListCustomTargetTypesResponse,
ListCustomTargetTypesPagedResponse>
listCustomTargetTypesSettings() {
return listCustomTargetTypesSettings;
}
/** Returns the object with the settings used for calls to getCustomTargetType. */
public UnaryCallSettings<GetCustomTargetTypeRequest, CustomTargetType>
getCustomTargetTypeSettings() {
return getCustomTargetTypeSettings;
}
/** Returns the object with the settings used for calls to createCustomTargetType. */
public UnaryCallSettings<CreateCustomTargetTypeRequest, Operation>
createCustomTargetTypeSettings() {
return createCustomTargetTypeSettings;
}
/** Returns the object with the settings used for calls to createCustomTargetType. */
public OperationCallSettings<CreateCustomTargetTypeRequest, CustomTargetType, OperationMetadata>
createCustomTargetTypeOperationSettings() {
return createCustomTargetTypeOperationSettings;
}
/** Returns the object with the settings used for calls to updateCustomTargetType. */
public UnaryCallSettings<UpdateCustomTargetTypeRequest, Operation>
updateCustomTargetTypeSettings() {
return updateCustomTargetTypeSettings;
}
/** Returns the object with the settings used for calls to updateCustomTargetType. */
public OperationCallSettings<UpdateCustomTargetTypeRequest, CustomTargetType, OperationMetadata>
updateCustomTargetTypeOperationSettings() {
return updateCustomTargetTypeOperationSettings;
}
/** Returns the object with the settings used for calls to deleteCustomTargetType. */
public UnaryCallSettings<DeleteCustomTargetTypeRequest, Operation>
deleteCustomTargetTypeSettings() {
return deleteCustomTargetTypeSettings;
}
/** Returns the object with the settings used for calls to deleteCustomTargetType. */
public OperationCallSettings<DeleteCustomTargetTypeRequest, Empty, OperationMetadata>
deleteCustomTargetTypeOperationSettings() {
return deleteCustomTargetTypeOperationSettings;
}
/** Returns the object with the settings used for calls to listReleases. */
public PagedCallSettings<ListReleasesRequest, ListReleasesResponse, ListReleasesPagedResponse>
listReleasesSettings() {
return listReleasesSettings;
}
/** Returns the object with the settings used for calls to getRelease. */
public UnaryCallSettings<GetReleaseRequest, Release> getReleaseSettings() {
return getReleaseSettings;
}
/** Returns the object with the settings used for calls to createRelease. */
public UnaryCallSettings<CreateReleaseRequest, Operation> createReleaseSettings() {
return createReleaseSettings;
}
/** Returns the object with the settings used for calls to createRelease. */
public OperationCallSettings<CreateReleaseRequest, Release, OperationMetadata>
createReleaseOperationSettings() {
return createReleaseOperationSettings;
}
/** Returns the object with the settings used for calls to abandonRelease. */
public UnaryCallSettings<AbandonReleaseRequest, AbandonReleaseResponse> abandonReleaseSettings() {
return abandonReleaseSettings;
}
/** Returns the object with the settings used for calls to approveRollout. */
public UnaryCallSettings<ApproveRolloutRequest, ApproveRolloutResponse> approveRolloutSettings() {
return approveRolloutSettings;
}
/** Returns the object with the settings used for calls to advanceRollout. */
public UnaryCallSettings<AdvanceRolloutRequest, AdvanceRolloutResponse> advanceRolloutSettings() {
return advanceRolloutSettings;
}