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 package apphub
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "net/http"
61 "net/url"
62 "strconv"
63 "strings"
64
65 googleapi "google.golang.org/api/googleapi"
66 internal "google.golang.org/api/internal"
67 gensupport "google.golang.org/api/internal/gensupport"
68 option "google.golang.org/api/option"
69 internaloption "google.golang.org/api/option/internaloption"
70 htransport "google.golang.org/api/transport/http"
71 )
72
73
74
75 var _ = bytes.NewBuffer
76 var _ = strconv.Itoa
77 var _ = fmt.Sprintf
78 var _ = json.NewDecoder
79 var _ = io.Copy
80 var _ = url.Parse
81 var _ = gensupport.MarshalJSON
82 var _ = googleapi.Version
83 var _ = errors.New
84 var _ = strings.Replace
85 var _ = context.Canceled
86 var _ = internaloption.WithDefaultEndpoint
87 var _ = internal.Version
88
89 const apiId = "apphub:v1alpha"
90 const apiName = "apphub"
91 const apiVersion = "v1alpha"
92 const basePath = "https://apphub.googleapis.com/"
93 const basePathTemplate = "https://apphub.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://apphub.mtls.googleapis.com/"
95
96
97 const (
98
99
100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/cloud-platform",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*APIService, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &APIService{client: client, BasePath: basePath}
138 s.Projects = NewProjectsService(s)
139 return s, nil
140 }
141
142 type APIService struct {
143 client *http.Client
144 BasePath string
145 UserAgent string
146
147 Projects *ProjectsService
148 }
149
150 func (s *APIService) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *APIService) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *APIService
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Applications = NewProjectsLocationsApplicationsService(s)
172 rs.DiscoveredServices = NewProjectsLocationsDiscoveredServicesService(s)
173 rs.DiscoveredWorkloads = NewProjectsLocationsDiscoveredWorkloadsService(s)
174 rs.Operations = NewProjectsLocationsOperationsService(s)
175 rs.ServiceProjectAttachments = NewProjectsLocationsServiceProjectAttachmentsService(s)
176 return rs
177 }
178
179 type ProjectsLocationsService struct {
180 s *APIService
181
182 Applications *ProjectsLocationsApplicationsService
183
184 DiscoveredServices *ProjectsLocationsDiscoveredServicesService
185
186 DiscoveredWorkloads *ProjectsLocationsDiscoveredWorkloadsService
187
188 Operations *ProjectsLocationsOperationsService
189
190 ServiceProjectAttachments *ProjectsLocationsServiceProjectAttachmentsService
191 }
192
193 func NewProjectsLocationsApplicationsService(s *APIService) *ProjectsLocationsApplicationsService {
194 rs := &ProjectsLocationsApplicationsService{s: s}
195 rs.Services = NewProjectsLocationsApplicationsServicesService(s)
196 rs.Workloads = NewProjectsLocationsApplicationsWorkloadsService(s)
197 return rs
198 }
199
200 type ProjectsLocationsApplicationsService struct {
201 s *APIService
202
203 Services *ProjectsLocationsApplicationsServicesService
204
205 Workloads *ProjectsLocationsApplicationsWorkloadsService
206 }
207
208 func NewProjectsLocationsApplicationsServicesService(s *APIService) *ProjectsLocationsApplicationsServicesService {
209 rs := &ProjectsLocationsApplicationsServicesService{s: s}
210 return rs
211 }
212
213 type ProjectsLocationsApplicationsServicesService struct {
214 s *APIService
215 }
216
217 func NewProjectsLocationsApplicationsWorkloadsService(s *APIService) *ProjectsLocationsApplicationsWorkloadsService {
218 rs := &ProjectsLocationsApplicationsWorkloadsService{s: s}
219 return rs
220 }
221
222 type ProjectsLocationsApplicationsWorkloadsService struct {
223 s *APIService
224 }
225
226 func NewProjectsLocationsDiscoveredServicesService(s *APIService) *ProjectsLocationsDiscoveredServicesService {
227 rs := &ProjectsLocationsDiscoveredServicesService{s: s}
228 return rs
229 }
230
231 type ProjectsLocationsDiscoveredServicesService struct {
232 s *APIService
233 }
234
235 func NewProjectsLocationsDiscoveredWorkloadsService(s *APIService) *ProjectsLocationsDiscoveredWorkloadsService {
236 rs := &ProjectsLocationsDiscoveredWorkloadsService{s: s}
237 return rs
238 }
239
240 type ProjectsLocationsDiscoveredWorkloadsService struct {
241 s *APIService
242 }
243
244 func NewProjectsLocationsOperationsService(s *APIService) *ProjectsLocationsOperationsService {
245 rs := &ProjectsLocationsOperationsService{s: s}
246 return rs
247 }
248
249 type ProjectsLocationsOperationsService struct {
250 s *APIService
251 }
252
253 func NewProjectsLocationsServiceProjectAttachmentsService(s *APIService) *ProjectsLocationsServiceProjectAttachmentsService {
254 rs := &ProjectsLocationsServiceProjectAttachmentsService{s: s}
255 return rs
256 }
257
258 type ProjectsLocationsServiceProjectAttachmentsService struct {
259 s *APIService
260 }
261
262
263
264
265
266 type Application struct {
267
268 Attributes *Attributes `json:"attributes,omitempty"`
269
270 CreateTime string `json:"createTime,omitempty"`
271
272
273 Description string `json:"description,omitempty"`
274
275
276 DisplayName string `json:"displayName,omitempty"`
277
278
279
280 Name string `json:"name,omitempty"`
281
282
283 Scope *Scope `json:"scope,omitempty"`
284
285
286
287
288
289
290
291 State string `json:"state,omitempty"`
292
293
294 Uid string `json:"uid,omitempty"`
295
296 UpdateTime string `json:"updateTime,omitempty"`
297
298
299 googleapi.ServerResponse `json:"-"`
300
301
302
303
304
305 ForceSendFields []string `json:"-"`
306
307
308
309
310 NullFields []string `json:"-"`
311 }
312
313 func (s *Application) MarshalJSON() ([]byte, error) {
314 type NoMethod Application
315 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
316 }
317
318
319 type Attributes struct {
320
321
322 BusinessOwners []*ContactInfo `json:"businessOwners,omitempty"`
323
324 Criticality *Criticality `json:"criticality,omitempty"`
325
326 DeveloperOwners []*ContactInfo `json:"developerOwners,omitempty"`
327
328 Environment *Environment `json:"environment,omitempty"`
329
330 OperatorOwners []*ContactInfo `json:"operatorOwners,omitempty"`
331
332
333
334
335
336 ForceSendFields []string `json:"-"`
337
338
339
340
341 NullFields []string `json:"-"`
342 }
343
344 func (s *Attributes) MarshalJSON() ([]byte, error) {
345 type NoMethod Attributes
346 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
347 }
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365 type AuditConfig struct {
366
367 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
368
369
370
371 Service string `json:"service,omitempty"`
372
373
374
375
376
377 ForceSendFields []string `json:"-"`
378
379
380
381
382 NullFields []string `json:"-"`
383 }
384
385 func (s *AuditConfig) MarshalJSON() ([]byte, error) {
386 type NoMethod AuditConfig
387 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
388 }
389
390
391
392
393
394
395 type AuditLogConfig struct {
396
397
398 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
399
400
401
402
403
404
405
406 LogType string `json:"logType,omitempty"`
407
408
409
410
411
412 ForceSendFields []string `json:"-"`
413
414
415
416
417 NullFields []string `json:"-"`
418 }
419
420 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
421 type NoMethod AuditLogConfig
422 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
423 }
424
425
426 type Binding struct {
427
428
429
430
431
432
433
434
435 Condition *Expr `json:"condition,omitempty"`
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 Members []string `json:"members,omitempty"`
499
500
501
502
503
504
505 Role string `json:"role,omitempty"`
506
507
508
509
510
511 ForceSendFields []string `json:"-"`
512
513
514
515
516 NullFields []string `json:"-"`
517 }
518
519 func (s *Binding) MarshalJSON() ([]byte, error) {
520 type NoMethod Binding
521 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
522 }
523
524
525 type CancelOperationRequest struct {
526 }
527
528
529
530 type Channel struct {
531
532 Uri string `json:"uri,omitempty"`
533
534
535
536
537
538 ForceSendFields []string `json:"-"`
539
540
541
542
543 NullFields []string `json:"-"`
544 }
545
546 func (s *Channel) MarshalJSON() ([]byte, error) {
547 type NoMethod Channel
548 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
549 }
550
551
552 type ContactInfo struct {
553
554 Channel *Channel `json:"channel,omitempty"`
555
556
557 DisplayName string `json:"displayName,omitempty"`
558
559 Email string `json:"email,omitempty"`
560
561
562
563
564
565 ForceSendFields []string `json:"-"`
566
567
568
569
570 NullFields []string `json:"-"`
571 }
572
573 func (s *ContactInfo) MarshalJSON() ([]byte, error) {
574 type NoMethod ContactInfo
575 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
576 }
577
578
579 type Criticality struct {
580
581
582
583 Level string `json:"level,omitempty"`
584
585
586 MissionCritical bool `json:"missionCritical,omitempty"`
587
588
589
590
591
592
593
594
595 Type string `json:"type,omitempty"`
596
597
598
599
600
601 ForceSendFields []string `json:"-"`
602
603
604
605
606 NullFields []string `json:"-"`
607 }
608
609 func (s *Criticality) MarshalJSON() ([]byte, error) {
610 type NoMethod Criticality
611 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
612 }
613
614
615
616 type DetachServiceProjectAttachmentRequest struct {
617 }
618
619
620
621 type DetachServiceProjectAttachmentResponse struct {
622
623 googleapi.ServerResponse `json:"-"`
624 }
625
626
627
628
629 type DiscoveredService struct {
630
631
632 Name string `json:"name,omitempty"`
633
634
635 ServiceProperties *ServiceProperties `json:"serviceProperties,omitempty"`
636
637
638 ServiceReference *ServiceReference `json:"serviceReference,omitempty"`
639
640
641 googleapi.ServerResponse `json:"-"`
642
643
644
645
646
647 ForceSendFields []string `json:"-"`
648
649
650
651
652 NullFields []string `json:"-"`
653 }
654
655 func (s *DiscoveredService) MarshalJSON() ([]byte, error) {
656 type NoMethod DiscoveredService
657 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
658 }
659
660
661
662
663
664 type DiscoveredWorkload struct {
665
666
667 Name string `json:"name,omitempty"`
668
669
670 WorkloadProperties *WorkloadProperties `json:"workloadProperties,omitempty"`
671
672
673 WorkloadReference *WorkloadReference `json:"workloadReference,omitempty"`
674
675
676 googleapi.ServerResponse `json:"-"`
677
678
679
680
681
682 ForceSendFields []string `json:"-"`
683
684
685
686
687 NullFields []string `json:"-"`
688 }
689
690 func (s *DiscoveredWorkload) MarshalJSON() ([]byte, error) {
691 type NoMethod DiscoveredWorkload
692 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
693 }
694
695
696
697
698
699 type Empty struct {
700
701 googleapi.ServerResponse `json:"-"`
702 }
703
704
705 type Environment struct {
706
707
708
709 Environment string `json:"environment,omitempty"`
710
711
712
713
714
715
716
717
718 Type string `json:"type,omitempty"`
719
720
721
722
723
724 ForceSendFields []string `json:"-"`
725
726
727
728
729 NullFields []string `json:"-"`
730 }
731
732 func (s *Environment) MarshalJSON() ([]byte, error) {
733 type NoMethod Environment
734 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
735 }
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753 type Expr struct {
754
755
756 Description string `json:"description,omitempty"`
757
758
759 Expression string `json:"expression,omitempty"`
760
761
762 Location string `json:"location,omitempty"`
763
764
765
766 Title string `json:"title,omitempty"`
767
768
769
770
771
772 ForceSendFields []string `json:"-"`
773
774
775
776
777 NullFields []string `json:"-"`
778 }
779
780 func (s *Expr) MarshalJSON() ([]byte, error) {
781 type NoMethod Expr
782 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
783 }
784
785
786 type FindUnregisteredServicesResponse struct {
787
788 DiscoveredServices []*DiscoveredService `json:"discoveredServices,omitempty"`
789
790
791 NextPageToken string `json:"nextPageToken,omitempty"`
792
793 Unreachable []string `json:"unreachable,omitempty"`
794
795
796 googleapi.ServerResponse `json:"-"`
797
798
799
800
801
802 ForceSendFields []string `json:"-"`
803
804
805
806
807 NullFields []string `json:"-"`
808 }
809
810 func (s *FindUnregisteredServicesResponse) MarshalJSON() ([]byte, error) {
811 type NoMethod FindUnregisteredServicesResponse
812 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
813 }
814
815
816 type FindUnregisteredWorkloadsResponse struct {
817
818 DiscoveredWorkloads []*DiscoveredWorkload `json:"discoveredWorkloads,omitempty"`
819
820
821 NextPageToken string `json:"nextPageToken,omitempty"`
822
823 Unreachable []string `json:"unreachable,omitempty"`
824
825
826 googleapi.ServerResponse `json:"-"`
827
828
829
830
831
832 ForceSendFields []string `json:"-"`
833
834
835
836
837 NullFields []string `json:"-"`
838 }
839
840 func (s *FindUnregisteredWorkloadsResponse) MarshalJSON() ([]byte, error) {
841 type NoMethod FindUnregisteredWorkloadsResponse
842 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
843 }
844
845
846 type ListApplicationsResponse struct {
847
848 Applications []*Application `json:"applications,omitempty"`
849
850
851 NextPageToken string `json:"nextPageToken,omitempty"`
852
853 Unreachable []string `json:"unreachable,omitempty"`
854
855
856 googleapi.ServerResponse `json:"-"`
857
858
859
860
861
862 ForceSendFields []string `json:"-"`
863
864
865
866
867 NullFields []string `json:"-"`
868 }
869
870 func (s *ListApplicationsResponse) MarshalJSON() ([]byte, error) {
871 type NoMethod ListApplicationsResponse
872 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
873 }
874
875
876 type ListDiscoveredServicesResponse struct {
877
878 DiscoveredServices []*DiscoveredService `json:"discoveredServices,omitempty"`
879
880
881 NextPageToken string `json:"nextPageToken,omitempty"`
882
883 Unreachable []string `json:"unreachable,omitempty"`
884
885
886 googleapi.ServerResponse `json:"-"`
887
888
889
890
891
892 ForceSendFields []string `json:"-"`
893
894
895
896
897 NullFields []string `json:"-"`
898 }
899
900 func (s *ListDiscoveredServicesResponse) MarshalJSON() ([]byte, error) {
901 type NoMethod ListDiscoveredServicesResponse
902 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
903 }
904
905
906 type ListDiscoveredWorkloadsResponse struct {
907
908 DiscoveredWorkloads []*DiscoveredWorkload `json:"discoveredWorkloads,omitempty"`
909
910
911 NextPageToken string `json:"nextPageToken,omitempty"`
912
913 Unreachable []string `json:"unreachable,omitempty"`
914
915
916 googleapi.ServerResponse `json:"-"`
917
918
919
920
921
922 ForceSendFields []string `json:"-"`
923
924
925
926
927 NullFields []string `json:"-"`
928 }
929
930 func (s *ListDiscoveredWorkloadsResponse) MarshalJSON() ([]byte, error) {
931 type NoMethod ListDiscoveredWorkloadsResponse
932 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
933 }
934
935
936 type ListLocationsResponse struct {
937
938
939 Locations []*Location `json:"locations,omitempty"`
940
941 NextPageToken string `json:"nextPageToken,omitempty"`
942
943
944 googleapi.ServerResponse `json:"-"`
945
946
947
948
949
950 ForceSendFields []string `json:"-"`
951
952
953
954
955 NullFields []string `json:"-"`
956 }
957
958 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
959 type NoMethod ListLocationsResponse
960 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
961 }
962
963
964 type ListOperationsResponse struct {
965
966 NextPageToken string `json:"nextPageToken,omitempty"`
967
968
969 Operations []*Operation `json:"operations,omitempty"`
970
971
972 googleapi.ServerResponse `json:"-"`
973
974
975
976
977
978 ForceSendFields []string `json:"-"`
979
980
981
982
983 NullFields []string `json:"-"`
984 }
985
986 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
987 type NoMethod ListOperationsResponse
988 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
989 }
990
991
992
993 type ListServiceProjectAttachmentsResponse struct {
994
995
996 NextPageToken string `json:"nextPageToken,omitempty"`
997
998 ServiceProjectAttachments []*ServiceProjectAttachment `json:"serviceProjectAttachments,omitempty"`
999
1000 Unreachable []string `json:"unreachable,omitempty"`
1001
1002
1003 googleapi.ServerResponse `json:"-"`
1004
1005
1006
1007
1008
1009 ForceSendFields []string `json:"-"`
1010
1011
1012
1013
1014 NullFields []string `json:"-"`
1015 }
1016
1017 func (s *ListServiceProjectAttachmentsResponse) MarshalJSON() ([]byte, error) {
1018 type NoMethod ListServiceProjectAttachmentsResponse
1019 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1020 }
1021
1022
1023 type ListServicesResponse struct {
1024
1025
1026 NextPageToken string `json:"nextPageToken,omitempty"`
1027
1028 Services []*Service `json:"services,omitempty"`
1029
1030 Unreachable []string `json:"unreachable,omitempty"`
1031
1032
1033 googleapi.ServerResponse `json:"-"`
1034
1035
1036
1037
1038
1039 ForceSendFields []string `json:"-"`
1040
1041
1042
1043
1044 NullFields []string `json:"-"`
1045 }
1046
1047 func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
1048 type NoMethod ListServicesResponse
1049 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1050 }
1051
1052
1053 type ListWorkloadsResponse struct {
1054
1055
1056 NextPageToken string `json:"nextPageToken,omitempty"`
1057
1058 Unreachable []string `json:"unreachable,omitempty"`
1059
1060 Workloads []*Workload `json:"workloads,omitempty"`
1061
1062
1063 googleapi.ServerResponse `json:"-"`
1064
1065
1066
1067
1068
1069 ForceSendFields []string `json:"-"`
1070
1071
1072
1073
1074 NullFields []string `json:"-"`
1075 }
1076
1077 func (s *ListWorkloadsResponse) MarshalJSON() ([]byte, error) {
1078 type NoMethod ListWorkloadsResponse
1079 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1080 }
1081
1082
1083 type Location struct {
1084
1085
1086 DisplayName string `json:"displayName,omitempty"`
1087
1088
1089 Labels map[string]string `json:"labels,omitempty"`
1090
1091 LocationId string `json:"locationId,omitempty"`
1092
1093
1094 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1095
1096
1097
1098 Name string `json:"name,omitempty"`
1099
1100
1101 googleapi.ServerResponse `json:"-"`
1102
1103
1104
1105
1106
1107 ForceSendFields []string `json:"-"`
1108
1109
1110
1111
1112 NullFields []string `json:"-"`
1113 }
1114
1115 func (s *Location) MarshalJSON() ([]byte, error) {
1116 type NoMethod Location
1117 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1118 }
1119
1120
1121 type LookupDiscoveredServiceResponse struct {
1122
1123 DiscoveredService *DiscoveredService `json:"discoveredService,omitempty"`
1124
1125
1126 googleapi.ServerResponse `json:"-"`
1127
1128
1129
1130
1131
1132 ForceSendFields []string `json:"-"`
1133
1134
1135
1136
1137 NullFields []string `json:"-"`
1138 }
1139
1140 func (s *LookupDiscoveredServiceResponse) MarshalJSON() ([]byte, error) {
1141 type NoMethod LookupDiscoveredServiceResponse
1142 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1143 }
1144
1145
1146 type LookupDiscoveredWorkloadResponse struct {
1147
1148 DiscoveredWorkload *DiscoveredWorkload `json:"discoveredWorkload,omitempty"`
1149
1150
1151 googleapi.ServerResponse `json:"-"`
1152
1153
1154
1155
1156
1157 ForceSendFields []string `json:"-"`
1158
1159
1160
1161
1162 NullFields []string `json:"-"`
1163 }
1164
1165 func (s *LookupDiscoveredWorkloadResponse) MarshalJSON() ([]byte, error) {
1166 type NoMethod LookupDiscoveredWorkloadResponse
1167 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1168 }
1169
1170
1171
1172 type LookupServiceProjectAttachmentResponse struct {
1173
1174
1175 ServiceProjectAttachment *ServiceProjectAttachment `json:"serviceProjectAttachment,omitempty"`
1176
1177
1178 googleapi.ServerResponse `json:"-"`
1179
1180
1181
1182
1183
1184 ForceSendFields []string `json:"-"`
1185
1186
1187
1188
1189 NullFields []string `json:"-"`
1190 }
1191
1192 func (s *LookupServiceProjectAttachmentResponse) MarshalJSON() ([]byte, error) {
1193 type NoMethod LookupServiceProjectAttachmentResponse
1194 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1195 }
1196
1197
1198
1199 type Operation struct {
1200
1201
1202
1203 Done bool `json:"done,omitempty"`
1204
1205 Error *Status `json:"error,omitempty"`
1206
1207
1208
1209
1210 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1211
1212
1213
1214 Name string `json:"name,omitempty"`
1215
1216
1217
1218
1219
1220
1221
1222 Response googleapi.RawMessage `json:"response,omitempty"`
1223
1224
1225 googleapi.ServerResponse `json:"-"`
1226
1227
1228
1229
1230
1231 ForceSendFields []string `json:"-"`
1232
1233
1234
1235
1236 NullFields []string `json:"-"`
1237 }
1238
1239 func (s *Operation) MarshalJSON() ([]byte, error) {
1240 type NoMethod Operation
1241 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1242 }
1243
1244
1245 type OperationMetadata struct {
1246
1247 ApiVersion string `json:"apiVersion,omitempty"`
1248
1249 CreateTime string `json:"createTime,omitempty"`
1250
1251 EndTime string `json:"endTime,omitempty"`
1252
1253
1254
1255
1256 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
1257
1258 StatusMessage string `json:"statusMessage,omitempty"`
1259
1260
1261 Target string `json:"target,omitempty"`
1262
1263 Verb string `json:"verb,omitempty"`
1264
1265
1266
1267
1268
1269 ForceSendFields []string `json:"-"`
1270
1271
1272
1273
1274 NullFields []string `json:"-"`
1275 }
1276
1277 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1278 type NoMethod OperationMetadata
1279 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1280 }
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312 type Policy struct {
1313
1314 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324 Bindings []*Binding `json:"bindings,omitempty"`
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336 Etag string `json:"etag,omitempty"`
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352 Version int64 `json:"version,omitempty"`
1353
1354
1355 googleapi.ServerResponse `json:"-"`
1356
1357
1358
1359
1360
1361 ForceSendFields []string `json:"-"`
1362
1363
1364
1365
1366 NullFields []string `json:"-"`
1367 }
1368
1369 func (s *Policy) MarshalJSON() ([]byte, error) {
1370 type NoMethod Policy
1371 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1372 }
1373
1374
1375 type Scope struct {
1376
1377
1378
1379
1380
1381 Type string `json:"type,omitempty"`
1382
1383
1384
1385
1386
1387 ForceSendFields []string `json:"-"`
1388
1389
1390
1391
1392 NullFields []string `json:"-"`
1393 }
1394
1395 func (s *Scope) MarshalJSON() ([]byte, error) {
1396 type NoMethod Scope
1397 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1398 }
1399
1400
1401
1402
1403 type Service struct {
1404
1405 Attributes *Attributes `json:"attributes,omitempty"`
1406
1407 CreateTime string `json:"createTime,omitempty"`
1408
1409
1410 Description string `json:"description,omitempty"`
1411
1412
1413 DiscoveredService string `json:"discoveredService,omitempty"`
1414
1415
1416 DisplayName string `json:"displayName,omitempty"`
1417
1418
1419
1420 Name string `json:"name,omitempty"`
1421
1422
1423 ServiceProperties *ServiceProperties `json:"serviceProperties,omitempty"`
1424
1425
1426 ServiceReference *ServiceReference `json:"serviceReference,omitempty"`
1427
1428
1429
1430
1431
1432
1433
1434
1435 State string `json:"state,omitempty"`
1436
1437
1438 Uid string `json:"uid,omitempty"`
1439
1440 UpdateTime string `json:"updateTime,omitempty"`
1441
1442
1443 googleapi.ServerResponse `json:"-"`
1444
1445
1446
1447
1448
1449 ForceSendFields []string `json:"-"`
1450
1451
1452
1453
1454 NullFields []string `json:"-"`
1455 }
1456
1457 func (s *Service) MarshalJSON() ([]byte, error) {
1458 type NoMethod Service
1459 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1460 }
1461
1462
1463
1464
1465
1466
1467
1468 type ServiceProjectAttachment struct {
1469
1470 CreateTime string `json:"createTime,omitempty"`
1471
1472
1473
1474 Name string `json:"name,omitempty"`
1475
1476
1477
1478
1479 ServiceProject string `json:"serviceProject,omitempty"`
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489 State string `json:"state,omitempty"`
1490
1491
1492 Uid string `json:"uid,omitempty"`
1493
1494
1495 googleapi.ServerResponse `json:"-"`
1496
1497
1498
1499
1500
1501 ForceSendFields []string `json:"-"`
1502
1503
1504
1505
1506 NullFields []string `json:"-"`
1507 }
1508
1509 func (s *ServiceProjectAttachment) MarshalJSON() ([]byte, error) {
1510 type NoMethod ServiceProjectAttachment
1511 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1512 }
1513
1514
1515
1516 type ServiceProperties struct {
1517
1518
1519 GcpProject string `json:"gcpProject,omitempty"`
1520
1521
1522 Location string `json:"location,omitempty"`
1523
1524
1525 Zone string `json:"zone,omitempty"`
1526
1527
1528
1529
1530
1531 ForceSendFields []string `json:"-"`
1532
1533
1534
1535
1536 NullFields []string `json:"-"`
1537 }
1538
1539 func (s *ServiceProperties) MarshalJSON() ([]byte, error) {
1540 type NoMethod ServiceProperties
1541 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1542 }
1543
1544
1545
1546 type ServiceReference struct {
1547
1548
1549
1550 Path string `json:"path,omitempty"`
1551
1552
1553 Uri string `json:"uri,omitempty"`
1554
1555
1556
1557
1558
1559 ForceSendFields []string `json:"-"`
1560
1561
1562
1563
1564 NullFields []string `json:"-"`
1565 }
1566
1567 func (s *ServiceReference) MarshalJSON() ([]byte, error) {
1568 type NoMethod ServiceReference
1569 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1570 }
1571
1572
1573 type SetIamPolicyRequest struct {
1574
1575
1576
1577
1578 Policy *Policy `json:"policy,omitempty"`
1579
1580
1581
1582 UpdateMask string `json:"updateMask,omitempty"`
1583
1584
1585
1586
1587
1588 ForceSendFields []string `json:"-"`
1589
1590
1591
1592
1593 NullFields []string `json:"-"`
1594 }
1595
1596 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1597 type NoMethod SetIamPolicyRequest
1598 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1599 }
1600
1601
1602
1603
1604
1605
1606
1607 type Status struct {
1608
1609 Code int64 `json:"code,omitempty"`
1610
1611
1612 Details []googleapi.RawMessage `json:"details,omitempty"`
1613
1614
1615
1616 Message string `json:"message,omitempty"`
1617
1618
1619
1620
1621
1622 ForceSendFields []string `json:"-"`
1623
1624
1625
1626
1627 NullFields []string `json:"-"`
1628 }
1629
1630 func (s *Status) MarshalJSON() ([]byte, error) {
1631 type NoMethod Status
1632 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1633 }
1634
1635
1636 type TestIamPermissionsRequest struct {
1637
1638
1639
1640
1641 Permissions []string `json:"permissions,omitempty"`
1642
1643
1644
1645
1646
1647 ForceSendFields []string `json:"-"`
1648
1649
1650
1651
1652 NullFields []string `json:"-"`
1653 }
1654
1655 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
1656 type NoMethod TestIamPermissionsRequest
1657 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1658 }
1659
1660
1661
1662 type TestIamPermissionsResponse struct {
1663
1664
1665 Permissions []string `json:"permissions,omitempty"`
1666
1667
1668 googleapi.ServerResponse `json:"-"`
1669
1670
1671
1672
1673
1674 ForceSendFields []string `json:"-"`
1675
1676
1677
1678
1679 NullFields []string `json:"-"`
1680 }
1681
1682 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
1683 type NoMethod TestIamPermissionsResponse
1684 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1685 }
1686
1687
1688
1689
1690
1691 type Workload struct {
1692
1693 Attributes *Attributes `json:"attributes,omitempty"`
1694
1695 CreateTime string `json:"createTime,omitempty"`
1696
1697
1698 Description string `json:"description,omitempty"`
1699
1700
1701 DiscoveredWorkload string `json:"discoveredWorkload,omitempty"`
1702
1703
1704 DisplayName string `json:"displayName,omitempty"`
1705
1706
1707
1708 Name string `json:"name,omitempty"`
1709
1710
1711
1712
1713
1714
1715
1716
1717 State string `json:"state,omitempty"`
1718
1719
1720 Uid string `json:"uid,omitempty"`
1721
1722 UpdateTime string `json:"updateTime,omitempty"`
1723
1724
1725 WorkloadProperties *WorkloadProperties `json:"workloadProperties,omitempty"`
1726
1727
1728 WorkloadReference *WorkloadReference `json:"workloadReference,omitempty"`
1729
1730
1731 googleapi.ServerResponse `json:"-"`
1732
1733
1734
1735
1736
1737 ForceSendFields []string `json:"-"`
1738
1739
1740
1741
1742 NullFields []string `json:"-"`
1743 }
1744
1745 func (s *Workload) MarshalJSON() ([]byte, error) {
1746 type NoMethod Workload
1747 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1748 }
1749
1750
1751
1752 type WorkloadProperties struct {
1753
1754
1755 GcpProject string `json:"gcpProject,omitempty"`
1756
1757
1758 Location string `json:"location,omitempty"`
1759
1760
1761 Zone string `json:"zone,omitempty"`
1762
1763
1764
1765
1766
1767 ForceSendFields []string `json:"-"`
1768
1769
1770
1771
1772 NullFields []string `json:"-"`
1773 }
1774
1775 func (s *WorkloadProperties) MarshalJSON() ([]byte, error) {
1776 type NoMethod WorkloadProperties
1777 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1778 }
1779
1780
1781
1782 type WorkloadReference struct {
1783
1784 Uri string `json:"uri,omitempty"`
1785
1786
1787
1788
1789
1790 ForceSendFields []string `json:"-"`
1791
1792
1793
1794
1795 NullFields []string `json:"-"`
1796 }
1797
1798 func (s *WorkloadReference) MarshalJSON() ([]byte, error) {
1799 type NoMethod WorkloadReference
1800 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1801 }
1802
1803 type ProjectsLocationsDetachServiceProjectAttachmentCall struct {
1804 s *APIService
1805 name string
1806 detachserviceprojectattachmentrequest *DetachServiceProjectAttachmentRequest
1807 urlParams_ gensupport.URLParams
1808 ctx_ context.Context
1809 header_ http.Header
1810 }
1811
1812
1813
1814
1815
1816
1817
1818
1819 func (r *ProjectsLocationsService) DetachServiceProjectAttachment(name string, detachserviceprojectattachmentrequest *DetachServiceProjectAttachmentRequest) *ProjectsLocationsDetachServiceProjectAttachmentCall {
1820 c := &ProjectsLocationsDetachServiceProjectAttachmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1821 c.name = name
1822 c.detachserviceprojectattachmentrequest = detachserviceprojectattachmentrequest
1823 return c
1824 }
1825
1826
1827
1828
1829 func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDetachServiceProjectAttachmentCall {
1830 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1831 return c
1832 }
1833
1834
1835 func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Context(ctx context.Context) *ProjectsLocationsDetachServiceProjectAttachmentCall {
1836 c.ctx_ = ctx
1837 return c
1838 }
1839
1840
1841
1842 func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Header() http.Header {
1843 if c.header_ == nil {
1844 c.header_ = make(http.Header)
1845 }
1846 return c.header_
1847 }
1848
1849 func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) doRequest(alt string) (*http.Response, error) {
1850 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1851 var body io.Reader = nil
1852 body, err := googleapi.WithoutDataWrapper.JSONReader(c.detachserviceprojectattachmentrequest)
1853 if err != nil {
1854 return nil, err
1855 }
1856 c.urlParams_.Set("alt", alt)
1857 c.urlParams_.Set("prettyPrint", "false")
1858 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:detachServiceProjectAttachment")
1859 urls += "?" + c.urlParams_.Encode()
1860 req, err := http.NewRequest("POST", urls, body)
1861 if err != nil {
1862 return nil, err
1863 }
1864 req.Header = reqHeaders
1865 googleapi.Expand(req.URL, map[string]string{
1866 "name": c.name,
1867 })
1868 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1869 }
1870
1871
1872
1873
1874
1875
1876
1877 func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Do(opts ...googleapi.CallOption) (*DetachServiceProjectAttachmentResponse, error) {
1878 gensupport.SetOptions(c.urlParams_, opts...)
1879 res, err := c.doRequest("json")
1880 if res != nil && res.StatusCode == http.StatusNotModified {
1881 if res.Body != nil {
1882 res.Body.Close()
1883 }
1884 return nil, gensupport.WrapError(&googleapi.Error{
1885 Code: res.StatusCode,
1886 Header: res.Header,
1887 })
1888 }
1889 if err != nil {
1890 return nil, err
1891 }
1892 defer googleapi.CloseBody(res)
1893 if err := googleapi.CheckResponse(res); err != nil {
1894 return nil, gensupport.WrapError(err)
1895 }
1896 ret := &DetachServiceProjectAttachmentResponse{
1897 ServerResponse: googleapi.ServerResponse{
1898 Header: res.Header,
1899 HTTPStatusCode: res.StatusCode,
1900 },
1901 }
1902 target := &ret
1903 if err := gensupport.DecodeResponse(target, res); err != nil {
1904 return nil, err
1905 }
1906 return ret, nil
1907 }
1908
1909 type ProjectsLocationsGetCall struct {
1910 s *APIService
1911 name string
1912 urlParams_ gensupport.URLParams
1913 ifNoneMatch_ string
1914 ctx_ context.Context
1915 header_ http.Header
1916 }
1917
1918
1919
1920
1921 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
1922 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1923 c.name = name
1924 return c
1925 }
1926
1927
1928
1929
1930 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
1931 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1932 return c
1933 }
1934
1935
1936
1937
1938 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
1939 c.ifNoneMatch_ = entityTag
1940 return c
1941 }
1942
1943
1944 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
1945 c.ctx_ = ctx
1946 return c
1947 }
1948
1949
1950
1951 func (c *ProjectsLocationsGetCall) Header() http.Header {
1952 if c.header_ == nil {
1953 c.header_ = make(http.Header)
1954 }
1955 return c.header_
1956 }
1957
1958 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
1959 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1960 if c.ifNoneMatch_ != "" {
1961 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1962 }
1963 var body io.Reader = nil
1964 c.urlParams_.Set("alt", alt)
1965 c.urlParams_.Set("prettyPrint", "false")
1966 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
1967 urls += "?" + c.urlParams_.Encode()
1968 req, err := http.NewRequest("GET", urls, body)
1969 if err != nil {
1970 return nil, err
1971 }
1972 req.Header = reqHeaders
1973 googleapi.Expand(req.URL, map[string]string{
1974 "name": c.name,
1975 })
1976 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1977 }
1978
1979
1980
1981
1982
1983
1984 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
1985 gensupport.SetOptions(c.urlParams_, opts...)
1986 res, err := c.doRequest("json")
1987 if res != nil && res.StatusCode == http.StatusNotModified {
1988 if res.Body != nil {
1989 res.Body.Close()
1990 }
1991 return nil, gensupport.WrapError(&googleapi.Error{
1992 Code: res.StatusCode,
1993 Header: res.Header,
1994 })
1995 }
1996 if err != nil {
1997 return nil, err
1998 }
1999 defer googleapi.CloseBody(res)
2000 if err := googleapi.CheckResponse(res); err != nil {
2001 return nil, gensupport.WrapError(err)
2002 }
2003 ret := &Location{
2004 ServerResponse: googleapi.ServerResponse{
2005 Header: res.Header,
2006 HTTPStatusCode: res.StatusCode,
2007 },
2008 }
2009 target := &ret
2010 if err := gensupport.DecodeResponse(target, res); err != nil {
2011 return nil, err
2012 }
2013 return ret, nil
2014 }
2015
2016 type ProjectsLocationsListCall struct {
2017 s *APIService
2018 name string
2019 urlParams_ gensupport.URLParams
2020 ifNoneMatch_ string
2021 ctx_ context.Context
2022 header_ http.Header
2023 }
2024
2025
2026
2027
2028 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
2029 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2030 c.name = name
2031 return c
2032 }
2033
2034
2035
2036
2037
2038 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
2039 c.urlParams_.Set("filter", filter)
2040 return c
2041 }
2042
2043
2044
2045 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
2046 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2047 return c
2048 }
2049
2050
2051
2052
2053 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
2054 c.urlParams_.Set("pageToken", pageToken)
2055 return c
2056 }
2057
2058
2059
2060
2061 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
2062 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2063 return c
2064 }
2065
2066
2067
2068
2069 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
2070 c.ifNoneMatch_ = entityTag
2071 return c
2072 }
2073
2074
2075 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
2076 c.ctx_ = ctx
2077 return c
2078 }
2079
2080
2081
2082 func (c *ProjectsLocationsListCall) Header() http.Header {
2083 if c.header_ == nil {
2084 c.header_ = make(http.Header)
2085 }
2086 return c.header_
2087 }
2088
2089 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2090 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2091 if c.ifNoneMatch_ != "" {
2092 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2093 }
2094 var body io.Reader = nil
2095 c.urlParams_.Set("alt", alt)
2096 c.urlParams_.Set("prettyPrint", "false")
2097 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/locations")
2098 urls += "?" + c.urlParams_.Encode()
2099 req, err := http.NewRequest("GET", urls, body)
2100 if err != nil {
2101 return nil, err
2102 }
2103 req.Header = reqHeaders
2104 googleapi.Expand(req.URL, map[string]string{
2105 "name": c.name,
2106 })
2107 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2108 }
2109
2110
2111
2112
2113
2114
2115
2116 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2117 gensupport.SetOptions(c.urlParams_, opts...)
2118 res, err := c.doRequest("json")
2119 if res != nil && res.StatusCode == http.StatusNotModified {
2120 if res.Body != nil {
2121 res.Body.Close()
2122 }
2123 return nil, gensupport.WrapError(&googleapi.Error{
2124 Code: res.StatusCode,
2125 Header: res.Header,
2126 })
2127 }
2128 if err != nil {
2129 return nil, err
2130 }
2131 defer googleapi.CloseBody(res)
2132 if err := googleapi.CheckResponse(res); err != nil {
2133 return nil, gensupport.WrapError(err)
2134 }
2135 ret := &ListLocationsResponse{
2136 ServerResponse: googleapi.ServerResponse{
2137 Header: res.Header,
2138 HTTPStatusCode: res.StatusCode,
2139 },
2140 }
2141 target := &ret
2142 if err := gensupport.DecodeResponse(target, res); err != nil {
2143 return nil, err
2144 }
2145 return ret, nil
2146 }
2147
2148
2149
2150
2151 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2152 c.ctx_ = ctx
2153 defer c.PageToken(c.urlParams_.Get("pageToken"))
2154 for {
2155 x, err := c.Do()
2156 if err != nil {
2157 return err
2158 }
2159 if err := f(x); err != nil {
2160 return err
2161 }
2162 if x.NextPageToken == "" {
2163 return nil
2164 }
2165 c.PageToken(x.NextPageToken)
2166 }
2167 }
2168
2169 type ProjectsLocationsLookupServiceProjectAttachmentCall struct {
2170 s *APIService
2171 name string
2172 urlParams_ gensupport.URLParams
2173 ifNoneMatch_ string
2174 ctx_ context.Context
2175 header_ http.Header
2176 }
2177
2178
2179
2180
2181
2182
2183
2184
2185 func (r *ProjectsLocationsService) LookupServiceProjectAttachment(name string) *ProjectsLocationsLookupServiceProjectAttachmentCall {
2186 c := &ProjectsLocationsLookupServiceProjectAttachmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2187 c.name = name
2188 return c
2189 }
2190
2191
2192
2193
2194 func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupServiceProjectAttachmentCall {
2195 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2196 return c
2197 }
2198
2199
2200
2201
2202 func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupServiceProjectAttachmentCall {
2203 c.ifNoneMatch_ = entityTag
2204 return c
2205 }
2206
2207
2208 func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Context(ctx context.Context) *ProjectsLocationsLookupServiceProjectAttachmentCall {
2209 c.ctx_ = ctx
2210 return c
2211 }
2212
2213
2214
2215 func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Header() http.Header {
2216 if c.header_ == nil {
2217 c.header_ = make(http.Header)
2218 }
2219 return c.header_
2220 }
2221
2222 func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) doRequest(alt string) (*http.Response, error) {
2223 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2224 if c.ifNoneMatch_ != "" {
2225 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2226 }
2227 var body io.Reader = nil
2228 c.urlParams_.Set("alt", alt)
2229 c.urlParams_.Set("prettyPrint", "false")
2230 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:lookupServiceProjectAttachment")
2231 urls += "?" + c.urlParams_.Encode()
2232 req, err := http.NewRequest("GET", urls, body)
2233 if err != nil {
2234 return nil, err
2235 }
2236 req.Header = reqHeaders
2237 googleapi.Expand(req.URL, map[string]string{
2238 "name": c.name,
2239 })
2240 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2241 }
2242
2243
2244
2245
2246
2247
2248
2249 func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Do(opts ...googleapi.CallOption) (*LookupServiceProjectAttachmentResponse, error) {
2250 gensupport.SetOptions(c.urlParams_, opts...)
2251 res, err := c.doRequest("json")
2252 if res != nil && res.StatusCode == http.StatusNotModified {
2253 if res.Body != nil {
2254 res.Body.Close()
2255 }
2256 return nil, gensupport.WrapError(&googleapi.Error{
2257 Code: res.StatusCode,
2258 Header: res.Header,
2259 })
2260 }
2261 if err != nil {
2262 return nil, err
2263 }
2264 defer googleapi.CloseBody(res)
2265 if err := googleapi.CheckResponse(res); err != nil {
2266 return nil, gensupport.WrapError(err)
2267 }
2268 ret := &LookupServiceProjectAttachmentResponse{
2269 ServerResponse: googleapi.ServerResponse{
2270 Header: res.Header,
2271 HTTPStatusCode: res.StatusCode,
2272 },
2273 }
2274 target := &ret
2275 if err := gensupport.DecodeResponse(target, res); err != nil {
2276 return nil, err
2277 }
2278 return ret, nil
2279 }
2280
2281 type ProjectsLocationsApplicationsCreateCall struct {
2282 s *APIService
2283 parent string
2284 application *Application
2285 urlParams_ gensupport.URLParams
2286 ctx_ context.Context
2287 header_ http.Header
2288 }
2289
2290
2291
2292
2293
2294 func (r *ProjectsLocationsApplicationsService) Create(parent string, application *Application) *ProjectsLocationsApplicationsCreateCall {
2295 c := &ProjectsLocationsApplicationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2296 c.parent = parent
2297 c.application = application
2298 return c
2299 }
2300
2301
2302
2303
2304
2305 func (c *ProjectsLocationsApplicationsCreateCall) ApplicationId(applicationId string) *ProjectsLocationsApplicationsCreateCall {
2306 c.urlParams_.Set("applicationId", applicationId)
2307 return c
2308 }
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321 func (c *ProjectsLocationsApplicationsCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsCreateCall {
2322 c.urlParams_.Set("requestId", requestId)
2323 return c
2324 }
2325
2326
2327
2328
2329 func (c *ProjectsLocationsApplicationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsCreateCall {
2330 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2331 return c
2332 }
2333
2334
2335 func (c *ProjectsLocationsApplicationsCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsCreateCall {
2336 c.ctx_ = ctx
2337 return c
2338 }
2339
2340
2341
2342 func (c *ProjectsLocationsApplicationsCreateCall) Header() http.Header {
2343 if c.header_ == nil {
2344 c.header_ = make(http.Header)
2345 }
2346 return c.header_
2347 }
2348
2349 func (c *ProjectsLocationsApplicationsCreateCall) doRequest(alt string) (*http.Response, error) {
2350 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2351 var body io.Reader = nil
2352 body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
2353 if err != nil {
2354 return nil, err
2355 }
2356 c.urlParams_.Set("alt", alt)
2357 c.urlParams_.Set("prettyPrint", "false")
2358 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/applications")
2359 urls += "?" + c.urlParams_.Encode()
2360 req, err := http.NewRequest("POST", urls, body)
2361 if err != nil {
2362 return nil, err
2363 }
2364 req.Header = reqHeaders
2365 googleapi.Expand(req.URL, map[string]string{
2366 "parent": c.parent,
2367 })
2368 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2369 }
2370
2371
2372
2373
2374
2375
2376 func (c *ProjectsLocationsApplicationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2377 gensupport.SetOptions(c.urlParams_, opts...)
2378 res, err := c.doRequest("json")
2379 if res != nil && res.StatusCode == http.StatusNotModified {
2380 if res.Body != nil {
2381 res.Body.Close()
2382 }
2383 return nil, gensupport.WrapError(&googleapi.Error{
2384 Code: res.StatusCode,
2385 Header: res.Header,
2386 })
2387 }
2388 if err != nil {
2389 return nil, err
2390 }
2391 defer googleapi.CloseBody(res)
2392 if err := googleapi.CheckResponse(res); err != nil {
2393 return nil, gensupport.WrapError(err)
2394 }
2395 ret := &Operation{
2396 ServerResponse: googleapi.ServerResponse{
2397 Header: res.Header,
2398 HTTPStatusCode: res.StatusCode,
2399 },
2400 }
2401 target := &ret
2402 if err := gensupport.DecodeResponse(target, res); err != nil {
2403 return nil, err
2404 }
2405 return ret, nil
2406 }
2407
2408 type ProjectsLocationsApplicationsDeleteCall struct {
2409 s *APIService
2410 name string
2411 urlParams_ gensupport.URLParams
2412 ctx_ context.Context
2413 header_ http.Header
2414 }
2415
2416
2417
2418
2419
2420 func (r *ProjectsLocationsApplicationsService) Delete(name string) *ProjectsLocationsApplicationsDeleteCall {
2421 c := &ProjectsLocationsApplicationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2422 c.name = name
2423 return c
2424 }
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437 func (c *ProjectsLocationsApplicationsDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsDeleteCall {
2438 c.urlParams_.Set("requestId", requestId)
2439 return c
2440 }
2441
2442
2443
2444
2445 func (c *ProjectsLocationsApplicationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsDeleteCall {
2446 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2447 return c
2448 }
2449
2450
2451 func (c *ProjectsLocationsApplicationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsDeleteCall {
2452 c.ctx_ = ctx
2453 return c
2454 }
2455
2456
2457
2458 func (c *ProjectsLocationsApplicationsDeleteCall) Header() http.Header {
2459 if c.header_ == nil {
2460 c.header_ = make(http.Header)
2461 }
2462 return c.header_
2463 }
2464
2465 func (c *ProjectsLocationsApplicationsDeleteCall) doRequest(alt string) (*http.Response, error) {
2466 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2467 var body io.Reader = nil
2468 c.urlParams_.Set("alt", alt)
2469 c.urlParams_.Set("prettyPrint", "false")
2470 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
2471 urls += "?" + c.urlParams_.Encode()
2472 req, err := http.NewRequest("DELETE", urls, body)
2473 if err != nil {
2474 return nil, err
2475 }
2476 req.Header = reqHeaders
2477 googleapi.Expand(req.URL, map[string]string{
2478 "name": c.name,
2479 })
2480 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2481 }
2482
2483
2484
2485
2486
2487
2488 func (c *ProjectsLocationsApplicationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2489 gensupport.SetOptions(c.urlParams_, opts...)
2490 res, err := c.doRequest("json")
2491 if res != nil && res.StatusCode == http.StatusNotModified {
2492 if res.Body != nil {
2493 res.Body.Close()
2494 }
2495 return nil, gensupport.WrapError(&googleapi.Error{
2496 Code: res.StatusCode,
2497 Header: res.Header,
2498 })
2499 }
2500 if err != nil {
2501 return nil, err
2502 }
2503 defer googleapi.CloseBody(res)
2504 if err := googleapi.CheckResponse(res); err != nil {
2505 return nil, gensupport.WrapError(err)
2506 }
2507 ret := &Operation{
2508 ServerResponse: googleapi.ServerResponse{
2509 Header: res.Header,
2510 HTTPStatusCode: res.StatusCode,
2511 },
2512 }
2513 target := &ret
2514 if err := gensupport.DecodeResponse(target, res); err != nil {
2515 return nil, err
2516 }
2517 return ret, nil
2518 }
2519
2520 type ProjectsLocationsApplicationsGetCall struct {
2521 s *APIService
2522 name string
2523 urlParams_ gensupport.URLParams
2524 ifNoneMatch_ string
2525 ctx_ context.Context
2526 header_ http.Header
2527 }
2528
2529
2530
2531
2532
2533 func (r *ProjectsLocationsApplicationsService) Get(name string) *ProjectsLocationsApplicationsGetCall {
2534 c := &ProjectsLocationsApplicationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2535 c.name = name
2536 return c
2537 }
2538
2539
2540
2541
2542 func (c *ProjectsLocationsApplicationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetCall {
2543 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2544 return c
2545 }
2546
2547
2548
2549
2550 func (c *ProjectsLocationsApplicationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetCall {
2551 c.ifNoneMatch_ = entityTag
2552 return c
2553 }
2554
2555
2556 func (c *ProjectsLocationsApplicationsGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetCall {
2557 c.ctx_ = ctx
2558 return c
2559 }
2560
2561
2562
2563 func (c *ProjectsLocationsApplicationsGetCall) Header() http.Header {
2564 if c.header_ == nil {
2565 c.header_ = make(http.Header)
2566 }
2567 return c.header_
2568 }
2569
2570 func (c *ProjectsLocationsApplicationsGetCall) doRequest(alt string) (*http.Response, error) {
2571 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2572 if c.ifNoneMatch_ != "" {
2573 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2574 }
2575 var body io.Reader = nil
2576 c.urlParams_.Set("alt", alt)
2577 c.urlParams_.Set("prettyPrint", "false")
2578 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
2579 urls += "?" + c.urlParams_.Encode()
2580 req, err := http.NewRequest("GET", urls, body)
2581 if err != nil {
2582 return nil, err
2583 }
2584 req.Header = reqHeaders
2585 googleapi.Expand(req.URL, map[string]string{
2586 "name": c.name,
2587 })
2588 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2589 }
2590
2591
2592
2593
2594
2595
2596 func (c *ProjectsLocationsApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
2597 gensupport.SetOptions(c.urlParams_, opts...)
2598 res, err := c.doRequest("json")
2599 if res != nil && res.StatusCode == http.StatusNotModified {
2600 if res.Body != nil {
2601 res.Body.Close()
2602 }
2603 return nil, gensupport.WrapError(&googleapi.Error{
2604 Code: res.StatusCode,
2605 Header: res.Header,
2606 })
2607 }
2608 if err != nil {
2609 return nil, err
2610 }
2611 defer googleapi.CloseBody(res)
2612 if err := googleapi.CheckResponse(res); err != nil {
2613 return nil, gensupport.WrapError(err)
2614 }
2615 ret := &Application{
2616 ServerResponse: googleapi.ServerResponse{
2617 Header: res.Header,
2618 HTTPStatusCode: res.StatusCode,
2619 },
2620 }
2621 target := &ret
2622 if err := gensupport.DecodeResponse(target, res); err != nil {
2623 return nil, err
2624 }
2625 return ret, nil
2626 }
2627
2628 type ProjectsLocationsApplicationsGetIamPolicyCall struct {
2629 s *APIService
2630 resource string
2631 urlParams_ gensupport.URLParams
2632 ifNoneMatch_ string
2633 ctx_ context.Context
2634 header_ http.Header
2635 }
2636
2637
2638
2639
2640
2641
2642
2643 func (r *ProjectsLocationsApplicationsService) GetIamPolicy(resource string) *ProjectsLocationsApplicationsGetIamPolicyCall {
2644 c := &ProjectsLocationsApplicationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2645 c.resource = resource
2646 return c
2647 }
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661 func (c *ProjectsLocationsApplicationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApplicationsGetIamPolicyCall {
2662 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
2663 return c
2664 }
2665
2666
2667
2668
2669 func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetIamPolicyCall {
2670 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2671 return c
2672 }
2673
2674
2675
2676
2677 func (c *ProjectsLocationsApplicationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetIamPolicyCall {
2678 c.ifNoneMatch_ = entityTag
2679 return c
2680 }
2681
2682
2683 func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetIamPolicyCall {
2684 c.ctx_ = ctx
2685 return c
2686 }
2687
2688
2689
2690 func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Header() http.Header {
2691 if c.header_ == nil {
2692 c.header_ = make(http.Header)
2693 }
2694 return c.header_
2695 }
2696
2697 func (c *ProjectsLocationsApplicationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
2698 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2699 if c.ifNoneMatch_ != "" {
2700 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2701 }
2702 var body io.Reader = nil
2703 c.urlParams_.Set("alt", alt)
2704 c.urlParams_.Set("prettyPrint", "false")
2705 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
2706 urls += "?" + c.urlParams_.Encode()
2707 req, err := http.NewRequest("GET", urls, body)
2708 if err != nil {
2709 return nil, err
2710 }
2711 req.Header = reqHeaders
2712 googleapi.Expand(req.URL, map[string]string{
2713 "resource": c.resource,
2714 })
2715 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2716 }
2717
2718
2719
2720
2721
2722
2723 func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
2724 gensupport.SetOptions(c.urlParams_, opts...)
2725 res, err := c.doRequest("json")
2726 if res != nil && res.StatusCode == http.StatusNotModified {
2727 if res.Body != nil {
2728 res.Body.Close()
2729 }
2730 return nil, gensupport.WrapError(&googleapi.Error{
2731 Code: res.StatusCode,
2732 Header: res.Header,
2733 })
2734 }
2735 if err != nil {
2736 return nil, err
2737 }
2738 defer googleapi.CloseBody(res)
2739 if err := googleapi.CheckResponse(res); err != nil {
2740 return nil, gensupport.WrapError(err)
2741 }
2742 ret := &Policy{
2743 ServerResponse: googleapi.ServerResponse{
2744 Header: res.Header,
2745 HTTPStatusCode: res.StatusCode,
2746 },
2747 }
2748 target := &ret
2749 if err := gensupport.DecodeResponse(target, res); err != nil {
2750 return nil, err
2751 }
2752 return ret, nil
2753 }
2754
2755 type ProjectsLocationsApplicationsListCall struct {
2756 s *APIService
2757 parent string
2758 urlParams_ gensupport.URLParams
2759 ifNoneMatch_ string
2760 ctx_ context.Context
2761 header_ http.Header
2762 }
2763
2764
2765
2766
2767
2768 func (r *ProjectsLocationsApplicationsService) List(parent string) *ProjectsLocationsApplicationsListCall {
2769 c := &ProjectsLocationsApplicationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2770 c.parent = parent
2771 return c
2772 }
2773
2774
2775 func (c *ProjectsLocationsApplicationsListCall) Filter(filter string) *ProjectsLocationsApplicationsListCall {
2776 c.urlParams_.Set("filter", filter)
2777 return c
2778 }
2779
2780
2781
2782 func (c *ProjectsLocationsApplicationsListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsListCall {
2783 c.urlParams_.Set("orderBy", orderBy)
2784 return c
2785 }
2786
2787
2788
2789
2790 func (c *ProjectsLocationsApplicationsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsListCall {
2791 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2792 return c
2793 }
2794
2795
2796
2797 func (c *ProjectsLocationsApplicationsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsListCall {
2798 c.urlParams_.Set("pageToken", pageToken)
2799 return c
2800 }
2801
2802
2803
2804
2805 func (c *ProjectsLocationsApplicationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsListCall {
2806 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2807 return c
2808 }
2809
2810
2811
2812
2813 func (c *ProjectsLocationsApplicationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsListCall {
2814 c.ifNoneMatch_ = entityTag
2815 return c
2816 }
2817
2818
2819 func (c *ProjectsLocationsApplicationsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsListCall {
2820 c.ctx_ = ctx
2821 return c
2822 }
2823
2824
2825
2826 func (c *ProjectsLocationsApplicationsListCall) Header() http.Header {
2827 if c.header_ == nil {
2828 c.header_ = make(http.Header)
2829 }
2830 return c.header_
2831 }
2832
2833 func (c *ProjectsLocationsApplicationsListCall) doRequest(alt string) (*http.Response, error) {
2834 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2835 if c.ifNoneMatch_ != "" {
2836 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2837 }
2838 var body io.Reader = nil
2839 c.urlParams_.Set("alt", alt)
2840 c.urlParams_.Set("prettyPrint", "false")
2841 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/applications")
2842 urls += "?" + c.urlParams_.Encode()
2843 req, err := http.NewRequest("GET", urls, body)
2844 if err != nil {
2845 return nil, err
2846 }
2847 req.Header = reqHeaders
2848 googleapi.Expand(req.URL, map[string]string{
2849 "parent": c.parent,
2850 })
2851 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2852 }
2853
2854
2855
2856
2857
2858
2859
2860 func (c *ProjectsLocationsApplicationsListCall) Do(opts ...googleapi.CallOption) (*ListApplicationsResponse, error) {
2861 gensupport.SetOptions(c.urlParams_, opts...)
2862 res, err := c.doRequest("json")
2863 if res != nil && res.StatusCode == http.StatusNotModified {
2864 if res.Body != nil {
2865 res.Body.Close()
2866 }
2867 return nil, gensupport.WrapError(&googleapi.Error{
2868 Code: res.StatusCode,
2869 Header: res.Header,
2870 })
2871 }
2872 if err != nil {
2873 return nil, err
2874 }
2875 defer googleapi.CloseBody(res)
2876 if err := googleapi.CheckResponse(res); err != nil {
2877 return nil, gensupport.WrapError(err)
2878 }
2879 ret := &ListApplicationsResponse{
2880 ServerResponse: googleapi.ServerResponse{
2881 Header: res.Header,
2882 HTTPStatusCode: res.StatusCode,
2883 },
2884 }
2885 target := &ret
2886 if err := gensupport.DecodeResponse(target, res); err != nil {
2887 return nil, err
2888 }
2889 return ret, nil
2890 }
2891
2892
2893
2894
2895 func (c *ProjectsLocationsApplicationsListCall) Pages(ctx context.Context, f func(*ListApplicationsResponse) error) error {
2896 c.ctx_ = ctx
2897 defer c.PageToken(c.urlParams_.Get("pageToken"))
2898 for {
2899 x, err := c.Do()
2900 if err != nil {
2901 return err
2902 }
2903 if err := f(x); err != nil {
2904 return err
2905 }
2906 if x.NextPageToken == "" {
2907 return nil
2908 }
2909 c.PageToken(x.NextPageToken)
2910 }
2911 }
2912
2913 type ProjectsLocationsApplicationsPatchCall struct {
2914 s *APIService
2915 name string
2916 application *Application
2917 urlParams_ gensupport.URLParams
2918 ctx_ context.Context
2919 header_ http.Header
2920 }
2921
2922
2923
2924
2925
2926
2927 func (r *ProjectsLocationsApplicationsService) Patch(name string, application *Application) *ProjectsLocationsApplicationsPatchCall {
2928 c := &ProjectsLocationsApplicationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2929 c.name = name
2930 c.application = application
2931 return c
2932 }
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945 func (c *ProjectsLocationsApplicationsPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsPatchCall {
2946 c.urlParams_.Set("requestId", requestId)
2947 return c
2948 }
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958 func (c *ProjectsLocationsApplicationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsPatchCall {
2959 c.urlParams_.Set("updateMask", updateMask)
2960 return c
2961 }
2962
2963
2964
2965
2966 func (c *ProjectsLocationsApplicationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsPatchCall {
2967 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2968 return c
2969 }
2970
2971
2972 func (c *ProjectsLocationsApplicationsPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsPatchCall {
2973 c.ctx_ = ctx
2974 return c
2975 }
2976
2977
2978
2979 func (c *ProjectsLocationsApplicationsPatchCall) Header() http.Header {
2980 if c.header_ == nil {
2981 c.header_ = make(http.Header)
2982 }
2983 return c.header_
2984 }
2985
2986 func (c *ProjectsLocationsApplicationsPatchCall) doRequest(alt string) (*http.Response, error) {
2987 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2988 var body io.Reader = nil
2989 body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
2990 if err != nil {
2991 return nil, err
2992 }
2993 c.urlParams_.Set("alt", alt)
2994 c.urlParams_.Set("prettyPrint", "false")
2995 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
2996 urls += "?" + c.urlParams_.Encode()
2997 req, err := http.NewRequest("PATCH", urls, body)
2998 if err != nil {
2999 return nil, err
3000 }
3001 req.Header = reqHeaders
3002 googleapi.Expand(req.URL, map[string]string{
3003 "name": c.name,
3004 })
3005 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3006 }
3007
3008
3009
3010
3011
3012
3013 func (c *ProjectsLocationsApplicationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3014 gensupport.SetOptions(c.urlParams_, opts...)
3015 res, err := c.doRequest("json")
3016 if res != nil && res.StatusCode == http.StatusNotModified {
3017 if res.Body != nil {
3018 res.Body.Close()
3019 }
3020 return nil, gensupport.WrapError(&googleapi.Error{
3021 Code: res.StatusCode,
3022 Header: res.Header,
3023 })
3024 }
3025 if err != nil {
3026 return nil, err
3027 }
3028 defer googleapi.CloseBody(res)
3029 if err := googleapi.CheckResponse(res); err != nil {
3030 return nil, gensupport.WrapError(err)
3031 }
3032 ret := &Operation{
3033 ServerResponse: googleapi.ServerResponse{
3034 Header: res.Header,
3035 HTTPStatusCode: res.StatusCode,
3036 },
3037 }
3038 target := &ret
3039 if err := gensupport.DecodeResponse(target, res); err != nil {
3040 return nil, err
3041 }
3042 return ret, nil
3043 }
3044
3045 type ProjectsLocationsApplicationsSetIamPolicyCall struct {
3046 s *APIService
3047 resource string
3048 setiampolicyrequest *SetIamPolicyRequest
3049 urlParams_ gensupport.URLParams
3050 ctx_ context.Context
3051 header_ http.Header
3052 }
3053
3054
3055
3056
3057
3058
3059
3060
3061 func (r *ProjectsLocationsApplicationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApplicationsSetIamPolicyCall {
3062 c := &ProjectsLocationsApplicationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3063 c.resource = resource
3064 c.setiampolicyrequest = setiampolicyrequest
3065 return c
3066 }
3067
3068
3069
3070
3071 func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsSetIamPolicyCall {
3072 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3073 return c
3074 }
3075
3076
3077 func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsSetIamPolicyCall {
3078 c.ctx_ = ctx
3079 return c
3080 }
3081
3082
3083
3084 func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Header() http.Header {
3085 if c.header_ == nil {
3086 c.header_ = make(http.Header)
3087 }
3088 return c.header_
3089 }
3090
3091 func (c *ProjectsLocationsApplicationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3092 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3093 var body io.Reader = nil
3094 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
3095 if err != nil {
3096 return nil, err
3097 }
3098 c.urlParams_.Set("alt", alt)
3099 c.urlParams_.Set("prettyPrint", "false")
3100 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
3101 urls += "?" + c.urlParams_.Encode()
3102 req, err := http.NewRequest("POST", urls, body)
3103 if err != nil {
3104 return nil, err
3105 }
3106 req.Header = reqHeaders
3107 googleapi.Expand(req.URL, map[string]string{
3108 "resource": c.resource,
3109 })
3110 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3111 }
3112
3113
3114
3115
3116
3117
3118 func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3119 gensupport.SetOptions(c.urlParams_, opts...)
3120 res, err := c.doRequest("json")
3121 if res != nil && res.StatusCode == http.StatusNotModified {
3122 if res.Body != nil {
3123 res.Body.Close()
3124 }
3125 return nil, gensupport.WrapError(&googleapi.Error{
3126 Code: res.StatusCode,
3127 Header: res.Header,
3128 })
3129 }
3130 if err != nil {
3131 return nil, err
3132 }
3133 defer googleapi.CloseBody(res)
3134 if err := googleapi.CheckResponse(res); err != nil {
3135 return nil, gensupport.WrapError(err)
3136 }
3137 ret := &Policy{
3138 ServerResponse: googleapi.ServerResponse{
3139 Header: res.Header,
3140 HTTPStatusCode: res.StatusCode,
3141 },
3142 }
3143 target := &ret
3144 if err := gensupport.DecodeResponse(target, res); err != nil {
3145 return nil, err
3146 }
3147 return ret, nil
3148 }
3149
3150 type ProjectsLocationsApplicationsTestIamPermissionsCall struct {
3151 s *APIService
3152 resource string
3153 testiampermissionsrequest *TestIamPermissionsRequest
3154 urlParams_ gensupport.URLParams
3155 ctx_ context.Context
3156 header_ http.Header
3157 }
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169 func (r *ProjectsLocationsApplicationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApplicationsTestIamPermissionsCall {
3170 c := &ProjectsLocationsApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3171 c.resource = resource
3172 c.testiampermissionsrequest = testiampermissionsrequest
3173 return c
3174 }
3175
3176
3177
3178
3179 func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsTestIamPermissionsCall {
3180 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3181 return c
3182 }
3183
3184
3185 func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApplicationsTestIamPermissionsCall {
3186 c.ctx_ = ctx
3187 return c
3188 }
3189
3190
3191
3192 func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Header() http.Header {
3193 if c.header_ == nil {
3194 c.header_ = make(http.Header)
3195 }
3196 return c.header_
3197 }
3198
3199 func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
3200 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3201 var body io.Reader = nil
3202 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
3203 if err != nil {
3204 return nil, err
3205 }
3206 c.urlParams_.Set("alt", alt)
3207 c.urlParams_.Set("prettyPrint", "false")
3208 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
3209 urls += "?" + c.urlParams_.Encode()
3210 req, err := http.NewRequest("POST", urls, body)
3211 if err != nil {
3212 return nil, err
3213 }
3214 req.Header = reqHeaders
3215 googleapi.Expand(req.URL, map[string]string{
3216 "resource": c.resource,
3217 })
3218 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3219 }
3220
3221
3222
3223
3224
3225
3226
3227 func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
3228 gensupport.SetOptions(c.urlParams_, opts...)
3229 res, err := c.doRequest("json")
3230 if res != nil && res.StatusCode == http.StatusNotModified {
3231 if res.Body != nil {
3232 res.Body.Close()
3233 }
3234 return nil, gensupport.WrapError(&googleapi.Error{
3235 Code: res.StatusCode,
3236 Header: res.Header,
3237 })
3238 }
3239 if err != nil {
3240 return nil, err
3241 }
3242 defer googleapi.CloseBody(res)
3243 if err := googleapi.CheckResponse(res); err != nil {
3244 return nil, gensupport.WrapError(err)
3245 }
3246 ret := &TestIamPermissionsResponse{
3247 ServerResponse: googleapi.ServerResponse{
3248 Header: res.Header,
3249 HTTPStatusCode: res.StatusCode,
3250 },
3251 }
3252 target := &ret
3253 if err := gensupport.DecodeResponse(target, res); err != nil {
3254 return nil, err
3255 }
3256 return ret, nil
3257 }
3258
3259 type ProjectsLocationsApplicationsServicesCreateCall struct {
3260 s *APIService
3261 parent string
3262 service *Service
3263 urlParams_ gensupport.URLParams
3264 ctx_ context.Context
3265 header_ http.Header
3266 }
3267
3268
3269
3270
3271
3272
3273 func (r *ProjectsLocationsApplicationsServicesService) Create(parent string, service *Service) *ProjectsLocationsApplicationsServicesCreateCall {
3274 c := &ProjectsLocationsApplicationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3275 c.parent = parent
3276 c.service = service
3277 return c
3278 }
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291 func (c *ProjectsLocationsApplicationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesCreateCall {
3292 c.urlParams_.Set("requestId", requestId)
3293 return c
3294 }
3295
3296
3297
3298
3299
3300 func (c *ProjectsLocationsApplicationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsApplicationsServicesCreateCall {
3301 c.urlParams_.Set("serviceId", serviceId)
3302 return c
3303 }
3304
3305
3306
3307
3308 func (c *ProjectsLocationsApplicationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesCreateCall {
3309 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3310 return c
3311 }
3312
3313
3314 func (c *ProjectsLocationsApplicationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesCreateCall {
3315 c.ctx_ = ctx
3316 return c
3317 }
3318
3319
3320
3321 func (c *ProjectsLocationsApplicationsServicesCreateCall) Header() http.Header {
3322 if c.header_ == nil {
3323 c.header_ = make(http.Header)
3324 }
3325 return c.header_
3326 }
3327
3328 func (c *ProjectsLocationsApplicationsServicesCreateCall) doRequest(alt string) (*http.Response, error) {
3329 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3330 var body io.Reader = nil
3331 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
3332 if err != nil {
3333 return nil, err
3334 }
3335 c.urlParams_.Set("alt", alt)
3336 c.urlParams_.Set("prettyPrint", "false")
3337 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/services")
3338 urls += "?" + c.urlParams_.Encode()
3339 req, err := http.NewRequest("POST", urls, body)
3340 if err != nil {
3341 return nil, err
3342 }
3343 req.Header = reqHeaders
3344 googleapi.Expand(req.URL, map[string]string{
3345 "parent": c.parent,
3346 })
3347 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3348 }
3349
3350
3351
3352
3353
3354
3355 func (c *ProjectsLocationsApplicationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3356 gensupport.SetOptions(c.urlParams_, opts...)
3357 res, err := c.doRequest("json")
3358 if res != nil && res.StatusCode == http.StatusNotModified {
3359 if res.Body != nil {
3360 res.Body.Close()
3361 }
3362 return nil, gensupport.WrapError(&googleapi.Error{
3363 Code: res.StatusCode,
3364 Header: res.Header,
3365 })
3366 }
3367 if err != nil {
3368 return nil, err
3369 }
3370 defer googleapi.CloseBody(res)
3371 if err := googleapi.CheckResponse(res); err != nil {
3372 return nil, gensupport.WrapError(err)
3373 }
3374 ret := &Operation{
3375 ServerResponse: googleapi.ServerResponse{
3376 Header: res.Header,
3377 HTTPStatusCode: res.StatusCode,
3378 },
3379 }
3380 target := &ret
3381 if err := gensupport.DecodeResponse(target, res); err != nil {
3382 return nil, err
3383 }
3384 return ret, nil
3385 }
3386
3387 type ProjectsLocationsApplicationsServicesDeleteCall struct {
3388 s *APIService
3389 name string
3390 urlParams_ gensupport.URLParams
3391 ctx_ context.Context
3392 header_ http.Header
3393 }
3394
3395
3396
3397
3398
3399
3400
3401 func (r *ProjectsLocationsApplicationsServicesService) Delete(name string) *ProjectsLocationsApplicationsServicesDeleteCall {
3402 c := &ProjectsLocationsApplicationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3403 c.name = name
3404 return c
3405 }
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418 func (c *ProjectsLocationsApplicationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesDeleteCall {
3419 c.urlParams_.Set("requestId", requestId)
3420 return c
3421 }
3422
3423
3424
3425
3426 func (c *ProjectsLocationsApplicationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesDeleteCall {
3427 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3428 return c
3429 }
3430
3431
3432 func (c *ProjectsLocationsApplicationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesDeleteCall {
3433 c.ctx_ = ctx
3434 return c
3435 }
3436
3437
3438
3439 func (c *ProjectsLocationsApplicationsServicesDeleteCall) Header() http.Header {
3440 if c.header_ == nil {
3441 c.header_ = make(http.Header)
3442 }
3443 return c.header_
3444 }
3445
3446 func (c *ProjectsLocationsApplicationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
3447 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3448 var body io.Reader = nil
3449 c.urlParams_.Set("alt", alt)
3450 c.urlParams_.Set("prettyPrint", "false")
3451 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
3452 urls += "?" + c.urlParams_.Encode()
3453 req, err := http.NewRequest("DELETE", urls, body)
3454 if err != nil {
3455 return nil, err
3456 }
3457 req.Header = reqHeaders
3458 googleapi.Expand(req.URL, map[string]string{
3459 "name": c.name,
3460 })
3461 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3462 }
3463
3464
3465
3466
3467
3468
3469 func (c *ProjectsLocationsApplicationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3470 gensupport.SetOptions(c.urlParams_, opts...)
3471 res, err := c.doRequest("json")
3472 if res != nil && res.StatusCode == http.StatusNotModified {
3473 if res.Body != nil {
3474 res.Body.Close()
3475 }
3476 return nil, gensupport.WrapError(&googleapi.Error{
3477 Code: res.StatusCode,
3478 Header: res.Header,
3479 })
3480 }
3481 if err != nil {
3482 return nil, err
3483 }
3484 defer googleapi.CloseBody(res)
3485 if err := googleapi.CheckResponse(res); err != nil {
3486 return nil, gensupport.WrapError(err)
3487 }
3488 ret := &Operation{
3489 ServerResponse: googleapi.ServerResponse{
3490 Header: res.Header,
3491 HTTPStatusCode: res.StatusCode,
3492 },
3493 }
3494 target := &ret
3495 if err := gensupport.DecodeResponse(target, res); err != nil {
3496 return nil, err
3497 }
3498 return ret, nil
3499 }
3500
3501 type ProjectsLocationsApplicationsServicesGetCall struct {
3502 s *APIService
3503 name string
3504 urlParams_ gensupport.URLParams
3505 ifNoneMatch_ string
3506 ctx_ context.Context
3507 header_ http.Header
3508 }
3509
3510
3511
3512
3513
3514
3515 func (r *ProjectsLocationsApplicationsServicesService) Get(name string) *ProjectsLocationsApplicationsServicesGetCall {
3516 c := &ProjectsLocationsApplicationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3517 c.name = name
3518 return c
3519 }
3520
3521
3522
3523
3524 func (c *ProjectsLocationsApplicationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesGetCall {
3525 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3526 return c
3527 }
3528
3529
3530
3531
3532 func (c *ProjectsLocationsApplicationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsServicesGetCall {
3533 c.ifNoneMatch_ = entityTag
3534 return c
3535 }
3536
3537
3538 func (c *ProjectsLocationsApplicationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesGetCall {
3539 c.ctx_ = ctx
3540 return c
3541 }
3542
3543
3544
3545 func (c *ProjectsLocationsApplicationsServicesGetCall) Header() http.Header {
3546 if c.header_ == nil {
3547 c.header_ = make(http.Header)
3548 }
3549 return c.header_
3550 }
3551
3552 func (c *ProjectsLocationsApplicationsServicesGetCall) doRequest(alt string) (*http.Response, error) {
3553 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3554 if c.ifNoneMatch_ != "" {
3555 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3556 }
3557 var body io.Reader = nil
3558 c.urlParams_.Set("alt", alt)
3559 c.urlParams_.Set("prettyPrint", "false")
3560 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
3561 urls += "?" + c.urlParams_.Encode()
3562 req, err := http.NewRequest("GET", urls, body)
3563 if err != nil {
3564 return nil, err
3565 }
3566 req.Header = reqHeaders
3567 googleapi.Expand(req.URL, map[string]string{
3568 "name": c.name,
3569 })
3570 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3571 }
3572
3573
3574
3575
3576
3577
3578 func (c *ProjectsLocationsApplicationsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
3579 gensupport.SetOptions(c.urlParams_, opts...)
3580 res, err := c.doRequest("json")
3581 if res != nil && res.StatusCode == http.StatusNotModified {
3582 if res.Body != nil {
3583 res.Body.Close()
3584 }
3585 return nil, gensupport.WrapError(&googleapi.Error{
3586 Code: res.StatusCode,
3587 Header: res.Header,
3588 })
3589 }
3590 if err != nil {
3591 return nil, err
3592 }
3593 defer googleapi.CloseBody(res)
3594 if err := googleapi.CheckResponse(res); err != nil {
3595 return nil, gensupport.WrapError(err)
3596 }
3597 ret := &Service{
3598 ServerResponse: googleapi.ServerResponse{
3599 Header: res.Header,
3600 HTTPStatusCode: res.StatusCode,
3601 },
3602 }
3603 target := &ret
3604 if err := gensupport.DecodeResponse(target, res); err != nil {
3605 return nil, err
3606 }
3607 return ret, nil
3608 }
3609
3610 type ProjectsLocationsApplicationsServicesListCall struct {
3611 s *APIService
3612 parent string
3613 urlParams_ gensupport.URLParams
3614 ifNoneMatch_ string
3615 ctx_ context.Context
3616 header_ http.Header
3617 }
3618
3619
3620
3621
3622
3623
3624 func (r *ProjectsLocationsApplicationsServicesService) List(parent string) *ProjectsLocationsApplicationsServicesListCall {
3625 c := &ProjectsLocationsApplicationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3626 c.parent = parent
3627 return c
3628 }
3629
3630
3631 func (c *ProjectsLocationsApplicationsServicesListCall) Filter(filter string) *ProjectsLocationsApplicationsServicesListCall {
3632 c.urlParams_.Set("filter", filter)
3633 return c
3634 }
3635
3636
3637
3638 func (c *ProjectsLocationsApplicationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsServicesListCall {
3639 c.urlParams_.Set("orderBy", orderBy)
3640 return c
3641 }
3642
3643
3644
3645
3646 func (c *ProjectsLocationsApplicationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsServicesListCall {
3647 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3648 return c
3649 }
3650
3651
3652
3653 func (c *ProjectsLocationsApplicationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsServicesListCall {
3654 c.urlParams_.Set("pageToken", pageToken)
3655 return c
3656 }
3657
3658
3659
3660
3661 func (c *ProjectsLocationsApplicationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesListCall {
3662 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3663 return c
3664 }
3665
3666
3667
3668
3669 func (c *ProjectsLocationsApplicationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsServicesListCall {
3670 c.ifNoneMatch_ = entityTag
3671 return c
3672 }
3673
3674
3675 func (c *ProjectsLocationsApplicationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesListCall {
3676 c.ctx_ = ctx
3677 return c
3678 }
3679
3680
3681
3682 func (c *ProjectsLocationsApplicationsServicesListCall) Header() http.Header {
3683 if c.header_ == nil {
3684 c.header_ = make(http.Header)
3685 }
3686 return c.header_
3687 }
3688
3689 func (c *ProjectsLocationsApplicationsServicesListCall) doRequest(alt string) (*http.Response, error) {
3690 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3691 if c.ifNoneMatch_ != "" {
3692 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3693 }
3694 var body io.Reader = nil
3695 c.urlParams_.Set("alt", alt)
3696 c.urlParams_.Set("prettyPrint", "false")
3697 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/services")
3698 urls += "?" + c.urlParams_.Encode()
3699 req, err := http.NewRequest("GET", urls, body)
3700 if err != nil {
3701 return nil, err
3702 }
3703 req.Header = reqHeaders
3704 googleapi.Expand(req.URL, map[string]string{
3705 "parent": c.parent,
3706 })
3707 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3708 }
3709
3710
3711
3712
3713
3714
3715
3716 func (c *ProjectsLocationsApplicationsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
3717 gensupport.SetOptions(c.urlParams_, opts...)
3718 res, err := c.doRequest("json")
3719 if res != nil && res.StatusCode == http.StatusNotModified {
3720 if res.Body != nil {
3721 res.Body.Close()
3722 }
3723 return nil, gensupport.WrapError(&googleapi.Error{
3724 Code: res.StatusCode,
3725 Header: res.Header,
3726 })
3727 }
3728 if err != nil {
3729 return nil, err
3730 }
3731 defer googleapi.CloseBody(res)
3732 if err := googleapi.CheckResponse(res); err != nil {
3733 return nil, gensupport.WrapError(err)
3734 }
3735 ret := &ListServicesResponse{
3736 ServerResponse: googleapi.ServerResponse{
3737 Header: res.Header,
3738 HTTPStatusCode: res.StatusCode,
3739 },
3740 }
3741 target := &ret
3742 if err := gensupport.DecodeResponse(target, res); err != nil {
3743 return nil, err
3744 }
3745 return ret, nil
3746 }
3747
3748
3749
3750
3751 func (c *ProjectsLocationsApplicationsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
3752 c.ctx_ = ctx
3753 defer c.PageToken(c.urlParams_.Get("pageToken"))
3754 for {
3755 x, err := c.Do()
3756 if err != nil {
3757 return err
3758 }
3759 if err := f(x); err != nil {
3760 return err
3761 }
3762 if x.NextPageToken == "" {
3763 return nil
3764 }
3765 c.PageToken(x.NextPageToken)
3766 }
3767 }
3768
3769 type ProjectsLocationsApplicationsServicesPatchCall struct {
3770 s *APIService
3771 name string
3772 service *Service
3773 urlParams_ gensupport.URLParams
3774 ctx_ context.Context
3775 header_ http.Header
3776 }
3777
3778
3779
3780
3781
3782
3783 func (r *ProjectsLocationsApplicationsServicesService) Patch(name string, service *Service) *ProjectsLocationsApplicationsServicesPatchCall {
3784 c := &ProjectsLocationsApplicationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3785 c.name = name
3786 c.service = service
3787 return c
3788 }
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801 func (c *ProjectsLocationsApplicationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesPatchCall {
3802 c.urlParams_.Set("requestId", requestId)
3803 return c
3804 }
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814 func (c *ProjectsLocationsApplicationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsServicesPatchCall {
3815 c.urlParams_.Set("updateMask", updateMask)
3816 return c
3817 }
3818
3819
3820
3821
3822 func (c *ProjectsLocationsApplicationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesPatchCall {
3823 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3824 return c
3825 }
3826
3827
3828 func (c *ProjectsLocationsApplicationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesPatchCall {
3829 c.ctx_ = ctx
3830 return c
3831 }
3832
3833
3834
3835 func (c *ProjectsLocationsApplicationsServicesPatchCall) Header() http.Header {
3836 if c.header_ == nil {
3837 c.header_ = make(http.Header)
3838 }
3839 return c.header_
3840 }
3841
3842 func (c *ProjectsLocationsApplicationsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
3843 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3844 var body io.Reader = nil
3845 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
3846 if err != nil {
3847 return nil, err
3848 }
3849 c.urlParams_.Set("alt", alt)
3850 c.urlParams_.Set("prettyPrint", "false")
3851 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
3852 urls += "?" + c.urlParams_.Encode()
3853 req, err := http.NewRequest("PATCH", urls, body)
3854 if err != nil {
3855 return nil, err
3856 }
3857 req.Header = reqHeaders
3858 googleapi.Expand(req.URL, map[string]string{
3859 "name": c.name,
3860 })
3861 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3862 }
3863
3864
3865
3866
3867
3868
3869 func (c *ProjectsLocationsApplicationsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3870 gensupport.SetOptions(c.urlParams_, opts...)
3871 res, err := c.doRequest("json")
3872 if res != nil && res.StatusCode == http.StatusNotModified {
3873 if res.Body != nil {
3874 res.Body.Close()
3875 }
3876 return nil, gensupport.WrapError(&googleapi.Error{
3877 Code: res.StatusCode,
3878 Header: res.Header,
3879 })
3880 }
3881 if err != nil {
3882 return nil, err
3883 }
3884 defer googleapi.CloseBody(res)
3885 if err := googleapi.CheckResponse(res); err != nil {
3886 return nil, gensupport.WrapError(err)
3887 }
3888 ret := &Operation{
3889 ServerResponse: googleapi.ServerResponse{
3890 Header: res.Header,
3891 HTTPStatusCode: res.StatusCode,
3892 },
3893 }
3894 target := &ret
3895 if err := gensupport.DecodeResponse(target, res); err != nil {
3896 return nil, err
3897 }
3898 return ret, nil
3899 }
3900
3901 type ProjectsLocationsApplicationsWorkloadsCreateCall struct {
3902 s *APIService
3903 parent string
3904 workload *Workload
3905 urlParams_ gensupport.URLParams
3906 ctx_ context.Context
3907 header_ http.Header
3908 }
3909
3910
3911
3912
3913
3914
3915 func (r *ProjectsLocationsApplicationsWorkloadsService) Create(parent string, workload *Workload) *ProjectsLocationsApplicationsWorkloadsCreateCall {
3916 c := &ProjectsLocationsApplicationsWorkloadsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3917 c.parent = parent
3918 c.workload = workload
3919 return c
3920 }
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933 func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsCreateCall {
3934 c.urlParams_.Set("requestId", requestId)
3935 return c
3936 }
3937
3938
3939
3940
3941
3942 func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) WorkloadId(workloadId string) *ProjectsLocationsApplicationsWorkloadsCreateCall {
3943 c.urlParams_.Set("workloadId", workloadId)
3944 return c
3945 }
3946
3947
3948
3949
3950 func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsCreateCall {
3951 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3952 return c
3953 }
3954
3955
3956 func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsCreateCall {
3957 c.ctx_ = ctx
3958 return c
3959 }
3960
3961
3962
3963 func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Header() http.Header {
3964 if c.header_ == nil {
3965 c.header_ = make(http.Header)
3966 }
3967 return c.header_
3968 }
3969
3970 func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) doRequest(alt string) (*http.Response, error) {
3971 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3972 var body io.Reader = nil
3973 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workload)
3974 if err != nil {
3975 return nil, err
3976 }
3977 c.urlParams_.Set("alt", alt)
3978 c.urlParams_.Set("prettyPrint", "false")
3979 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/workloads")
3980 urls += "?" + c.urlParams_.Encode()
3981 req, err := http.NewRequest("POST", urls, body)
3982 if err != nil {
3983 return nil, err
3984 }
3985 req.Header = reqHeaders
3986 googleapi.Expand(req.URL, map[string]string{
3987 "parent": c.parent,
3988 })
3989 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3990 }
3991
3992
3993
3994
3995
3996
3997 func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3998 gensupport.SetOptions(c.urlParams_, opts...)
3999 res, err := c.doRequest("json")
4000 if res != nil && res.StatusCode == http.StatusNotModified {
4001 if res.Body != nil {
4002 res.Body.Close()
4003 }
4004 return nil, gensupport.WrapError(&googleapi.Error{
4005 Code: res.StatusCode,
4006 Header: res.Header,
4007 })
4008 }
4009 if err != nil {
4010 return nil, err
4011 }
4012 defer googleapi.CloseBody(res)
4013 if err := googleapi.CheckResponse(res); err != nil {
4014 return nil, gensupport.WrapError(err)
4015 }
4016 ret := &Operation{
4017 ServerResponse: googleapi.ServerResponse{
4018 Header: res.Header,
4019 HTTPStatusCode: res.StatusCode,
4020 },
4021 }
4022 target := &ret
4023 if err := gensupport.DecodeResponse(target, res); err != nil {
4024 return nil, err
4025 }
4026 return ret, nil
4027 }
4028
4029 type ProjectsLocationsApplicationsWorkloadsDeleteCall struct {
4030 s *APIService
4031 name string
4032 urlParams_ gensupport.URLParams
4033 ctx_ context.Context
4034 header_ http.Header
4035 }
4036
4037
4038
4039
4040
4041
4042
4043 func (r *ProjectsLocationsApplicationsWorkloadsService) Delete(name string) *ProjectsLocationsApplicationsWorkloadsDeleteCall {
4044 c := &ProjectsLocationsApplicationsWorkloadsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4045 c.name = name
4046 return c
4047 }
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060 func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsDeleteCall {
4061 c.urlParams_.Set("requestId", requestId)
4062 return c
4063 }
4064
4065
4066
4067
4068 func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsDeleteCall {
4069 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4070 return c
4071 }
4072
4073
4074 func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsDeleteCall {
4075 c.ctx_ = ctx
4076 return c
4077 }
4078
4079
4080
4081 func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Header() http.Header {
4082 if c.header_ == nil {
4083 c.header_ = make(http.Header)
4084 }
4085 return c.header_
4086 }
4087
4088 func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) doRequest(alt string) (*http.Response, error) {
4089 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4090 var body io.Reader = nil
4091 c.urlParams_.Set("alt", alt)
4092 c.urlParams_.Set("prettyPrint", "false")
4093 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
4094 urls += "?" + c.urlParams_.Encode()
4095 req, err := http.NewRequest("DELETE", urls, body)
4096 if err != nil {
4097 return nil, err
4098 }
4099 req.Header = reqHeaders
4100 googleapi.Expand(req.URL, map[string]string{
4101 "name": c.name,
4102 })
4103 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4104 }
4105
4106
4107
4108
4109
4110
4111 func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4112 gensupport.SetOptions(c.urlParams_, opts...)
4113 res, err := c.doRequest("json")
4114 if res != nil && res.StatusCode == http.StatusNotModified {
4115 if res.Body != nil {
4116 res.Body.Close()
4117 }
4118 return nil, gensupport.WrapError(&googleapi.Error{
4119 Code: res.StatusCode,
4120 Header: res.Header,
4121 })
4122 }
4123 if err != nil {
4124 return nil, err
4125 }
4126 defer googleapi.CloseBody(res)
4127 if err := googleapi.CheckResponse(res); err != nil {
4128 return nil, gensupport.WrapError(err)
4129 }
4130 ret := &Operation{
4131 ServerResponse: googleapi.ServerResponse{
4132 Header: res.Header,
4133 HTTPStatusCode: res.StatusCode,
4134 },
4135 }
4136 target := &ret
4137 if err := gensupport.DecodeResponse(target, res); err != nil {
4138 return nil, err
4139 }
4140 return ret, nil
4141 }
4142
4143 type ProjectsLocationsApplicationsWorkloadsGetCall struct {
4144 s *APIService
4145 name string
4146 urlParams_ gensupport.URLParams
4147 ifNoneMatch_ string
4148 ctx_ context.Context
4149 header_ http.Header
4150 }
4151
4152
4153
4154
4155
4156
4157 func (r *ProjectsLocationsApplicationsWorkloadsService) Get(name string) *ProjectsLocationsApplicationsWorkloadsGetCall {
4158 c := &ProjectsLocationsApplicationsWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4159 c.name = name
4160 return c
4161 }
4162
4163
4164
4165
4166 func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsGetCall {
4167 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4168 return c
4169 }
4170
4171
4172
4173
4174 func (c *ProjectsLocationsApplicationsWorkloadsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsWorkloadsGetCall {
4175 c.ifNoneMatch_ = entityTag
4176 return c
4177 }
4178
4179
4180 func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsGetCall {
4181 c.ctx_ = ctx
4182 return c
4183 }
4184
4185
4186
4187 func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Header() http.Header {
4188 if c.header_ == nil {
4189 c.header_ = make(http.Header)
4190 }
4191 return c.header_
4192 }
4193
4194 func (c *ProjectsLocationsApplicationsWorkloadsGetCall) doRequest(alt string) (*http.Response, error) {
4195 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4196 if c.ifNoneMatch_ != "" {
4197 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4198 }
4199 var body io.Reader = nil
4200 c.urlParams_.Set("alt", alt)
4201 c.urlParams_.Set("prettyPrint", "false")
4202 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
4203 urls += "?" + c.urlParams_.Encode()
4204 req, err := http.NewRequest("GET", urls, body)
4205 if err != nil {
4206 return nil, err
4207 }
4208 req.Header = reqHeaders
4209 googleapi.Expand(req.URL, map[string]string{
4210 "name": c.name,
4211 })
4212 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4213 }
4214
4215
4216
4217
4218
4219
4220 func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*Workload, error) {
4221 gensupport.SetOptions(c.urlParams_, opts...)
4222 res, err := c.doRequest("json")
4223 if res != nil && res.StatusCode == http.StatusNotModified {
4224 if res.Body != nil {
4225 res.Body.Close()
4226 }
4227 return nil, gensupport.WrapError(&googleapi.Error{
4228 Code: res.StatusCode,
4229 Header: res.Header,
4230 })
4231 }
4232 if err != nil {
4233 return nil, err
4234 }
4235 defer googleapi.CloseBody(res)
4236 if err := googleapi.CheckResponse(res); err != nil {
4237 return nil, gensupport.WrapError(err)
4238 }
4239 ret := &Workload{
4240 ServerResponse: googleapi.ServerResponse{
4241 Header: res.Header,
4242 HTTPStatusCode: res.StatusCode,
4243 },
4244 }
4245 target := &ret
4246 if err := gensupport.DecodeResponse(target, res); err != nil {
4247 return nil, err
4248 }
4249 return ret, nil
4250 }
4251
4252 type ProjectsLocationsApplicationsWorkloadsListCall struct {
4253 s *APIService
4254 parent string
4255 urlParams_ gensupport.URLParams
4256 ifNoneMatch_ string
4257 ctx_ context.Context
4258 header_ http.Header
4259 }
4260
4261
4262
4263
4264
4265
4266 func (r *ProjectsLocationsApplicationsWorkloadsService) List(parent string) *ProjectsLocationsApplicationsWorkloadsListCall {
4267 c := &ProjectsLocationsApplicationsWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4268 c.parent = parent
4269 return c
4270 }
4271
4272
4273 func (c *ProjectsLocationsApplicationsWorkloadsListCall) Filter(filter string) *ProjectsLocationsApplicationsWorkloadsListCall {
4274 c.urlParams_.Set("filter", filter)
4275 return c
4276 }
4277
4278
4279
4280 func (c *ProjectsLocationsApplicationsWorkloadsListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsWorkloadsListCall {
4281 c.urlParams_.Set("orderBy", orderBy)
4282 return c
4283 }
4284
4285
4286
4287
4288 func (c *ProjectsLocationsApplicationsWorkloadsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsWorkloadsListCall {
4289 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4290 return c
4291 }
4292
4293
4294
4295 func (c *ProjectsLocationsApplicationsWorkloadsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsWorkloadsListCall {
4296 c.urlParams_.Set("pageToken", pageToken)
4297 return c
4298 }
4299
4300
4301
4302
4303 func (c *ProjectsLocationsApplicationsWorkloadsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsListCall {
4304 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4305 return c
4306 }
4307
4308
4309
4310
4311 func (c *ProjectsLocationsApplicationsWorkloadsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsWorkloadsListCall {
4312 c.ifNoneMatch_ = entityTag
4313 return c
4314 }
4315
4316
4317 func (c *ProjectsLocationsApplicationsWorkloadsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsListCall {
4318 c.ctx_ = ctx
4319 return c
4320 }
4321
4322
4323
4324 func (c *ProjectsLocationsApplicationsWorkloadsListCall) Header() http.Header {
4325 if c.header_ == nil {
4326 c.header_ = make(http.Header)
4327 }
4328 return c.header_
4329 }
4330
4331 func (c *ProjectsLocationsApplicationsWorkloadsListCall) doRequest(alt string) (*http.Response, error) {
4332 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4333 if c.ifNoneMatch_ != "" {
4334 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4335 }
4336 var body io.Reader = nil
4337 c.urlParams_.Set("alt", alt)
4338 c.urlParams_.Set("prettyPrint", "false")
4339 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/workloads")
4340 urls += "?" + c.urlParams_.Encode()
4341 req, err := http.NewRequest("GET", urls, body)
4342 if err != nil {
4343 return nil, err
4344 }
4345 req.Header = reqHeaders
4346 googleapi.Expand(req.URL, map[string]string{
4347 "parent": c.parent,
4348 })
4349 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4350 }
4351
4352
4353
4354
4355
4356
4357
4358 func (c *ProjectsLocationsApplicationsWorkloadsListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadsResponse, error) {
4359 gensupport.SetOptions(c.urlParams_, opts...)
4360 res, err := c.doRequest("json")
4361 if res != nil && res.StatusCode == http.StatusNotModified {
4362 if res.Body != nil {
4363 res.Body.Close()
4364 }
4365 return nil, gensupport.WrapError(&googleapi.Error{
4366 Code: res.StatusCode,
4367 Header: res.Header,
4368 })
4369 }
4370 if err != nil {
4371 return nil, err
4372 }
4373 defer googleapi.CloseBody(res)
4374 if err := googleapi.CheckResponse(res); err != nil {
4375 return nil, gensupport.WrapError(err)
4376 }
4377 ret := &ListWorkloadsResponse{
4378 ServerResponse: googleapi.ServerResponse{
4379 Header: res.Header,
4380 HTTPStatusCode: res.StatusCode,
4381 },
4382 }
4383 target := &ret
4384 if err := gensupport.DecodeResponse(target, res); err != nil {
4385 return nil, err
4386 }
4387 return ret, nil
4388 }
4389
4390
4391
4392
4393 func (c *ProjectsLocationsApplicationsWorkloadsListCall) Pages(ctx context.Context, f func(*ListWorkloadsResponse) error) error {
4394 c.ctx_ = ctx
4395 defer c.PageToken(c.urlParams_.Get("pageToken"))
4396 for {
4397 x, err := c.Do()
4398 if err != nil {
4399 return err
4400 }
4401 if err := f(x); err != nil {
4402 return err
4403 }
4404 if x.NextPageToken == "" {
4405 return nil
4406 }
4407 c.PageToken(x.NextPageToken)
4408 }
4409 }
4410
4411 type ProjectsLocationsApplicationsWorkloadsPatchCall struct {
4412 s *APIService
4413 name string
4414 workload *Workload
4415 urlParams_ gensupport.URLParams
4416 ctx_ context.Context
4417 header_ http.Header
4418 }
4419
4420
4421
4422
4423
4424
4425 func (r *ProjectsLocationsApplicationsWorkloadsService) Patch(name string, workload *Workload) *ProjectsLocationsApplicationsWorkloadsPatchCall {
4426 c := &ProjectsLocationsApplicationsWorkloadsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4427 c.name = name
4428 c.workload = workload
4429 return c
4430 }
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443 func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsPatchCall {
4444 c.urlParams_.Set("requestId", requestId)
4445 return c
4446 }
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456 func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsWorkloadsPatchCall {
4457 c.urlParams_.Set("updateMask", updateMask)
4458 return c
4459 }
4460
4461
4462
4463
4464 func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsPatchCall {
4465 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4466 return c
4467 }
4468
4469
4470 func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsPatchCall {
4471 c.ctx_ = ctx
4472 return c
4473 }
4474
4475
4476
4477 func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Header() http.Header {
4478 if c.header_ == nil {
4479 c.header_ = make(http.Header)
4480 }
4481 return c.header_
4482 }
4483
4484 func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) doRequest(alt string) (*http.Response, error) {
4485 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4486 var body io.Reader = nil
4487 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workload)
4488 if err != nil {
4489 return nil, err
4490 }
4491 c.urlParams_.Set("alt", alt)
4492 c.urlParams_.Set("prettyPrint", "false")
4493 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
4494 urls += "?" + c.urlParams_.Encode()
4495 req, err := http.NewRequest("PATCH", urls, body)
4496 if err != nil {
4497 return nil, err
4498 }
4499 req.Header = reqHeaders
4500 googleapi.Expand(req.URL, map[string]string{
4501 "name": c.name,
4502 })
4503 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4504 }
4505
4506
4507
4508
4509
4510
4511 func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4512 gensupport.SetOptions(c.urlParams_, opts...)
4513 res, err := c.doRequest("json")
4514 if res != nil && res.StatusCode == http.StatusNotModified {
4515 if res.Body != nil {
4516 res.Body.Close()
4517 }
4518 return nil, gensupport.WrapError(&googleapi.Error{
4519 Code: res.StatusCode,
4520 Header: res.Header,
4521 })
4522 }
4523 if err != nil {
4524 return nil, err
4525 }
4526 defer googleapi.CloseBody(res)
4527 if err := googleapi.CheckResponse(res); err != nil {
4528 return nil, gensupport.WrapError(err)
4529 }
4530 ret := &Operation{
4531 ServerResponse: googleapi.ServerResponse{
4532 Header: res.Header,
4533 HTTPStatusCode: res.StatusCode,
4534 },
4535 }
4536 target := &ret
4537 if err := gensupport.DecodeResponse(target, res); err != nil {
4538 return nil, err
4539 }
4540 return ret, nil
4541 }
4542
4543 type ProjectsLocationsDiscoveredServicesFindUnregisteredCall struct {
4544 s *APIService
4545 parent string
4546 urlParams_ gensupport.URLParams
4547 ifNoneMatch_ string
4548 ctx_ context.Context
4549 header_ http.Header
4550 }
4551
4552
4553
4554
4555
4556
4557 func (r *ProjectsLocationsDiscoveredServicesService) FindUnregistered(parent string) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
4558 c := &ProjectsLocationsDiscoveredServicesFindUnregisteredCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4559 c.parent = parent
4560 return c
4561 }
4562
4563
4564 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Filter(filter string) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
4565 c.urlParams_.Set("filter", filter)
4566 return c
4567 }
4568
4569
4570
4571 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
4572 c.urlParams_.Set("orderBy", orderBy)
4573 return c
4574 }
4575
4576
4577
4578
4579 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
4580 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4581 return c
4582 }
4583
4584
4585
4586 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
4587 c.urlParams_.Set("pageToken", pageToken)
4588 return c
4589 }
4590
4591
4592
4593
4594 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
4595 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4596 return c
4597 }
4598
4599
4600
4601
4602 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
4603 c.ifNoneMatch_ = entityTag
4604 return c
4605 }
4606
4607
4608 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
4609 c.ctx_ = ctx
4610 return c
4611 }
4612
4613
4614
4615 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Header() http.Header {
4616 if c.header_ == nil {
4617 c.header_ = make(http.Header)
4618 }
4619 return c.header_
4620 }
4621
4622 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) doRequest(alt string) (*http.Response, error) {
4623 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4624 if c.ifNoneMatch_ != "" {
4625 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4626 }
4627 var body io.Reader = nil
4628 c.urlParams_.Set("alt", alt)
4629 c.urlParams_.Set("prettyPrint", "false")
4630 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredServices:findUnregistered")
4631 urls += "?" + c.urlParams_.Encode()
4632 req, err := http.NewRequest("GET", urls, body)
4633 if err != nil {
4634 return nil, err
4635 }
4636 req.Header = reqHeaders
4637 googleapi.Expand(req.URL, map[string]string{
4638 "parent": c.parent,
4639 })
4640 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4641 }
4642
4643
4644
4645
4646
4647
4648
4649 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Do(opts ...googleapi.CallOption) (*FindUnregisteredServicesResponse, error) {
4650 gensupport.SetOptions(c.urlParams_, opts...)
4651 res, err := c.doRequest("json")
4652 if res != nil && res.StatusCode == http.StatusNotModified {
4653 if res.Body != nil {
4654 res.Body.Close()
4655 }
4656 return nil, gensupport.WrapError(&googleapi.Error{
4657 Code: res.StatusCode,
4658 Header: res.Header,
4659 })
4660 }
4661 if err != nil {
4662 return nil, err
4663 }
4664 defer googleapi.CloseBody(res)
4665 if err := googleapi.CheckResponse(res); err != nil {
4666 return nil, gensupport.WrapError(err)
4667 }
4668 ret := &FindUnregisteredServicesResponse{
4669 ServerResponse: googleapi.ServerResponse{
4670 Header: res.Header,
4671 HTTPStatusCode: res.StatusCode,
4672 },
4673 }
4674 target := &ret
4675 if err := gensupport.DecodeResponse(target, res); err != nil {
4676 return nil, err
4677 }
4678 return ret, nil
4679 }
4680
4681
4682
4683
4684 func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Pages(ctx context.Context, f func(*FindUnregisteredServicesResponse) error) error {
4685 c.ctx_ = ctx
4686 defer c.PageToken(c.urlParams_.Get("pageToken"))
4687 for {
4688 x, err := c.Do()
4689 if err != nil {
4690 return err
4691 }
4692 if err := f(x); err != nil {
4693 return err
4694 }
4695 if x.NextPageToken == "" {
4696 return nil
4697 }
4698 c.PageToken(x.NextPageToken)
4699 }
4700 }
4701
4702 type ProjectsLocationsDiscoveredServicesGetCall struct {
4703 s *APIService
4704 name string
4705 urlParams_ gensupport.URLParams
4706 ifNoneMatch_ string
4707 ctx_ context.Context
4708 header_ http.Header
4709 }
4710
4711
4712
4713
4714
4715
4716
4717 func (r *ProjectsLocationsDiscoveredServicesService) Get(name string) *ProjectsLocationsDiscoveredServicesGetCall {
4718 c := &ProjectsLocationsDiscoveredServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4719 c.name = name
4720 return c
4721 }
4722
4723
4724
4725
4726 func (c *ProjectsLocationsDiscoveredServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesGetCall {
4727 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4728 return c
4729 }
4730
4731
4732
4733
4734 func (c *ProjectsLocationsDiscoveredServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesGetCall {
4735 c.ifNoneMatch_ = entityTag
4736 return c
4737 }
4738
4739
4740 func (c *ProjectsLocationsDiscoveredServicesGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesGetCall {
4741 c.ctx_ = ctx
4742 return c
4743 }
4744
4745
4746
4747 func (c *ProjectsLocationsDiscoveredServicesGetCall) Header() http.Header {
4748 if c.header_ == nil {
4749 c.header_ = make(http.Header)
4750 }
4751 return c.header_
4752 }
4753
4754 func (c *ProjectsLocationsDiscoveredServicesGetCall) doRequest(alt string) (*http.Response, error) {
4755 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4756 if c.ifNoneMatch_ != "" {
4757 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4758 }
4759 var body io.Reader = nil
4760 c.urlParams_.Set("alt", alt)
4761 c.urlParams_.Set("prettyPrint", "false")
4762 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
4763 urls += "?" + c.urlParams_.Encode()
4764 req, err := http.NewRequest("GET", urls, body)
4765 if err != nil {
4766 return nil, err
4767 }
4768 req.Header = reqHeaders
4769 googleapi.Expand(req.URL, map[string]string{
4770 "name": c.name,
4771 })
4772 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4773 }
4774
4775
4776
4777
4778
4779
4780
4781 func (c *ProjectsLocationsDiscoveredServicesGetCall) Do(opts ...googleapi.CallOption) (*DiscoveredService, error) {
4782 gensupport.SetOptions(c.urlParams_, opts...)
4783 res, err := c.doRequest("json")
4784 if res != nil && res.StatusCode == http.StatusNotModified {
4785 if res.Body != nil {
4786 res.Body.Close()
4787 }
4788 return nil, gensupport.WrapError(&googleapi.Error{
4789 Code: res.StatusCode,
4790 Header: res.Header,
4791 })
4792 }
4793 if err != nil {
4794 return nil, err
4795 }
4796 defer googleapi.CloseBody(res)
4797 if err := googleapi.CheckResponse(res); err != nil {
4798 return nil, gensupport.WrapError(err)
4799 }
4800 ret := &DiscoveredService{
4801 ServerResponse: googleapi.ServerResponse{
4802 Header: res.Header,
4803 HTTPStatusCode: res.StatusCode,
4804 },
4805 }
4806 target := &ret
4807 if err := gensupport.DecodeResponse(target, res); err != nil {
4808 return nil, err
4809 }
4810 return ret, nil
4811 }
4812
4813 type ProjectsLocationsDiscoveredServicesListCall struct {
4814 s *APIService
4815 parent string
4816 urlParams_ gensupport.URLParams
4817 ifNoneMatch_ string
4818 ctx_ context.Context
4819 header_ http.Header
4820 }
4821
4822
4823
4824
4825
4826
4827 func (r *ProjectsLocationsDiscoveredServicesService) List(parent string) *ProjectsLocationsDiscoveredServicesListCall {
4828 c := &ProjectsLocationsDiscoveredServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4829 c.parent = parent
4830 return c
4831 }
4832
4833
4834 func (c *ProjectsLocationsDiscoveredServicesListCall) Filter(filter string) *ProjectsLocationsDiscoveredServicesListCall {
4835 c.urlParams_.Set("filter", filter)
4836 return c
4837 }
4838
4839
4840
4841 func (c *ProjectsLocationsDiscoveredServicesListCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredServicesListCall {
4842 c.urlParams_.Set("orderBy", orderBy)
4843 return c
4844 }
4845
4846
4847
4848
4849 func (c *ProjectsLocationsDiscoveredServicesListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredServicesListCall {
4850 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4851 return c
4852 }
4853
4854
4855
4856 func (c *ProjectsLocationsDiscoveredServicesListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredServicesListCall {
4857 c.urlParams_.Set("pageToken", pageToken)
4858 return c
4859 }
4860
4861
4862
4863
4864 func (c *ProjectsLocationsDiscoveredServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesListCall {
4865 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4866 return c
4867 }
4868
4869
4870
4871
4872 func (c *ProjectsLocationsDiscoveredServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesListCall {
4873 c.ifNoneMatch_ = entityTag
4874 return c
4875 }
4876
4877
4878 func (c *ProjectsLocationsDiscoveredServicesListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesListCall {
4879 c.ctx_ = ctx
4880 return c
4881 }
4882
4883
4884
4885 func (c *ProjectsLocationsDiscoveredServicesListCall) Header() http.Header {
4886 if c.header_ == nil {
4887 c.header_ = make(http.Header)
4888 }
4889 return c.header_
4890 }
4891
4892 func (c *ProjectsLocationsDiscoveredServicesListCall) doRequest(alt string) (*http.Response, error) {
4893 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4894 if c.ifNoneMatch_ != "" {
4895 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4896 }
4897 var body io.Reader = nil
4898 c.urlParams_.Set("alt", alt)
4899 c.urlParams_.Set("prettyPrint", "false")
4900 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredServices")
4901 urls += "?" + c.urlParams_.Encode()
4902 req, err := http.NewRequest("GET", urls, body)
4903 if err != nil {
4904 return nil, err
4905 }
4906 req.Header = reqHeaders
4907 googleapi.Expand(req.URL, map[string]string{
4908 "parent": c.parent,
4909 })
4910 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4911 }
4912
4913
4914
4915
4916
4917
4918
4919 func (c *ProjectsLocationsDiscoveredServicesListCall) Do(opts ...googleapi.CallOption) (*ListDiscoveredServicesResponse, error) {
4920 gensupport.SetOptions(c.urlParams_, opts...)
4921 res, err := c.doRequest("json")
4922 if res != nil && res.StatusCode == http.StatusNotModified {
4923 if res.Body != nil {
4924 res.Body.Close()
4925 }
4926 return nil, gensupport.WrapError(&googleapi.Error{
4927 Code: res.StatusCode,
4928 Header: res.Header,
4929 })
4930 }
4931 if err != nil {
4932 return nil, err
4933 }
4934 defer googleapi.CloseBody(res)
4935 if err := googleapi.CheckResponse(res); err != nil {
4936 return nil, gensupport.WrapError(err)
4937 }
4938 ret := &ListDiscoveredServicesResponse{
4939 ServerResponse: googleapi.ServerResponse{
4940 Header: res.Header,
4941 HTTPStatusCode: res.StatusCode,
4942 },
4943 }
4944 target := &ret
4945 if err := gensupport.DecodeResponse(target, res); err != nil {
4946 return nil, err
4947 }
4948 return ret, nil
4949 }
4950
4951
4952
4953
4954 func (c *ProjectsLocationsDiscoveredServicesListCall) Pages(ctx context.Context, f func(*ListDiscoveredServicesResponse) error) error {
4955 c.ctx_ = ctx
4956 defer c.PageToken(c.urlParams_.Get("pageToken"))
4957 for {
4958 x, err := c.Do()
4959 if err != nil {
4960 return err
4961 }
4962 if err := f(x); err != nil {
4963 return err
4964 }
4965 if x.NextPageToken == "" {
4966 return nil
4967 }
4968 c.PageToken(x.NextPageToken)
4969 }
4970 }
4971
4972 type ProjectsLocationsDiscoveredServicesLookupCall struct {
4973 s *APIService
4974 parent string
4975 urlParams_ gensupport.URLParams
4976 ifNoneMatch_ string
4977 ctx_ context.Context
4978 header_ http.Header
4979 }
4980
4981
4982
4983
4984
4985
4986 func (r *ProjectsLocationsDiscoveredServicesService) Lookup(parent string) *ProjectsLocationsDiscoveredServicesLookupCall {
4987 c := &ProjectsLocationsDiscoveredServicesLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4988 c.parent = parent
4989 return c
4990 }
4991
4992
4993
4994
4995 func (c *ProjectsLocationsDiscoveredServicesLookupCall) Uri(uri string) *ProjectsLocationsDiscoveredServicesLookupCall {
4996 c.urlParams_.Set("uri", uri)
4997 return c
4998 }
4999
5000
5001
5002
5003 func (c *ProjectsLocationsDiscoveredServicesLookupCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesLookupCall {
5004 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5005 return c
5006 }
5007
5008
5009
5010
5011 func (c *ProjectsLocationsDiscoveredServicesLookupCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesLookupCall {
5012 c.ifNoneMatch_ = entityTag
5013 return c
5014 }
5015
5016
5017 func (c *ProjectsLocationsDiscoveredServicesLookupCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesLookupCall {
5018 c.ctx_ = ctx
5019 return c
5020 }
5021
5022
5023
5024 func (c *ProjectsLocationsDiscoveredServicesLookupCall) Header() http.Header {
5025 if c.header_ == nil {
5026 c.header_ = make(http.Header)
5027 }
5028 return c.header_
5029 }
5030
5031 func (c *ProjectsLocationsDiscoveredServicesLookupCall) doRequest(alt string) (*http.Response, error) {
5032 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5033 if c.ifNoneMatch_ != "" {
5034 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5035 }
5036 var body io.Reader = nil
5037 c.urlParams_.Set("alt", alt)
5038 c.urlParams_.Set("prettyPrint", "false")
5039 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredServices:lookup")
5040 urls += "?" + c.urlParams_.Encode()
5041 req, err := http.NewRequest("GET", urls, body)
5042 if err != nil {
5043 return nil, err
5044 }
5045 req.Header = reqHeaders
5046 googleapi.Expand(req.URL, map[string]string{
5047 "parent": c.parent,
5048 })
5049 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5050 }
5051
5052
5053
5054
5055
5056
5057
5058 func (c *ProjectsLocationsDiscoveredServicesLookupCall) Do(opts ...googleapi.CallOption) (*LookupDiscoveredServiceResponse, error) {
5059 gensupport.SetOptions(c.urlParams_, opts...)
5060 res, err := c.doRequest("json")
5061 if res != nil && res.StatusCode == http.StatusNotModified {
5062 if res.Body != nil {
5063 res.Body.Close()
5064 }
5065 return nil, gensupport.WrapError(&googleapi.Error{
5066 Code: res.StatusCode,
5067 Header: res.Header,
5068 })
5069 }
5070 if err != nil {
5071 return nil, err
5072 }
5073 defer googleapi.CloseBody(res)
5074 if err := googleapi.CheckResponse(res); err != nil {
5075 return nil, gensupport.WrapError(err)
5076 }
5077 ret := &LookupDiscoveredServiceResponse{
5078 ServerResponse: googleapi.ServerResponse{
5079 Header: res.Header,
5080 HTTPStatusCode: res.StatusCode,
5081 },
5082 }
5083 target := &ret
5084 if err := gensupport.DecodeResponse(target, res); err != nil {
5085 return nil, err
5086 }
5087 return ret, nil
5088 }
5089
5090 type ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall struct {
5091 s *APIService
5092 parent string
5093 urlParams_ gensupport.URLParams
5094 ifNoneMatch_ string
5095 ctx_ context.Context
5096 header_ http.Header
5097 }
5098
5099
5100
5101
5102
5103
5104 func (r *ProjectsLocationsDiscoveredWorkloadsService) FindUnregistered(parent string) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
5105 c := &ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5106 c.parent = parent
5107 return c
5108 }
5109
5110
5111 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Filter(filter string) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
5112 c.urlParams_.Set("filter", filter)
5113 return c
5114 }
5115
5116
5117
5118 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
5119 c.urlParams_.Set("orderBy", orderBy)
5120 return c
5121 }
5122
5123
5124
5125
5126 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
5127 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5128 return c
5129 }
5130
5131
5132
5133 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
5134 c.urlParams_.Set("pageToken", pageToken)
5135 return c
5136 }
5137
5138
5139
5140
5141 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
5142 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5143 return c
5144 }
5145
5146
5147
5148
5149 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
5150 c.ifNoneMatch_ = entityTag
5151 return c
5152 }
5153
5154
5155 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
5156 c.ctx_ = ctx
5157 return c
5158 }
5159
5160
5161
5162 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Header() http.Header {
5163 if c.header_ == nil {
5164 c.header_ = make(http.Header)
5165 }
5166 return c.header_
5167 }
5168
5169 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) doRequest(alt string) (*http.Response, error) {
5170 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5171 if c.ifNoneMatch_ != "" {
5172 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5173 }
5174 var body io.Reader = nil
5175 c.urlParams_.Set("alt", alt)
5176 c.urlParams_.Set("prettyPrint", "false")
5177 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredWorkloads:findUnregistered")
5178 urls += "?" + c.urlParams_.Encode()
5179 req, err := http.NewRequest("GET", urls, body)
5180 if err != nil {
5181 return nil, err
5182 }
5183 req.Header = reqHeaders
5184 googleapi.Expand(req.URL, map[string]string{
5185 "parent": c.parent,
5186 })
5187 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5188 }
5189
5190
5191
5192
5193
5194
5195
5196 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Do(opts ...googleapi.CallOption) (*FindUnregisteredWorkloadsResponse, error) {
5197 gensupport.SetOptions(c.urlParams_, opts...)
5198 res, err := c.doRequest("json")
5199 if res != nil && res.StatusCode == http.StatusNotModified {
5200 if res.Body != nil {
5201 res.Body.Close()
5202 }
5203 return nil, gensupport.WrapError(&googleapi.Error{
5204 Code: res.StatusCode,
5205 Header: res.Header,
5206 })
5207 }
5208 if err != nil {
5209 return nil, err
5210 }
5211 defer googleapi.CloseBody(res)
5212 if err := googleapi.CheckResponse(res); err != nil {
5213 return nil, gensupport.WrapError(err)
5214 }
5215 ret := &FindUnregisteredWorkloadsResponse{
5216 ServerResponse: googleapi.ServerResponse{
5217 Header: res.Header,
5218 HTTPStatusCode: res.StatusCode,
5219 },
5220 }
5221 target := &ret
5222 if err := gensupport.DecodeResponse(target, res); err != nil {
5223 return nil, err
5224 }
5225 return ret, nil
5226 }
5227
5228
5229
5230
5231 func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Pages(ctx context.Context, f func(*FindUnregisteredWorkloadsResponse) error) error {
5232 c.ctx_ = ctx
5233 defer c.PageToken(c.urlParams_.Get("pageToken"))
5234 for {
5235 x, err := c.Do()
5236 if err != nil {
5237 return err
5238 }
5239 if err := f(x); err != nil {
5240 return err
5241 }
5242 if x.NextPageToken == "" {
5243 return nil
5244 }
5245 c.PageToken(x.NextPageToken)
5246 }
5247 }
5248
5249 type ProjectsLocationsDiscoveredWorkloadsGetCall struct {
5250 s *APIService
5251 name string
5252 urlParams_ gensupport.URLParams
5253 ifNoneMatch_ string
5254 ctx_ context.Context
5255 header_ http.Header
5256 }
5257
5258
5259
5260
5261
5262
5263
5264 func (r *ProjectsLocationsDiscoveredWorkloadsService) Get(name string) *ProjectsLocationsDiscoveredWorkloadsGetCall {
5265 c := &ProjectsLocationsDiscoveredWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5266 c.name = name
5267 return c
5268 }
5269
5270
5271
5272
5273 func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsGetCall {
5274 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5275 return c
5276 }
5277
5278
5279
5280
5281 func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsGetCall {
5282 c.ifNoneMatch_ = entityTag
5283 return c
5284 }
5285
5286
5287 func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsGetCall {
5288 c.ctx_ = ctx
5289 return c
5290 }
5291
5292
5293
5294 func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Header() http.Header {
5295 if c.header_ == nil {
5296 c.header_ = make(http.Header)
5297 }
5298 return c.header_
5299 }
5300
5301 func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) doRequest(alt string) (*http.Response, error) {
5302 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5303 if c.ifNoneMatch_ != "" {
5304 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5305 }
5306 var body io.Reader = nil
5307 c.urlParams_.Set("alt", alt)
5308 c.urlParams_.Set("prettyPrint", "false")
5309 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
5310 urls += "?" + c.urlParams_.Encode()
5311 req, err := http.NewRequest("GET", urls, body)
5312 if err != nil {
5313 return nil, err
5314 }
5315 req.Header = reqHeaders
5316 googleapi.Expand(req.URL, map[string]string{
5317 "name": c.name,
5318 })
5319 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5320 }
5321
5322
5323
5324
5325
5326
5327
5328 func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*DiscoveredWorkload, error) {
5329 gensupport.SetOptions(c.urlParams_, opts...)
5330 res, err := c.doRequest("json")
5331 if res != nil && res.StatusCode == http.StatusNotModified {
5332 if res.Body != nil {
5333 res.Body.Close()
5334 }
5335 return nil, gensupport.WrapError(&googleapi.Error{
5336 Code: res.StatusCode,
5337 Header: res.Header,
5338 })
5339 }
5340 if err != nil {
5341 return nil, err
5342 }
5343 defer googleapi.CloseBody(res)
5344 if err := googleapi.CheckResponse(res); err != nil {
5345 return nil, gensupport.WrapError(err)
5346 }
5347 ret := &DiscoveredWorkload{
5348 ServerResponse: googleapi.ServerResponse{
5349 Header: res.Header,
5350 HTTPStatusCode: res.StatusCode,
5351 },
5352 }
5353 target := &ret
5354 if err := gensupport.DecodeResponse(target, res); err != nil {
5355 return nil, err
5356 }
5357 return ret, nil
5358 }
5359
5360 type ProjectsLocationsDiscoveredWorkloadsListCall struct {
5361 s *APIService
5362 parent string
5363 urlParams_ gensupport.URLParams
5364 ifNoneMatch_ string
5365 ctx_ context.Context
5366 header_ http.Header
5367 }
5368
5369
5370
5371
5372
5373
5374 func (r *ProjectsLocationsDiscoveredWorkloadsService) List(parent string) *ProjectsLocationsDiscoveredWorkloadsListCall {
5375 c := &ProjectsLocationsDiscoveredWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5376 c.parent = parent
5377 return c
5378 }
5379
5380
5381 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Filter(filter string) *ProjectsLocationsDiscoveredWorkloadsListCall {
5382 c.urlParams_.Set("filter", filter)
5383 return c
5384 }
5385
5386
5387
5388 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredWorkloadsListCall {
5389 c.urlParams_.Set("orderBy", orderBy)
5390 return c
5391 }
5392
5393
5394
5395
5396 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredWorkloadsListCall {
5397 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5398 return c
5399 }
5400
5401
5402
5403 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredWorkloadsListCall {
5404 c.urlParams_.Set("pageToken", pageToken)
5405 return c
5406 }
5407
5408
5409
5410
5411 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsListCall {
5412 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5413 return c
5414 }
5415
5416
5417
5418
5419 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsListCall {
5420 c.ifNoneMatch_ = entityTag
5421 return c
5422 }
5423
5424
5425 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsListCall {
5426 c.ctx_ = ctx
5427 return c
5428 }
5429
5430
5431
5432 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Header() http.Header {
5433 if c.header_ == nil {
5434 c.header_ = make(http.Header)
5435 }
5436 return c.header_
5437 }
5438
5439 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) doRequest(alt string) (*http.Response, error) {
5440 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5441 if c.ifNoneMatch_ != "" {
5442 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5443 }
5444 var body io.Reader = nil
5445 c.urlParams_.Set("alt", alt)
5446 c.urlParams_.Set("prettyPrint", "false")
5447 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredWorkloads")
5448 urls += "?" + c.urlParams_.Encode()
5449 req, err := http.NewRequest("GET", urls, body)
5450 if err != nil {
5451 return nil, err
5452 }
5453 req.Header = reqHeaders
5454 googleapi.Expand(req.URL, map[string]string{
5455 "parent": c.parent,
5456 })
5457 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5458 }
5459
5460
5461
5462
5463
5464
5465
5466 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Do(opts ...googleapi.CallOption) (*ListDiscoveredWorkloadsResponse, error) {
5467 gensupport.SetOptions(c.urlParams_, opts...)
5468 res, err := c.doRequest("json")
5469 if res != nil && res.StatusCode == http.StatusNotModified {
5470 if res.Body != nil {
5471 res.Body.Close()
5472 }
5473 return nil, gensupport.WrapError(&googleapi.Error{
5474 Code: res.StatusCode,
5475 Header: res.Header,
5476 })
5477 }
5478 if err != nil {
5479 return nil, err
5480 }
5481 defer googleapi.CloseBody(res)
5482 if err := googleapi.CheckResponse(res); err != nil {
5483 return nil, gensupport.WrapError(err)
5484 }
5485 ret := &ListDiscoveredWorkloadsResponse{
5486 ServerResponse: googleapi.ServerResponse{
5487 Header: res.Header,
5488 HTTPStatusCode: res.StatusCode,
5489 },
5490 }
5491 target := &ret
5492 if err := gensupport.DecodeResponse(target, res); err != nil {
5493 return nil, err
5494 }
5495 return ret, nil
5496 }
5497
5498
5499
5500
5501 func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Pages(ctx context.Context, f func(*ListDiscoveredWorkloadsResponse) error) error {
5502 c.ctx_ = ctx
5503 defer c.PageToken(c.urlParams_.Get("pageToken"))
5504 for {
5505 x, err := c.Do()
5506 if err != nil {
5507 return err
5508 }
5509 if err := f(x); err != nil {
5510 return err
5511 }
5512 if x.NextPageToken == "" {
5513 return nil
5514 }
5515 c.PageToken(x.NextPageToken)
5516 }
5517 }
5518
5519 type ProjectsLocationsDiscoveredWorkloadsLookupCall struct {
5520 s *APIService
5521 parent string
5522 urlParams_ gensupport.URLParams
5523 ifNoneMatch_ string
5524 ctx_ context.Context
5525 header_ http.Header
5526 }
5527
5528
5529
5530
5531
5532
5533 func (r *ProjectsLocationsDiscoveredWorkloadsService) Lookup(parent string) *ProjectsLocationsDiscoveredWorkloadsLookupCall {
5534 c := &ProjectsLocationsDiscoveredWorkloadsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5535 c.parent = parent
5536 return c
5537 }
5538
5539
5540
5541
5542 func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) Uri(uri string) *ProjectsLocationsDiscoveredWorkloadsLookupCall {
5543 c.urlParams_.Set("uri", uri)
5544 return c
5545 }
5546
5547
5548
5549
5550 func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsLookupCall {
5551 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5552 return c
5553 }
5554
5555
5556
5557
5558 func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsLookupCall {
5559 c.ifNoneMatch_ = entityTag
5560 return c
5561 }
5562
5563
5564 func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsLookupCall {
5565 c.ctx_ = ctx
5566 return c
5567 }
5568
5569
5570
5571 func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) Header() http.Header {
5572 if c.header_ == nil {
5573 c.header_ = make(http.Header)
5574 }
5575 return c.header_
5576 }
5577
5578 func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) doRequest(alt string) (*http.Response, error) {
5579 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5580 if c.ifNoneMatch_ != "" {
5581 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5582 }
5583 var body io.Reader = nil
5584 c.urlParams_.Set("alt", alt)
5585 c.urlParams_.Set("prettyPrint", "false")
5586 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredWorkloads:lookup")
5587 urls += "?" + c.urlParams_.Encode()
5588 req, err := http.NewRequest("GET", urls, body)
5589 if err != nil {
5590 return nil, err
5591 }
5592 req.Header = reqHeaders
5593 googleapi.Expand(req.URL, map[string]string{
5594 "parent": c.parent,
5595 })
5596 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5597 }
5598
5599
5600
5601
5602
5603
5604
5605 func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) Do(opts ...googleapi.CallOption) (*LookupDiscoveredWorkloadResponse, error) {
5606 gensupport.SetOptions(c.urlParams_, opts...)
5607 res, err := c.doRequest("json")
5608 if res != nil && res.StatusCode == http.StatusNotModified {
5609 if res.Body != nil {
5610 res.Body.Close()
5611 }
5612 return nil, gensupport.WrapError(&googleapi.Error{
5613 Code: res.StatusCode,
5614 Header: res.Header,
5615 })
5616 }
5617 if err != nil {
5618 return nil, err
5619 }
5620 defer googleapi.CloseBody(res)
5621 if err := googleapi.CheckResponse(res); err != nil {
5622 return nil, gensupport.WrapError(err)
5623 }
5624 ret := &LookupDiscoveredWorkloadResponse{
5625 ServerResponse: googleapi.ServerResponse{
5626 Header: res.Header,
5627 HTTPStatusCode: res.StatusCode,
5628 },
5629 }
5630 target := &ret
5631 if err := gensupport.DecodeResponse(target, res); err != nil {
5632 return nil, err
5633 }
5634 return ret, nil
5635 }
5636
5637 type ProjectsLocationsOperationsCancelCall struct {
5638 s *APIService
5639 name string
5640 canceloperationrequest *CancelOperationRequest
5641 urlParams_ gensupport.URLParams
5642 ctx_ context.Context
5643 header_ http.Header
5644 }
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
5658 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5659 c.name = name
5660 c.canceloperationrequest = canceloperationrequest
5661 return c
5662 }
5663
5664
5665
5666
5667 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
5668 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5669 return c
5670 }
5671
5672
5673 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
5674 c.ctx_ = ctx
5675 return c
5676 }
5677
5678
5679
5680 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
5681 if c.header_ == nil {
5682 c.header_ = make(http.Header)
5683 }
5684 return c.header_
5685 }
5686
5687 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
5688 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5689 var body io.Reader = nil
5690 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
5691 if err != nil {
5692 return nil, err
5693 }
5694 c.urlParams_.Set("alt", alt)
5695 c.urlParams_.Set("prettyPrint", "false")
5696 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel")
5697 urls += "?" + c.urlParams_.Encode()
5698 req, err := http.NewRequest("POST", urls, body)
5699 if err != nil {
5700 return nil, err
5701 }
5702 req.Header = reqHeaders
5703 googleapi.Expand(req.URL, map[string]string{
5704 "name": c.name,
5705 })
5706 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5707 }
5708
5709
5710
5711
5712
5713
5714 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5715 gensupport.SetOptions(c.urlParams_, opts...)
5716 res, err := c.doRequest("json")
5717 if res != nil && res.StatusCode == http.StatusNotModified {
5718 if res.Body != nil {
5719 res.Body.Close()
5720 }
5721 return nil, gensupport.WrapError(&googleapi.Error{
5722 Code: res.StatusCode,
5723 Header: res.Header,
5724 })
5725 }
5726 if err != nil {
5727 return nil, err
5728 }
5729 defer googleapi.CloseBody(res)
5730 if err := googleapi.CheckResponse(res); err != nil {
5731 return nil, gensupport.WrapError(err)
5732 }
5733 ret := &Empty{
5734 ServerResponse: googleapi.ServerResponse{
5735 Header: res.Header,
5736 HTTPStatusCode: res.StatusCode,
5737 },
5738 }
5739 target := &ret
5740 if err := gensupport.DecodeResponse(target, res); err != nil {
5741 return nil, err
5742 }
5743 return ret, nil
5744 }
5745
5746 type ProjectsLocationsOperationsDeleteCall struct {
5747 s *APIService
5748 name string
5749 urlParams_ gensupport.URLParams
5750 ctx_ context.Context
5751 header_ http.Header
5752 }
5753
5754
5755
5756
5757
5758
5759
5760 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
5761 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5762 c.name = name
5763 return c
5764 }
5765
5766
5767
5768
5769 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
5770 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5771 return c
5772 }
5773
5774
5775 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
5776 c.ctx_ = ctx
5777 return c
5778 }
5779
5780
5781
5782 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
5783 if c.header_ == nil {
5784 c.header_ = make(http.Header)
5785 }
5786 return c.header_
5787 }
5788
5789 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
5790 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5791 var body io.Reader = nil
5792 c.urlParams_.Set("alt", alt)
5793 c.urlParams_.Set("prettyPrint", "false")
5794 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
5795 urls += "?" + c.urlParams_.Encode()
5796 req, err := http.NewRequest("DELETE", urls, body)
5797 if err != nil {
5798 return nil, err
5799 }
5800 req.Header = reqHeaders
5801 googleapi.Expand(req.URL, map[string]string{
5802 "name": c.name,
5803 })
5804 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5805 }
5806
5807
5808
5809
5810
5811
5812 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5813 gensupport.SetOptions(c.urlParams_, opts...)
5814 res, err := c.doRequest("json")
5815 if res != nil && res.StatusCode == http.StatusNotModified {
5816 if res.Body != nil {
5817 res.Body.Close()
5818 }
5819 return nil, gensupport.WrapError(&googleapi.Error{
5820 Code: res.StatusCode,
5821 Header: res.Header,
5822 })
5823 }
5824 if err != nil {
5825 return nil, err
5826 }
5827 defer googleapi.CloseBody(res)
5828 if err := googleapi.CheckResponse(res); err != nil {
5829 return nil, gensupport.WrapError(err)
5830 }
5831 ret := &Empty{
5832 ServerResponse: googleapi.ServerResponse{
5833 Header: res.Header,
5834 HTTPStatusCode: res.StatusCode,
5835 },
5836 }
5837 target := &ret
5838 if err := gensupport.DecodeResponse(target, res); err != nil {
5839 return nil, err
5840 }
5841 return ret, nil
5842 }
5843
5844 type ProjectsLocationsOperationsGetCall struct {
5845 s *APIService
5846 name string
5847 urlParams_ gensupport.URLParams
5848 ifNoneMatch_ string
5849 ctx_ context.Context
5850 header_ http.Header
5851 }
5852
5853
5854
5855
5856
5857
5858 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
5859 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5860 c.name = name
5861 return c
5862 }
5863
5864
5865
5866
5867 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
5868 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5869 return c
5870 }
5871
5872
5873
5874
5875 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
5876 c.ifNoneMatch_ = entityTag
5877 return c
5878 }
5879
5880
5881 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
5882 c.ctx_ = ctx
5883 return c
5884 }
5885
5886
5887
5888 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
5889 if c.header_ == nil {
5890 c.header_ = make(http.Header)
5891 }
5892 return c.header_
5893 }
5894
5895 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
5896 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5897 if c.ifNoneMatch_ != "" {
5898 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5899 }
5900 var body io.Reader = nil
5901 c.urlParams_.Set("alt", alt)
5902 c.urlParams_.Set("prettyPrint", "false")
5903 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
5904 urls += "?" + c.urlParams_.Encode()
5905 req, err := http.NewRequest("GET", urls, body)
5906 if err != nil {
5907 return nil, err
5908 }
5909 req.Header = reqHeaders
5910 googleapi.Expand(req.URL, map[string]string{
5911 "name": c.name,
5912 })
5913 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5914 }
5915
5916
5917
5918
5919
5920
5921 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5922 gensupport.SetOptions(c.urlParams_, opts...)
5923 res, err := c.doRequest("json")
5924 if res != nil && res.StatusCode == http.StatusNotModified {
5925 if res.Body != nil {
5926 res.Body.Close()
5927 }
5928 return nil, gensupport.WrapError(&googleapi.Error{
5929 Code: res.StatusCode,
5930 Header: res.Header,
5931 })
5932 }
5933 if err != nil {
5934 return nil, err
5935 }
5936 defer googleapi.CloseBody(res)
5937 if err := googleapi.CheckResponse(res); err != nil {
5938 return nil, gensupport.WrapError(err)
5939 }
5940 ret := &Operation{
5941 ServerResponse: googleapi.ServerResponse{
5942 Header: res.Header,
5943 HTTPStatusCode: res.StatusCode,
5944 },
5945 }
5946 target := &ret
5947 if err := gensupport.DecodeResponse(target, res); err != nil {
5948 return nil, err
5949 }
5950 return ret, nil
5951 }
5952
5953 type ProjectsLocationsOperationsListCall struct {
5954 s *APIService
5955 name string
5956 urlParams_ gensupport.URLParams
5957 ifNoneMatch_ string
5958 ctx_ context.Context
5959 header_ http.Header
5960 }
5961
5962
5963
5964
5965
5966 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
5967 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5968 c.name = name
5969 return c
5970 }
5971
5972
5973 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
5974 c.urlParams_.Set("filter", filter)
5975 return c
5976 }
5977
5978
5979
5980 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
5981 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5982 return c
5983 }
5984
5985
5986
5987 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
5988 c.urlParams_.Set("pageToken", pageToken)
5989 return c
5990 }
5991
5992
5993
5994
5995 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
5996 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5997 return c
5998 }
5999
6000
6001
6002
6003 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
6004 c.ifNoneMatch_ = entityTag
6005 return c
6006 }
6007
6008
6009 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
6010 c.ctx_ = ctx
6011 return c
6012 }
6013
6014
6015
6016 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
6017 if c.header_ == nil {
6018 c.header_ = make(http.Header)
6019 }
6020 return c.header_
6021 }
6022
6023 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
6024 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6025 if c.ifNoneMatch_ != "" {
6026 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6027 }
6028 var body io.Reader = nil
6029 c.urlParams_.Set("alt", alt)
6030 c.urlParams_.Set("prettyPrint", "false")
6031 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations")
6032 urls += "?" + c.urlParams_.Encode()
6033 req, err := http.NewRequest("GET", urls, body)
6034 if err != nil {
6035 return nil, err
6036 }
6037 req.Header = reqHeaders
6038 googleapi.Expand(req.URL, map[string]string{
6039 "name": c.name,
6040 })
6041 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6042 }
6043
6044
6045
6046
6047
6048
6049
6050 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
6051 gensupport.SetOptions(c.urlParams_, opts...)
6052 res, err := c.doRequest("json")
6053 if res != nil && res.StatusCode == http.StatusNotModified {
6054 if res.Body != nil {
6055 res.Body.Close()
6056 }
6057 return nil, gensupport.WrapError(&googleapi.Error{
6058 Code: res.StatusCode,
6059 Header: res.Header,
6060 })
6061 }
6062 if err != nil {
6063 return nil, err
6064 }
6065 defer googleapi.CloseBody(res)
6066 if err := googleapi.CheckResponse(res); err != nil {
6067 return nil, gensupport.WrapError(err)
6068 }
6069 ret := &ListOperationsResponse{
6070 ServerResponse: googleapi.ServerResponse{
6071 Header: res.Header,
6072 HTTPStatusCode: res.StatusCode,
6073 },
6074 }
6075 target := &ret
6076 if err := gensupport.DecodeResponse(target, res); err != nil {
6077 return nil, err
6078 }
6079 return ret, nil
6080 }
6081
6082
6083
6084
6085 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
6086 c.ctx_ = ctx
6087 defer c.PageToken(c.urlParams_.Get("pageToken"))
6088 for {
6089 x, err := c.Do()
6090 if err != nil {
6091 return err
6092 }
6093 if err := f(x); err != nil {
6094 return err
6095 }
6096 if x.NextPageToken == "" {
6097 return nil
6098 }
6099 c.PageToken(x.NextPageToken)
6100 }
6101 }
6102
6103 type ProjectsLocationsServiceProjectAttachmentsCreateCall struct {
6104 s *APIService
6105 parent string
6106 serviceprojectattachment *ServiceProjectAttachment
6107 urlParams_ gensupport.URLParams
6108 ctx_ context.Context
6109 header_ http.Header
6110 }
6111
6112
6113
6114
6115
6116
6117 func (r *ProjectsLocationsServiceProjectAttachmentsService) Create(parent string, serviceprojectattachment *ServiceProjectAttachment) *ProjectsLocationsServiceProjectAttachmentsCreateCall {
6118 c := &ProjectsLocationsServiceProjectAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6119 c.parent = parent
6120 c.serviceprojectattachment = serviceprojectattachment
6121 return c
6122 }
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135 func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) RequestId(requestId string) *ProjectsLocationsServiceProjectAttachmentsCreateCall {
6136 c.urlParams_.Set("requestId", requestId)
6137 return c
6138 }
6139
6140
6141
6142
6143
6144 func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) ServiceProjectAttachmentId(serviceProjectAttachmentId string) *ProjectsLocationsServiceProjectAttachmentsCreateCall {
6145 c.urlParams_.Set("serviceProjectAttachmentId", serviceProjectAttachmentId)
6146 return c
6147 }
6148
6149
6150
6151
6152 func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsCreateCall {
6153 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6154 return c
6155 }
6156
6157
6158 func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsCreateCall {
6159 c.ctx_ = ctx
6160 return c
6161 }
6162
6163
6164
6165 func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Header() http.Header {
6166 if c.header_ == nil {
6167 c.header_ = make(http.Header)
6168 }
6169 return c.header_
6170 }
6171
6172 func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) {
6173 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6174 var body io.Reader = nil
6175 body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceprojectattachment)
6176 if err != nil {
6177 return nil, err
6178 }
6179 c.urlParams_.Set("alt", alt)
6180 c.urlParams_.Set("prettyPrint", "false")
6181 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/serviceProjectAttachments")
6182 urls += "?" + c.urlParams_.Encode()
6183 req, err := http.NewRequest("POST", urls, body)
6184 if err != nil {
6185 return nil, err
6186 }
6187 req.Header = reqHeaders
6188 googleapi.Expand(req.URL, map[string]string{
6189 "parent": c.parent,
6190 })
6191 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6192 }
6193
6194
6195
6196
6197
6198
6199 func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6200 gensupport.SetOptions(c.urlParams_, opts...)
6201 res, err := c.doRequest("json")
6202 if res != nil && res.StatusCode == http.StatusNotModified {
6203 if res.Body != nil {
6204 res.Body.Close()
6205 }
6206 return nil, gensupport.WrapError(&googleapi.Error{
6207 Code: res.StatusCode,
6208 Header: res.Header,
6209 })
6210 }
6211 if err != nil {
6212 return nil, err
6213 }
6214 defer googleapi.CloseBody(res)
6215 if err := googleapi.CheckResponse(res); err != nil {
6216 return nil, gensupport.WrapError(err)
6217 }
6218 ret := &Operation{
6219 ServerResponse: googleapi.ServerResponse{
6220 Header: res.Header,
6221 HTTPStatusCode: res.StatusCode,
6222 },
6223 }
6224 target := &ret
6225 if err := gensupport.DecodeResponse(target, res); err != nil {
6226 return nil, err
6227 }
6228 return ret, nil
6229 }
6230
6231 type ProjectsLocationsServiceProjectAttachmentsDeleteCall struct {
6232 s *APIService
6233 name string
6234 urlParams_ gensupport.URLParams
6235 ctx_ context.Context
6236 header_ http.Header
6237 }
6238
6239
6240
6241
6242
6243
6244
6245 func (r *ProjectsLocationsServiceProjectAttachmentsService) Delete(name string) *ProjectsLocationsServiceProjectAttachmentsDeleteCall {
6246 c := &ProjectsLocationsServiceProjectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6247 c.name = name
6248 return c
6249 }
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262 func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceProjectAttachmentsDeleteCall {
6263 c.urlParams_.Set("requestId", requestId)
6264 return c
6265 }
6266
6267
6268
6269
6270 func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsDeleteCall {
6271 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6272 return c
6273 }
6274
6275
6276 func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsDeleteCall {
6277 c.ctx_ = ctx
6278 return c
6279 }
6280
6281
6282
6283 func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Header() http.Header {
6284 if c.header_ == nil {
6285 c.header_ = make(http.Header)
6286 }
6287 return c.header_
6288 }
6289
6290 func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
6291 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6292 var body io.Reader = nil
6293 c.urlParams_.Set("alt", alt)
6294 c.urlParams_.Set("prettyPrint", "false")
6295 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
6296 urls += "?" + c.urlParams_.Encode()
6297 req, err := http.NewRequest("DELETE", urls, body)
6298 if err != nil {
6299 return nil, err
6300 }
6301 req.Header = reqHeaders
6302 googleapi.Expand(req.URL, map[string]string{
6303 "name": c.name,
6304 })
6305 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6306 }
6307
6308
6309
6310
6311
6312
6313 func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6314 gensupport.SetOptions(c.urlParams_, opts...)
6315 res, err := c.doRequest("json")
6316 if res != nil && res.StatusCode == http.StatusNotModified {
6317 if res.Body != nil {
6318 res.Body.Close()
6319 }
6320 return nil, gensupport.WrapError(&googleapi.Error{
6321 Code: res.StatusCode,
6322 Header: res.Header,
6323 })
6324 }
6325 if err != nil {
6326 return nil, err
6327 }
6328 defer googleapi.CloseBody(res)
6329 if err := googleapi.CheckResponse(res); err != nil {
6330 return nil, gensupport.WrapError(err)
6331 }
6332 ret := &Operation{
6333 ServerResponse: googleapi.ServerResponse{
6334 Header: res.Header,
6335 HTTPStatusCode: res.StatusCode,
6336 },
6337 }
6338 target := &ret
6339 if err := gensupport.DecodeResponse(target, res); err != nil {
6340 return nil, err
6341 }
6342 return ret, nil
6343 }
6344
6345 type ProjectsLocationsServiceProjectAttachmentsGetCall struct {
6346 s *APIService
6347 name string
6348 urlParams_ gensupport.URLParams
6349 ifNoneMatch_ string
6350 ctx_ context.Context
6351 header_ http.Header
6352 }
6353
6354
6355
6356
6357
6358
6359
6360 func (r *ProjectsLocationsServiceProjectAttachmentsService) Get(name string) *ProjectsLocationsServiceProjectAttachmentsGetCall {
6361 c := &ProjectsLocationsServiceProjectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6362 c.name = name
6363 return c
6364 }
6365
6366
6367
6368
6369 func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsGetCall {
6370 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6371 return c
6372 }
6373
6374
6375
6376
6377 func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceProjectAttachmentsGetCall {
6378 c.ifNoneMatch_ = entityTag
6379 return c
6380 }
6381
6382
6383 func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsGetCall {
6384 c.ctx_ = ctx
6385 return c
6386 }
6387
6388
6389
6390 func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Header() http.Header {
6391 if c.header_ == nil {
6392 c.header_ = make(http.Header)
6393 }
6394 return c.header_
6395 }
6396
6397 func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) {
6398 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6399 if c.ifNoneMatch_ != "" {
6400 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6401 }
6402 var body io.Reader = nil
6403 c.urlParams_.Set("alt", alt)
6404 c.urlParams_.Set("prettyPrint", "false")
6405 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
6406 urls += "?" + c.urlParams_.Encode()
6407 req, err := http.NewRequest("GET", urls, body)
6408 if err != nil {
6409 return nil, err
6410 }
6411 req.Header = reqHeaders
6412 googleapi.Expand(req.URL, map[string]string{
6413 "name": c.name,
6414 })
6415 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6416 }
6417
6418
6419
6420
6421
6422
6423
6424 func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*ServiceProjectAttachment, error) {
6425 gensupport.SetOptions(c.urlParams_, opts...)
6426 res, err := c.doRequest("json")
6427 if res != nil && res.StatusCode == http.StatusNotModified {
6428 if res.Body != nil {
6429 res.Body.Close()
6430 }
6431 return nil, gensupport.WrapError(&googleapi.Error{
6432 Code: res.StatusCode,
6433 Header: res.Header,
6434 })
6435 }
6436 if err != nil {
6437 return nil, err
6438 }
6439 defer googleapi.CloseBody(res)
6440 if err := googleapi.CheckResponse(res); err != nil {
6441 return nil, gensupport.WrapError(err)
6442 }
6443 ret := &ServiceProjectAttachment{
6444 ServerResponse: googleapi.ServerResponse{
6445 Header: res.Header,
6446 HTTPStatusCode: res.StatusCode,
6447 },
6448 }
6449 target := &ret
6450 if err := gensupport.DecodeResponse(target, res); err != nil {
6451 return nil, err
6452 }
6453 return ret, nil
6454 }
6455
6456 type ProjectsLocationsServiceProjectAttachmentsListCall struct {
6457 s *APIService
6458 parent string
6459 urlParams_ gensupport.URLParams
6460 ifNoneMatch_ string
6461 ctx_ context.Context
6462 header_ http.Header
6463 }
6464
6465
6466
6467
6468
6469
6470 func (r *ProjectsLocationsServiceProjectAttachmentsService) List(parent string) *ProjectsLocationsServiceProjectAttachmentsListCall {
6471 c := &ProjectsLocationsServiceProjectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6472 c.parent = parent
6473 return c
6474 }
6475
6476
6477 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Filter(filter string) *ProjectsLocationsServiceProjectAttachmentsListCall {
6478 c.urlParams_.Set("filter", filter)
6479 return c
6480 }
6481
6482
6483
6484 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) OrderBy(orderBy string) *ProjectsLocationsServiceProjectAttachmentsListCall {
6485 c.urlParams_.Set("orderBy", orderBy)
6486 return c
6487 }
6488
6489
6490
6491
6492 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceProjectAttachmentsListCall {
6493 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6494 return c
6495 }
6496
6497
6498
6499 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) PageToken(pageToken string) *ProjectsLocationsServiceProjectAttachmentsListCall {
6500 c.urlParams_.Set("pageToken", pageToken)
6501 return c
6502 }
6503
6504
6505
6506
6507 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsListCall {
6508 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6509 return c
6510 }
6511
6512
6513
6514
6515 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceProjectAttachmentsListCall {
6516 c.ifNoneMatch_ = entityTag
6517 return c
6518 }
6519
6520
6521 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsListCall {
6522 c.ctx_ = ctx
6523 return c
6524 }
6525
6526
6527
6528 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Header() http.Header {
6529 if c.header_ == nil {
6530 c.header_ = make(http.Header)
6531 }
6532 return c.header_
6533 }
6534
6535 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) doRequest(alt string) (*http.Response, error) {
6536 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6537 if c.ifNoneMatch_ != "" {
6538 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6539 }
6540 var body io.Reader = nil
6541 c.urlParams_.Set("alt", alt)
6542 c.urlParams_.Set("prettyPrint", "false")
6543 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/serviceProjectAttachments")
6544 urls += "?" + c.urlParams_.Encode()
6545 req, err := http.NewRequest("GET", urls, body)
6546 if err != nil {
6547 return nil, err
6548 }
6549 req.Header = reqHeaders
6550 googleapi.Expand(req.URL, map[string]string{
6551 "parent": c.parent,
6552 })
6553 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6554 }
6555
6556
6557
6558
6559
6560
6561
6562 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ListServiceProjectAttachmentsResponse, error) {
6563 gensupport.SetOptions(c.urlParams_, opts...)
6564 res, err := c.doRequest("json")
6565 if res != nil && res.StatusCode == http.StatusNotModified {
6566 if res.Body != nil {
6567 res.Body.Close()
6568 }
6569 return nil, gensupport.WrapError(&googleapi.Error{
6570 Code: res.StatusCode,
6571 Header: res.Header,
6572 })
6573 }
6574 if err != nil {
6575 return nil, err
6576 }
6577 defer googleapi.CloseBody(res)
6578 if err := googleapi.CheckResponse(res); err != nil {
6579 return nil, gensupport.WrapError(err)
6580 }
6581 ret := &ListServiceProjectAttachmentsResponse{
6582 ServerResponse: googleapi.ServerResponse{
6583 Header: res.Header,
6584 HTTPStatusCode: res.StatusCode,
6585 },
6586 }
6587 target := &ret
6588 if err := gensupport.DecodeResponse(target, res); err != nil {
6589 return nil, err
6590 }
6591 return ret, nil
6592 }
6593
6594
6595
6596
6597 func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Pages(ctx context.Context, f func(*ListServiceProjectAttachmentsResponse) error) error {
6598 c.ctx_ = ctx
6599 defer c.PageToken(c.urlParams_.Get("pageToken"))
6600 for {
6601 x, err := c.Do()
6602 if err != nil {
6603 return err
6604 }
6605 if err := f(x); err != nil {
6606 return err
6607 }
6608 if x.NextPageToken == "" {
6609 return nil
6610 }
6611 c.PageToken(x.NextPageToken)
6612 }
6613 }
6614
View as plain text