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