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