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