1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58 package logging
59
60 import (
61 "bytes"
62 "context"
63 "encoding/json"
64 "errors"
65 "fmt"
66 "io"
67 "net/http"
68 "net/url"
69 "strconv"
70 "strings"
71
72 googleapi "google.golang.org/api/googleapi"
73 internal "google.golang.org/api/internal"
74 gensupport "google.golang.org/api/internal/gensupport"
75 option "google.golang.org/api/option"
76 internaloption "google.golang.org/api/option/internaloption"
77 htransport "google.golang.org/api/transport/http"
78 )
79
80
81
82 var _ = bytes.NewBuffer
83 var _ = strconv.Itoa
84 var _ = fmt.Sprintf
85 var _ = json.NewDecoder
86 var _ = io.Copy
87 var _ = url.Parse
88 var _ = gensupport.MarshalJSON
89 var _ = googleapi.Version
90 var _ = errors.New
91 var _ = strings.Replace
92 var _ = context.Canceled
93 var _ = internaloption.WithDefaultEndpoint
94 var _ = internal.Version
95
96 const apiId = "logging:v2"
97 const apiName = "logging"
98 const apiVersion = "v2"
99 const basePath = "https://logging.googleapis.com/"
100 const basePathTemplate = "https://logging.UNIVERSE_DOMAIN/"
101 const mtlsBasePath = "https://logging.mtls.googleapis.com/"
102
103
104 const (
105
106
107 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
108
109
110
111 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
112
113
114 LoggingAdminScope = "https://www.googleapis.com/auth/logging.admin"
115
116
117 LoggingReadScope = "https://www.googleapis.com/auth/logging.read"
118
119
120 LoggingWriteScope = "https://www.googleapis.com/auth/logging.write"
121 )
122
123
124 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
125 scopesOption := internaloption.WithDefaultScopes(
126 "https://www.googleapis.com/auth/cloud-platform",
127 "https://www.googleapis.com/auth/cloud-platform.read-only",
128 "https://www.googleapis.com/auth/logging.admin",
129 "https://www.googleapis.com/auth/logging.read",
130 "https://www.googleapis.com/auth/logging.write",
131 )
132
133 opts = append([]option.ClientOption{scopesOption}, opts...)
134 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
135 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
136 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
137 opts = append(opts, internaloption.EnableNewAuthLibrary())
138 client, endpoint, err := htransport.NewClient(ctx, opts...)
139 if err != nil {
140 return nil, err
141 }
142 s, err := New(client)
143 if err != nil {
144 return nil, err
145 }
146 if endpoint != "" {
147 s.BasePath = endpoint
148 }
149 return s, nil
150 }
151
152
153
154
155
156
157 func New(client *http.Client) (*Service, error) {
158 if client == nil {
159 return nil, errors.New("client is nil")
160 }
161 s := &Service{client: client, BasePath: basePath}
162 s.BillingAccounts = NewBillingAccountsService(s)
163 s.Entries = NewEntriesService(s)
164 s.Exclusions = NewExclusionsService(s)
165 s.Folders = NewFoldersService(s)
166 s.Locations = NewLocationsService(s)
167 s.Logs = NewLogsService(s)
168 s.MonitoredResourceDescriptors = NewMonitoredResourceDescriptorsService(s)
169 s.Organizations = NewOrganizationsService(s)
170 s.Projects = NewProjectsService(s)
171 s.Sinks = NewSinksService(s)
172 s.V2 = NewV2Service(s)
173 return s, nil
174 }
175
176 type Service struct {
177 client *http.Client
178 BasePath string
179 UserAgent string
180
181 BillingAccounts *BillingAccountsService
182
183 Entries *EntriesService
184
185 Exclusions *ExclusionsService
186
187 Folders *FoldersService
188
189 Locations *LocationsService
190
191 Logs *LogsService
192
193 MonitoredResourceDescriptors *MonitoredResourceDescriptorsService
194
195 Organizations *OrganizationsService
196
197 Projects *ProjectsService
198
199 Sinks *SinksService
200
201 V2 *V2Service
202 }
203
204 func (s *Service) userAgent() string {
205 if s.UserAgent == "" {
206 return googleapi.UserAgent
207 }
208 return googleapi.UserAgent + " " + s.UserAgent
209 }
210
211 func NewBillingAccountsService(s *Service) *BillingAccountsService {
212 rs := &BillingAccountsService{s: s}
213 rs.Exclusions = NewBillingAccountsExclusionsService(s)
214 rs.Locations = NewBillingAccountsLocationsService(s)
215 rs.Logs = NewBillingAccountsLogsService(s)
216 rs.Sinks = NewBillingAccountsSinksService(s)
217 return rs
218 }
219
220 type BillingAccountsService struct {
221 s *Service
222
223 Exclusions *BillingAccountsExclusionsService
224
225 Locations *BillingAccountsLocationsService
226
227 Logs *BillingAccountsLogsService
228
229 Sinks *BillingAccountsSinksService
230 }
231
232 func NewBillingAccountsExclusionsService(s *Service) *BillingAccountsExclusionsService {
233 rs := &BillingAccountsExclusionsService{s: s}
234 return rs
235 }
236
237 type BillingAccountsExclusionsService struct {
238 s *Service
239 }
240
241 func NewBillingAccountsLocationsService(s *Service) *BillingAccountsLocationsService {
242 rs := &BillingAccountsLocationsService{s: s}
243 rs.Buckets = NewBillingAccountsLocationsBucketsService(s)
244 rs.Operations = NewBillingAccountsLocationsOperationsService(s)
245 rs.RecentQueries = NewBillingAccountsLocationsRecentQueriesService(s)
246 rs.SavedQueries = NewBillingAccountsLocationsSavedQueriesService(s)
247 return rs
248 }
249
250 type BillingAccountsLocationsService struct {
251 s *Service
252
253 Buckets *BillingAccountsLocationsBucketsService
254
255 Operations *BillingAccountsLocationsOperationsService
256
257 RecentQueries *BillingAccountsLocationsRecentQueriesService
258
259 SavedQueries *BillingAccountsLocationsSavedQueriesService
260 }
261
262 func NewBillingAccountsLocationsBucketsService(s *Service) *BillingAccountsLocationsBucketsService {
263 rs := &BillingAccountsLocationsBucketsService{s: s}
264 rs.Links = NewBillingAccountsLocationsBucketsLinksService(s)
265 rs.Views = NewBillingAccountsLocationsBucketsViewsService(s)
266 return rs
267 }
268
269 type BillingAccountsLocationsBucketsService struct {
270 s *Service
271
272 Links *BillingAccountsLocationsBucketsLinksService
273
274 Views *BillingAccountsLocationsBucketsViewsService
275 }
276
277 func NewBillingAccountsLocationsBucketsLinksService(s *Service) *BillingAccountsLocationsBucketsLinksService {
278 rs := &BillingAccountsLocationsBucketsLinksService{s: s}
279 return rs
280 }
281
282 type BillingAccountsLocationsBucketsLinksService struct {
283 s *Service
284 }
285
286 func NewBillingAccountsLocationsBucketsViewsService(s *Service) *BillingAccountsLocationsBucketsViewsService {
287 rs := &BillingAccountsLocationsBucketsViewsService{s: s}
288 rs.Logs = NewBillingAccountsLocationsBucketsViewsLogsService(s)
289 return rs
290 }
291
292 type BillingAccountsLocationsBucketsViewsService struct {
293 s *Service
294
295 Logs *BillingAccountsLocationsBucketsViewsLogsService
296 }
297
298 func NewBillingAccountsLocationsBucketsViewsLogsService(s *Service) *BillingAccountsLocationsBucketsViewsLogsService {
299 rs := &BillingAccountsLocationsBucketsViewsLogsService{s: s}
300 return rs
301 }
302
303 type BillingAccountsLocationsBucketsViewsLogsService struct {
304 s *Service
305 }
306
307 func NewBillingAccountsLocationsOperationsService(s *Service) *BillingAccountsLocationsOperationsService {
308 rs := &BillingAccountsLocationsOperationsService{s: s}
309 return rs
310 }
311
312 type BillingAccountsLocationsOperationsService struct {
313 s *Service
314 }
315
316 func NewBillingAccountsLocationsRecentQueriesService(s *Service) *BillingAccountsLocationsRecentQueriesService {
317 rs := &BillingAccountsLocationsRecentQueriesService{s: s}
318 return rs
319 }
320
321 type BillingAccountsLocationsRecentQueriesService struct {
322 s *Service
323 }
324
325 func NewBillingAccountsLocationsSavedQueriesService(s *Service) *BillingAccountsLocationsSavedQueriesService {
326 rs := &BillingAccountsLocationsSavedQueriesService{s: s}
327 return rs
328 }
329
330 type BillingAccountsLocationsSavedQueriesService struct {
331 s *Service
332 }
333
334 func NewBillingAccountsLogsService(s *Service) *BillingAccountsLogsService {
335 rs := &BillingAccountsLogsService{s: s}
336 return rs
337 }
338
339 type BillingAccountsLogsService struct {
340 s *Service
341 }
342
343 func NewBillingAccountsSinksService(s *Service) *BillingAccountsSinksService {
344 rs := &BillingAccountsSinksService{s: s}
345 return rs
346 }
347
348 type BillingAccountsSinksService struct {
349 s *Service
350 }
351
352 func NewEntriesService(s *Service) *EntriesService {
353 rs := &EntriesService{s: s}
354 return rs
355 }
356
357 type EntriesService struct {
358 s *Service
359 }
360
361 func NewExclusionsService(s *Service) *ExclusionsService {
362 rs := &ExclusionsService{s: s}
363 return rs
364 }
365
366 type ExclusionsService struct {
367 s *Service
368 }
369
370 func NewFoldersService(s *Service) *FoldersService {
371 rs := &FoldersService{s: s}
372 rs.Exclusions = NewFoldersExclusionsService(s)
373 rs.Locations = NewFoldersLocationsService(s)
374 rs.Logs = NewFoldersLogsService(s)
375 rs.Sinks = NewFoldersSinksService(s)
376 return rs
377 }
378
379 type FoldersService struct {
380 s *Service
381
382 Exclusions *FoldersExclusionsService
383
384 Locations *FoldersLocationsService
385
386 Logs *FoldersLogsService
387
388 Sinks *FoldersSinksService
389 }
390
391 func NewFoldersExclusionsService(s *Service) *FoldersExclusionsService {
392 rs := &FoldersExclusionsService{s: s}
393 return rs
394 }
395
396 type FoldersExclusionsService struct {
397 s *Service
398 }
399
400 func NewFoldersLocationsService(s *Service) *FoldersLocationsService {
401 rs := &FoldersLocationsService{s: s}
402 rs.Buckets = NewFoldersLocationsBucketsService(s)
403 rs.Operations = NewFoldersLocationsOperationsService(s)
404 rs.RecentQueries = NewFoldersLocationsRecentQueriesService(s)
405 rs.SavedQueries = NewFoldersLocationsSavedQueriesService(s)
406 return rs
407 }
408
409 type FoldersLocationsService struct {
410 s *Service
411
412 Buckets *FoldersLocationsBucketsService
413
414 Operations *FoldersLocationsOperationsService
415
416 RecentQueries *FoldersLocationsRecentQueriesService
417
418 SavedQueries *FoldersLocationsSavedQueriesService
419 }
420
421 func NewFoldersLocationsBucketsService(s *Service) *FoldersLocationsBucketsService {
422 rs := &FoldersLocationsBucketsService{s: s}
423 rs.Links = NewFoldersLocationsBucketsLinksService(s)
424 rs.Views = NewFoldersLocationsBucketsViewsService(s)
425 return rs
426 }
427
428 type FoldersLocationsBucketsService struct {
429 s *Service
430
431 Links *FoldersLocationsBucketsLinksService
432
433 Views *FoldersLocationsBucketsViewsService
434 }
435
436 func NewFoldersLocationsBucketsLinksService(s *Service) *FoldersLocationsBucketsLinksService {
437 rs := &FoldersLocationsBucketsLinksService{s: s}
438 return rs
439 }
440
441 type FoldersLocationsBucketsLinksService struct {
442 s *Service
443 }
444
445 func NewFoldersLocationsBucketsViewsService(s *Service) *FoldersLocationsBucketsViewsService {
446 rs := &FoldersLocationsBucketsViewsService{s: s}
447 rs.Logs = NewFoldersLocationsBucketsViewsLogsService(s)
448 return rs
449 }
450
451 type FoldersLocationsBucketsViewsService struct {
452 s *Service
453
454 Logs *FoldersLocationsBucketsViewsLogsService
455 }
456
457 func NewFoldersLocationsBucketsViewsLogsService(s *Service) *FoldersLocationsBucketsViewsLogsService {
458 rs := &FoldersLocationsBucketsViewsLogsService{s: s}
459 return rs
460 }
461
462 type FoldersLocationsBucketsViewsLogsService struct {
463 s *Service
464 }
465
466 func NewFoldersLocationsOperationsService(s *Service) *FoldersLocationsOperationsService {
467 rs := &FoldersLocationsOperationsService{s: s}
468 return rs
469 }
470
471 type FoldersLocationsOperationsService struct {
472 s *Service
473 }
474
475 func NewFoldersLocationsRecentQueriesService(s *Service) *FoldersLocationsRecentQueriesService {
476 rs := &FoldersLocationsRecentQueriesService{s: s}
477 return rs
478 }
479
480 type FoldersLocationsRecentQueriesService struct {
481 s *Service
482 }
483
484 func NewFoldersLocationsSavedQueriesService(s *Service) *FoldersLocationsSavedQueriesService {
485 rs := &FoldersLocationsSavedQueriesService{s: s}
486 return rs
487 }
488
489 type FoldersLocationsSavedQueriesService struct {
490 s *Service
491 }
492
493 func NewFoldersLogsService(s *Service) *FoldersLogsService {
494 rs := &FoldersLogsService{s: s}
495 return rs
496 }
497
498 type FoldersLogsService struct {
499 s *Service
500 }
501
502 func NewFoldersSinksService(s *Service) *FoldersSinksService {
503 rs := &FoldersSinksService{s: s}
504 return rs
505 }
506
507 type FoldersSinksService struct {
508 s *Service
509 }
510
511 func NewLocationsService(s *Service) *LocationsService {
512 rs := &LocationsService{s: s}
513 rs.Buckets = NewLocationsBucketsService(s)
514 rs.Operations = NewLocationsOperationsService(s)
515 return rs
516 }
517
518 type LocationsService struct {
519 s *Service
520
521 Buckets *LocationsBucketsService
522
523 Operations *LocationsOperationsService
524 }
525
526 func NewLocationsBucketsService(s *Service) *LocationsBucketsService {
527 rs := &LocationsBucketsService{s: s}
528 rs.Links = NewLocationsBucketsLinksService(s)
529 rs.Views = NewLocationsBucketsViewsService(s)
530 return rs
531 }
532
533 type LocationsBucketsService struct {
534 s *Service
535
536 Links *LocationsBucketsLinksService
537
538 Views *LocationsBucketsViewsService
539 }
540
541 func NewLocationsBucketsLinksService(s *Service) *LocationsBucketsLinksService {
542 rs := &LocationsBucketsLinksService{s: s}
543 return rs
544 }
545
546 type LocationsBucketsLinksService struct {
547 s *Service
548 }
549
550 func NewLocationsBucketsViewsService(s *Service) *LocationsBucketsViewsService {
551 rs := &LocationsBucketsViewsService{s: s}
552 return rs
553 }
554
555 type LocationsBucketsViewsService struct {
556 s *Service
557 }
558
559 func NewLocationsOperationsService(s *Service) *LocationsOperationsService {
560 rs := &LocationsOperationsService{s: s}
561 return rs
562 }
563
564 type LocationsOperationsService struct {
565 s *Service
566 }
567
568 func NewLogsService(s *Service) *LogsService {
569 rs := &LogsService{s: s}
570 return rs
571 }
572
573 type LogsService struct {
574 s *Service
575 }
576
577 func NewMonitoredResourceDescriptorsService(s *Service) *MonitoredResourceDescriptorsService {
578 rs := &MonitoredResourceDescriptorsService{s: s}
579 return rs
580 }
581
582 type MonitoredResourceDescriptorsService struct {
583 s *Service
584 }
585
586 func NewOrganizationsService(s *Service) *OrganizationsService {
587 rs := &OrganizationsService{s: s}
588 rs.Exclusions = NewOrganizationsExclusionsService(s)
589 rs.Locations = NewOrganizationsLocationsService(s)
590 rs.Logs = NewOrganizationsLogsService(s)
591 rs.Sinks = NewOrganizationsSinksService(s)
592 return rs
593 }
594
595 type OrganizationsService struct {
596 s *Service
597
598 Exclusions *OrganizationsExclusionsService
599
600 Locations *OrganizationsLocationsService
601
602 Logs *OrganizationsLogsService
603
604 Sinks *OrganizationsSinksService
605 }
606
607 func NewOrganizationsExclusionsService(s *Service) *OrganizationsExclusionsService {
608 rs := &OrganizationsExclusionsService{s: s}
609 return rs
610 }
611
612 type OrganizationsExclusionsService struct {
613 s *Service
614 }
615
616 func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService {
617 rs := &OrganizationsLocationsService{s: s}
618 rs.Buckets = NewOrganizationsLocationsBucketsService(s)
619 rs.Operations = NewOrganizationsLocationsOperationsService(s)
620 rs.RecentQueries = NewOrganizationsLocationsRecentQueriesService(s)
621 rs.SavedQueries = NewOrganizationsLocationsSavedQueriesService(s)
622 return rs
623 }
624
625 type OrganizationsLocationsService struct {
626 s *Service
627
628 Buckets *OrganizationsLocationsBucketsService
629
630 Operations *OrganizationsLocationsOperationsService
631
632 RecentQueries *OrganizationsLocationsRecentQueriesService
633
634 SavedQueries *OrganizationsLocationsSavedQueriesService
635 }
636
637 func NewOrganizationsLocationsBucketsService(s *Service) *OrganizationsLocationsBucketsService {
638 rs := &OrganizationsLocationsBucketsService{s: s}
639 rs.Links = NewOrganizationsLocationsBucketsLinksService(s)
640 rs.Views = NewOrganizationsLocationsBucketsViewsService(s)
641 return rs
642 }
643
644 type OrganizationsLocationsBucketsService struct {
645 s *Service
646
647 Links *OrganizationsLocationsBucketsLinksService
648
649 Views *OrganizationsLocationsBucketsViewsService
650 }
651
652 func NewOrganizationsLocationsBucketsLinksService(s *Service) *OrganizationsLocationsBucketsLinksService {
653 rs := &OrganizationsLocationsBucketsLinksService{s: s}
654 return rs
655 }
656
657 type OrganizationsLocationsBucketsLinksService struct {
658 s *Service
659 }
660
661 func NewOrganizationsLocationsBucketsViewsService(s *Service) *OrganizationsLocationsBucketsViewsService {
662 rs := &OrganizationsLocationsBucketsViewsService{s: s}
663 rs.Logs = NewOrganizationsLocationsBucketsViewsLogsService(s)
664 return rs
665 }
666
667 type OrganizationsLocationsBucketsViewsService struct {
668 s *Service
669
670 Logs *OrganizationsLocationsBucketsViewsLogsService
671 }
672
673 func NewOrganizationsLocationsBucketsViewsLogsService(s *Service) *OrganizationsLocationsBucketsViewsLogsService {
674 rs := &OrganizationsLocationsBucketsViewsLogsService{s: s}
675 return rs
676 }
677
678 type OrganizationsLocationsBucketsViewsLogsService struct {
679 s *Service
680 }
681
682 func NewOrganizationsLocationsOperationsService(s *Service) *OrganizationsLocationsOperationsService {
683 rs := &OrganizationsLocationsOperationsService{s: s}
684 return rs
685 }
686
687 type OrganizationsLocationsOperationsService struct {
688 s *Service
689 }
690
691 func NewOrganizationsLocationsRecentQueriesService(s *Service) *OrganizationsLocationsRecentQueriesService {
692 rs := &OrganizationsLocationsRecentQueriesService{s: s}
693 return rs
694 }
695
696 type OrganizationsLocationsRecentQueriesService struct {
697 s *Service
698 }
699
700 func NewOrganizationsLocationsSavedQueriesService(s *Service) *OrganizationsLocationsSavedQueriesService {
701 rs := &OrganizationsLocationsSavedQueriesService{s: s}
702 return rs
703 }
704
705 type OrganizationsLocationsSavedQueriesService struct {
706 s *Service
707 }
708
709 func NewOrganizationsLogsService(s *Service) *OrganizationsLogsService {
710 rs := &OrganizationsLogsService{s: s}
711 return rs
712 }
713
714 type OrganizationsLogsService struct {
715 s *Service
716 }
717
718 func NewOrganizationsSinksService(s *Service) *OrganizationsSinksService {
719 rs := &OrganizationsSinksService{s: s}
720 return rs
721 }
722
723 type OrganizationsSinksService struct {
724 s *Service
725 }
726
727 func NewProjectsService(s *Service) *ProjectsService {
728 rs := &ProjectsService{s: s}
729 rs.Exclusions = NewProjectsExclusionsService(s)
730 rs.Locations = NewProjectsLocationsService(s)
731 rs.Logs = NewProjectsLogsService(s)
732 rs.Metrics = NewProjectsMetricsService(s)
733 rs.Sinks = NewProjectsSinksService(s)
734 return rs
735 }
736
737 type ProjectsService struct {
738 s *Service
739
740 Exclusions *ProjectsExclusionsService
741
742 Locations *ProjectsLocationsService
743
744 Logs *ProjectsLogsService
745
746 Metrics *ProjectsMetricsService
747
748 Sinks *ProjectsSinksService
749 }
750
751 func NewProjectsExclusionsService(s *Service) *ProjectsExclusionsService {
752 rs := &ProjectsExclusionsService{s: s}
753 return rs
754 }
755
756 type ProjectsExclusionsService struct {
757 s *Service
758 }
759
760 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
761 rs := &ProjectsLocationsService{s: s}
762 rs.Buckets = NewProjectsLocationsBucketsService(s)
763 rs.Operations = NewProjectsLocationsOperationsService(s)
764 rs.RecentQueries = NewProjectsLocationsRecentQueriesService(s)
765 rs.SavedQueries = NewProjectsLocationsSavedQueriesService(s)
766 return rs
767 }
768
769 type ProjectsLocationsService struct {
770 s *Service
771
772 Buckets *ProjectsLocationsBucketsService
773
774 Operations *ProjectsLocationsOperationsService
775
776 RecentQueries *ProjectsLocationsRecentQueriesService
777
778 SavedQueries *ProjectsLocationsSavedQueriesService
779 }
780
781 func NewProjectsLocationsBucketsService(s *Service) *ProjectsLocationsBucketsService {
782 rs := &ProjectsLocationsBucketsService{s: s}
783 rs.Links = NewProjectsLocationsBucketsLinksService(s)
784 rs.Views = NewProjectsLocationsBucketsViewsService(s)
785 return rs
786 }
787
788 type ProjectsLocationsBucketsService struct {
789 s *Service
790
791 Links *ProjectsLocationsBucketsLinksService
792
793 Views *ProjectsLocationsBucketsViewsService
794 }
795
796 func NewProjectsLocationsBucketsLinksService(s *Service) *ProjectsLocationsBucketsLinksService {
797 rs := &ProjectsLocationsBucketsLinksService{s: s}
798 return rs
799 }
800
801 type ProjectsLocationsBucketsLinksService struct {
802 s *Service
803 }
804
805 func NewProjectsLocationsBucketsViewsService(s *Service) *ProjectsLocationsBucketsViewsService {
806 rs := &ProjectsLocationsBucketsViewsService{s: s}
807 rs.Logs = NewProjectsLocationsBucketsViewsLogsService(s)
808 return rs
809 }
810
811 type ProjectsLocationsBucketsViewsService struct {
812 s *Service
813
814 Logs *ProjectsLocationsBucketsViewsLogsService
815 }
816
817 func NewProjectsLocationsBucketsViewsLogsService(s *Service) *ProjectsLocationsBucketsViewsLogsService {
818 rs := &ProjectsLocationsBucketsViewsLogsService{s: s}
819 return rs
820 }
821
822 type ProjectsLocationsBucketsViewsLogsService struct {
823 s *Service
824 }
825
826 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
827 rs := &ProjectsLocationsOperationsService{s: s}
828 return rs
829 }
830
831 type ProjectsLocationsOperationsService struct {
832 s *Service
833 }
834
835 func NewProjectsLocationsRecentQueriesService(s *Service) *ProjectsLocationsRecentQueriesService {
836 rs := &ProjectsLocationsRecentQueriesService{s: s}
837 return rs
838 }
839
840 type ProjectsLocationsRecentQueriesService struct {
841 s *Service
842 }
843
844 func NewProjectsLocationsSavedQueriesService(s *Service) *ProjectsLocationsSavedQueriesService {
845 rs := &ProjectsLocationsSavedQueriesService{s: s}
846 return rs
847 }
848
849 type ProjectsLocationsSavedQueriesService struct {
850 s *Service
851 }
852
853 func NewProjectsLogsService(s *Service) *ProjectsLogsService {
854 rs := &ProjectsLogsService{s: s}
855 return rs
856 }
857
858 type ProjectsLogsService struct {
859 s *Service
860 }
861
862 func NewProjectsMetricsService(s *Service) *ProjectsMetricsService {
863 rs := &ProjectsMetricsService{s: s}
864 return rs
865 }
866
867 type ProjectsMetricsService struct {
868 s *Service
869 }
870
871 func NewProjectsSinksService(s *Service) *ProjectsSinksService {
872 rs := &ProjectsSinksService{s: s}
873 return rs
874 }
875
876 type ProjectsSinksService struct {
877 s *Service
878 }
879
880 func NewSinksService(s *Service) *SinksService {
881 rs := &SinksService{s: s}
882 return rs
883 }
884
885 type SinksService struct {
886 s *Service
887 }
888
889 func NewV2Service(s *Service) *V2Service {
890 rs := &V2Service{s: s}
891 return rs
892 }
893
894 type V2Service struct {
895 s *Service
896 }
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914 type AuditConfig struct {
915
916 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
917
918
919
920 Service string `json:"service,omitempty"`
921
922
923
924
925
926 ForceSendFields []string `json:"-"`
927
928
929
930
931 NullFields []string `json:"-"`
932 }
933
934 func (s *AuditConfig) MarshalJSON() ([]byte, error) {
935 type NoMethod AuditConfig
936 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
937 }
938
939
940
941
942
943
944 type AuditLogConfig struct {
945
946
947 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
948
949
950
951
952
953
954
955 LogType string `json:"logType,omitempty"`
956
957
958
959
960
961 ForceSendFields []string `json:"-"`
962
963
964
965
966 NullFields []string `json:"-"`
967 }
968
969 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
970 type NoMethod AuditLogConfig
971 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
972 }
973
974
975 type BigQueryDataset struct {
976
977
978
979
980
981 DatasetId string `json:"datasetId,omitempty"`
982
983
984
985
986
987 ForceSendFields []string `json:"-"`
988
989
990
991
992 NullFields []string `json:"-"`
993 }
994
995 func (s *BigQueryDataset) MarshalJSON() ([]byte, error) {
996 type NoMethod BigQueryDataset
997 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
998 }
999
1000
1001
1002 type BigQueryOptions struct {
1003
1004
1005
1006
1007
1008
1009
1010 UsePartitionedTables bool `json:"usePartitionedTables,omitempty"`
1011
1012
1013
1014
1015
1016
1017 UsesTimestampColumnPartitioning bool `json:"usesTimestampColumnPartitioning,omitempty"`
1018
1019
1020
1021
1022
1023 ForceSendFields []string `json:"-"`
1024
1025
1026
1027
1028 NullFields []string `json:"-"`
1029 }
1030
1031 func (s *BigQueryOptions) MarshalJSON() ([]byte, error) {
1032 type NoMethod BigQueryOptions
1033 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1034 }
1035
1036
1037 type Binding struct {
1038
1039
1040
1041
1042
1043
1044
1045
1046 Condition *Expr `json:"condition,omitempty"`
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106 Members []string `json:"members,omitempty"`
1107
1108
1109
1110
1111
1112
1113 Role string `json:"role,omitempty"`
1114
1115
1116
1117
1118
1119 ForceSendFields []string `json:"-"`
1120
1121
1122
1123
1124 NullFields []string `json:"-"`
1125 }
1126
1127 func (s *Binding) MarshalJSON() ([]byte, error) {
1128 type NoMethod Binding
1129 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1130 }
1131
1132
1133 type BucketMetadata struct {
1134
1135 CreateBucketRequest *CreateBucketRequest `json:"createBucketRequest,omitempty"`
1136
1137 EndTime string `json:"endTime,omitempty"`
1138
1139 StartTime string `json:"startTime,omitempty"`
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152 State string `json:"state,omitempty"`
1153
1154 UpdateBucketRequest *UpdateBucketRequest `json:"updateBucketRequest,omitempty"`
1155
1156
1157
1158
1159
1160 ForceSendFields []string `json:"-"`
1161
1162
1163
1164
1165 NullFields []string `json:"-"`
1166 }
1167
1168 func (s *BucketMetadata) MarshalJSON() ([]byte, error) {
1169 type NoMethod BucketMetadata
1170 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1171 }
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187 type BucketOptions struct {
1188
1189 ExplicitBuckets *Explicit `json:"explicitBuckets,omitempty"`
1190
1191 ExponentialBuckets *Exponential `json:"exponentialBuckets,omitempty"`
1192
1193 LinearBuckets *Linear `json:"linearBuckets,omitempty"`
1194
1195
1196
1197
1198
1199 ForceSendFields []string `json:"-"`
1200
1201
1202
1203
1204 NullFields []string `json:"-"`
1205 }
1206
1207 func (s *BucketOptions) MarshalJSON() ([]byte, error) {
1208 type NoMethod BucketOptions
1209 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1210 }
1211
1212
1213 type CancelOperationRequest struct {
1214 }
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224 type CmekSettings struct {
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242 KmsKeyName string `json:"kmsKeyName,omitempty"`
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253 KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"`
1254
1255 Name string `json:"name,omitempty"`
1256
1257
1258
1259
1260
1261
1262
1263
1264 ServiceAccountId string `json:"serviceAccountId,omitempty"`
1265
1266
1267 googleapi.ServerResponse `json:"-"`
1268
1269
1270
1271
1272
1273 ForceSendFields []string `json:"-"`
1274
1275
1276
1277
1278 NullFields []string `json:"-"`
1279 }
1280
1281 func (s *CmekSettings) MarshalJSON() ([]byte, error) {
1282 type NoMethod CmekSettings
1283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1284 }
1285
1286
1287 type CopyLogEntriesMetadata struct {
1288
1289
1290 CancellationRequested bool `json:"cancellationRequested,omitempty"`
1291
1292
1293 Destination string `json:"destination,omitempty"`
1294
1295 EndTime string `json:"endTime,omitempty"`
1296
1297 Progress int64 `json:"progress,omitempty"`
1298
1299 Request *CopyLogEntriesRequest `json:"request,omitempty"`
1300
1301
1302 Source string `json:"source,omitempty"`
1303
1304 StartTime string `json:"startTime,omitempty"`
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317 State string `json:"state,omitempty"`
1318
1319 Verb string `json:"verb,omitempty"`
1320
1321
1322
1323
1324 WriterIdentity string `json:"writerIdentity,omitempty"`
1325
1326
1327
1328
1329
1330 ForceSendFields []string `json:"-"`
1331
1332
1333
1334
1335 NullFields []string `json:"-"`
1336 }
1337
1338 func (s *CopyLogEntriesMetadata) MarshalJSON() ([]byte, error) {
1339 type NoMethod CopyLogEntriesMetadata
1340 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1341 }
1342
1343
1344 type CopyLogEntriesRequest struct {
1345
1346 Destination string `json:"destination,omitempty"`
1347
1348
1349
1350 Filter string `json:"filter,omitempty"`
1351
1352
1353 Name string `json:"name,omitempty"`
1354
1355
1356
1357
1358
1359 ForceSendFields []string `json:"-"`
1360
1361
1362
1363
1364 NullFields []string `json:"-"`
1365 }
1366
1367 func (s *CopyLogEntriesRequest) MarshalJSON() ([]byte, error) {
1368 type NoMethod CopyLogEntriesRequest
1369 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1370 }
1371
1372
1373
1374 type CopyLogEntriesResponse struct {
1375
1376 LogEntriesCopiedCount int64 `json:"logEntriesCopiedCount,omitempty,string"`
1377
1378
1379
1380
1381
1382 ForceSendFields []string `json:"-"`
1383
1384
1385
1386
1387 NullFields []string `json:"-"`
1388 }
1389
1390 func (s *CopyLogEntriesResponse) MarshalJSON() ([]byte, error) {
1391 type NoMethod CopyLogEntriesResponse
1392 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1393 }
1394
1395
1396 type CreateBucketRequest struct {
1397
1398
1399
1400 Bucket *LogBucket `json:"bucket,omitempty"`
1401
1402
1403
1404
1405 BucketId string `json:"bucketId,omitempty"`
1406
1407
1408
1409 Parent string `json:"parent,omitempty"`
1410
1411
1412
1413
1414
1415 ForceSendFields []string `json:"-"`
1416
1417
1418
1419
1420 NullFields []string `json:"-"`
1421 }
1422
1423 func (s *CreateBucketRequest) MarshalJSON() ([]byte, error) {
1424 type NoMethod CreateBucketRequest
1425 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1426 }
1427
1428
1429 type CreateLinkRequest struct {
1430
1431 Link *Link `json:"link,omitempty"`
1432
1433
1434
1435 LinkId string `json:"linkId,omitempty"`
1436
1437
1438
1439
1440
1441
1442 Parent string `json:"parent,omitempty"`
1443
1444
1445
1446
1447
1448 ForceSendFields []string `json:"-"`
1449
1450
1451
1452
1453 NullFields []string `json:"-"`
1454 }
1455
1456 func (s *CreateLinkRequest) MarshalJSON() ([]byte, error) {
1457 type NoMethod CreateLinkRequest
1458 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1459 }
1460
1461
1462
1463
1464 type DefaultSinkConfig struct {
1465
1466
1467 Exclusions []*LogExclusion `json:"exclusions,omitempty"`
1468
1469
1470
1471
1472
1473
1474
1475
1476 Filter string `json:"filter,omitempty"`
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489 Mode string `json:"mode,omitempty"`
1490
1491
1492
1493
1494
1495 ForceSendFields []string `json:"-"`
1496
1497
1498
1499
1500 NullFields []string `json:"-"`
1501 }
1502
1503 func (s *DefaultSinkConfig) MarshalJSON() ([]byte, error) {
1504 type NoMethod DefaultSinkConfig
1505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1506 }
1507
1508
1509 type DeleteLinkRequest struct {
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519 Name string `json:"name,omitempty"`
1520
1521
1522
1523
1524
1525 ForceSendFields []string `json:"-"`
1526
1527
1528
1529
1530 NullFields []string `json:"-"`
1531 }
1532
1533 func (s *DeleteLinkRequest) MarshalJSON() ([]byte, error) {
1534 type NoMethod DeleteLinkRequest
1535 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1536 }
1537
1538
1539
1540
1541
1542 type Empty struct {
1543
1544 googleapi.ServerResponse `json:"-"`
1545 }
1546
1547
1548
1549
1550
1551
1552
1553 type Explicit struct {
1554
1555 Bounds []float64 `json:"bounds,omitempty"`
1556
1557
1558
1559
1560
1561 ForceSendFields []string `json:"-"`
1562
1563
1564
1565
1566 NullFields []string `json:"-"`
1567 }
1568
1569 func (s *Explicit) MarshalJSON() ([]byte, error) {
1570 type NoMethod Explicit
1571 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1572 }
1573
1574 func (s *Explicit) UnmarshalJSON(data []byte) error {
1575 type NoMethod Explicit
1576 var s1 struct {
1577 Bounds []gensupport.JSONFloat64 `json:"bounds"`
1578 *NoMethod
1579 }
1580 s1.NoMethod = (*NoMethod)(s)
1581 if err := json.Unmarshal(data, &s1); err != nil {
1582 return err
1583 }
1584 s.Bounds = make([]float64, len(s1.Bounds))
1585 for i := range s1.Bounds {
1586 s.Bounds[i] = float64(s1.Bounds[i])
1587 }
1588 return nil
1589 }
1590
1591
1592
1593
1594
1595
1596
1597 type Exponential struct {
1598
1599 GrowthFactor float64 `json:"growthFactor,omitempty"`
1600
1601 NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
1602
1603 Scale float64 `json:"scale,omitempty"`
1604
1605
1606
1607
1608
1609 ForceSendFields []string `json:"-"`
1610
1611
1612
1613
1614 NullFields []string `json:"-"`
1615 }
1616
1617 func (s *Exponential) MarshalJSON() ([]byte, error) {
1618 type NoMethod Exponential
1619 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1620 }
1621
1622 func (s *Exponential) UnmarshalJSON(data []byte) error {
1623 type NoMethod Exponential
1624 var s1 struct {
1625 GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"`
1626 Scale gensupport.JSONFloat64 `json:"scale"`
1627 *NoMethod
1628 }
1629 s1.NoMethod = (*NoMethod)(s)
1630 if err := json.Unmarshal(data, &s1); err != nil {
1631 return err
1632 }
1633 s.GrowthFactor = float64(s1.GrowthFactor)
1634 s.Scale = float64(s1.Scale)
1635 return nil
1636 }
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654 type Expr struct {
1655
1656
1657 Description string `json:"description,omitempty"`
1658
1659
1660 Expression string `json:"expression,omitempty"`
1661
1662
1663 Location string `json:"location,omitempty"`
1664
1665
1666
1667 Title string `json:"title,omitempty"`
1668
1669
1670
1671
1672
1673 ForceSendFields []string `json:"-"`
1674
1675
1676
1677
1678 NullFields []string `json:"-"`
1679 }
1680
1681 func (s *Expr) MarshalJSON() ([]byte, error) {
1682 type NoMethod Expr
1683 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1684 }
1685
1686
1687 type GetIamPolicyRequest struct {
1688
1689
1690 Options *GetPolicyOptions `json:"options,omitempty"`
1691
1692
1693
1694
1695
1696 ForceSendFields []string `json:"-"`
1697
1698
1699
1700
1701 NullFields []string `json:"-"`
1702 }
1703
1704 func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1705 type NoMethod GetIamPolicyRequest
1706 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1707 }
1708
1709
1710 type GetPolicyOptions struct {
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
1723
1724
1725
1726
1727
1728 ForceSendFields []string `json:"-"`
1729
1730
1731
1732
1733 NullFields []string `json:"-"`
1734 }
1735
1736 func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
1737 type NoMethod GetPolicyOptions
1738 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1739 }
1740
1741
1742
1743
1744 type HttpRequest struct {
1745
1746
1747 CacheFillBytes int64 `json:"cacheFillBytes,omitempty,string"`
1748
1749
1750 CacheHit bool `json:"cacheHit,omitempty"`
1751
1752 CacheLookup bool `json:"cacheLookup,omitempty"`
1753
1754
1755
1756 CacheValidatedWithOriginServer bool `json:"cacheValidatedWithOriginServer,omitempty"`
1757
1758
1759 Latency string `json:"latency,omitempty"`
1760
1761
1762 Protocol string `json:"protocol,omitempty"`
1763
1764
1765 Referer string `json:"referer,omitempty"`
1766
1767
1768
1769 RemoteIp string `json:"remoteIp,omitempty"`
1770
1771 RequestMethod string `json:"requestMethod,omitempty"`
1772
1773
1774 RequestSize int64 `json:"requestSize,omitempty,string"`
1775
1776
1777
1778 RequestUrl string `json:"requestUrl,omitempty"`
1779
1780
1781 ResponseSize int64 `json:"responseSize,omitempty,string"`
1782
1783
1784
1785 ServerIp string `json:"serverIp,omitempty"`
1786
1787
1788 Status int64 `json:"status,omitempty"`
1789
1790
1791 UserAgent string `json:"userAgent,omitempty"`
1792
1793
1794
1795
1796
1797 ForceSendFields []string `json:"-"`
1798
1799
1800
1801
1802 NullFields []string `json:"-"`
1803 }
1804
1805 func (s *HttpRequest) MarshalJSON() ([]byte, error) {
1806 type NoMethod HttpRequest
1807 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1808 }
1809
1810
1811 type IndexConfig struct {
1812
1813
1814
1815 CreateTime string `json:"createTime,omitempty"`
1816
1817
1818
1819
1820
1821 FieldPath string `json:"fieldPath,omitempty"`
1822
1823
1824
1825
1826
1827
1828 Type string `json:"type,omitempty"`
1829
1830
1831
1832
1833
1834 ForceSendFields []string `json:"-"`
1835
1836
1837
1838
1839 NullFields []string `json:"-"`
1840 }
1841
1842 func (s *IndexConfig) MarshalJSON() ([]byte, error) {
1843 type NoMethod IndexConfig
1844 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1845 }
1846
1847
1848 type LabelDescriptor struct {
1849
1850 Description string `json:"description,omitempty"`
1851
1852 Key string `json:"key,omitempty"`
1853
1854
1855
1856
1857
1858
1859 ValueType string `json:"valueType,omitempty"`
1860
1861
1862
1863
1864
1865 ForceSendFields []string `json:"-"`
1866
1867
1868
1869
1870 NullFields []string `json:"-"`
1871 }
1872
1873 func (s *LabelDescriptor) MarshalJSON() ([]byte, error) {
1874 type NoMethod LabelDescriptor
1875 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1876 }
1877
1878
1879
1880
1881
1882
1883
1884 type Linear struct {
1885
1886 NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
1887
1888 Offset float64 `json:"offset,omitempty"`
1889
1890 Width float64 `json:"width,omitempty"`
1891
1892
1893
1894
1895
1896 ForceSendFields []string `json:"-"`
1897
1898
1899
1900
1901 NullFields []string `json:"-"`
1902 }
1903
1904 func (s *Linear) MarshalJSON() ([]byte, error) {
1905 type NoMethod Linear
1906 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1907 }
1908
1909 func (s *Linear) UnmarshalJSON(data []byte) error {
1910 type NoMethod Linear
1911 var s1 struct {
1912 Offset gensupport.JSONFloat64 `json:"offset"`
1913 Width gensupport.JSONFloat64 `json:"width"`
1914 *NoMethod
1915 }
1916 s1.NoMethod = (*NoMethod)(s)
1917 if err := json.Unmarshal(data, &s1); err != nil {
1918 return err
1919 }
1920 s.Offset = float64(s1.Offset)
1921 s.Width = float64(s1.Width)
1922 return nil
1923 }
1924
1925
1926 type Link struct {
1927
1928
1929
1930
1931 BigqueryDataset *BigQueryDataset `json:"bigqueryDataset,omitempty"`
1932
1933 CreateTime string `json:"createTime,omitempty"`
1934
1935
1936 Description string `json:"description,omitempty"`
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951 LifecycleState string `json:"lifecycleState,omitempty"`
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964 Name string `json:"name,omitempty"`
1965
1966
1967 googleapi.ServerResponse `json:"-"`
1968
1969
1970
1971
1972
1973 ForceSendFields []string `json:"-"`
1974
1975
1976
1977
1978 NullFields []string `json:"-"`
1979 }
1980
1981 func (s *Link) MarshalJSON() ([]byte, error) {
1982 type NoMethod Link
1983 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1984 }
1985
1986
1987 type LinkMetadata struct {
1988
1989 CreateLinkRequest *CreateLinkRequest `json:"createLinkRequest,omitempty"`
1990
1991 DeleteLinkRequest *DeleteLinkRequest `json:"deleteLinkRequest,omitempty"`
1992
1993 EndTime string `json:"endTime,omitempty"`
1994
1995 StartTime string `json:"startTime,omitempty"`
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008 State string `json:"state,omitempty"`
2009
2010
2011
2012
2013
2014 ForceSendFields []string `json:"-"`
2015
2016
2017
2018
2019 NullFields []string `json:"-"`
2020 }
2021
2022 func (s *LinkMetadata) MarshalJSON() ([]byte, error) {
2023 type NoMethod LinkMetadata
2024 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2025 }
2026
2027
2028 type ListBucketsResponse struct {
2029
2030 Buckets []*LogBucket `json:"buckets,omitempty"`
2031
2032
2033
2034 NextPageToken string `json:"nextPageToken,omitempty"`
2035
2036
2037 googleapi.ServerResponse `json:"-"`
2038
2039
2040
2041
2042
2043 ForceSendFields []string `json:"-"`
2044
2045
2046
2047
2048 NullFields []string `json:"-"`
2049 }
2050
2051 func (s *ListBucketsResponse) MarshalJSON() ([]byte, error) {
2052 type NoMethod ListBucketsResponse
2053 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2054 }
2055
2056
2057 type ListExclusionsResponse struct {
2058
2059 Exclusions []*LogExclusion `json:"exclusions,omitempty"`
2060
2061
2062
2063 NextPageToken string `json:"nextPageToken,omitempty"`
2064
2065
2066 googleapi.ServerResponse `json:"-"`
2067
2068
2069
2070
2071
2072 ForceSendFields []string `json:"-"`
2073
2074
2075
2076
2077 NullFields []string `json:"-"`
2078 }
2079
2080 func (s *ListExclusionsResponse) MarshalJSON() ([]byte, error) {
2081 type NoMethod ListExclusionsResponse
2082 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2083 }
2084
2085
2086 type ListLinksResponse struct {
2087
2088 Links []*Link `json:"links,omitempty"`
2089
2090
2091
2092 NextPageToken string `json:"nextPageToken,omitempty"`
2093
2094
2095 googleapi.ServerResponse `json:"-"`
2096
2097
2098
2099
2100
2101 ForceSendFields []string `json:"-"`
2102
2103
2104
2105
2106 NullFields []string `json:"-"`
2107 }
2108
2109 func (s *ListLinksResponse) MarshalJSON() ([]byte, error) {
2110 type NoMethod ListLinksResponse
2111 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2112 }
2113
2114
2115 type ListLocationsResponse struct {
2116
2117
2118 Locations []*Location `json:"locations,omitempty"`
2119
2120 NextPageToken string `json:"nextPageToken,omitempty"`
2121
2122
2123 googleapi.ServerResponse `json:"-"`
2124
2125
2126
2127
2128
2129 ForceSendFields []string `json:"-"`
2130
2131
2132
2133
2134 NullFields []string `json:"-"`
2135 }
2136
2137 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
2138 type NoMethod ListLocationsResponse
2139 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2140 }
2141
2142
2143 type ListLogEntriesRequest struct {
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156 Filter string `json:"filter,omitempty"`
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166 OrderBy string `json:"orderBy,omitempty"`
2167
2168
2169
2170
2171 PageSize int64 `json:"pageSize,omitempty"`
2172
2173
2174
2175
2176 PageToken string `json:"pageToken,omitempty"`
2177
2178
2179
2180 ProjectIds []string `json:"projectIds,omitempty"`
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194 ResourceNames []string `json:"resourceNames,omitempty"`
2195
2196
2197
2198
2199
2200 ForceSendFields []string `json:"-"`
2201
2202
2203
2204
2205 NullFields []string `json:"-"`
2206 }
2207
2208 func (s *ListLogEntriesRequest) MarshalJSON() ([]byte, error) {
2209 type NoMethod ListLogEntriesRequest
2210 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2211 }
2212
2213
2214 type ListLogEntriesResponse struct {
2215
2216
2217
2218 Entries []*LogEntry `json:"entries,omitempty"`
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228 NextPageToken string `json:"nextPageToken,omitempty"`
2229
2230
2231 googleapi.ServerResponse `json:"-"`
2232
2233
2234
2235
2236
2237 ForceSendFields []string `json:"-"`
2238
2239
2240
2241
2242 NullFields []string `json:"-"`
2243 }
2244
2245 func (s *ListLogEntriesResponse) MarshalJSON() ([]byte, error) {
2246 type NoMethod ListLogEntriesResponse
2247 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2248 }
2249
2250
2251 type ListLogMetricsResponse struct {
2252
2253 Metrics []*LogMetric `json:"metrics,omitempty"`
2254
2255
2256
2257 NextPageToken string `json:"nextPageToken,omitempty"`
2258
2259
2260 googleapi.ServerResponse `json:"-"`
2261
2262
2263
2264
2265
2266 ForceSendFields []string `json:"-"`
2267
2268
2269
2270
2271 NullFields []string `json:"-"`
2272 }
2273
2274 func (s *ListLogMetricsResponse) MarshalJSON() ([]byte, error) {
2275 type NoMethod ListLogMetricsResponse
2276 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2277 }
2278
2279
2280 type ListLogsResponse struct {
2281
2282
2283
2284 LogNames []string `json:"logNames,omitempty"`
2285
2286
2287
2288 NextPageToken string `json:"nextPageToken,omitempty"`
2289
2290
2291 googleapi.ServerResponse `json:"-"`
2292
2293
2294
2295
2296
2297 ForceSendFields []string `json:"-"`
2298
2299
2300
2301
2302 NullFields []string `json:"-"`
2303 }
2304
2305 func (s *ListLogsResponse) MarshalJSON() ([]byte, error) {
2306 type NoMethod ListLogsResponse
2307 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2308 }
2309
2310
2311
2312 type ListMonitoredResourceDescriptorsResponse struct {
2313
2314
2315
2316 NextPageToken string `json:"nextPageToken,omitempty"`
2317
2318 ResourceDescriptors []*MonitoredResourceDescriptor `json:"resourceDescriptors,omitempty"`
2319
2320
2321 googleapi.ServerResponse `json:"-"`
2322
2323
2324
2325
2326
2327 ForceSendFields []string `json:"-"`
2328
2329
2330
2331
2332 NullFields []string `json:"-"`
2333 }
2334
2335 func (s *ListMonitoredResourceDescriptorsResponse) MarshalJSON() ([]byte, error) {
2336 type NoMethod ListMonitoredResourceDescriptorsResponse
2337 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2338 }
2339
2340
2341 type ListOperationsResponse struct {
2342
2343 NextPageToken string `json:"nextPageToken,omitempty"`
2344
2345
2346 Operations []*Operation `json:"operations,omitempty"`
2347
2348
2349 googleapi.ServerResponse `json:"-"`
2350
2351
2352
2353
2354
2355 ForceSendFields []string `json:"-"`
2356
2357
2358
2359
2360 NullFields []string `json:"-"`
2361 }
2362
2363 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
2364 type NoMethod ListOperationsResponse
2365 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2366 }
2367
2368
2369 type ListRecentQueriesResponse struct {
2370
2371
2372
2373 NextPageToken string `json:"nextPageToken,omitempty"`
2374
2375 RecentQueries []*RecentQuery `json:"recentQueries,omitempty"`
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385 Unreachable []string `json:"unreachable,omitempty"`
2386
2387
2388 googleapi.ServerResponse `json:"-"`
2389
2390
2391
2392
2393
2394 ForceSendFields []string `json:"-"`
2395
2396
2397
2398
2399 NullFields []string `json:"-"`
2400 }
2401
2402 func (s *ListRecentQueriesResponse) MarshalJSON() ([]byte, error) {
2403 type NoMethod ListRecentQueriesResponse
2404 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2405 }
2406
2407
2408 type ListSavedQueriesResponse struct {
2409
2410
2411
2412 NextPageToken string `json:"nextPageToken,omitempty"`
2413
2414 SavedQueries []*SavedQuery `json:"savedQueries,omitempty"`
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424 Unreachable []string `json:"unreachable,omitempty"`
2425
2426
2427 googleapi.ServerResponse `json:"-"`
2428
2429
2430
2431
2432
2433 ForceSendFields []string `json:"-"`
2434
2435
2436
2437
2438 NullFields []string `json:"-"`
2439 }
2440
2441 func (s *ListSavedQueriesResponse) MarshalJSON() ([]byte, error) {
2442 type NoMethod ListSavedQueriesResponse
2443 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2444 }
2445
2446
2447 type ListSinksResponse struct {
2448
2449
2450
2451 NextPageToken string `json:"nextPageToken,omitempty"`
2452
2453 Sinks []*LogSink `json:"sinks,omitempty"`
2454
2455
2456 googleapi.ServerResponse `json:"-"`
2457
2458
2459
2460
2461
2462 ForceSendFields []string `json:"-"`
2463
2464
2465
2466
2467 NullFields []string `json:"-"`
2468 }
2469
2470 func (s *ListSinksResponse) MarshalJSON() ([]byte, error) {
2471 type NoMethod ListSinksResponse
2472 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2473 }
2474
2475
2476 type ListViewsResponse struct {
2477
2478
2479
2480 NextPageToken string `json:"nextPageToken,omitempty"`
2481
2482 Views []*LogView `json:"views,omitempty"`
2483
2484
2485 googleapi.ServerResponse `json:"-"`
2486
2487
2488
2489
2490
2491 ForceSendFields []string `json:"-"`
2492
2493
2494
2495
2496 NullFields []string `json:"-"`
2497 }
2498
2499 func (s *ListViewsResponse) MarshalJSON() ([]byte, error) {
2500 type NoMethod ListViewsResponse
2501 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2502 }
2503
2504
2505 type Location struct {
2506
2507
2508 DisplayName string `json:"displayName,omitempty"`
2509
2510
2511 Labels map[string]string `json:"labels,omitempty"`
2512
2513 LocationId string `json:"locationId,omitempty"`
2514
2515
2516 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2517
2518
2519 Name string `json:"name,omitempty"`
2520
2521
2522 googleapi.ServerResponse `json:"-"`
2523
2524
2525
2526
2527
2528 ForceSendFields []string `json:"-"`
2529
2530
2531
2532
2533 NullFields []string `json:"-"`
2534 }
2535
2536 func (s *Location) MarshalJSON() ([]byte, error) {
2537 type NoMethod Location
2538 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2539 }
2540
2541
2542 type LocationMetadata struct {
2543
2544
2545 LogAnalyticsEnabled bool `json:"logAnalyticsEnabled,omitempty"`
2546
2547
2548
2549
2550
2551 ForceSendFields []string `json:"-"`
2552
2553
2554
2555
2556 NullFields []string `json:"-"`
2557 }
2558
2559 func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
2560 type NoMethod LocationMetadata
2561 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2562 }
2563
2564
2565 type LogBucket struct {
2566
2567
2568 AnalyticsEnabled bool `json:"analyticsEnabled,omitempty"`
2569
2570
2571
2572
2573
2574 CmekSettings *CmekSettings `json:"cmekSettings,omitempty"`
2575
2576
2577 CreateTime string `json:"createTime,omitempty"`
2578
2579 Description string `json:"description,omitempty"`
2580
2581
2582 IndexConfigs []*IndexConfig `json:"indexConfigs,omitempty"`
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597 LifecycleState string `json:"lifecycleState,omitempty"`
2598
2599
2600
2601 Locked bool `json:"locked,omitempty"`
2602
2603
2604
2605
2606
2607
2608 Name string `json:"name,omitempty"`
2609
2610
2611
2612
2613
2614 RestrictedFields []string `json:"restrictedFields,omitempty"`
2615
2616
2617
2618
2619 RetentionDays int64 `json:"retentionDays,omitempty"`
2620
2621 UpdateTime string `json:"updateTime,omitempty"`
2622
2623
2624 googleapi.ServerResponse `json:"-"`
2625
2626
2627
2628
2629
2630 ForceSendFields []string `json:"-"`
2631
2632
2633
2634
2635 NullFields []string `json:"-"`
2636 }
2637
2638 func (s *LogBucket) MarshalJSON() ([]byte, error) {
2639 type NoMethod LogBucket
2640 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2641 }
2642
2643
2644 type LogEntry struct {
2645
2646
2647
2648
2649
2650
2651
2652 ErrorGroups []*LogErrorGroup `json:"errorGroups,omitempty"`
2653
2654
2655 HttpRequest *HttpRequest `json:"httpRequest,omitempty"`
2656
2657
2658
2659
2660
2661
2662
2663
2664 InsertId string `json:"insertId,omitempty"`
2665
2666
2667 JsonPayload googleapi.RawMessage `json:"jsonPayload,omitempty"`
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678 Labels map[string]string `json:"labels,omitempty"`
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695 LogName string `json:"logName,omitempty"`
2696
2697
2698 Metadata *MonitoredResourceMetadata `json:"metadata,omitempty"`
2699
2700
2701 Operation *LogEntryOperation `json:"operation,omitempty"`
2702
2703
2704
2705
2706
2707 ProtoPayload googleapi.RawMessage `json:"protoPayload,omitempty"`
2708
2709
2710 ReceiveTimestamp string `json:"receiveTimestamp,omitempty"`
2711
2712
2713
2714
2715 Resource *MonitoredResource `json:"resource,omitempty"`
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730 Severity string `json:"severity,omitempty"`
2731
2732
2733 SourceLocation *LogEntrySourceLocation `json:"sourceLocation,omitempty"`
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753 SpanId string `json:"spanId,omitempty"`
2754
2755
2756 Split *LogSplit `json:"split,omitempty"`
2757
2758 TextPayload string `json:"textPayload,omitempty"`
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769 Timestamp string `json:"timestamp,omitempty"`
2770
2771
2772
2773
2774
2775
2776
2777
2778 Trace string `json:"trace,omitempty"`
2779
2780
2781
2782
2783
2784
2785 TraceSampled bool `json:"traceSampled,omitempty"`
2786
2787
2788
2789
2790
2791 ForceSendFields []string `json:"-"`
2792
2793
2794
2795
2796 NullFields []string `json:"-"`
2797 }
2798
2799 func (s *LogEntry) MarshalJSON() ([]byte, error) {
2800 type NoMethod LogEntry
2801 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2802 }
2803
2804
2805
2806 type LogEntryOperation struct {
2807
2808
2809 First bool `json:"first,omitempty"`
2810
2811
2812 Id string `json:"id,omitempty"`
2813
2814
2815 Last bool `json:"last,omitempty"`
2816
2817
2818
2819 Producer string `json:"producer,omitempty"`
2820
2821
2822
2823
2824
2825 ForceSendFields []string `json:"-"`
2826
2827
2828
2829
2830 NullFields []string `json:"-"`
2831 }
2832
2833 func (s *LogEntryOperation) MarshalJSON() ([]byte, error) {
2834 type NoMethod LogEntryOperation
2835 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2836 }
2837
2838
2839
2840 type LogEntrySourceLocation struct {
2841
2842
2843 File string `json:"file,omitempty"`
2844
2845
2846
2847
2848
2849
2850 Function string `json:"function,omitempty"`
2851
2852
2853 Line int64 `json:"line,omitempty,string"`
2854
2855
2856
2857
2858
2859 ForceSendFields []string `json:"-"`
2860
2861
2862
2863
2864 NullFields []string `json:"-"`
2865 }
2866
2867 func (s *LogEntrySourceLocation) MarshalJSON() ([]byte, error) {
2868 type NoMethod LogEntrySourceLocation
2869 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2870 }
2871
2872
2873
2874 type LogErrorGroup struct {
2875
2876
2877
2878
2879
2880
2881 Id string `json:"id,omitempty"`
2882
2883
2884
2885
2886
2887 ForceSendFields []string `json:"-"`
2888
2889
2890
2891
2892 NullFields []string `json:"-"`
2893 }
2894
2895 func (s *LogErrorGroup) MarshalJSON() ([]byte, error) {
2896 type NoMethod LogErrorGroup
2897 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2898 }
2899
2900
2901
2902
2903
2904
2905 type LogExclusion struct {
2906
2907
2908 CreateTime string `json:"createTime,omitempty"`
2909
2910 Description string `json:"description,omitempty"`
2911
2912
2913
2914 Disabled bool `json:"disabled,omitempty"`
2915
2916
2917
2918
2919
2920
2921
2922
2923 Filter string `json:"filter,omitempty"`
2924
2925
2926
2927
2928 Name string `json:"name,omitempty"`
2929
2930
2931 UpdateTime string `json:"updateTime,omitempty"`
2932
2933
2934 googleapi.ServerResponse `json:"-"`
2935
2936
2937
2938
2939
2940 ForceSendFields []string `json:"-"`
2941
2942
2943
2944
2945 NullFields []string `json:"-"`
2946 }
2947
2948 func (s *LogExclusion) MarshalJSON() ([]byte, error) {
2949 type NoMethod LogExclusion
2950 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2951 }
2952
2953
2954 type LogLine struct {
2955
2956 LogMessage string `json:"logMessage,omitempty"`
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970 Severity string `json:"severity,omitempty"`
2971
2972 SourceLocation *SourceLocation `json:"sourceLocation,omitempty"`
2973
2974 Time string `json:"time,omitempty"`
2975
2976
2977
2978
2979
2980 ForceSendFields []string `json:"-"`
2981
2982
2983
2984
2985 NullFields []string `json:"-"`
2986 }
2987
2988 func (s *LogLine) MarshalJSON() ([]byte, error) {
2989 type NoMethod LogLine
2990 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2991 }
2992
2993
2994
2995
2996
2997
2998
2999 type LogMetric struct {
3000
3001
3002
3003
3004
3005 BucketName string `json:"bucketName,omitempty"`
3006
3007
3008
3009 BucketOptions *BucketOptions `json:"bucketOptions,omitempty"`
3010
3011
3012 CreateTime string `json:"createTime,omitempty"`
3013
3014
3015 Description string `json:"description,omitempty"`
3016
3017
3018 Disabled bool `json:"disabled,omitempty"`
3019
3020
3021
3022
3023 Filter string `json:"filter,omitempty"`
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035 LabelExtractors map[string]string `json:"labelExtractors,omitempty"`
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050 MetricDescriptor *MetricDescriptor `json:"metricDescriptor,omitempty"`
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060 Name string `json:"name,omitempty"`
3061
3062
3063 ResourceName string `json:"resourceName,omitempty"`
3064
3065
3066 UpdateTime string `json:"updateTime,omitempty"`
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081 ValueExtractor string `json:"valueExtractor,omitempty"`
3082
3083
3084
3085
3086
3087
3088 Version string `json:"version,omitempty"`
3089
3090
3091 googleapi.ServerResponse `json:"-"`
3092
3093
3094
3095
3096
3097 ForceSendFields []string `json:"-"`
3098
3099
3100
3101
3102 NullFields []string `json:"-"`
3103 }
3104
3105 func (s *LogMetric) MarshalJSON() ([]byte, error) {
3106 type NoMethod LogMetric
3107 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3108 }
3109
3110
3111
3112
3113
3114
3115 type LogSink struct {
3116
3117
3118 BigqueryOptions *BigQueryOptions `json:"bigqueryOptions,omitempty"`
3119
3120
3121 CreateTime string `json:"createTime,omitempty"`
3122
3123
3124 Description string `json:"description,omitempty"`
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135 Destination string `json:"destination,omitempty"`
3136
3137
3138 Disabled bool `json:"disabled,omitempty"`
3139
3140
3141
3142 Exclusions []*LogExclusion `json:"exclusions,omitempty"`
3143
3144
3145
3146
3147
3148 Filter string `json:"filter,omitempty"`
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161 IncludeChildren bool `json:"includeChildren,omitempty"`
3162
3163
3164
3165
3166
3167
3168
3169
3170 InterceptChildren bool `json:"interceptChildren,omitempty"`
3171
3172
3173
3174
3175
3176 Name string `json:"name,omitempty"`
3177
3178
3179
3180
3181
3182
3183
3184 OutputVersionFormat string `json:"outputVersionFormat,omitempty"`
3185
3186
3187
3188
3189
3190
3191 ResourceName string `json:"resourceName,omitempty"`
3192
3193
3194 UpdateTime string `json:"updateTime,omitempty"`
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208 WriterIdentity string `json:"writerIdentity,omitempty"`
3209
3210
3211 googleapi.ServerResponse `json:"-"`
3212
3213
3214
3215
3216
3217 ForceSendFields []string `json:"-"`
3218
3219
3220
3221
3222 NullFields []string `json:"-"`
3223 }
3224
3225 func (s *LogSink) MarshalJSON() ([]byte, error) {
3226 type NoMethod LogSink
3227 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3228 }
3229
3230
3231
3232
3233 type LogSplit struct {
3234
3235
3236
3237 Index int64 `json:"index,omitempty"`
3238
3239
3240 TotalSplits int64 `json:"totalSplits,omitempty"`
3241
3242
3243
3244 Uid string `json:"uid,omitempty"`
3245
3246
3247
3248
3249
3250 ForceSendFields []string `json:"-"`
3251
3252
3253
3254
3255 NullFields []string `json:"-"`
3256 }
3257
3258 func (s *LogSplit) MarshalJSON() ([]byte, error) {
3259 type NoMethod LogSplit
3260 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3261 }
3262
3263
3264 type LogView struct {
3265
3266 CreateTime string `json:"createTime,omitempty"`
3267
3268 Description string `json:"description,omitempty"`
3269
3270
3271
3272
3273
3274
3275
3276
3277 Filter string `json:"filter,omitempty"`
3278
3279
3280 Name string `json:"name,omitempty"`
3281
3282 UpdateTime string `json:"updateTime,omitempty"`
3283
3284
3285 googleapi.ServerResponse `json:"-"`
3286
3287
3288
3289
3290
3291 ForceSendFields []string `json:"-"`
3292
3293
3294
3295
3296 NullFields []string `json:"-"`
3297 }
3298
3299 func (s *LogView) MarshalJSON() ([]byte, error) {
3300 type NoMethod LogView
3301 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3302 }
3303
3304
3305
3306
3307
3308 type LoggingQuery struct {
3309
3310
3311
3312 Filter string `json:"filter,omitempty"`
3313
3314 SummaryFieldEnd int64 `json:"summaryFieldEnd,omitempty"`
3315
3316 SummaryFieldStart int64 `json:"summaryFieldStart,omitempty"`
3317
3318
3319 SummaryFields []*SummaryField `json:"summaryFields,omitempty"`
3320
3321
3322
3323
3324
3325 ForceSendFields []string `json:"-"`
3326
3327
3328
3329
3330 NullFields []string `json:"-"`
3331 }
3332
3333 func (s *LoggingQuery) MarshalJSON() ([]byte, error) {
3334 type NoMethod LoggingQuery
3335 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3336 }
3337
3338
3339
3340
3341 type MetricDescriptor struct {
3342
3343
3344 Description string `json:"description,omitempty"`
3345
3346
3347
3348
3349 DisplayName string `json:"displayName,omitempty"`
3350
3351
3352
3353
3354
3355 Labels []*LabelDescriptor `json:"labels,omitempty"`
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390 LaunchStage string `json:"launchStage,omitempty"`
3391
3392 Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"`
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405 MetricKind string `json:"metricKind,omitempty"`
3406
3407
3408
3409
3410 MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"`
3411
3412 Name string `json:"name,omitempty"`
3413
3414
3415
3416
3417
3418
3419
3420 Type string `json:"type,omitempty"`
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466 Unit string `json:"unit,omitempty"`
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480 ValueType string `json:"valueType,omitempty"`
3481
3482
3483
3484
3485
3486 ForceSendFields []string `json:"-"`
3487
3488
3489
3490
3491 NullFields []string `json:"-"`
3492 }
3493
3494 func (s *MetricDescriptor) MarshalJSON() ([]byte, error) {
3495 type NoMethod MetricDescriptor
3496 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3497 }
3498
3499
3500
3501 type MetricDescriptorMetadata struct {
3502
3503
3504
3505 IngestDelay string `json:"ingestDelay,omitempty"`
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540 LaunchStage string `json:"launchStage,omitempty"`
3541
3542
3543
3544
3545 SamplePeriod string `json:"samplePeriod,omitempty"`
3546
3547
3548
3549
3550
3551 ForceSendFields []string `json:"-"`
3552
3553
3554
3555
3556 NullFields []string `json:"-"`
3557 }
3558
3559 func (s *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) {
3560 type NoMethod MetricDescriptorMetadata
3561 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3562 }
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575 type MonitoredResource struct {
3576
3577
3578
3579 Labels map[string]string `json:"labels,omitempty"`
3580
3581
3582
3583
3584
3585 Type string `json:"type,omitempty"`
3586
3587
3588
3589
3590
3591 ForceSendFields []string `json:"-"`
3592
3593
3594
3595
3596 NullFields []string `json:"-"`
3597 }
3598
3599 func (s *MonitoredResource) MarshalJSON() ([]byte, error) {
3600 type NoMethod MonitoredResource
3601 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3602 }
3603
3604
3605
3606
3607
3608
3609
3610
3611 type MonitoredResourceDescriptor struct {
3612
3613
3614 Description string `json:"description,omitempty"`
3615
3616
3617
3618
3619 DisplayName string `json:"displayName,omitempty"`
3620
3621
3622
3623 Labels []*LabelDescriptor `json:"labels,omitempty"`
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659 LaunchStage string `json:"launchStage,omitempty"`
3660
3661
3662
3663
3664
3665
3666 Name string `json:"name,omitempty"`
3667
3668
3669
3670
3671
3672 Type string `json:"type,omitempty"`
3673
3674
3675
3676
3677
3678 ForceSendFields []string `json:"-"`
3679
3680
3681
3682
3683 NullFields []string `json:"-"`
3684 }
3685
3686 func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
3687 type NoMethod MonitoredResourceDescriptor
3688 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3689 }
3690
3691
3692
3693
3694
3695
3696
3697 type MonitoredResourceMetadata struct {
3698
3699
3700
3701
3702
3703
3704 SystemLabels googleapi.RawMessage `json:"systemLabels,omitempty"`
3705
3706 UserLabels map[string]string `json:"userLabels,omitempty"`
3707
3708
3709
3710
3711
3712 ForceSendFields []string `json:"-"`
3713
3714
3715
3716
3717 NullFields []string `json:"-"`
3718 }
3719
3720 func (s *MonitoredResourceMetadata) MarshalJSON() ([]byte, error) {
3721 type NoMethod MonitoredResourceMetadata
3722 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3723 }
3724
3725
3726
3727 type Operation struct {
3728
3729
3730 Done bool `json:"done,omitempty"`
3731
3732 Error *Status `json:"error,omitempty"`
3733
3734
3735
3736
3737 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3738
3739
3740
3741 Name string `json:"name,omitempty"`
3742
3743
3744
3745
3746
3747
3748
3749 Response googleapi.RawMessage `json:"response,omitempty"`
3750
3751
3752 googleapi.ServerResponse `json:"-"`
3753
3754
3755
3756
3757
3758 ForceSendFields []string `json:"-"`
3759
3760
3761
3762
3763 NullFields []string `json:"-"`
3764 }
3765
3766 func (s *Operation) MarshalJSON() ([]byte, error) {
3767 type NoMethod Operation
3768 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3769 }
3770
3771
3772
3773
3774 type OpsAnalyticsQuery struct {
3775
3776
3777
3778 SqlQueryText string `json:"sqlQueryText,omitempty"`
3779
3780
3781
3782
3783
3784 ForceSendFields []string `json:"-"`
3785
3786
3787
3788
3789 NullFields []string `json:"-"`
3790 }
3791
3792 func (s *OpsAnalyticsQuery) MarshalJSON() ([]byte, error) {
3793 type NoMethod OpsAnalyticsQuery
3794 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3795 }
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826 type Policy struct {
3827
3828 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
3829
3830
3831
3832
3833
3834
3835
3836
3837 Bindings []*Binding `json:"bindings,omitempty"`
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849 Etag string `json:"etag,omitempty"`
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865 Version int64 `json:"version,omitempty"`
3866
3867
3868 googleapi.ServerResponse `json:"-"`
3869
3870
3871
3872
3873
3874 ForceSendFields []string `json:"-"`
3875
3876
3877
3878
3879 NullFields []string `json:"-"`
3880 }
3881
3882 func (s *Policy) MarshalJSON() ([]byte, error) {
3883 type NoMethod Policy
3884 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3885 }
3886
3887
3888
3889 type RecentQuery struct {
3890
3891 LastRunTime string `json:"lastRunTime,omitempty"`
3892
3893
3894 LoggingQuery *LoggingQuery `json:"loggingQuery,omitempty"`
3895
3896
3897
3898
3899
3900 Name string `json:"name,omitempty"`
3901
3902 OpsAnalyticsQuery *OpsAnalyticsQuery `json:"opsAnalyticsQuery,omitempty"`
3903
3904
3905
3906
3907
3908 ForceSendFields []string `json:"-"`
3909
3910
3911
3912
3913 NullFields []string `json:"-"`
3914 }
3915
3916 func (s *RecentQuery) MarshalJSON() ([]byte, error) {
3917 type NoMethod RecentQuery
3918 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3919 }
3920
3921
3922
3923 type RequestLog struct {
3924
3925 AppEngineRelease string `json:"appEngineRelease,omitempty"`
3926
3927 AppId string `json:"appId,omitempty"`
3928
3929 Cost float64 `json:"cost,omitempty"`
3930
3931 EndTime string `json:"endTime,omitempty"`
3932
3933 Finished bool `json:"finished,omitempty"`
3934
3935
3936
3937 First bool `json:"first,omitempty"`
3938
3939 Host string `json:"host,omitempty"`
3940
3941 HttpVersion string `json:"httpVersion,omitempty"`
3942
3943 InstanceId string `json:"instanceId,omitempty"`
3944
3945
3946
3947 InstanceIndex int64 `json:"instanceIndex,omitempty"`
3948
3949 Ip string `json:"ip,omitempty"`
3950
3951 Latency string `json:"latency,omitempty"`
3952
3953
3954 Line []*LogLine `json:"line,omitempty"`
3955
3956 MegaCycles int64 `json:"megaCycles,omitempty,string"`
3957
3958 Method string `json:"method,omitempty"`
3959
3960 ModuleId string `json:"moduleId,omitempty"`
3961
3962
3963
3964
3965
3966
3967 Nickname string `json:"nickname,omitempty"`
3968
3969 PendingTime string `json:"pendingTime,omitempty"`
3970
3971 Referrer string `json:"referrer,omitempty"`
3972
3973
3974
3975 RequestId string `json:"requestId,omitempty"`
3976
3977
3978
3979
3980 Resource string `json:"resource,omitempty"`
3981
3982 ResponseSize int64 `json:"responseSize,omitempty,string"`
3983
3984
3985
3986 SourceReference []*SourceReference `json:"sourceReference,omitempty"`
3987
3988 SpanId string `json:"spanId,omitempty"`
3989
3990 StartTime string `json:"startTime,omitempty"`
3991
3992 Status int64 `json:"status,omitempty"`
3993
3994 TaskName string `json:"taskName,omitempty"`
3995
3996 TaskQueueName string `json:"taskQueueName,omitempty"`
3997
3998 TraceId string `json:"traceId,omitempty"`
3999
4000
4001 TraceSampled bool `json:"traceSampled,omitempty"`
4002
4003 UrlMapEntry string `json:"urlMapEntry,omitempty"`
4004
4005 UserAgent string `json:"userAgent,omitempty"`
4006
4007 VersionId string `json:"versionId,omitempty"`
4008
4009 WasLoadingRequest bool `json:"wasLoadingRequest,omitempty"`
4010
4011
4012
4013
4014
4015 ForceSendFields []string `json:"-"`
4016
4017
4018
4019
4020 NullFields []string `json:"-"`
4021 }
4022
4023 func (s *RequestLog) MarshalJSON() ([]byte, error) {
4024 type NoMethod RequestLog
4025 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4026 }
4027
4028 func (s *RequestLog) UnmarshalJSON(data []byte) error {
4029 type NoMethod RequestLog
4030 var s1 struct {
4031 Cost gensupport.JSONFloat64 `json:"cost"`
4032 *NoMethod
4033 }
4034 s1.NoMethod = (*NoMethod)(s)
4035 if err := json.Unmarshal(data, &s1); err != nil {
4036 return err
4037 }
4038 s.Cost = float64(s1.Cost)
4039 return nil
4040 }
4041
4042
4043 type SavedQuery struct {
4044
4045 CreateTime string `json:"createTime,omitempty"`
4046
4047 Description string `json:"description,omitempty"`
4048
4049 DisplayName string `json:"displayName,omitempty"`
4050
4051
4052 LoggingQuery *LoggingQuery `json:"loggingQuery,omitempty"`
4053
4054
4055
4056
4057
4058
4059 Name string `json:"name,omitempty"`
4060
4061 OpsAnalyticsQuery *OpsAnalyticsQuery `json:"opsAnalyticsQuery,omitempty"`
4062
4063
4064 UpdateTime string `json:"updateTime,omitempty"`
4065
4066
4067
4068
4069
4070
4071
4072
4073 Visibility string `json:"visibility,omitempty"`
4074
4075
4076 googleapi.ServerResponse `json:"-"`
4077
4078
4079
4080
4081
4082 ForceSendFields []string `json:"-"`
4083
4084
4085
4086
4087 NullFields []string `json:"-"`
4088 }
4089
4090 func (s *SavedQuery) MarshalJSON() ([]byte, error) {
4091 type NoMethod SavedQuery
4092 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4093 }
4094
4095
4096 type SetIamPolicyRequest struct {
4097
4098
4099
4100
4101 Policy *Policy `json:"policy,omitempty"`
4102
4103
4104
4105 UpdateMask string `json:"updateMask,omitempty"`
4106
4107
4108
4109
4110
4111 ForceSendFields []string `json:"-"`
4112
4113
4114
4115
4116 NullFields []string `json:"-"`
4117 }
4118
4119 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
4120 type NoMethod SetIamPolicyRequest
4121 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4122 }
4123
4124
4125
4126 type Settings struct {
4127
4128
4129 DefaultSinkConfig *DefaultSinkConfig `json:"defaultSinkConfig,omitempty"`
4130
4131
4132
4133
4134
4135 DisableDefaultSink bool `json:"disableDefaultSink,omitempty"`
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149 KmsKeyName string `json:"kmsKeyName,omitempty"`
4150
4151
4152
4153
4154
4155
4156
4157 KmsServiceAccountId string `json:"kmsServiceAccountId,omitempty"`
4158
4159
4160
4161
4162 LoggingServiceAccountId string `json:"loggingServiceAccountId,omitempty"`
4163
4164 Name string `json:"name,omitempty"`
4165
4166
4167
4168
4169
4170 StorageLocation string `json:"storageLocation,omitempty"`
4171
4172
4173 googleapi.ServerResponse `json:"-"`
4174
4175
4176
4177
4178
4179 ForceSendFields []string `json:"-"`
4180
4181
4182
4183
4184 NullFields []string `json:"-"`
4185 }
4186
4187 func (s *Settings) MarshalJSON() ([]byte, error) {
4188 type NoMethod Settings
4189 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4190 }
4191
4192
4193 type SourceLocation struct {
4194
4195
4196 File string `json:"file,omitempty"`
4197
4198
4199
4200
4201
4202 FunctionName string `json:"functionName,omitempty"`
4203
4204 Line int64 `json:"line,omitempty,string"`
4205
4206
4207
4208
4209
4210 ForceSendFields []string `json:"-"`
4211
4212
4213
4214
4215 NullFields []string `json:"-"`
4216 }
4217
4218 func (s *SourceLocation) MarshalJSON() ([]byte, error) {
4219 type NoMethod SourceLocation
4220 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4221 }
4222
4223
4224
4225 type SourceReference struct {
4226
4227
4228 Repository string `json:"repository,omitempty"`
4229
4230
4231 RevisionId string `json:"revisionId,omitempty"`
4232
4233
4234
4235
4236
4237 ForceSendFields []string `json:"-"`
4238
4239
4240
4241
4242 NullFields []string `json:"-"`
4243 }
4244
4245 func (s *SourceReference) MarshalJSON() ([]byte, error) {
4246 type NoMethod SourceReference
4247 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4248 }
4249
4250
4251
4252
4253
4254
4255
4256 type Status struct {
4257
4258 Code int64 `json:"code,omitempty"`
4259
4260
4261 Details []googleapi.RawMessage `json:"details,omitempty"`
4262
4263
4264
4265 Message string `json:"message,omitempty"`
4266
4267
4268
4269
4270
4271 ForceSendFields []string `json:"-"`
4272
4273
4274
4275
4276 NullFields []string `json:"-"`
4277 }
4278
4279 func (s *Status) MarshalJSON() ([]byte, error) {
4280 type NoMethod Status
4281 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4282 }
4283
4284
4285
4286
4287 type SummaryField struct {
4288
4289
4290 Field string `json:"field,omitempty"`
4291
4292
4293
4294
4295
4296 ForceSendFields []string `json:"-"`
4297
4298
4299
4300
4301 NullFields []string `json:"-"`
4302 }
4303
4304 func (s *SummaryField) MarshalJSON() ([]byte, error) {
4305 type NoMethod SummaryField
4306 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4307 }
4308
4309
4310
4311 type SuppressionInfo struct {
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321 Reason string `json:"reason,omitempty"`
4322
4323
4324 SuppressedCount int64 `json:"suppressedCount,omitempty"`
4325
4326
4327
4328
4329
4330 ForceSendFields []string `json:"-"`
4331
4332
4333
4334
4335 NullFields []string `json:"-"`
4336 }
4337
4338 func (s *SuppressionInfo) MarshalJSON() ([]byte, error) {
4339 type NoMethod SuppressionInfo
4340 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4341 }
4342
4343
4344 type TailLogEntriesRequest struct {
4345
4346
4347
4348
4349 BufferWindow string `json:"bufferWindow,omitempty"`
4350
4351
4352
4353
4354
4355 Filter string `json:"filter,omitempty"`
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368 ResourceNames []string `json:"resourceNames,omitempty"`
4369
4370
4371
4372
4373
4374 ForceSendFields []string `json:"-"`
4375
4376
4377
4378
4379 NullFields []string `json:"-"`
4380 }
4381
4382 func (s *TailLogEntriesRequest) MarshalJSON() ([]byte, error) {
4383 type NoMethod TailLogEntriesRequest
4384 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4385 }
4386
4387
4388 type TailLogEntriesResponse struct {
4389
4390
4391
4392 Entries []*LogEntry `json:"entries,omitempty"`
4393
4394
4395
4396
4397
4398 SuppressionInfo []*SuppressionInfo `json:"suppressionInfo,omitempty"`
4399
4400
4401 googleapi.ServerResponse `json:"-"`
4402
4403
4404
4405
4406
4407 ForceSendFields []string `json:"-"`
4408
4409
4410
4411
4412 NullFields []string `json:"-"`
4413 }
4414
4415 func (s *TailLogEntriesResponse) MarshalJSON() ([]byte, error) {
4416 type NoMethod TailLogEntriesResponse
4417 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4418 }
4419
4420
4421 type TestIamPermissionsRequest struct {
4422
4423
4424
4425
4426 Permissions []string `json:"permissions,omitempty"`
4427
4428
4429
4430
4431
4432 ForceSendFields []string `json:"-"`
4433
4434
4435
4436
4437 NullFields []string `json:"-"`
4438 }
4439
4440 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
4441 type NoMethod TestIamPermissionsRequest
4442 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4443 }
4444
4445
4446 type TestIamPermissionsResponse struct {
4447
4448
4449 Permissions []string `json:"permissions,omitempty"`
4450
4451
4452 googleapi.ServerResponse `json:"-"`
4453
4454
4455
4456
4457
4458 ForceSendFields []string `json:"-"`
4459
4460
4461
4462
4463 NullFields []string `json:"-"`
4464 }
4465
4466 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
4467 type NoMethod TestIamPermissionsResponse
4468 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4469 }
4470
4471
4472 type UndeleteBucketRequest struct {
4473 }
4474
4475
4476 type UpdateBucketRequest struct {
4477
4478 Bucket *LogBucket `json:"bucket,omitempty"`
4479
4480
4481
4482
4483
4484
4485
4486 Name string `json:"name,omitempty"`
4487
4488
4489
4490
4491
4492
4493 UpdateMask string `json:"updateMask,omitempty"`
4494
4495
4496
4497
4498
4499 ForceSendFields []string `json:"-"`
4500
4501
4502
4503
4504 NullFields []string `json:"-"`
4505 }
4506
4507 func (s *UpdateBucketRequest) MarshalJSON() ([]byte, error) {
4508 type NoMethod UpdateBucketRequest
4509 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4510 }
4511
4512
4513 type WriteLogEntriesRequest struct {
4514
4515
4516
4517 DryRun bool `json:"dryRun,omitempty"`
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536 Entries []*LogEntry `json:"entries,omitempty"`
4537
4538
4539
4540
4541 Labels map[string]string `json:"labels,omitempty"`
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553 LogName string `json:"logName,omitempty"`
4554
4555
4556
4557
4558
4559
4560
4561
4562 PartialSuccess bool `json:"partialSuccess,omitempty"`
4563
4564
4565
4566
4567 Resource *MonitoredResource `json:"resource,omitempty"`
4568
4569
4570
4571
4572
4573 ForceSendFields []string `json:"-"`
4574
4575
4576
4577
4578 NullFields []string `json:"-"`
4579 }
4580
4581 func (s *WriteLogEntriesRequest) MarshalJSON() ([]byte, error) {
4582 type NoMethod WriteLogEntriesRequest
4583 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4584 }
4585
4586
4587 type WriteLogEntriesResponse struct {
4588
4589 googleapi.ServerResponse `json:"-"`
4590 }
4591
4592 type BillingAccountsGetCmekSettingsCall struct {
4593 s *Service
4594 name string
4595 urlParams_ gensupport.URLParams
4596 ifNoneMatch_ string
4597 ctx_ context.Context
4598 header_ http.Header
4599 }
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618 func (r *BillingAccountsService) GetCmekSettings(name string) *BillingAccountsGetCmekSettingsCall {
4619 c := &BillingAccountsGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4620 c.name = name
4621 return c
4622 }
4623
4624
4625
4626
4627 func (c *BillingAccountsGetCmekSettingsCall) Fields(s ...googleapi.Field) *BillingAccountsGetCmekSettingsCall {
4628 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4629 return c
4630 }
4631
4632
4633
4634
4635 func (c *BillingAccountsGetCmekSettingsCall) IfNoneMatch(entityTag string) *BillingAccountsGetCmekSettingsCall {
4636 c.ifNoneMatch_ = entityTag
4637 return c
4638 }
4639
4640
4641 func (c *BillingAccountsGetCmekSettingsCall) Context(ctx context.Context) *BillingAccountsGetCmekSettingsCall {
4642 c.ctx_ = ctx
4643 return c
4644 }
4645
4646
4647
4648 func (c *BillingAccountsGetCmekSettingsCall) Header() http.Header {
4649 if c.header_ == nil {
4650 c.header_ = make(http.Header)
4651 }
4652 return c.header_
4653 }
4654
4655 func (c *BillingAccountsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
4656 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4657 if c.ifNoneMatch_ != "" {
4658 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4659 }
4660 var body io.Reader = nil
4661 c.urlParams_.Set("alt", alt)
4662 c.urlParams_.Set("prettyPrint", "false")
4663 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
4664 urls += "?" + c.urlParams_.Encode()
4665 req, err := http.NewRequest("GET", urls, body)
4666 if err != nil {
4667 return nil, err
4668 }
4669 req.Header = reqHeaders
4670 googleapi.Expand(req.URL, map[string]string{
4671 "name": c.name,
4672 })
4673 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4674 }
4675
4676
4677
4678
4679
4680
4681 func (c *BillingAccountsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
4682 gensupport.SetOptions(c.urlParams_, opts...)
4683 res, err := c.doRequest("json")
4684 if res != nil && res.StatusCode == http.StatusNotModified {
4685 if res.Body != nil {
4686 res.Body.Close()
4687 }
4688 return nil, gensupport.WrapError(&googleapi.Error{
4689 Code: res.StatusCode,
4690 Header: res.Header,
4691 })
4692 }
4693 if err != nil {
4694 return nil, err
4695 }
4696 defer googleapi.CloseBody(res)
4697 if err := googleapi.CheckResponse(res); err != nil {
4698 return nil, gensupport.WrapError(err)
4699 }
4700 ret := &CmekSettings{
4701 ServerResponse: googleapi.ServerResponse{
4702 Header: res.Header,
4703 HTTPStatusCode: res.StatusCode,
4704 },
4705 }
4706 target := &ret
4707 if err := gensupport.DecodeResponse(target, res); err != nil {
4708 return nil, err
4709 }
4710 return ret, nil
4711 }
4712
4713 type BillingAccountsGetSettingsCall struct {
4714 s *Service
4715 name string
4716 urlParams_ gensupport.URLParams
4717 ifNoneMatch_ string
4718 ctx_ context.Context
4719 header_ http.Header
4720 }
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735 func (r *BillingAccountsService) GetSettings(name string) *BillingAccountsGetSettingsCall {
4736 c := &BillingAccountsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4737 c.name = name
4738 return c
4739 }
4740
4741
4742
4743
4744 func (c *BillingAccountsGetSettingsCall) Fields(s ...googleapi.Field) *BillingAccountsGetSettingsCall {
4745 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4746 return c
4747 }
4748
4749
4750
4751
4752 func (c *BillingAccountsGetSettingsCall) IfNoneMatch(entityTag string) *BillingAccountsGetSettingsCall {
4753 c.ifNoneMatch_ = entityTag
4754 return c
4755 }
4756
4757
4758 func (c *BillingAccountsGetSettingsCall) Context(ctx context.Context) *BillingAccountsGetSettingsCall {
4759 c.ctx_ = ctx
4760 return c
4761 }
4762
4763
4764
4765 func (c *BillingAccountsGetSettingsCall) Header() http.Header {
4766 if c.header_ == nil {
4767 c.header_ = make(http.Header)
4768 }
4769 return c.header_
4770 }
4771
4772 func (c *BillingAccountsGetSettingsCall) doRequest(alt string) (*http.Response, error) {
4773 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4774 if c.ifNoneMatch_ != "" {
4775 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4776 }
4777 var body io.Reader = nil
4778 c.urlParams_.Set("alt", alt)
4779 c.urlParams_.Set("prettyPrint", "false")
4780 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
4781 urls += "?" + c.urlParams_.Encode()
4782 req, err := http.NewRequest("GET", urls, body)
4783 if err != nil {
4784 return nil, err
4785 }
4786 req.Header = reqHeaders
4787 googleapi.Expand(req.URL, map[string]string{
4788 "name": c.name,
4789 })
4790 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4791 }
4792
4793
4794
4795
4796
4797
4798 func (c *BillingAccountsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
4799 gensupport.SetOptions(c.urlParams_, opts...)
4800 res, err := c.doRequest("json")
4801 if res != nil && res.StatusCode == http.StatusNotModified {
4802 if res.Body != nil {
4803 res.Body.Close()
4804 }
4805 return nil, gensupport.WrapError(&googleapi.Error{
4806 Code: res.StatusCode,
4807 Header: res.Header,
4808 })
4809 }
4810 if err != nil {
4811 return nil, err
4812 }
4813 defer googleapi.CloseBody(res)
4814 if err := googleapi.CheckResponse(res); err != nil {
4815 return nil, gensupport.WrapError(err)
4816 }
4817 ret := &Settings{
4818 ServerResponse: googleapi.ServerResponse{
4819 Header: res.Header,
4820 HTTPStatusCode: res.StatusCode,
4821 },
4822 }
4823 target := &ret
4824 if err := gensupport.DecodeResponse(target, res); err != nil {
4825 return nil, err
4826 }
4827 return ret, nil
4828 }
4829
4830 type BillingAccountsExclusionsCreateCall struct {
4831 s *Service
4832 parent string
4833 logexclusion *LogExclusion
4834 urlParams_ gensupport.URLParams
4835 ctx_ context.Context
4836 header_ http.Header
4837 }
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847 func (r *BillingAccountsExclusionsService) Create(parent string, logexclusion *LogExclusion) *BillingAccountsExclusionsCreateCall {
4848 c := &BillingAccountsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4849 c.parent = parent
4850 c.logexclusion = logexclusion
4851 return c
4852 }
4853
4854
4855
4856
4857 func (c *BillingAccountsExclusionsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsCreateCall {
4858 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4859 return c
4860 }
4861
4862
4863 func (c *BillingAccountsExclusionsCreateCall) Context(ctx context.Context) *BillingAccountsExclusionsCreateCall {
4864 c.ctx_ = ctx
4865 return c
4866 }
4867
4868
4869
4870 func (c *BillingAccountsExclusionsCreateCall) Header() http.Header {
4871 if c.header_ == nil {
4872 c.header_ = make(http.Header)
4873 }
4874 return c.header_
4875 }
4876
4877 func (c *BillingAccountsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
4878 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4879 var body io.Reader = nil
4880 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
4881 if err != nil {
4882 return nil, err
4883 }
4884 c.urlParams_.Set("alt", alt)
4885 c.urlParams_.Set("prettyPrint", "false")
4886 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
4887 urls += "?" + c.urlParams_.Encode()
4888 req, err := http.NewRequest("POST", urls, body)
4889 if err != nil {
4890 return nil, err
4891 }
4892 req.Header = reqHeaders
4893 googleapi.Expand(req.URL, map[string]string{
4894 "parent": c.parent,
4895 })
4896 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4897 }
4898
4899
4900
4901
4902
4903
4904 func (c *BillingAccountsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
4905 gensupport.SetOptions(c.urlParams_, opts...)
4906 res, err := c.doRequest("json")
4907 if res != nil && res.StatusCode == http.StatusNotModified {
4908 if res.Body != nil {
4909 res.Body.Close()
4910 }
4911 return nil, gensupport.WrapError(&googleapi.Error{
4912 Code: res.StatusCode,
4913 Header: res.Header,
4914 })
4915 }
4916 if err != nil {
4917 return nil, err
4918 }
4919 defer googleapi.CloseBody(res)
4920 if err := googleapi.CheckResponse(res); err != nil {
4921 return nil, gensupport.WrapError(err)
4922 }
4923 ret := &LogExclusion{
4924 ServerResponse: googleapi.ServerResponse{
4925 Header: res.Header,
4926 HTTPStatusCode: res.StatusCode,
4927 },
4928 }
4929 target := &ret
4930 if err := gensupport.DecodeResponse(target, res); err != nil {
4931 return nil, err
4932 }
4933 return ret, nil
4934 }
4935
4936 type BillingAccountsExclusionsDeleteCall struct {
4937 s *Service
4938 name string
4939 urlParams_ gensupport.URLParams
4940 ctx_ context.Context
4941 header_ http.Header
4942 }
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952 func (r *BillingAccountsExclusionsService) Delete(name string) *BillingAccountsExclusionsDeleteCall {
4953 c := &BillingAccountsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4954 c.name = name
4955 return c
4956 }
4957
4958
4959
4960
4961 func (c *BillingAccountsExclusionsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsDeleteCall {
4962 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4963 return c
4964 }
4965
4966
4967 func (c *BillingAccountsExclusionsDeleteCall) Context(ctx context.Context) *BillingAccountsExclusionsDeleteCall {
4968 c.ctx_ = ctx
4969 return c
4970 }
4971
4972
4973
4974 func (c *BillingAccountsExclusionsDeleteCall) Header() http.Header {
4975 if c.header_ == nil {
4976 c.header_ = make(http.Header)
4977 }
4978 return c.header_
4979 }
4980
4981 func (c *BillingAccountsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
4982 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4983 var body io.Reader = nil
4984 c.urlParams_.Set("alt", alt)
4985 c.urlParams_.Set("prettyPrint", "false")
4986 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
4987 urls += "?" + c.urlParams_.Encode()
4988 req, err := http.NewRequest("DELETE", urls, body)
4989 if err != nil {
4990 return nil, err
4991 }
4992 req.Header = reqHeaders
4993 googleapi.Expand(req.URL, map[string]string{
4994 "name": c.name,
4995 })
4996 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4997 }
4998
4999
5000
5001
5002
5003
5004 func (c *BillingAccountsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5005 gensupport.SetOptions(c.urlParams_, opts...)
5006 res, err := c.doRequest("json")
5007 if res != nil && res.StatusCode == http.StatusNotModified {
5008 if res.Body != nil {
5009 res.Body.Close()
5010 }
5011 return nil, gensupport.WrapError(&googleapi.Error{
5012 Code: res.StatusCode,
5013 Header: res.Header,
5014 })
5015 }
5016 if err != nil {
5017 return nil, err
5018 }
5019 defer googleapi.CloseBody(res)
5020 if err := googleapi.CheckResponse(res); err != nil {
5021 return nil, gensupport.WrapError(err)
5022 }
5023 ret := &Empty{
5024 ServerResponse: googleapi.ServerResponse{
5025 Header: res.Header,
5026 HTTPStatusCode: res.StatusCode,
5027 },
5028 }
5029 target := &ret
5030 if err := gensupport.DecodeResponse(target, res); err != nil {
5031 return nil, err
5032 }
5033 return ret, nil
5034 }
5035
5036 type BillingAccountsExclusionsGetCall struct {
5037 s *Service
5038 name string
5039 urlParams_ gensupport.URLParams
5040 ifNoneMatch_ string
5041 ctx_ context.Context
5042 header_ http.Header
5043 }
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053 func (r *BillingAccountsExclusionsService) Get(name string) *BillingAccountsExclusionsGetCall {
5054 c := &BillingAccountsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5055 c.name = name
5056 return c
5057 }
5058
5059
5060
5061
5062 func (c *BillingAccountsExclusionsGetCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsGetCall {
5063 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5064 return c
5065 }
5066
5067
5068
5069
5070 func (c *BillingAccountsExclusionsGetCall) IfNoneMatch(entityTag string) *BillingAccountsExclusionsGetCall {
5071 c.ifNoneMatch_ = entityTag
5072 return c
5073 }
5074
5075
5076 func (c *BillingAccountsExclusionsGetCall) Context(ctx context.Context) *BillingAccountsExclusionsGetCall {
5077 c.ctx_ = ctx
5078 return c
5079 }
5080
5081
5082
5083 func (c *BillingAccountsExclusionsGetCall) Header() http.Header {
5084 if c.header_ == nil {
5085 c.header_ = make(http.Header)
5086 }
5087 return c.header_
5088 }
5089
5090 func (c *BillingAccountsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
5091 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5092 if c.ifNoneMatch_ != "" {
5093 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5094 }
5095 var body io.Reader = nil
5096 c.urlParams_.Set("alt", alt)
5097 c.urlParams_.Set("prettyPrint", "false")
5098 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5099 urls += "?" + c.urlParams_.Encode()
5100 req, err := http.NewRequest("GET", urls, body)
5101 if err != nil {
5102 return nil, err
5103 }
5104 req.Header = reqHeaders
5105 googleapi.Expand(req.URL, map[string]string{
5106 "name": c.name,
5107 })
5108 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5109 }
5110
5111
5112
5113
5114
5115
5116 func (c *BillingAccountsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
5117 gensupport.SetOptions(c.urlParams_, opts...)
5118 res, err := c.doRequest("json")
5119 if res != nil && res.StatusCode == http.StatusNotModified {
5120 if res.Body != nil {
5121 res.Body.Close()
5122 }
5123 return nil, gensupport.WrapError(&googleapi.Error{
5124 Code: res.StatusCode,
5125 Header: res.Header,
5126 })
5127 }
5128 if err != nil {
5129 return nil, err
5130 }
5131 defer googleapi.CloseBody(res)
5132 if err := googleapi.CheckResponse(res); err != nil {
5133 return nil, gensupport.WrapError(err)
5134 }
5135 ret := &LogExclusion{
5136 ServerResponse: googleapi.ServerResponse{
5137 Header: res.Header,
5138 HTTPStatusCode: res.StatusCode,
5139 },
5140 }
5141 target := &ret
5142 if err := gensupport.DecodeResponse(target, res); err != nil {
5143 return nil, err
5144 }
5145 return ret, nil
5146 }
5147
5148 type BillingAccountsExclusionsListCall struct {
5149 s *Service
5150 parent string
5151 urlParams_ gensupport.URLParams
5152 ifNoneMatch_ string
5153 ctx_ context.Context
5154 header_ http.Header
5155 }
5156
5157
5158
5159
5160
5161
5162 func (r *BillingAccountsExclusionsService) List(parent string) *BillingAccountsExclusionsListCall {
5163 c := &BillingAccountsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5164 c.parent = parent
5165 return c
5166 }
5167
5168
5169
5170
5171
5172 func (c *BillingAccountsExclusionsListCall) PageSize(pageSize int64) *BillingAccountsExclusionsListCall {
5173 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5174 return c
5175 }
5176
5177
5178
5179
5180
5181 func (c *BillingAccountsExclusionsListCall) PageToken(pageToken string) *BillingAccountsExclusionsListCall {
5182 c.urlParams_.Set("pageToken", pageToken)
5183 return c
5184 }
5185
5186
5187
5188
5189 func (c *BillingAccountsExclusionsListCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsListCall {
5190 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5191 return c
5192 }
5193
5194
5195
5196
5197 func (c *BillingAccountsExclusionsListCall) IfNoneMatch(entityTag string) *BillingAccountsExclusionsListCall {
5198 c.ifNoneMatch_ = entityTag
5199 return c
5200 }
5201
5202
5203 func (c *BillingAccountsExclusionsListCall) Context(ctx context.Context) *BillingAccountsExclusionsListCall {
5204 c.ctx_ = ctx
5205 return c
5206 }
5207
5208
5209
5210 func (c *BillingAccountsExclusionsListCall) Header() http.Header {
5211 if c.header_ == nil {
5212 c.header_ = make(http.Header)
5213 }
5214 return c.header_
5215 }
5216
5217 func (c *BillingAccountsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
5218 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5219 if c.ifNoneMatch_ != "" {
5220 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5221 }
5222 var body io.Reader = nil
5223 c.urlParams_.Set("alt", alt)
5224 c.urlParams_.Set("prettyPrint", "false")
5225 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
5226 urls += "?" + c.urlParams_.Encode()
5227 req, err := http.NewRequest("GET", urls, body)
5228 if err != nil {
5229 return nil, err
5230 }
5231 req.Header = reqHeaders
5232 googleapi.Expand(req.URL, map[string]string{
5233 "parent": c.parent,
5234 })
5235 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5236 }
5237
5238
5239
5240
5241
5242
5243
5244 func (c *BillingAccountsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
5245 gensupport.SetOptions(c.urlParams_, opts...)
5246 res, err := c.doRequest("json")
5247 if res != nil && res.StatusCode == http.StatusNotModified {
5248 if res.Body != nil {
5249 res.Body.Close()
5250 }
5251 return nil, gensupport.WrapError(&googleapi.Error{
5252 Code: res.StatusCode,
5253 Header: res.Header,
5254 })
5255 }
5256 if err != nil {
5257 return nil, err
5258 }
5259 defer googleapi.CloseBody(res)
5260 if err := googleapi.CheckResponse(res); err != nil {
5261 return nil, gensupport.WrapError(err)
5262 }
5263 ret := &ListExclusionsResponse{
5264 ServerResponse: googleapi.ServerResponse{
5265 Header: res.Header,
5266 HTTPStatusCode: res.StatusCode,
5267 },
5268 }
5269 target := &ret
5270 if err := gensupport.DecodeResponse(target, res); err != nil {
5271 return nil, err
5272 }
5273 return ret, nil
5274 }
5275
5276
5277
5278
5279 func (c *BillingAccountsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
5280 c.ctx_ = ctx
5281 defer c.PageToken(c.urlParams_.Get("pageToken"))
5282 for {
5283 x, err := c.Do()
5284 if err != nil {
5285 return err
5286 }
5287 if err := f(x); err != nil {
5288 return err
5289 }
5290 if x.NextPageToken == "" {
5291 return nil
5292 }
5293 c.PageToken(x.NextPageToken)
5294 }
5295 }
5296
5297 type BillingAccountsExclusionsPatchCall struct {
5298 s *Service
5299 name string
5300 logexclusion *LogExclusion
5301 urlParams_ gensupport.URLParams
5302 ctx_ context.Context
5303 header_ http.Header
5304 }
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315 func (r *BillingAccountsExclusionsService) Patch(name string, logexclusion *LogExclusion) *BillingAccountsExclusionsPatchCall {
5316 c := &BillingAccountsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5317 c.name = name
5318 c.logexclusion = logexclusion
5319 return c
5320 }
5321
5322
5323
5324
5325
5326
5327
5328 func (c *BillingAccountsExclusionsPatchCall) UpdateMask(updateMask string) *BillingAccountsExclusionsPatchCall {
5329 c.urlParams_.Set("updateMask", updateMask)
5330 return c
5331 }
5332
5333
5334
5335
5336 func (c *BillingAccountsExclusionsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsPatchCall {
5337 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5338 return c
5339 }
5340
5341
5342 func (c *BillingAccountsExclusionsPatchCall) Context(ctx context.Context) *BillingAccountsExclusionsPatchCall {
5343 c.ctx_ = ctx
5344 return c
5345 }
5346
5347
5348
5349 func (c *BillingAccountsExclusionsPatchCall) Header() http.Header {
5350 if c.header_ == nil {
5351 c.header_ = make(http.Header)
5352 }
5353 return c.header_
5354 }
5355
5356 func (c *BillingAccountsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
5357 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5358 var body io.Reader = nil
5359 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
5360 if err != nil {
5361 return nil, err
5362 }
5363 c.urlParams_.Set("alt", alt)
5364 c.urlParams_.Set("prettyPrint", "false")
5365 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5366 urls += "?" + c.urlParams_.Encode()
5367 req, err := http.NewRequest("PATCH", urls, body)
5368 if err != nil {
5369 return nil, err
5370 }
5371 req.Header = reqHeaders
5372 googleapi.Expand(req.URL, map[string]string{
5373 "name": c.name,
5374 })
5375 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5376 }
5377
5378
5379
5380
5381
5382
5383 func (c *BillingAccountsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
5384 gensupport.SetOptions(c.urlParams_, opts...)
5385 res, err := c.doRequest("json")
5386 if res != nil && res.StatusCode == http.StatusNotModified {
5387 if res.Body != nil {
5388 res.Body.Close()
5389 }
5390 return nil, gensupport.WrapError(&googleapi.Error{
5391 Code: res.StatusCode,
5392 Header: res.Header,
5393 })
5394 }
5395 if err != nil {
5396 return nil, err
5397 }
5398 defer googleapi.CloseBody(res)
5399 if err := googleapi.CheckResponse(res); err != nil {
5400 return nil, gensupport.WrapError(err)
5401 }
5402 ret := &LogExclusion{
5403 ServerResponse: googleapi.ServerResponse{
5404 Header: res.Header,
5405 HTTPStatusCode: res.StatusCode,
5406 },
5407 }
5408 target := &ret
5409 if err := gensupport.DecodeResponse(target, res); err != nil {
5410 return nil, err
5411 }
5412 return ret, nil
5413 }
5414
5415 type BillingAccountsLocationsGetCall struct {
5416 s *Service
5417 name string
5418 urlParams_ gensupport.URLParams
5419 ifNoneMatch_ string
5420 ctx_ context.Context
5421 header_ http.Header
5422 }
5423
5424
5425
5426
5427 func (r *BillingAccountsLocationsService) Get(name string) *BillingAccountsLocationsGetCall {
5428 c := &BillingAccountsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5429 c.name = name
5430 return c
5431 }
5432
5433
5434
5435
5436 func (c *BillingAccountsLocationsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsGetCall {
5437 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5438 return c
5439 }
5440
5441
5442
5443
5444 func (c *BillingAccountsLocationsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsGetCall {
5445 c.ifNoneMatch_ = entityTag
5446 return c
5447 }
5448
5449
5450 func (c *BillingAccountsLocationsGetCall) Context(ctx context.Context) *BillingAccountsLocationsGetCall {
5451 c.ctx_ = ctx
5452 return c
5453 }
5454
5455
5456
5457 func (c *BillingAccountsLocationsGetCall) Header() http.Header {
5458 if c.header_ == nil {
5459 c.header_ = make(http.Header)
5460 }
5461 return c.header_
5462 }
5463
5464 func (c *BillingAccountsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
5465 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5466 if c.ifNoneMatch_ != "" {
5467 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5468 }
5469 var body io.Reader = nil
5470 c.urlParams_.Set("alt", alt)
5471 c.urlParams_.Set("prettyPrint", "false")
5472 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5473 urls += "?" + c.urlParams_.Encode()
5474 req, err := http.NewRequest("GET", urls, body)
5475 if err != nil {
5476 return nil, err
5477 }
5478 req.Header = reqHeaders
5479 googleapi.Expand(req.URL, map[string]string{
5480 "name": c.name,
5481 })
5482 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5483 }
5484
5485
5486
5487
5488
5489
5490 func (c *BillingAccountsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
5491 gensupport.SetOptions(c.urlParams_, opts...)
5492 res, err := c.doRequest("json")
5493 if res != nil && res.StatusCode == http.StatusNotModified {
5494 if res.Body != nil {
5495 res.Body.Close()
5496 }
5497 return nil, gensupport.WrapError(&googleapi.Error{
5498 Code: res.StatusCode,
5499 Header: res.Header,
5500 })
5501 }
5502 if err != nil {
5503 return nil, err
5504 }
5505 defer googleapi.CloseBody(res)
5506 if err := googleapi.CheckResponse(res); err != nil {
5507 return nil, gensupport.WrapError(err)
5508 }
5509 ret := &Location{
5510 ServerResponse: googleapi.ServerResponse{
5511 Header: res.Header,
5512 HTTPStatusCode: res.StatusCode,
5513 },
5514 }
5515 target := &ret
5516 if err := gensupport.DecodeResponse(target, res); err != nil {
5517 return nil, err
5518 }
5519 return ret, nil
5520 }
5521
5522 type BillingAccountsLocationsListCall struct {
5523 s *Service
5524 name string
5525 urlParams_ gensupport.URLParams
5526 ifNoneMatch_ string
5527 ctx_ context.Context
5528 header_ http.Header
5529 }
5530
5531
5532
5533
5534 func (r *BillingAccountsLocationsService) List(name string) *BillingAccountsLocationsListCall {
5535 c := &BillingAccountsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5536 c.name = name
5537 return c
5538 }
5539
5540
5541
5542
5543
5544 func (c *BillingAccountsLocationsListCall) Filter(filter string) *BillingAccountsLocationsListCall {
5545 c.urlParams_.Set("filter", filter)
5546 return c
5547 }
5548
5549
5550
5551 func (c *BillingAccountsLocationsListCall) PageSize(pageSize int64) *BillingAccountsLocationsListCall {
5552 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5553 return c
5554 }
5555
5556
5557
5558
5559 func (c *BillingAccountsLocationsListCall) PageToken(pageToken string) *BillingAccountsLocationsListCall {
5560 c.urlParams_.Set("pageToken", pageToken)
5561 return c
5562 }
5563
5564
5565
5566
5567 func (c *BillingAccountsLocationsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsListCall {
5568 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5569 return c
5570 }
5571
5572
5573
5574
5575 func (c *BillingAccountsLocationsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsListCall {
5576 c.ifNoneMatch_ = entityTag
5577 return c
5578 }
5579
5580
5581 func (c *BillingAccountsLocationsListCall) Context(ctx context.Context) *BillingAccountsLocationsListCall {
5582 c.ctx_ = ctx
5583 return c
5584 }
5585
5586
5587
5588 func (c *BillingAccountsLocationsListCall) Header() http.Header {
5589 if c.header_ == nil {
5590 c.header_ = make(http.Header)
5591 }
5592 return c.header_
5593 }
5594
5595 func (c *BillingAccountsLocationsListCall) doRequest(alt string) (*http.Response, error) {
5596 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5597 if c.ifNoneMatch_ != "" {
5598 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5599 }
5600 var body io.Reader = nil
5601 c.urlParams_.Set("alt", alt)
5602 c.urlParams_.Set("prettyPrint", "false")
5603 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
5604 urls += "?" + c.urlParams_.Encode()
5605 req, err := http.NewRequest("GET", urls, body)
5606 if err != nil {
5607 return nil, err
5608 }
5609 req.Header = reqHeaders
5610 googleapi.Expand(req.URL, map[string]string{
5611 "name": c.name,
5612 })
5613 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5614 }
5615
5616
5617
5618
5619
5620
5621
5622 func (c *BillingAccountsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
5623 gensupport.SetOptions(c.urlParams_, opts...)
5624 res, err := c.doRequest("json")
5625 if res != nil && res.StatusCode == http.StatusNotModified {
5626 if res.Body != nil {
5627 res.Body.Close()
5628 }
5629 return nil, gensupport.WrapError(&googleapi.Error{
5630 Code: res.StatusCode,
5631 Header: res.Header,
5632 })
5633 }
5634 if err != nil {
5635 return nil, err
5636 }
5637 defer googleapi.CloseBody(res)
5638 if err := googleapi.CheckResponse(res); err != nil {
5639 return nil, gensupport.WrapError(err)
5640 }
5641 ret := &ListLocationsResponse{
5642 ServerResponse: googleapi.ServerResponse{
5643 Header: res.Header,
5644 HTTPStatusCode: res.StatusCode,
5645 },
5646 }
5647 target := &ret
5648 if err := gensupport.DecodeResponse(target, res); err != nil {
5649 return nil, err
5650 }
5651 return ret, nil
5652 }
5653
5654
5655
5656
5657 func (c *BillingAccountsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
5658 c.ctx_ = ctx
5659 defer c.PageToken(c.urlParams_.Get("pageToken"))
5660 for {
5661 x, err := c.Do()
5662 if err != nil {
5663 return err
5664 }
5665 if err := f(x); err != nil {
5666 return err
5667 }
5668 if x.NextPageToken == "" {
5669 return nil
5670 }
5671 c.PageToken(x.NextPageToken)
5672 }
5673 }
5674
5675 type BillingAccountsLocationsBucketsCreateCall struct {
5676 s *Service
5677 parent string
5678 logbucket *LogBucket
5679 urlParams_ gensupport.URLParams
5680 ctx_ context.Context
5681 header_ http.Header
5682 }
5683
5684
5685
5686
5687
5688
5689
5690 func (r *BillingAccountsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *BillingAccountsLocationsBucketsCreateCall {
5691 c := &BillingAccountsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5692 c.parent = parent
5693 c.logbucket = logbucket
5694 return c
5695 }
5696
5697
5698
5699
5700
5701 func (c *BillingAccountsLocationsBucketsCreateCall) BucketId(bucketId string) *BillingAccountsLocationsBucketsCreateCall {
5702 c.urlParams_.Set("bucketId", bucketId)
5703 return c
5704 }
5705
5706
5707
5708
5709 func (c *BillingAccountsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsCreateCall {
5710 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5711 return c
5712 }
5713
5714
5715 func (c *BillingAccountsLocationsBucketsCreateCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsCreateCall {
5716 c.ctx_ = ctx
5717 return c
5718 }
5719
5720
5721
5722 func (c *BillingAccountsLocationsBucketsCreateCall) Header() http.Header {
5723 if c.header_ == nil {
5724 c.header_ = make(http.Header)
5725 }
5726 return c.header_
5727 }
5728
5729 func (c *BillingAccountsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
5730 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5731 var body io.Reader = nil
5732 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
5733 if err != nil {
5734 return nil, err
5735 }
5736 c.urlParams_.Set("alt", alt)
5737 c.urlParams_.Set("prettyPrint", "false")
5738 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
5739 urls += "?" + c.urlParams_.Encode()
5740 req, err := http.NewRequest("POST", urls, body)
5741 if err != nil {
5742 return nil, err
5743 }
5744 req.Header = reqHeaders
5745 googleapi.Expand(req.URL, map[string]string{
5746 "parent": c.parent,
5747 })
5748 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5749 }
5750
5751
5752
5753
5754
5755
5756 func (c *BillingAccountsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
5757 gensupport.SetOptions(c.urlParams_, opts...)
5758 res, err := c.doRequest("json")
5759 if res != nil && res.StatusCode == http.StatusNotModified {
5760 if res.Body != nil {
5761 res.Body.Close()
5762 }
5763 return nil, gensupport.WrapError(&googleapi.Error{
5764 Code: res.StatusCode,
5765 Header: res.Header,
5766 })
5767 }
5768 if err != nil {
5769 return nil, err
5770 }
5771 defer googleapi.CloseBody(res)
5772 if err := googleapi.CheckResponse(res); err != nil {
5773 return nil, gensupport.WrapError(err)
5774 }
5775 ret := &LogBucket{
5776 ServerResponse: googleapi.ServerResponse{
5777 Header: res.Header,
5778 HTTPStatusCode: res.StatusCode,
5779 },
5780 }
5781 target := &ret
5782 if err := gensupport.DecodeResponse(target, res); err != nil {
5783 return nil, err
5784 }
5785 return ret, nil
5786 }
5787
5788 type BillingAccountsLocationsBucketsCreateAsyncCall struct {
5789 s *Service
5790 parent string
5791 logbucket *LogBucket
5792 urlParams_ gensupport.URLParams
5793 ctx_ context.Context
5794 header_ http.Header
5795 }
5796
5797
5798
5799
5800
5801
5802
5803
5804 func (r *BillingAccountsLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *BillingAccountsLocationsBucketsCreateAsyncCall {
5805 c := &BillingAccountsLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5806 c.parent = parent
5807 c.logbucket = logbucket
5808 return c
5809 }
5810
5811
5812
5813
5814
5815 func (c *BillingAccountsLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *BillingAccountsLocationsBucketsCreateAsyncCall {
5816 c.urlParams_.Set("bucketId", bucketId)
5817 return c
5818 }
5819
5820
5821
5822
5823 func (c *BillingAccountsLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsCreateAsyncCall {
5824 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5825 return c
5826 }
5827
5828
5829 func (c *BillingAccountsLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsCreateAsyncCall {
5830 c.ctx_ = ctx
5831 return c
5832 }
5833
5834
5835
5836 func (c *BillingAccountsLocationsBucketsCreateAsyncCall) Header() http.Header {
5837 if c.header_ == nil {
5838 c.header_ = make(http.Header)
5839 }
5840 return c.header_
5841 }
5842
5843 func (c *BillingAccountsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) {
5844 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5845 var body io.Reader = nil
5846 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
5847 if err != nil {
5848 return nil, err
5849 }
5850 c.urlParams_.Set("alt", alt)
5851 c.urlParams_.Set("prettyPrint", "false")
5852 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync")
5853 urls += "?" + c.urlParams_.Encode()
5854 req, err := http.NewRequest("POST", urls, body)
5855 if err != nil {
5856 return nil, err
5857 }
5858 req.Header = reqHeaders
5859 googleapi.Expand(req.URL, map[string]string{
5860 "parent": c.parent,
5861 })
5862 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5863 }
5864
5865
5866
5867
5868
5869
5870 func (c *BillingAccountsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5871 gensupport.SetOptions(c.urlParams_, opts...)
5872 res, err := c.doRequest("json")
5873 if res != nil && res.StatusCode == http.StatusNotModified {
5874 if res.Body != nil {
5875 res.Body.Close()
5876 }
5877 return nil, gensupport.WrapError(&googleapi.Error{
5878 Code: res.StatusCode,
5879 Header: res.Header,
5880 })
5881 }
5882 if err != nil {
5883 return nil, err
5884 }
5885 defer googleapi.CloseBody(res)
5886 if err := googleapi.CheckResponse(res); err != nil {
5887 return nil, gensupport.WrapError(err)
5888 }
5889 ret := &Operation{
5890 ServerResponse: googleapi.ServerResponse{
5891 Header: res.Header,
5892 HTTPStatusCode: res.StatusCode,
5893 },
5894 }
5895 target := &ret
5896 if err := gensupport.DecodeResponse(target, res); err != nil {
5897 return nil, err
5898 }
5899 return ret, nil
5900 }
5901
5902 type BillingAccountsLocationsBucketsDeleteCall struct {
5903 s *Service
5904 name string
5905 urlParams_ gensupport.URLParams
5906 ctx_ context.Context
5907 header_ http.Header
5908 }
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921 func (r *BillingAccountsLocationsBucketsService) Delete(name string) *BillingAccountsLocationsBucketsDeleteCall {
5922 c := &BillingAccountsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5923 c.name = name
5924 return c
5925 }
5926
5927
5928
5929
5930 func (c *BillingAccountsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsDeleteCall {
5931 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5932 return c
5933 }
5934
5935
5936 func (c *BillingAccountsLocationsBucketsDeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsDeleteCall {
5937 c.ctx_ = ctx
5938 return c
5939 }
5940
5941
5942
5943 func (c *BillingAccountsLocationsBucketsDeleteCall) Header() http.Header {
5944 if c.header_ == nil {
5945 c.header_ = make(http.Header)
5946 }
5947 return c.header_
5948 }
5949
5950 func (c *BillingAccountsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
5951 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5952 var body io.Reader = nil
5953 c.urlParams_.Set("alt", alt)
5954 c.urlParams_.Set("prettyPrint", "false")
5955 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5956 urls += "?" + c.urlParams_.Encode()
5957 req, err := http.NewRequest("DELETE", urls, body)
5958 if err != nil {
5959 return nil, err
5960 }
5961 req.Header = reqHeaders
5962 googleapi.Expand(req.URL, map[string]string{
5963 "name": c.name,
5964 })
5965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5966 }
5967
5968
5969
5970
5971
5972
5973 func (c *BillingAccountsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5974 gensupport.SetOptions(c.urlParams_, opts...)
5975 res, err := c.doRequest("json")
5976 if res != nil && res.StatusCode == http.StatusNotModified {
5977 if res.Body != nil {
5978 res.Body.Close()
5979 }
5980 return nil, gensupport.WrapError(&googleapi.Error{
5981 Code: res.StatusCode,
5982 Header: res.Header,
5983 })
5984 }
5985 if err != nil {
5986 return nil, err
5987 }
5988 defer googleapi.CloseBody(res)
5989 if err := googleapi.CheckResponse(res); err != nil {
5990 return nil, gensupport.WrapError(err)
5991 }
5992 ret := &Empty{
5993 ServerResponse: googleapi.ServerResponse{
5994 Header: res.Header,
5995 HTTPStatusCode: res.StatusCode,
5996 },
5997 }
5998 target := &ret
5999 if err := gensupport.DecodeResponse(target, res); err != nil {
6000 return nil, err
6001 }
6002 return ret, nil
6003 }
6004
6005 type BillingAccountsLocationsBucketsGetCall struct {
6006 s *Service
6007 name string
6008 urlParams_ gensupport.URLParams
6009 ifNoneMatch_ string
6010 ctx_ context.Context
6011 header_ http.Header
6012 }
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023 func (r *BillingAccountsLocationsBucketsService) Get(name string) *BillingAccountsLocationsBucketsGetCall {
6024 c := &BillingAccountsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6025 c.name = name
6026 return c
6027 }
6028
6029
6030
6031
6032 func (c *BillingAccountsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsGetCall {
6033 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6034 return c
6035 }
6036
6037
6038
6039
6040 func (c *BillingAccountsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsGetCall {
6041 c.ifNoneMatch_ = entityTag
6042 return c
6043 }
6044
6045
6046 func (c *BillingAccountsLocationsBucketsGetCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsGetCall {
6047 c.ctx_ = ctx
6048 return c
6049 }
6050
6051
6052
6053 func (c *BillingAccountsLocationsBucketsGetCall) Header() http.Header {
6054 if c.header_ == nil {
6055 c.header_ = make(http.Header)
6056 }
6057 return c.header_
6058 }
6059
6060 func (c *BillingAccountsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
6061 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6062 if c.ifNoneMatch_ != "" {
6063 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6064 }
6065 var body io.Reader = nil
6066 c.urlParams_.Set("alt", alt)
6067 c.urlParams_.Set("prettyPrint", "false")
6068 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6069 urls += "?" + c.urlParams_.Encode()
6070 req, err := http.NewRequest("GET", urls, body)
6071 if err != nil {
6072 return nil, err
6073 }
6074 req.Header = reqHeaders
6075 googleapi.Expand(req.URL, map[string]string{
6076 "name": c.name,
6077 })
6078 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6079 }
6080
6081
6082
6083
6084
6085
6086 func (c *BillingAccountsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
6087 gensupport.SetOptions(c.urlParams_, opts...)
6088 res, err := c.doRequest("json")
6089 if res != nil && res.StatusCode == http.StatusNotModified {
6090 if res.Body != nil {
6091 res.Body.Close()
6092 }
6093 return nil, gensupport.WrapError(&googleapi.Error{
6094 Code: res.StatusCode,
6095 Header: res.Header,
6096 })
6097 }
6098 if err != nil {
6099 return nil, err
6100 }
6101 defer googleapi.CloseBody(res)
6102 if err := googleapi.CheckResponse(res); err != nil {
6103 return nil, gensupport.WrapError(err)
6104 }
6105 ret := &LogBucket{
6106 ServerResponse: googleapi.ServerResponse{
6107 Header: res.Header,
6108 HTTPStatusCode: res.StatusCode,
6109 },
6110 }
6111 target := &ret
6112 if err := gensupport.DecodeResponse(target, res); err != nil {
6113 return nil, err
6114 }
6115 return ret, nil
6116 }
6117
6118 type BillingAccountsLocationsBucketsListCall struct {
6119 s *Service
6120 parent string
6121 urlParams_ gensupport.URLParams
6122 ifNoneMatch_ string
6123 ctx_ context.Context
6124 header_ http.Header
6125 }
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136 func (r *BillingAccountsLocationsBucketsService) List(parent string) *BillingAccountsLocationsBucketsListCall {
6137 c := &BillingAccountsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6138 c.parent = parent
6139 return c
6140 }
6141
6142
6143
6144
6145
6146 func (c *BillingAccountsLocationsBucketsListCall) PageSize(pageSize int64) *BillingAccountsLocationsBucketsListCall {
6147 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6148 return c
6149 }
6150
6151
6152
6153
6154
6155 func (c *BillingAccountsLocationsBucketsListCall) PageToken(pageToken string) *BillingAccountsLocationsBucketsListCall {
6156 c.urlParams_.Set("pageToken", pageToken)
6157 return c
6158 }
6159
6160
6161
6162
6163 func (c *BillingAccountsLocationsBucketsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsListCall {
6164 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6165 return c
6166 }
6167
6168
6169
6170
6171 func (c *BillingAccountsLocationsBucketsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsListCall {
6172 c.ifNoneMatch_ = entityTag
6173 return c
6174 }
6175
6176
6177 func (c *BillingAccountsLocationsBucketsListCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsListCall {
6178 c.ctx_ = ctx
6179 return c
6180 }
6181
6182
6183
6184 func (c *BillingAccountsLocationsBucketsListCall) Header() http.Header {
6185 if c.header_ == nil {
6186 c.header_ = make(http.Header)
6187 }
6188 return c.header_
6189 }
6190
6191 func (c *BillingAccountsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
6192 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6193 if c.ifNoneMatch_ != "" {
6194 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6195 }
6196 var body io.Reader = nil
6197 c.urlParams_.Set("alt", alt)
6198 c.urlParams_.Set("prettyPrint", "false")
6199 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
6200 urls += "?" + c.urlParams_.Encode()
6201 req, err := http.NewRequest("GET", urls, body)
6202 if err != nil {
6203 return nil, err
6204 }
6205 req.Header = reqHeaders
6206 googleapi.Expand(req.URL, map[string]string{
6207 "parent": c.parent,
6208 })
6209 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6210 }
6211
6212
6213
6214
6215
6216
6217
6218 func (c *BillingAccountsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
6219 gensupport.SetOptions(c.urlParams_, opts...)
6220 res, err := c.doRequest("json")
6221 if res != nil && res.StatusCode == http.StatusNotModified {
6222 if res.Body != nil {
6223 res.Body.Close()
6224 }
6225 return nil, gensupport.WrapError(&googleapi.Error{
6226 Code: res.StatusCode,
6227 Header: res.Header,
6228 })
6229 }
6230 if err != nil {
6231 return nil, err
6232 }
6233 defer googleapi.CloseBody(res)
6234 if err := googleapi.CheckResponse(res); err != nil {
6235 return nil, gensupport.WrapError(err)
6236 }
6237 ret := &ListBucketsResponse{
6238 ServerResponse: googleapi.ServerResponse{
6239 Header: res.Header,
6240 HTTPStatusCode: res.StatusCode,
6241 },
6242 }
6243 target := &ret
6244 if err := gensupport.DecodeResponse(target, res); err != nil {
6245 return nil, err
6246 }
6247 return ret, nil
6248 }
6249
6250
6251
6252
6253 func (c *BillingAccountsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
6254 c.ctx_ = ctx
6255 defer c.PageToken(c.urlParams_.Get("pageToken"))
6256 for {
6257 x, err := c.Do()
6258 if err != nil {
6259 return err
6260 }
6261 if err := f(x); err != nil {
6262 return err
6263 }
6264 if x.NextPageToken == "" {
6265 return nil
6266 }
6267 c.PageToken(x.NextPageToken)
6268 }
6269 }
6270
6271 type BillingAccountsLocationsBucketsPatchCall struct {
6272 s *Service
6273 name string
6274 logbucket *LogBucket
6275 urlParams_ gensupport.URLParams
6276 ctx_ context.Context
6277 header_ http.Header
6278 }
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291 func (r *BillingAccountsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *BillingAccountsLocationsBucketsPatchCall {
6292 c := &BillingAccountsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6293 c.name = name
6294 c.logbucket = logbucket
6295 return c
6296 }
6297
6298
6299
6300
6301
6302
6303
6304 func (c *BillingAccountsLocationsBucketsPatchCall) UpdateMask(updateMask string) *BillingAccountsLocationsBucketsPatchCall {
6305 c.urlParams_.Set("updateMask", updateMask)
6306 return c
6307 }
6308
6309
6310
6311
6312 func (c *BillingAccountsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsPatchCall {
6313 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6314 return c
6315 }
6316
6317
6318 func (c *BillingAccountsLocationsBucketsPatchCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsPatchCall {
6319 c.ctx_ = ctx
6320 return c
6321 }
6322
6323
6324
6325 func (c *BillingAccountsLocationsBucketsPatchCall) Header() http.Header {
6326 if c.header_ == nil {
6327 c.header_ = make(http.Header)
6328 }
6329 return c.header_
6330 }
6331
6332 func (c *BillingAccountsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
6333 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6334 var body io.Reader = nil
6335 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
6336 if err != nil {
6337 return nil, err
6338 }
6339 c.urlParams_.Set("alt", alt)
6340 c.urlParams_.Set("prettyPrint", "false")
6341 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6342 urls += "?" + c.urlParams_.Encode()
6343 req, err := http.NewRequest("PATCH", urls, body)
6344 if err != nil {
6345 return nil, err
6346 }
6347 req.Header = reqHeaders
6348 googleapi.Expand(req.URL, map[string]string{
6349 "name": c.name,
6350 })
6351 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6352 }
6353
6354
6355
6356
6357
6358
6359 func (c *BillingAccountsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
6360 gensupport.SetOptions(c.urlParams_, opts...)
6361 res, err := c.doRequest("json")
6362 if res != nil && res.StatusCode == http.StatusNotModified {
6363 if res.Body != nil {
6364 res.Body.Close()
6365 }
6366 return nil, gensupport.WrapError(&googleapi.Error{
6367 Code: res.StatusCode,
6368 Header: res.Header,
6369 })
6370 }
6371 if err != nil {
6372 return nil, err
6373 }
6374 defer googleapi.CloseBody(res)
6375 if err := googleapi.CheckResponse(res); err != nil {
6376 return nil, gensupport.WrapError(err)
6377 }
6378 ret := &LogBucket{
6379 ServerResponse: googleapi.ServerResponse{
6380 Header: res.Header,
6381 HTTPStatusCode: res.StatusCode,
6382 },
6383 }
6384 target := &ret
6385 if err := gensupport.DecodeResponse(target, res); err != nil {
6386 return nil, err
6387 }
6388 return ret, nil
6389 }
6390
6391 type BillingAccountsLocationsBucketsUndeleteCall struct {
6392 s *Service
6393 name string
6394 undeletebucketrequest *UndeleteBucketRequest
6395 urlParams_ gensupport.URLParams
6396 ctx_ context.Context
6397 header_ http.Header
6398 }
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410 func (r *BillingAccountsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *BillingAccountsLocationsBucketsUndeleteCall {
6411 c := &BillingAccountsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6412 c.name = name
6413 c.undeletebucketrequest = undeletebucketrequest
6414 return c
6415 }
6416
6417
6418
6419
6420 func (c *BillingAccountsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsUndeleteCall {
6421 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6422 return c
6423 }
6424
6425
6426 func (c *BillingAccountsLocationsBucketsUndeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsUndeleteCall {
6427 c.ctx_ = ctx
6428 return c
6429 }
6430
6431
6432
6433 func (c *BillingAccountsLocationsBucketsUndeleteCall) Header() http.Header {
6434 if c.header_ == nil {
6435 c.header_ = make(http.Header)
6436 }
6437 return c.header_
6438 }
6439
6440 func (c *BillingAccountsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
6441 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6442 var body io.Reader = nil
6443 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
6444 if err != nil {
6445 return nil, err
6446 }
6447 c.urlParams_.Set("alt", alt)
6448 c.urlParams_.Set("prettyPrint", "false")
6449 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
6450 urls += "?" + c.urlParams_.Encode()
6451 req, err := http.NewRequest("POST", urls, body)
6452 if err != nil {
6453 return nil, err
6454 }
6455 req.Header = reqHeaders
6456 googleapi.Expand(req.URL, map[string]string{
6457 "name": c.name,
6458 })
6459 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6460 }
6461
6462
6463
6464
6465
6466
6467 func (c *BillingAccountsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6468 gensupport.SetOptions(c.urlParams_, opts...)
6469 res, err := c.doRequest("json")
6470 if res != nil && res.StatusCode == http.StatusNotModified {
6471 if res.Body != nil {
6472 res.Body.Close()
6473 }
6474 return nil, gensupport.WrapError(&googleapi.Error{
6475 Code: res.StatusCode,
6476 Header: res.Header,
6477 })
6478 }
6479 if err != nil {
6480 return nil, err
6481 }
6482 defer googleapi.CloseBody(res)
6483 if err := googleapi.CheckResponse(res); err != nil {
6484 return nil, gensupport.WrapError(err)
6485 }
6486 ret := &Empty{
6487 ServerResponse: googleapi.ServerResponse{
6488 Header: res.Header,
6489 HTTPStatusCode: res.StatusCode,
6490 },
6491 }
6492 target := &ret
6493 if err := gensupport.DecodeResponse(target, res); err != nil {
6494 return nil, err
6495 }
6496 return ret, nil
6497 }
6498
6499 type BillingAccountsLocationsBucketsUpdateAsyncCall struct {
6500 s *Service
6501 name string
6502 logbucket *LogBucket
6503 urlParams_ gensupport.URLParams
6504 ctx_ context.Context
6505 header_ http.Header
6506 }
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520 func (r *BillingAccountsLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *BillingAccountsLocationsBucketsUpdateAsyncCall {
6521 c := &BillingAccountsLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6522 c.name = name
6523 c.logbucket = logbucket
6524 return c
6525 }
6526
6527
6528
6529
6530
6531
6532
6533 func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *BillingAccountsLocationsBucketsUpdateAsyncCall {
6534 c.urlParams_.Set("updateMask", updateMask)
6535 return c
6536 }
6537
6538
6539
6540
6541 func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsUpdateAsyncCall {
6542 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6543 return c
6544 }
6545
6546
6547 func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsUpdateAsyncCall {
6548 c.ctx_ = ctx
6549 return c
6550 }
6551
6552
6553
6554 func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) Header() http.Header {
6555 if c.header_ == nil {
6556 c.header_ = make(http.Header)
6557 }
6558 return c.header_
6559 }
6560
6561 func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) {
6562 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6563 var body io.Reader = nil
6564 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
6565 if err != nil {
6566 return nil, err
6567 }
6568 c.urlParams_.Set("alt", alt)
6569 c.urlParams_.Set("prettyPrint", "false")
6570 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync")
6571 urls += "?" + c.urlParams_.Encode()
6572 req, err := http.NewRequest("POST", urls, body)
6573 if err != nil {
6574 return nil, err
6575 }
6576 req.Header = reqHeaders
6577 googleapi.Expand(req.URL, map[string]string{
6578 "name": c.name,
6579 })
6580 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6581 }
6582
6583
6584
6585
6586
6587
6588 func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6589 gensupport.SetOptions(c.urlParams_, opts...)
6590 res, err := c.doRequest("json")
6591 if res != nil && res.StatusCode == http.StatusNotModified {
6592 if res.Body != nil {
6593 res.Body.Close()
6594 }
6595 return nil, gensupport.WrapError(&googleapi.Error{
6596 Code: res.StatusCode,
6597 Header: res.Header,
6598 })
6599 }
6600 if err != nil {
6601 return nil, err
6602 }
6603 defer googleapi.CloseBody(res)
6604 if err := googleapi.CheckResponse(res); err != nil {
6605 return nil, gensupport.WrapError(err)
6606 }
6607 ret := &Operation{
6608 ServerResponse: googleapi.ServerResponse{
6609 Header: res.Header,
6610 HTTPStatusCode: res.StatusCode,
6611 },
6612 }
6613 target := &ret
6614 if err := gensupport.DecodeResponse(target, res); err != nil {
6615 return nil, err
6616 }
6617 return ret, nil
6618 }
6619
6620 type BillingAccountsLocationsBucketsLinksCreateCall struct {
6621 s *Service
6622 parent string
6623 link *Link
6624 urlParams_ gensupport.URLParams
6625 ctx_ context.Context
6626 header_ http.Header
6627 }
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639 func (r *BillingAccountsLocationsBucketsLinksService) Create(parent string, link *Link) *BillingAccountsLocationsBucketsLinksCreateCall {
6640 c := &BillingAccountsLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6641 c.parent = parent
6642 c.link = link
6643 return c
6644 }
6645
6646
6647
6648
6649 func (c *BillingAccountsLocationsBucketsLinksCreateCall) LinkId(linkId string) *BillingAccountsLocationsBucketsLinksCreateCall {
6650 c.urlParams_.Set("linkId", linkId)
6651 return c
6652 }
6653
6654
6655
6656
6657 func (c *BillingAccountsLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsLinksCreateCall {
6658 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6659 return c
6660 }
6661
6662
6663 func (c *BillingAccountsLocationsBucketsLinksCreateCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsLinksCreateCall {
6664 c.ctx_ = ctx
6665 return c
6666 }
6667
6668
6669
6670 func (c *BillingAccountsLocationsBucketsLinksCreateCall) Header() http.Header {
6671 if c.header_ == nil {
6672 c.header_ = make(http.Header)
6673 }
6674 return c.header_
6675 }
6676
6677 func (c *BillingAccountsLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
6678 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6679 var body io.Reader = nil
6680 body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
6681 if err != nil {
6682 return nil, err
6683 }
6684 c.urlParams_.Set("alt", alt)
6685 c.urlParams_.Set("prettyPrint", "false")
6686 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
6687 urls += "?" + c.urlParams_.Encode()
6688 req, err := http.NewRequest("POST", urls, body)
6689 if err != nil {
6690 return nil, err
6691 }
6692 req.Header = reqHeaders
6693 googleapi.Expand(req.URL, map[string]string{
6694 "parent": c.parent,
6695 })
6696 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6697 }
6698
6699
6700
6701
6702
6703
6704 func (c *BillingAccountsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6705 gensupport.SetOptions(c.urlParams_, opts...)
6706 res, err := c.doRequest("json")
6707 if res != nil && res.StatusCode == http.StatusNotModified {
6708 if res.Body != nil {
6709 res.Body.Close()
6710 }
6711 return nil, gensupport.WrapError(&googleapi.Error{
6712 Code: res.StatusCode,
6713 Header: res.Header,
6714 })
6715 }
6716 if err != nil {
6717 return nil, err
6718 }
6719 defer googleapi.CloseBody(res)
6720 if err := googleapi.CheckResponse(res); err != nil {
6721 return nil, gensupport.WrapError(err)
6722 }
6723 ret := &Operation{
6724 ServerResponse: googleapi.ServerResponse{
6725 Header: res.Header,
6726 HTTPStatusCode: res.StatusCode,
6727 },
6728 }
6729 target := &ret
6730 if err := gensupport.DecodeResponse(target, res); err != nil {
6731 return nil, err
6732 }
6733 return ret, nil
6734 }
6735
6736 type BillingAccountsLocationsBucketsLinksDeleteCall struct {
6737 s *Service
6738 name string
6739 urlParams_ gensupport.URLParams
6740 ctx_ context.Context
6741 header_ http.Header
6742 }
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756 func (r *BillingAccountsLocationsBucketsLinksService) Delete(name string) *BillingAccountsLocationsBucketsLinksDeleteCall {
6757 c := &BillingAccountsLocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6758 c.name = name
6759 return c
6760 }
6761
6762
6763
6764
6765 func (c *BillingAccountsLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsLinksDeleteCall {
6766 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6767 return c
6768 }
6769
6770
6771 func (c *BillingAccountsLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsLinksDeleteCall {
6772 c.ctx_ = ctx
6773 return c
6774 }
6775
6776
6777
6778 func (c *BillingAccountsLocationsBucketsLinksDeleteCall) Header() http.Header {
6779 if c.header_ == nil {
6780 c.header_ = make(http.Header)
6781 }
6782 return c.header_
6783 }
6784
6785 func (c *BillingAccountsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
6786 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6787 var body io.Reader = nil
6788 c.urlParams_.Set("alt", alt)
6789 c.urlParams_.Set("prettyPrint", "false")
6790 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6791 urls += "?" + c.urlParams_.Encode()
6792 req, err := http.NewRequest("DELETE", urls, body)
6793 if err != nil {
6794 return nil, err
6795 }
6796 req.Header = reqHeaders
6797 googleapi.Expand(req.URL, map[string]string{
6798 "name": c.name,
6799 })
6800 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6801 }
6802
6803
6804
6805
6806
6807
6808 func (c *BillingAccountsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6809 gensupport.SetOptions(c.urlParams_, opts...)
6810 res, err := c.doRequest("json")
6811 if res != nil && res.StatusCode == http.StatusNotModified {
6812 if res.Body != nil {
6813 res.Body.Close()
6814 }
6815 return nil, gensupport.WrapError(&googleapi.Error{
6816 Code: res.StatusCode,
6817 Header: res.Header,
6818 })
6819 }
6820 if err != nil {
6821 return nil, err
6822 }
6823 defer googleapi.CloseBody(res)
6824 if err := googleapi.CheckResponse(res); err != nil {
6825 return nil, gensupport.WrapError(err)
6826 }
6827 ret := &Operation{
6828 ServerResponse: googleapi.ServerResponse{
6829 Header: res.Header,
6830 HTTPStatusCode: res.StatusCode,
6831 },
6832 }
6833 target := &ret
6834 if err := gensupport.DecodeResponse(target, res); err != nil {
6835 return nil, err
6836 }
6837 return ret, nil
6838 }
6839
6840 type BillingAccountsLocationsBucketsLinksGetCall struct {
6841 s *Service
6842 name string
6843 urlParams_ gensupport.URLParams
6844 ifNoneMatch_ string
6845 ctx_ context.Context
6846 header_ http.Header
6847 }
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860 func (r *BillingAccountsLocationsBucketsLinksService) Get(name string) *BillingAccountsLocationsBucketsLinksGetCall {
6861 c := &BillingAccountsLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6862 c.name = name
6863 return c
6864 }
6865
6866
6867
6868
6869 func (c *BillingAccountsLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsLinksGetCall {
6870 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6871 return c
6872 }
6873
6874
6875
6876
6877 func (c *BillingAccountsLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsLinksGetCall {
6878 c.ifNoneMatch_ = entityTag
6879 return c
6880 }
6881
6882
6883 func (c *BillingAccountsLocationsBucketsLinksGetCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsLinksGetCall {
6884 c.ctx_ = ctx
6885 return c
6886 }
6887
6888
6889
6890 func (c *BillingAccountsLocationsBucketsLinksGetCall) Header() http.Header {
6891 if c.header_ == nil {
6892 c.header_ = make(http.Header)
6893 }
6894 return c.header_
6895 }
6896
6897 func (c *BillingAccountsLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) {
6898 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6899 if c.ifNoneMatch_ != "" {
6900 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6901 }
6902 var body io.Reader = nil
6903 c.urlParams_.Set("alt", alt)
6904 c.urlParams_.Set("prettyPrint", "false")
6905 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6906 urls += "?" + c.urlParams_.Encode()
6907 req, err := http.NewRequest("GET", urls, body)
6908 if err != nil {
6909 return nil, err
6910 }
6911 req.Header = reqHeaders
6912 googleapi.Expand(req.URL, map[string]string{
6913 "name": c.name,
6914 })
6915 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6916 }
6917
6918
6919
6920
6921
6922
6923 func (c *BillingAccountsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) {
6924 gensupport.SetOptions(c.urlParams_, opts...)
6925 res, err := c.doRequest("json")
6926 if res != nil && res.StatusCode == http.StatusNotModified {
6927 if res.Body != nil {
6928 res.Body.Close()
6929 }
6930 return nil, gensupport.WrapError(&googleapi.Error{
6931 Code: res.StatusCode,
6932 Header: res.Header,
6933 })
6934 }
6935 if err != nil {
6936 return nil, err
6937 }
6938 defer googleapi.CloseBody(res)
6939 if err := googleapi.CheckResponse(res); err != nil {
6940 return nil, gensupport.WrapError(err)
6941 }
6942 ret := &Link{
6943 ServerResponse: googleapi.ServerResponse{
6944 Header: res.Header,
6945 HTTPStatusCode: res.StatusCode,
6946 },
6947 }
6948 target := &ret
6949 if err := gensupport.DecodeResponse(target, res); err != nil {
6950 return nil, err
6951 }
6952 return ret, nil
6953 }
6954
6955 type BillingAccountsLocationsBucketsLinksListCall struct {
6956 s *Service
6957 parent string
6958 urlParams_ gensupport.URLParams
6959 ifNoneMatch_ string
6960 ctx_ context.Context
6961 header_ http.Header
6962 }
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972 func (r *BillingAccountsLocationsBucketsLinksService) List(parent string) *BillingAccountsLocationsBucketsLinksListCall {
6973 c := &BillingAccountsLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6974 c.parent = parent
6975 return c
6976 }
6977
6978
6979
6980 func (c *BillingAccountsLocationsBucketsLinksListCall) PageSize(pageSize int64) *BillingAccountsLocationsBucketsLinksListCall {
6981 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6982 return c
6983 }
6984
6985
6986
6987
6988 func (c *BillingAccountsLocationsBucketsLinksListCall) PageToken(pageToken string) *BillingAccountsLocationsBucketsLinksListCall {
6989 c.urlParams_.Set("pageToken", pageToken)
6990 return c
6991 }
6992
6993
6994
6995
6996 func (c *BillingAccountsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsLinksListCall {
6997 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6998 return c
6999 }
7000
7001
7002
7003
7004 func (c *BillingAccountsLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsLinksListCall {
7005 c.ifNoneMatch_ = entityTag
7006 return c
7007 }
7008
7009
7010 func (c *BillingAccountsLocationsBucketsLinksListCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsLinksListCall {
7011 c.ctx_ = ctx
7012 return c
7013 }
7014
7015
7016
7017 func (c *BillingAccountsLocationsBucketsLinksListCall) Header() http.Header {
7018 if c.header_ == nil {
7019 c.header_ = make(http.Header)
7020 }
7021 return c.header_
7022 }
7023
7024 func (c *BillingAccountsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) {
7025 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7026 if c.ifNoneMatch_ != "" {
7027 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7028 }
7029 var body io.Reader = nil
7030 c.urlParams_.Set("alt", alt)
7031 c.urlParams_.Set("prettyPrint", "false")
7032 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
7033 urls += "?" + c.urlParams_.Encode()
7034 req, err := http.NewRequest("GET", urls, body)
7035 if err != nil {
7036 return nil, err
7037 }
7038 req.Header = reqHeaders
7039 googleapi.Expand(req.URL, map[string]string{
7040 "parent": c.parent,
7041 })
7042 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7043 }
7044
7045
7046
7047
7048
7049
7050
7051 func (c *BillingAccountsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) {
7052 gensupport.SetOptions(c.urlParams_, opts...)
7053 res, err := c.doRequest("json")
7054 if res != nil && res.StatusCode == http.StatusNotModified {
7055 if res.Body != nil {
7056 res.Body.Close()
7057 }
7058 return nil, gensupport.WrapError(&googleapi.Error{
7059 Code: res.StatusCode,
7060 Header: res.Header,
7061 })
7062 }
7063 if err != nil {
7064 return nil, err
7065 }
7066 defer googleapi.CloseBody(res)
7067 if err := googleapi.CheckResponse(res); err != nil {
7068 return nil, gensupport.WrapError(err)
7069 }
7070 ret := &ListLinksResponse{
7071 ServerResponse: googleapi.ServerResponse{
7072 Header: res.Header,
7073 HTTPStatusCode: res.StatusCode,
7074 },
7075 }
7076 target := &ret
7077 if err := gensupport.DecodeResponse(target, res); err != nil {
7078 return nil, err
7079 }
7080 return ret, nil
7081 }
7082
7083
7084
7085
7086 func (c *BillingAccountsLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error {
7087 c.ctx_ = ctx
7088 defer c.PageToken(c.urlParams_.Get("pageToken"))
7089 for {
7090 x, err := c.Do()
7091 if err != nil {
7092 return err
7093 }
7094 if err := f(x); err != nil {
7095 return err
7096 }
7097 if x.NextPageToken == "" {
7098 return nil
7099 }
7100 c.PageToken(x.NextPageToken)
7101 }
7102 }
7103
7104 type BillingAccountsLocationsBucketsViewsCreateCall struct {
7105 s *Service
7106 parent string
7107 logview *LogView
7108 urlParams_ gensupport.URLParams
7109 ctx_ context.Context
7110 header_ http.Header
7111 }
7112
7113
7114
7115
7116
7117
7118
7119 func (r *BillingAccountsLocationsBucketsViewsService) Create(parent string, logview *LogView) *BillingAccountsLocationsBucketsViewsCreateCall {
7120 c := &BillingAccountsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7121 c.parent = parent
7122 c.logview = logview
7123 return c
7124 }
7125
7126
7127
7128
7129 func (c *BillingAccountsLocationsBucketsViewsCreateCall) ViewId(viewId string) *BillingAccountsLocationsBucketsViewsCreateCall {
7130 c.urlParams_.Set("viewId", viewId)
7131 return c
7132 }
7133
7134
7135
7136
7137 func (c *BillingAccountsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsCreateCall {
7138 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7139 return c
7140 }
7141
7142
7143 func (c *BillingAccountsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsCreateCall {
7144 c.ctx_ = ctx
7145 return c
7146 }
7147
7148
7149
7150 func (c *BillingAccountsLocationsBucketsViewsCreateCall) Header() http.Header {
7151 if c.header_ == nil {
7152 c.header_ = make(http.Header)
7153 }
7154 return c.header_
7155 }
7156
7157 func (c *BillingAccountsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
7158 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7159 var body io.Reader = nil
7160 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
7161 if err != nil {
7162 return nil, err
7163 }
7164 c.urlParams_.Set("alt", alt)
7165 c.urlParams_.Set("prettyPrint", "false")
7166 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
7167 urls += "?" + c.urlParams_.Encode()
7168 req, err := http.NewRequest("POST", urls, body)
7169 if err != nil {
7170 return nil, err
7171 }
7172 req.Header = reqHeaders
7173 googleapi.Expand(req.URL, map[string]string{
7174 "parent": c.parent,
7175 })
7176 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7177 }
7178
7179
7180
7181
7182
7183
7184 func (c *BillingAccountsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
7185 gensupport.SetOptions(c.urlParams_, opts...)
7186 res, err := c.doRequest("json")
7187 if res != nil && res.StatusCode == http.StatusNotModified {
7188 if res.Body != nil {
7189 res.Body.Close()
7190 }
7191 return nil, gensupport.WrapError(&googleapi.Error{
7192 Code: res.StatusCode,
7193 Header: res.Header,
7194 })
7195 }
7196 if err != nil {
7197 return nil, err
7198 }
7199 defer googleapi.CloseBody(res)
7200 if err := googleapi.CheckResponse(res); err != nil {
7201 return nil, gensupport.WrapError(err)
7202 }
7203 ret := &LogView{
7204 ServerResponse: googleapi.ServerResponse{
7205 Header: res.Header,
7206 HTTPStatusCode: res.StatusCode,
7207 },
7208 }
7209 target := &ret
7210 if err := gensupport.DecodeResponse(target, res); err != nil {
7211 return nil, err
7212 }
7213 return ret, nil
7214 }
7215
7216 type BillingAccountsLocationsBucketsViewsDeleteCall struct {
7217 s *Service
7218 name string
7219 urlParams_ gensupport.URLParams
7220 ctx_ context.Context
7221 header_ http.Header
7222 }
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233 func (r *BillingAccountsLocationsBucketsViewsService) Delete(name string) *BillingAccountsLocationsBucketsViewsDeleteCall {
7234 c := &BillingAccountsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7235 c.name = name
7236 return c
7237 }
7238
7239
7240
7241
7242 func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsDeleteCall {
7243 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7244 return c
7245 }
7246
7247
7248 func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsDeleteCall {
7249 c.ctx_ = ctx
7250 return c
7251 }
7252
7253
7254
7255 func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Header() http.Header {
7256 if c.header_ == nil {
7257 c.header_ = make(http.Header)
7258 }
7259 return c.header_
7260 }
7261
7262 func (c *BillingAccountsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
7263 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7264 var body io.Reader = nil
7265 c.urlParams_.Set("alt", alt)
7266 c.urlParams_.Set("prettyPrint", "false")
7267 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
7268 urls += "?" + c.urlParams_.Encode()
7269 req, err := http.NewRequest("DELETE", urls, body)
7270 if err != nil {
7271 return nil, err
7272 }
7273 req.Header = reqHeaders
7274 googleapi.Expand(req.URL, map[string]string{
7275 "name": c.name,
7276 })
7277 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7278 }
7279
7280
7281
7282
7283
7284
7285 func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7286 gensupport.SetOptions(c.urlParams_, opts...)
7287 res, err := c.doRequest("json")
7288 if res != nil && res.StatusCode == http.StatusNotModified {
7289 if res.Body != nil {
7290 res.Body.Close()
7291 }
7292 return nil, gensupport.WrapError(&googleapi.Error{
7293 Code: res.StatusCode,
7294 Header: res.Header,
7295 })
7296 }
7297 if err != nil {
7298 return nil, err
7299 }
7300 defer googleapi.CloseBody(res)
7301 if err := googleapi.CheckResponse(res); err != nil {
7302 return nil, gensupport.WrapError(err)
7303 }
7304 ret := &Empty{
7305 ServerResponse: googleapi.ServerResponse{
7306 Header: res.Header,
7307 HTTPStatusCode: res.StatusCode,
7308 },
7309 }
7310 target := &ret
7311 if err := gensupport.DecodeResponse(target, res); err != nil {
7312 return nil, err
7313 }
7314 return ret, nil
7315 }
7316
7317 type BillingAccountsLocationsBucketsViewsGetCall struct {
7318 s *Service
7319 name string
7320 urlParams_ gensupport.URLParams
7321 ifNoneMatch_ string
7322 ctx_ context.Context
7323 header_ http.Header
7324 }
7325
7326
7327
7328
7329
7330
7331
7332
7333 func (r *BillingAccountsLocationsBucketsViewsService) Get(name string) *BillingAccountsLocationsBucketsViewsGetCall {
7334 c := &BillingAccountsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7335 c.name = name
7336 return c
7337 }
7338
7339
7340
7341
7342 func (c *BillingAccountsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsGetCall {
7343 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7344 return c
7345 }
7346
7347
7348
7349
7350 func (c *BillingAccountsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsViewsGetCall {
7351 c.ifNoneMatch_ = entityTag
7352 return c
7353 }
7354
7355
7356 func (c *BillingAccountsLocationsBucketsViewsGetCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsGetCall {
7357 c.ctx_ = ctx
7358 return c
7359 }
7360
7361
7362
7363 func (c *BillingAccountsLocationsBucketsViewsGetCall) Header() http.Header {
7364 if c.header_ == nil {
7365 c.header_ = make(http.Header)
7366 }
7367 return c.header_
7368 }
7369
7370 func (c *BillingAccountsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
7371 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7372 if c.ifNoneMatch_ != "" {
7373 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7374 }
7375 var body io.Reader = nil
7376 c.urlParams_.Set("alt", alt)
7377 c.urlParams_.Set("prettyPrint", "false")
7378 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
7379 urls += "?" + c.urlParams_.Encode()
7380 req, err := http.NewRequest("GET", urls, body)
7381 if err != nil {
7382 return nil, err
7383 }
7384 req.Header = reqHeaders
7385 googleapi.Expand(req.URL, map[string]string{
7386 "name": c.name,
7387 })
7388 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7389 }
7390
7391
7392
7393
7394
7395
7396 func (c *BillingAccountsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
7397 gensupport.SetOptions(c.urlParams_, opts...)
7398 res, err := c.doRequest("json")
7399 if res != nil && res.StatusCode == http.StatusNotModified {
7400 if res.Body != nil {
7401 res.Body.Close()
7402 }
7403 return nil, gensupport.WrapError(&googleapi.Error{
7404 Code: res.StatusCode,
7405 Header: res.Header,
7406 })
7407 }
7408 if err != nil {
7409 return nil, err
7410 }
7411 defer googleapi.CloseBody(res)
7412 if err := googleapi.CheckResponse(res); err != nil {
7413 return nil, gensupport.WrapError(err)
7414 }
7415 ret := &LogView{
7416 ServerResponse: googleapi.ServerResponse{
7417 Header: res.Header,
7418 HTTPStatusCode: res.StatusCode,
7419 },
7420 }
7421 target := &ret
7422 if err := gensupport.DecodeResponse(target, res); err != nil {
7423 return nil, err
7424 }
7425 return ret, nil
7426 }
7427
7428 type BillingAccountsLocationsBucketsViewsListCall struct {
7429 s *Service
7430 parent string
7431 urlParams_ gensupport.URLParams
7432 ifNoneMatch_ string
7433 ctx_ context.Context
7434 header_ http.Header
7435 }
7436
7437
7438
7439
7440
7441 func (r *BillingAccountsLocationsBucketsViewsService) List(parent string) *BillingAccountsLocationsBucketsViewsListCall {
7442 c := &BillingAccountsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7443 c.parent = parent
7444 return c
7445 }
7446
7447
7448
7449
7450
7451 func (c *BillingAccountsLocationsBucketsViewsListCall) PageSize(pageSize int64) *BillingAccountsLocationsBucketsViewsListCall {
7452 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7453 return c
7454 }
7455
7456
7457
7458
7459
7460 func (c *BillingAccountsLocationsBucketsViewsListCall) PageToken(pageToken string) *BillingAccountsLocationsBucketsViewsListCall {
7461 c.urlParams_.Set("pageToken", pageToken)
7462 return c
7463 }
7464
7465
7466
7467
7468 func (c *BillingAccountsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsListCall {
7469 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7470 return c
7471 }
7472
7473
7474
7475
7476 func (c *BillingAccountsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsViewsListCall {
7477 c.ifNoneMatch_ = entityTag
7478 return c
7479 }
7480
7481
7482 func (c *BillingAccountsLocationsBucketsViewsListCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsListCall {
7483 c.ctx_ = ctx
7484 return c
7485 }
7486
7487
7488
7489 func (c *BillingAccountsLocationsBucketsViewsListCall) Header() http.Header {
7490 if c.header_ == nil {
7491 c.header_ = make(http.Header)
7492 }
7493 return c.header_
7494 }
7495
7496 func (c *BillingAccountsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
7497 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7498 if c.ifNoneMatch_ != "" {
7499 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7500 }
7501 var body io.Reader = nil
7502 c.urlParams_.Set("alt", alt)
7503 c.urlParams_.Set("prettyPrint", "false")
7504 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
7505 urls += "?" + c.urlParams_.Encode()
7506 req, err := http.NewRequest("GET", urls, body)
7507 if err != nil {
7508 return nil, err
7509 }
7510 req.Header = reqHeaders
7511 googleapi.Expand(req.URL, map[string]string{
7512 "parent": c.parent,
7513 })
7514 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7515 }
7516
7517
7518
7519
7520
7521
7522
7523 func (c *BillingAccountsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
7524 gensupport.SetOptions(c.urlParams_, opts...)
7525 res, err := c.doRequest("json")
7526 if res != nil && res.StatusCode == http.StatusNotModified {
7527 if res.Body != nil {
7528 res.Body.Close()
7529 }
7530 return nil, gensupport.WrapError(&googleapi.Error{
7531 Code: res.StatusCode,
7532 Header: res.Header,
7533 })
7534 }
7535 if err != nil {
7536 return nil, err
7537 }
7538 defer googleapi.CloseBody(res)
7539 if err := googleapi.CheckResponse(res); err != nil {
7540 return nil, gensupport.WrapError(err)
7541 }
7542 ret := &ListViewsResponse{
7543 ServerResponse: googleapi.ServerResponse{
7544 Header: res.Header,
7545 HTTPStatusCode: res.StatusCode,
7546 },
7547 }
7548 target := &ret
7549 if err := gensupport.DecodeResponse(target, res); err != nil {
7550 return nil, err
7551 }
7552 return ret, nil
7553 }
7554
7555
7556
7557
7558 func (c *BillingAccountsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
7559 c.ctx_ = ctx
7560 defer c.PageToken(c.urlParams_.Get("pageToken"))
7561 for {
7562 x, err := c.Do()
7563 if err != nil {
7564 return err
7565 }
7566 if err := f(x); err != nil {
7567 return err
7568 }
7569 if x.NextPageToken == "" {
7570 return nil
7571 }
7572 c.PageToken(x.NextPageToken)
7573 }
7574 }
7575
7576 type BillingAccountsLocationsBucketsViewsPatchCall struct {
7577 s *Service
7578 name string
7579 logview *LogView
7580 urlParams_ gensupport.URLParams
7581 ctx_ context.Context
7582 header_ http.Header
7583 }
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596 func (r *BillingAccountsLocationsBucketsViewsService) Patch(name string, logview *LogView) *BillingAccountsLocationsBucketsViewsPatchCall {
7597 c := &BillingAccountsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7598 c.name = name
7599 c.logview = logview
7600 return c
7601 }
7602
7603
7604
7605
7606
7607
7608
7609 func (c *BillingAccountsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *BillingAccountsLocationsBucketsViewsPatchCall {
7610 c.urlParams_.Set("updateMask", updateMask)
7611 return c
7612 }
7613
7614
7615
7616
7617 func (c *BillingAccountsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsPatchCall {
7618 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7619 return c
7620 }
7621
7622
7623 func (c *BillingAccountsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsPatchCall {
7624 c.ctx_ = ctx
7625 return c
7626 }
7627
7628
7629
7630 func (c *BillingAccountsLocationsBucketsViewsPatchCall) Header() http.Header {
7631 if c.header_ == nil {
7632 c.header_ = make(http.Header)
7633 }
7634 return c.header_
7635 }
7636
7637 func (c *BillingAccountsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
7638 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7639 var body io.Reader = nil
7640 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
7641 if err != nil {
7642 return nil, err
7643 }
7644 c.urlParams_.Set("alt", alt)
7645 c.urlParams_.Set("prettyPrint", "false")
7646 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
7647 urls += "?" + c.urlParams_.Encode()
7648 req, err := http.NewRequest("PATCH", urls, body)
7649 if err != nil {
7650 return nil, err
7651 }
7652 req.Header = reqHeaders
7653 googleapi.Expand(req.URL, map[string]string{
7654 "name": c.name,
7655 })
7656 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7657 }
7658
7659
7660
7661
7662
7663
7664 func (c *BillingAccountsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
7665 gensupport.SetOptions(c.urlParams_, opts...)
7666 res, err := c.doRequest("json")
7667 if res != nil && res.StatusCode == http.StatusNotModified {
7668 if res.Body != nil {
7669 res.Body.Close()
7670 }
7671 return nil, gensupport.WrapError(&googleapi.Error{
7672 Code: res.StatusCode,
7673 Header: res.Header,
7674 })
7675 }
7676 if err != nil {
7677 return nil, err
7678 }
7679 defer googleapi.CloseBody(res)
7680 if err := googleapi.CheckResponse(res); err != nil {
7681 return nil, gensupport.WrapError(err)
7682 }
7683 ret := &LogView{
7684 ServerResponse: googleapi.ServerResponse{
7685 Header: res.Header,
7686 HTTPStatusCode: res.StatusCode,
7687 },
7688 }
7689 target := &ret
7690 if err := gensupport.DecodeResponse(target, res); err != nil {
7691 return nil, err
7692 }
7693 return ret, nil
7694 }
7695
7696 type BillingAccountsLocationsBucketsViewsLogsListCall struct {
7697 s *Service
7698 parent string
7699 urlParams_ gensupport.URLParams
7700 ifNoneMatch_ string
7701 ctx_ context.Context
7702 header_ http.Header
7703 }
7704
7705
7706
7707
7708
7709
7710
7711 func (r *BillingAccountsLocationsBucketsViewsLogsService) List(parent string) *BillingAccountsLocationsBucketsViewsLogsListCall {
7712 c := &BillingAccountsLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7713 c.parent = parent
7714 return c
7715 }
7716
7717
7718
7719
7720
7721 func (c *BillingAccountsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *BillingAccountsLocationsBucketsViewsLogsListCall {
7722 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7723 return c
7724 }
7725
7726
7727
7728
7729
7730 func (c *BillingAccountsLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *BillingAccountsLocationsBucketsViewsLogsListCall {
7731 c.urlParams_.Set("pageToken", pageToken)
7732 return c
7733 }
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748 func (c *BillingAccountsLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *BillingAccountsLocationsBucketsViewsLogsListCall {
7749 c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
7750 return c
7751 }
7752
7753
7754
7755
7756 func (c *BillingAccountsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsLogsListCall {
7757 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7758 return c
7759 }
7760
7761
7762
7763
7764 func (c *BillingAccountsLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsViewsLogsListCall {
7765 c.ifNoneMatch_ = entityTag
7766 return c
7767 }
7768
7769
7770 func (c *BillingAccountsLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsLogsListCall {
7771 c.ctx_ = ctx
7772 return c
7773 }
7774
7775
7776
7777 func (c *BillingAccountsLocationsBucketsViewsLogsListCall) Header() http.Header {
7778 if c.header_ == nil {
7779 c.header_ = make(http.Header)
7780 }
7781 return c.header_
7782 }
7783
7784 func (c *BillingAccountsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) {
7785 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7786 if c.ifNoneMatch_ != "" {
7787 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7788 }
7789 var body io.Reader = nil
7790 c.urlParams_.Set("alt", alt)
7791 c.urlParams_.Set("prettyPrint", "false")
7792 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
7793 urls += "?" + c.urlParams_.Encode()
7794 req, err := http.NewRequest("GET", urls, body)
7795 if err != nil {
7796 return nil, err
7797 }
7798 req.Header = reqHeaders
7799 googleapi.Expand(req.URL, map[string]string{
7800 "parent": c.parent,
7801 })
7802 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7803 }
7804
7805
7806
7807
7808
7809
7810
7811 func (c *BillingAccountsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
7812 gensupport.SetOptions(c.urlParams_, opts...)
7813 res, err := c.doRequest("json")
7814 if res != nil && res.StatusCode == http.StatusNotModified {
7815 if res.Body != nil {
7816 res.Body.Close()
7817 }
7818 return nil, gensupport.WrapError(&googleapi.Error{
7819 Code: res.StatusCode,
7820 Header: res.Header,
7821 })
7822 }
7823 if err != nil {
7824 return nil, err
7825 }
7826 defer googleapi.CloseBody(res)
7827 if err := googleapi.CheckResponse(res); err != nil {
7828 return nil, gensupport.WrapError(err)
7829 }
7830 ret := &ListLogsResponse{
7831 ServerResponse: googleapi.ServerResponse{
7832 Header: res.Header,
7833 HTTPStatusCode: res.StatusCode,
7834 },
7835 }
7836 target := &ret
7837 if err := gensupport.DecodeResponse(target, res); err != nil {
7838 return nil, err
7839 }
7840 return ret, nil
7841 }
7842
7843
7844
7845
7846 func (c *BillingAccountsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
7847 c.ctx_ = ctx
7848 defer c.PageToken(c.urlParams_.Get("pageToken"))
7849 for {
7850 x, err := c.Do()
7851 if err != nil {
7852 return err
7853 }
7854 if err := f(x); err != nil {
7855 return err
7856 }
7857 if x.NextPageToken == "" {
7858 return nil
7859 }
7860 c.PageToken(x.NextPageToken)
7861 }
7862 }
7863
7864 type BillingAccountsLocationsOperationsCancelCall struct {
7865 s *Service
7866 name string
7867 canceloperationrequest *CancelOperationRequest
7868 urlParams_ gensupport.URLParams
7869 ctx_ context.Context
7870 header_ http.Header
7871 }
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884 func (r *BillingAccountsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *BillingAccountsLocationsOperationsCancelCall {
7885 c := &BillingAccountsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7886 c.name = name
7887 c.canceloperationrequest = canceloperationrequest
7888 return c
7889 }
7890
7891
7892
7893
7894 func (c *BillingAccountsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsOperationsCancelCall {
7895 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7896 return c
7897 }
7898
7899
7900 func (c *BillingAccountsLocationsOperationsCancelCall) Context(ctx context.Context) *BillingAccountsLocationsOperationsCancelCall {
7901 c.ctx_ = ctx
7902 return c
7903 }
7904
7905
7906
7907 func (c *BillingAccountsLocationsOperationsCancelCall) Header() http.Header {
7908 if c.header_ == nil {
7909 c.header_ = make(http.Header)
7910 }
7911 return c.header_
7912 }
7913
7914 func (c *BillingAccountsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
7915 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7916 var body io.Reader = nil
7917 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
7918 if err != nil {
7919 return nil, err
7920 }
7921 c.urlParams_.Set("alt", alt)
7922 c.urlParams_.Set("prettyPrint", "false")
7923 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
7924 urls += "?" + c.urlParams_.Encode()
7925 req, err := http.NewRequest("POST", urls, body)
7926 if err != nil {
7927 return nil, err
7928 }
7929 req.Header = reqHeaders
7930 googleapi.Expand(req.URL, map[string]string{
7931 "name": c.name,
7932 })
7933 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7934 }
7935
7936
7937
7938
7939
7940
7941 func (c *BillingAccountsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7942 gensupport.SetOptions(c.urlParams_, opts...)
7943 res, err := c.doRequest("json")
7944 if res != nil && res.StatusCode == http.StatusNotModified {
7945 if res.Body != nil {
7946 res.Body.Close()
7947 }
7948 return nil, gensupport.WrapError(&googleapi.Error{
7949 Code: res.StatusCode,
7950 Header: res.Header,
7951 })
7952 }
7953 if err != nil {
7954 return nil, err
7955 }
7956 defer googleapi.CloseBody(res)
7957 if err := googleapi.CheckResponse(res); err != nil {
7958 return nil, gensupport.WrapError(err)
7959 }
7960 ret := &Empty{
7961 ServerResponse: googleapi.ServerResponse{
7962 Header: res.Header,
7963 HTTPStatusCode: res.StatusCode,
7964 },
7965 }
7966 target := &ret
7967 if err := gensupport.DecodeResponse(target, res); err != nil {
7968 return nil, err
7969 }
7970 return ret, nil
7971 }
7972
7973 type BillingAccountsLocationsOperationsGetCall struct {
7974 s *Service
7975 name string
7976 urlParams_ gensupport.URLParams
7977 ifNoneMatch_ string
7978 ctx_ context.Context
7979 header_ http.Header
7980 }
7981
7982
7983
7984
7985
7986
7987 func (r *BillingAccountsLocationsOperationsService) Get(name string) *BillingAccountsLocationsOperationsGetCall {
7988 c := &BillingAccountsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7989 c.name = name
7990 return c
7991 }
7992
7993
7994
7995
7996 func (c *BillingAccountsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsOperationsGetCall {
7997 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7998 return c
7999 }
8000
8001
8002
8003
8004 func (c *BillingAccountsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsOperationsGetCall {
8005 c.ifNoneMatch_ = entityTag
8006 return c
8007 }
8008
8009
8010 func (c *BillingAccountsLocationsOperationsGetCall) Context(ctx context.Context) *BillingAccountsLocationsOperationsGetCall {
8011 c.ctx_ = ctx
8012 return c
8013 }
8014
8015
8016
8017 func (c *BillingAccountsLocationsOperationsGetCall) Header() http.Header {
8018 if c.header_ == nil {
8019 c.header_ = make(http.Header)
8020 }
8021 return c.header_
8022 }
8023
8024 func (c *BillingAccountsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
8025 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8026 if c.ifNoneMatch_ != "" {
8027 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8028 }
8029 var body io.Reader = nil
8030 c.urlParams_.Set("alt", alt)
8031 c.urlParams_.Set("prettyPrint", "false")
8032 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
8033 urls += "?" + c.urlParams_.Encode()
8034 req, err := http.NewRequest("GET", urls, body)
8035 if err != nil {
8036 return nil, err
8037 }
8038 req.Header = reqHeaders
8039 googleapi.Expand(req.URL, map[string]string{
8040 "name": c.name,
8041 })
8042 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8043 }
8044
8045
8046
8047
8048
8049
8050 func (c *BillingAccountsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8051 gensupport.SetOptions(c.urlParams_, opts...)
8052 res, err := c.doRequest("json")
8053 if res != nil && res.StatusCode == http.StatusNotModified {
8054 if res.Body != nil {
8055 res.Body.Close()
8056 }
8057 return nil, gensupport.WrapError(&googleapi.Error{
8058 Code: res.StatusCode,
8059 Header: res.Header,
8060 })
8061 }
8062 if err != nil {
8063 return nil, err
8064 }
8065 defer googleapi.CloseBody(res)
8066 if err := googleapi.CheckResponse(res); err != nil {
8067 return nil, gensupport.WrapError(err)
8068 }
8069 ret := &Operation{
8070 ServerResponse: googleapi.ServerResponse{
8071 Header: res.Header,
8072 HTTPStatusCode: res.StatusCode,
8073 },
8074 }
8075 target := &ret
8076 if err := gensupport.DecodeResponse(target, res); err != nil {
8077 return nil, err
8078 }
8079 return ret, nil
8080 }
8081
8082 type BillingAccountsLocationsOperationsListCall struct {
8083 s *Service
8084 name string
8085 urlParams_ gensupport.URLParams
8086 ifNoneMatch_ string
8087 ctx_ context.Context
8088 header_ http.Header
8089 }
8090
8091
8092
8093
8094
8095 func (r *BillingAccountsLocationsOperationsService) List(name string) *BillingAccountsLocationsOperationsListCall {
8096 c := &BillingAccountsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8097 c.name = name
8098 return c
8099 }
8100
8101
8102 func (c *BillingAccountsLocationsOperationsListCall) Filter(filter string) *BillingAccountsLocationsOperationsListCall {
8103 c.urlParams_.Set("filter", filter)
8104 return c
8105 }
8106
8107
8108
8109 func (c *BillingAccountsLocationsOperationsListCall) PageSize(pageSize int64) *BillingAccountsLocationsOperationsListCall {
8110 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8111 return c
8112 }
8113
8114
8115
8116 func (c *BillingAccountsLocationsOperationsListCall) PageToken(pageToken string) *BillingAccountsLocationsOperationsListCall {
8117 c.urlParams_.Set("pageToken", pageToken)
8118 return c
8119 }
8120
8121
8122
8123
8124 func (c *BillingAccountsLocationsOperationsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsOperationsListCall {
8125 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8126 return c
8127 }
8128
8129
8130
8131
8132 func (c *BillingAccountsLocationsOperationsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsOperationsListCall {
8133 c.ifNoneMatch_ = entityTag
8134 return c
8135 }
8136
8137
8138 func (c *BillingAccountsLocationsOperationsListCall) Context(ctx context.Context) *BillingAccountsLocationsOperationsListCall {
8139 c.ctx_ = ctx
8140 return c
8141 }
8142
8143
8144
8145 func (c *BillingAccountsLocationsOperationsListCall) Header() http.Header {
8146 if c.header_ == nil {
8147 c.header_ = make(http.Header)
8148 }
8149 return c.header_
8150 }
8151
8152 func (c *BillingAccountsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
8153 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8154 if c.ifNoneMatch_ != "" {
8155 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8156 }
8157 var body io.Reader = nil
8158 c.urlParams_.Set("alt", alt)
8159 c.urlParams_.Set("prettyPrint", "false")
8160 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
8161 urls += "?" + c.urlParams_.Encode()
8162 req, err := http.NewRequest("GET", urls, body)
8163 if err != nil {
8164 return nil, err
8165 }
8166 req.Header = reqHeaders
8167 googleapi.Expand(req.URL, map[string]string{
8168 "name": c.name,
8169 })
8170 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8171 }
8172
8173
8174
8175
8176
8177
8178
8179 func (c *BillingAccountsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
8180 gensupport.SetOptions(c.urlParams_, opts...)
8181 res, err := c.doRequest("json")
8182 if res != nil && res.StatusCode == http.StatusNotModified {
8183 if res.Body != nil {
8184 res.Body.Close()
8185 }
8186 return nil, gensupport.WrapError(&googleapi.Error{
8187 Code: res.StatusCode,
8188 Header: res.Header,
8189 })
8190 }
8191 if err != nil {
8192 return nil, err
8193 }
8194 defer googleapi.CloseBody(res)
8195 if err := googleapi.CheckResponse(res); err != nil {
8196 return nil, gensupport.WrapError(err)
8197 }
8198 ret := &ListOperationsResponse{
8199 ServerResponse: googleapi.ServerResponse{
8200 Header: res.Header,
8201 HTTPStatusCode: res.StatusCode,
8202 },
8203 }
8204 target := &ret
8205 if err := gensupport.DecodeResponse(target, res); err != nil {
8206 return nil, err
8207 }
8208 return ret, nil
8209 }
8210
8211
8212
8213
8214 func (c *BillingAccountsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
8215 c.ctx_ = ctx
8216 defer c.PageToken(c.urlParams_.Get("pageToken"))
8217 for {
8218 x, err := c.Do()
8219 if err != nil {
8220 return err
8221 }
8222 if err := f(x); err != nil {
8223 return err
8224 }
8225 if x.NextPageToken == "" {
8226 return nil
8227 }
8228 c.PageToken(x.NextPageToken)
8229 }
8230 }
8231
8232 type BillingAccountsLocationsRecentQueriesListCall struct {
8233 s *Service
8234 parent string
8235 urlParams_ gensupport.URLParams
8236 ifNoneMatch_ string
8237 ctx_ context.Context
8238 header_ http.Header
8239 }
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252 func (r *BillingAccountsLocationsRecentQueriesService) List(parent string) *BillingAccountsLocationsRecentQueriesListCall {
8253 c := &BillingAccountsLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8254 c.parent = parent
8255 return c
8256 }
8257
8258
8259
8260
8261
8262 func (c *BillingAccountsLocationsRecentQueriesListCall) PageSize(pageSize int64) *BillingAccountsLocationsRecentQueriesListCall {
8263 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8264 return c
8265 }
8266
8267
8268
8269
8270
8271 func (c *BillingAccountsLocationsRecentQueriesListCall) PageToken(pageToken string) *BillingAccountsLocationsRecentQueriesListCall {
8272 c.urlParams_.Set("pageToken", pageToken)
8273 return c
8274 }
8275
8276
8277
8278
8279 func (c *BillingAccountsLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsRecentQueriesListCall {
8280 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8281 return c
8282 }
8283
8284
8285
8286
8287 func (c *BillingAccountsLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsRecentQueriesListCall {
8288 c.ifNoneMatch_ = entityTag
8289 return c
8290 }
8291
8292
8293 func (c *BillingAccountsLocationsRecentQueriesListCall) Context(ctx context.Context) *BillingAccountsLocationsRecentQueriesListCall {
8294 c.ctx_ = ctx
8295 return c
8296 }
8297
8298
8299
8300 func (c *BillingAccountsLocationsRecentQueriesListCall) Header() http.Header {
8301 if c.header_ == nil {
8302 c.header_ = make(http.Header)
8303 }
8304 return c.header_
8305 }
8306
8307 func (c *BillingAccountsLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) {
8308 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8309 if c.ifNoneMatch_ != "" {
8310 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8311 }
8312 var body io.Reader = nil
8313 c.urlParams_.Set("alt", alt)
8314 c.urlParams_.Set("prettyPrint", "false")
8315 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries")
8316 urls += "?" + c.urlParams_.Encode()
8317 req, err := http.NewRequest("GET", urls, body)
8318 if err != nil {
8319 return nil, err
8320 }
8321 req.Header = reqHeaders
8322 googleapi.Expand(req.URL, map[string]string{
8323 "parent": c.parent,
8324 })
8325 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8326 }
8327
8328
8329
8330
8331
8332
8333
8334 func (c *BillingAccountsLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) {
8335 gensupport.SetOptions(c.urlParams_, opts...)
8336 res, err := c.doRequest("json")
8337 if res != nil && res.StatusCode == http.StatusNotModified {
8338 if res.Body != nil {
8339 res.Body.Close()
8340 }
8341 return nil, gensupport.WrapError(&googleapi.Error{
8342 Code: res.StatusCode,
8343 Header: res.Header,
8344 })
8345 }
8346 if err != nil {
8347 return nil, err
8348 }
8349 defer googleapi.CloseBody(res)
8350 if err := googleapi.CheckResponse(res); err != nil {
8351 return nil, gensupport.WrapError(err)
8352 }
8353 ret := &ListRecentQueriesResponse{
8354 ServerResponse: googleapi.ServerResponse{
8355 Header: res.Header,
8356 HTTPStatusCode: res.StatusCode,
8357 },
8358 }
8359 target := &ret
8360 if err := gensupport.DecodeResponse(target, res); err != nil {
8361 return nil, err
8362 }
8363 return ret, nil
8364 }
8365
8366
8367
8368
8369 func (c *BillingAccountsLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error {
8370 c.ctx_ = ctx
8371 defer c.PageToken(c.urlParams_.Get("pageToken"))
8372 for {
8373 x, err := c.Do()
8374 if err != nil {
8375 return err
8376 }
8377 if err := f(x); err != nil {
8378 return err
8379 }
8380 if x.NextPageToken == "" {
8381 return nil
8382 }
8383 c.PageToken(x.NextPageToken)
8384 }
8385 }
8386
8387 type BillingAccountsLocationsSavedQueriesCreateCall struct {
8388 s *Service
8389 parent string
8390 savedquery *SavedQuery
8391 urlParams_ gensupport.URLParams
8392 ctx_ context.Context
8393 header_ http.Header
8394 }
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405 func (r *BillingAccountsLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *BillingAccountsLocationsSavedQueriesCreateCall {
8406 c := &BillingAccountsLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8407 c.parent = parent
8408 c.savedquery = savedquery
8409 return c
8410 }
8411
8412
8413
8414
8415
8416
8417
8418
8419 func (c *BillingAccountsLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *BillingAccountsLocationsSavedQueriesCreateCall {
8420 c.urlParams_.Set("savedQueryId", savedQueryId)
8421 return c
8422 }
8423
8424
8425
8426
8427 func (c *BillingAccountsLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsSavedQueriesCreateCall {
8428 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8429 return c
8430 }
8431
8432
8433 func (c *BillingAccountsLocationsSavedQueriesCreateCall) Context(ctx context.Context) *BillingAccountsLocationsSavedQueriesCreateCall {
8434 c.ctx_ = ctx
8435 return c
8436 }
8437
8438
8439
8440 func (c *BillingAccountsLocationsSavedQueriesCreateCall) Header() http.Header {
8441 if c.header_ == nil {
8442 c.header_ = make(http.Header)
8443 }
8444 return c.header_
8445 }
8446
8447 func (c *BillingAccountsLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) {
8448 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8449 var body io.Reader = nil
8450 body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery)
8451 if err != nil {
8452 return nil, err
8453 }
8454 c.urlParams_.Set("alt", alt)
8455 c.urlParams_.Set("prettyPrint", "false")
8456 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
8457 urls += "?" + c.urlParams_.Encode()
8458 req, err := http.NewRequest("POST", urls, body)
8459 if err != nil {
8460 return nil, err
8461 }
8462 req.Header = reqHeaders
8463 googleapi.Expand(req.URL, map[string]string{
8464 "parent": c.parent,
8465 })
8466 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8467 }
8468
8469
8470
8471
8472
8473
8474 func (c *BillingAccountsLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
8475 gensupport.SetOptions(c.urlParams_, opts...)
8476 res, err := c.doRequest("json")
8477 if res != nil && res.StatusCode == http.StatusNotModified {
8478 if res.Body != nil {
8479 res.Body.Close()
8480 }
8481 return nil, gensupport.WrapError(&googleapi.Error{
8482 Code: res.StatusCode,
8483 Header: res.Header,
8484 })
8485 }
8486 if err != nil {
8487 return nil, err
8488 }
8489 defer googleapi.CloseBody(res)
8490 if err := googleapi.CheckResponse(res); err != nil {
8491 return nil, gensupport.WrapError(err)
8492 }
8493 ret := &SavedQuery{
8494 ServerResponse: googleapi.ServerResponse{
8495 Header: res.Header,
8496 HTTPStatusCode: res.StatusCode,
8497 },
8498 }
8499 target := &ret
8500 if err := gensupport.DecodeResponse(target, res); err != nil {
8501 return nil, err
8502 }
8503 return ret, nil
8504 }
8505
8506 type BillingAccountsLocationsSavedQueriesDeleteCall struct {
8507 s *Service
8508 name string
8509 urlParams_ gensupport.URLParams
8510 ctx_ context.Context
8511 header_ http.Header
8512 }
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526 func (r *BillingAccountsLocationsSavedQueriesService) Delete(name string) *BillingAccountsLocationsSavedQueriesDeleteCall {
8527 c := &BillingAccountsLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8528 c.name = name
8529 return c
8530 }
8531
8532
8533
8534
8535 func (c *BillingAccountsLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsSavedQueriesDeleteCall {
8536 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8537 return c
8538 }
8539
8540
8541 func (c *BillingAccountsLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *BillingAccountsLocationsSavedQueriesDeleteCall {
8542 c.ctx_ = ctx
8543 return c
8544 }
8545
8546
8547
8548 func (c *BillingAccountsLocationsSavedQueriesDeleteCall) Header() http.Header {
8549 if c.header_ == nil {
8550 c.header_ = make(http.Header)
8551 }
8552 return c.header_
8553 }
8554
8555 func (c *BillingAccountsLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) {
8556 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8557 var body io.Reader = nil
8558 c.urlParams_.Set("alt", alt)
8559 c.urlParams_.Set("prettyPrint", "false")
8560 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
8561 urls += "?" + c.urlParams_.Encode()
8562 req, err := http.NewRequest("DELETE", urls, body)
8563 if err != nil {
8564 return nil, err
8565 }
8566 req.Header = reqHeaders
8567 googleapi.Expand(req.URL, map[string]string{
8568 "name": c.name,
8569 })
8570 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8571 }
8572
8573
8574
8575
8576
8577
8578 func (c *BillingAccountsLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8579 gensupport.SetOptions(c.urlParams_, opts...)
8580 res, err := c.doRequest("json")
8581 if res != nil && res.StatusCode == http.StatusNotModified {
8582 if res.Body != nil {
8583 res.Body.Close()
8584 }
8585 return nil, gensupport.WrapError(&googleapi.Error{
8586 Code: res.StatusCode,
8587 Header: res.Header,
8588 })
8589 }
8590 if err != nil {
8591 return nil, err
8592 }
8593 defer googleapi.CloseBody(res)
8594 if err := googleapi.CheckResponse(res); err != nil {
8595 return nil, gensupport.WrapError(err)
8596 }
8597 ret := &Empty{
8598 ServerResponse: googleapi.ServerResponse{
8599 Header: res.Header,
8600 HTTPStatusCode: res.StatusCode,
8601 },
8602 }
8603 target := &ret
8604 if err := gensupport.DecodeResponse(target, res); err != nil {
8605 return nil, err
8606 }
8607 return ret, nil
8608 }
8609
8610 type BillingAccountsLocationsSavedQueriesListCall struct {
8611 s *Service
8612 parent string
8613 urlParams_ gensupport.URLParams
8614 ifNoneMatch_ string
8615 ctx_ context.Context
8616 header_ http.Header
8617 }
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631 func (r *BillingAccountsLocationsSavedQueriesService) List(parent string) *BillingAccountsLocationsSavedQueriesListCall {
8632 c := &BillingAccountsLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8633 c.parent = parent
8634 return c
8635 }
8636
8637
8638
8639
8640
8641 func (c *BillingAccountsLocationsSavedQueriesListCall) PageSize(pageSize int64) *BillingAccountsLocationsSavedQueriesListCall {
8642 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8643 return c
8644 }
8645
8646
8647
8648
8649
8650 func (c *BillingAccountsLocationsSavedQueriesListCall) PageToken(pageToken string) *BillingAccountsLocationsSavedQueriesListCall {
8651 c.urlParams_.Set("pageToken", pageToken)
8652 return c
8653 }
8654
8655
8656
8657
8658 func (c *BillingAccountsLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsSavedQueriesListCall {
8659 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8660 return c
8661 }
8662
8663
8664
8665
8666 func (c *BillingAccountsLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsSavedQueriesListCall {
8667 c.ifNoneMatch_ = entityTag
8668 return c
8669 }
8670
8671
8672 func (c *BillingAccountsLocationsSavedQueriesListCall) Context(ctx context.Context) *BillingAccountsLocationsSavedQueriesListCall {
8673 c.ctx_ = ctx
8674 return c
8675 }
8676
8677
8678
8679 func (c *BillingAccountsLocationsSavedQueriesListCall) Header() http.Header {
8680 if c.header_ == nil {
8681 c.header_ = make(http.Header)
8682 }
8683 return c.header_
8684 }
8685
8686 func (c *BillingAccountsLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) {
8687 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8688 if c.ifNoneMatch_ != "" {
8689 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8690 }
8691 var body io.Reader = nil
8692 c.urlParams_.Set("alt", alt)
8693 c.urlParams_.Set("prettyPrint", "false")
8694 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
8695 urls += "?" + c.urlParams_.Encode()
8696 req, err := http.NewRequest("GET", urls, body)
8697 if err != nil {
8698 return nil, err
8699 }
8700 req.Header = reqHeaders
8701 googleapi.Expand(req.URL, map[string]string{
8702 "parent": c.parent,
8703 })
8704 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8705 }
8706
8707
8708
8709
8710
8711
8712
8713 func (c *BillingAccountsLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) {
8714 gensupport.SetOptions(c.urlParams_, opts...)
8715 res, err := c.doRequest("json")
8716 if res != nil && res.StatusCode == http.StatusNotModified {
8717 if res.Body != nil {
8718 res.Body.Close()
8719 }
8720 return nil, gensupport.WrapError(&googleapi.Error{
8721 Code: res.StatusCode,
8722 Header: res.Header,
8723 })
8724 }
8725 if err != nil {
8726 return nil, err
8727 }
8728 defer googleapi.CloseBody(res)
8729 if err := googleapi.CheckResponse(res); err != nil {
8730 return nil, gensupport.WrapError(err)
8731 }
8732 ret := &ListSavedQueriesResponse{
8733 ServerResponse: googleapi.ServerResponse{
8734 Header: res.Header,
8735 HTTPStatusCode: res.StatusCode,
8736 },
8737 }
8738 target := &ret
8739 if err := gensupport.DecodeResponse(target, res); err != nil {
8740 return nil, err
8741 }
8742 return ret, nil
8743 }
8744
8745
8746
8747
8748 func (c *BillingAccountsLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error {
8749 c.ctx_ = ctx
8750 defer c.PageToken(c.urlParams_.Get("pageToken"))
8751 for {
8752 x, err := c.Do()
8753 if err != nil {
8754 return err
8755 }
8756 if err := f(x); err != nil {
8757 return err
8758 }
8759 if x.NextPageToken == "" {
8760 return nil
8761 }
8762 c.PageToken(x.NextPageToken)
8763 }
8764 }
8765
8766 type BillingAccountsLogsDeleteCall struct {
8767 s *Service
8768 logName string
8769 urlParams_ gensupport.URLParams
8770 ctx_ context.Context
8771 header_ http.Header
8772 }
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787 func (r *BillingAccountsLogsService) Delete(logName string) *BillingAccountsLogsDeleteCall {
8788 c := &BillingAccountsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8789 c.logName = logName
8790 return c
8791 }
8792
8793
8794
8795
8796 func (c *BillingAccountsLogsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLogsDeleteCall {
8797 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8798 return c
8799 }
8800
8801
8802 func (c *BillingAccountsLogsDeleteCall) Context(ctx context.Context) *BillingAccountsLogsDeleteCall {
8803 c.ctx_ = ctx
8804 return c
8805 }
8806
8807
8808
8809 func (c *BillingAccountsLogsDeleteCall) Header() http.Header {
8810 if c.header_ == nil {
8811 c.header_ = make(http.Header)
8812 }
8813 return c.header_
8814 }
8815
8816 func (c *BillingAccountsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
8817 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8818 var body io.Reader = nil
8819 c.urlParams_.Set("alt", alt)
8820 c.urlParams_.Set("prettyPrint", "false")
8821 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
8822 urls += "?" + c.urlParams_.Encode()
8823 req, err := http.NewRequest("DELETE", urls, body)
8824 if err != nil {
8825 return nil, err
8826 }
8827 req.Header = reqHeaders
8828 googleapi.Expand(req.URL, map[string]string{
8829 "logName": c.logName,
8830 })
8831 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8832 }
8833
8834
8835
8836
8837
8838
8839 func (c *BillingAccountsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8840 gensupport.SetOptions(c.urlParams_, opts...)
8841 res, err := c.doRequest("json")
8842 if res != nil && res.StatusCode == http.StatusNotModified {
8843 if res.Body != nil {
8844 res.Body.Close()
8845 }
8846 return nil, gensupport.WrapError(&googleapi.Error{
8847 Code: res.StatusCode,
8848 Header: res.Header,
8849 })
8850 }
8851 if err != nil {
8852 return nil, err
8853 }
8854 defer googleapi.CloseBody(res)
8855 if err := googleapi.CheckResponse(res); err != nil {
8856 return nil, gensupport.WrapError(err)
8857 }
8858 ret := &Empty{
8859 ServerResponse: googleapi.ServerResponse{
8860 Header: res.Header,
8861 HTTPStatusCode: res.StatusCode,
8862 },
8863 }
8864 target := &ret
8865 if err := gensupport.DecodeResponse(target, res); err != nil {
8866 return nil, err
8867 }
8868 return ret, nil
8869 }
8870
8871 type BillingAccountsLogsListCall struct {
8872 s *Service
8873 parent string
8874 urlParams_ gensupport.URLParams
8875 ifNoneMatch_ string
8876 ctx_ context.Context
8877 header_ http.Header
8878 }
8879
8880
8881
8882
8883
8884
8885
8886 func (r *BillingAccountsLogsService) List(parent string) *BillingAccountsLogsListCall {
8887 c := &BillingAccountsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8888 c.parent = parent
8889 return c
8890 }
8891
8892
8893
8894
8895
8896 func (c *BillingAccountsLogsListCall) PageSize(pageSize int64) *BillingAccountsLogsListCall {
8897 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8898 return c
8899 }
8900
8901
8902
8903
8904
8905 func (c *BillingAccountsLogsListCall) PageToken(pageToken string) *BillingAccountsLogsListCall {
8906 c.urlParams_.Set("pageToken", pageToken)
8907 return c
8908 }
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923 func (c *BillingAccountsLogsListCall) ResourceNames(resourceNames ...string) *BillingAccountsLogsListCall {
8924 c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
8925 return c
8926 }
8927
8928
8929
8930
8931 func (c *BillingAccountsLogsListCall) Fields(s ...googleapi.Field) *BillingAccountsLogsListCall {
8932 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8933 return c
8934 }
8935
8936
8937
8938
8939 func (c *BillingAccountsLogsListCall) IfNoneMatch(entityTag string) *BillingAccountsLogsListCall {
8940 c.ifNoneMatch_ = entityTag
8941 return c
8942 }
8943
8944
8945 func (c *BillingAccountsLogsListCall) Context(ctx context.Context) *BillingAccountsLogsListCall {
8946 c.ctx_ = ctx
8947 return c
8948 }
8949
8950
8951
8952 func (c *BillingAccountsLogsListCall) Header() http.Header {
8953 if c.header_ == nil {
8954 c.header_ = make(http.Header)
8955 }
8956 return c.header_
8957 }
8958
8959 func (c *BillingAccountsLogsListCall) doRequest(alt string) (*http.Response, error) {
8960 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8961 if c.ifNoneMatch_ != "" {
8962 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8963 }
8964 var body io.Reader = nil
8965 c.urlParams_.Set("alt", alt)
8966 c.urlParams_.Set("prettyPrint", "false")
8967 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
8968 urls += "?" + c.urlParams_.Encode()
8969 req, err := http.NewRequest("GET", urls, body)
8970 if err != nil {
8971 return nil, err
8972 }
8973 req.Header = reqHeaders
8974 googleapi.Expand(req.URL, map[string]string{
8975 "parent": c.parent,
8976 })
8977 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8978 }
8979
8980
8981
8982
8983
8984
8985
8986 func (c *BillingAccountsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
8987 gensupport.SetOptions(c.urlParams_, opts...)
8988 res, err := c.doRequest("json")
8989 if res != nil && res.StatusCode == http.StatusNotModified {
8990 if res.Body != nil {
8991 res.Body.Close()
8992 }
8993 return nil, gensupport.WrapError(&googleapi.Error{
8994 Code: res.StatusCode,
8995 Header: res.Header,
8996 })
8997 }
8998 if err != nil {
8999 return nil, err
9000 }
9001 defer googleapi.CloseBody(res)
9002 if err := googleapi.CheckResponse(res); err != nil {
9003 return nil, gensupport.WrapError(err)
9004 }
9005 ret := &ListLogsResponse{
9006 ServerResponse: googleapi.ServerResponse{
9007 Header: res.Header,
9008 HTTPStatusCode: res.StatusCode,
9009 },
9010 }
9011 target := &ret
9012 if err := gensupport.DecodeResponse(target, res); err != nil {
9013 return nil, err
9014 }
9015 return ret, nil
9016 }
9017
9018
9019
9020
9021 func (c *BillingAccountsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
9022 c.ctx_ = ctx
9023 defer c.PageToken(c.urlParams_.Get("pageToken"))
9024 for {
9025 x, err := c.Do()
9026 if err != nil {
9027 return err
9028 }
9029 if err := f(x); err != nil {
9030 return err
9031 }
9032 if x.NextPageToken == "" {
9033 return nil
9034 }
9035 c.PageToken(x.NextPageToken)
9036 }
9037 }
9038
9039 type BillingAccountsSinksCreateCall struct {
9040 s *Service
9041 parent string
9042 logsink *LogSink
9043 urlParams_ gensupport.URLParams
9044 ctx_ context.Context
9045 header_ http.Header
9046 }
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057 func (r *BillingAccountsSinksService) Create(parent string, logsink *LogSink) *BillingAccountsSinksCreateCall {
9058 c := &BillingAccountsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9059 c.parent = parent
9060 c.logsink = logsink
9061 return c
9062 }
9063
9064
9065
9066
9067
9068
9069
9070 func (c *BillingAccountsSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *BillingAccountsSinksCreateCall {
9071 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
9072 return c
9073 }
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087 func (c *BillingAccountsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksCreateCall {
9088 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
9089 return c
9090 }
9091
9092
9093
9094
9095 func (c *BillingAccountsSinksCreateCall) Fields(s ...googleapi.Field) *BillingAccountsSinksCreateCall {
9096 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9097 return c
9098 }
9099
9100
9101 func (c *BillingAccountsSinksCreateCall) Context(ctx context.Context) *BillingAccountsSinksCreateCall {
9102 c.ctx_ = ctx
9103 return c
9104 }
9105
9106
9107
9108 func (c *BillingAccountsSinksCreateCall) Header() http.Header {
9109 if c.header_ == nil {
9110 c.header_ = make(http.Header)
9111 }
9112 return c.header_
9113 }
9114
9115 func (c *BillingAccountsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
9116 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9117 var body io.Reader = nil
9118 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
9119 if err != nil {
9120 return nil, err
9121 }
9122 c.urlParams_.Set("alt", alt)
9123 c.urlParams_.Set("prettyPrint", "false")
9124 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
9125 urls += "?" + c.urlParams_.Encode()
9126 req, err := http.NewRequest("POST", urls, body)
9127 if err != nil {
9128 return nil, err
9129 }
9130 req.Header = reqHeaders
9131 googleapi.Expand(req.URL, map[string]string{
9132 "parent": c.parent,
9133 })
9134 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9135 }
9136
9137
9138
9139
9140
9141
9142 func (c *BillingAccountsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
9143 gensupport.SetOptions(c.urlParams_, opts...)
9144 res, err := c.doRequest("json")
9145 if res != nil && res.StatusCode == http.StatusNotModified {
9146 if res.Body != nil {
9147 res.Body.Close()
9148 }
9149 return nil, gensupport.WrapError(&googleapi.Error{
9150 Code: res.StatusCode,
9151 Header: res.Header,
9152 })
9153 }
9154 if err != nil {
9155 return nil, err
9156 }
9157 defer googleapi.CloseBody(res)
9158 if err := googleapi.CheckResponse(res); err != nil {
9159 return nil, gensupport.WrapError(err)
9160 }
9161 ret := &LogSink{
9162 ServerResponse: googleapi.ServerResponse{
9163 Header: res.Header,
9164 HTTPStatusCode: res.StatusCode,
9165 },
9166 }
9167 target := &ret
9168 if err := gensupport.DecodeResponse(target, res); err != nil {
9169 return nil, err
9170 }
9171 return ret, nil
9172 }
9173
9174 type BillingAccountsSinksDeleteCall struct {
9175 s *Service
9176 sinkNameid string
9177 urlParams_ gensupport.URLParams
9178 ctx_ context.Context
9179 header_ http.Header
9180 }
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192 func (r *BillingAccountsSinksService) Delete(sinkNameid string) *BillingAccountsSinksDeleteCall {
9193 c := &BillingAccountsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9194 c.sinkNameid = sinkNameid
9195 return c
9196 }
9197
9198
9199
9200
9201 func (c *BillingAccountsSinksDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsSinksDeleteCall {
9202 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9203 return c
9204 }
9205
9206
9207 func (c *BillingAccountsSinksDeleteCall) Context(ctx context.Context) *BillingAccountsSinksDeleteCall {
9208 c.ctx_ = ctx
9209 return c
9210 }
9211
9212
9213
9214 func (c *BillingAccountsSinksDeleteCall) Header() http.Header {
9215 if c.header_ == nil {
9216 c.header_ = make(http.Header)
9217 }
9218 return c.header_
9219 }
9220
9221 func (c *BillingAccountsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
9222 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9223 var body io.Reader = nil
9224 c.urlParams_.Set("alt", alt)
9225 c.urlParams_.Set("prettyPrint", "false")
9226 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
9227 urls += "?" + c.urlParams_.Encode()
9228 req, err := http.NewRequest("DELETE", urls, body)
9229 if err != nil {
9230 return nil, err
9231 }
9232 req.Header = reqHeaders
9233 googleapi.Expand(req.URL, map[string]string{
9234 "sinkName": c.sinkNameid,
9235 })
9236 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9237 }
9238
9239
9240
9241
9242
9243
9244 func (c *BillingAccountsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9245 gensupport.SetOptions(c.urlParams_, opts...)
9246 res, err := c.doRequest("json")
9247 if res != nil && res.StatusCode == http.StatusNotModified {
9248 if res.Body != nil {
9249 res.Body.Close()
9250 }
9251 return nil, gensupport.WrapError(&googleapi.Error{
9252 Code: res.StatusCode,
9253 Header: res.Header,
9254 })
9255 }
9256 if err != nil {
9257 return nil, err
9258 }
9259 defer googleapi.CloseBody(res)
9260 if err := googleapi.CheckResponse(res); err != nil {
9261 return nil, gensupport.WrapError(err)
9262 }
9263 ret := &Empty{
9264 ServerResponse: googleapi.ServerResponse{
9265 Header: res.Header,
9266 HTTPStatusCode: res.StatusCode,
9267 },
9268 }
9269 target := &ret
9270 if err := gensupport.DecodeResponse(target, res); err != nil {
9271 return nil, err
9272 }
9273 return ret, nil
9274 }
9275
9276 type BillingAccountsSinksGetCall struct {
9277 s *Service
9278 sinkName string
9279 urlParams_ gensupport.URLParams
9280 ifNoneMatch_ string
9281 ctx_ context.Context
9282 header_ http.Header
9283 }
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293 func (r *BillingAccountsSinksService) Get(sinkName string) *BillingAccountsSinksGetCall {
9294 c := &BillingAccountsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9295 c.sinkName = sinkName
9296 return c
9297 }
9298
9299
9300
9301
9302 func (c *BillingAccountsSinksGetCall) Fields(s ...googleapi.Field) *BillingAccountsSinksGetCall {
9303 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9304 return c
9305 }
9306
9307
9308
9309
9310 func (c *BillingAccountsSinksGetCall) IfNoneMatch(entityTag string) *BillingAccountsSinksGetCall {
9311 c.ifNoneMatch_ = entityTag
9312 return c
9313 }
9314
9315
9316 func (c *BillingAccountsSinksGetCall) Context(ctx context.Context) *BillingAccountsSinksGetCall {
9317 c.ctx_ = ctx
9318 return c
9319 }
9320
9321
9322
9323 func (c *BillingAccountsSinksGetCall) Header() http.Header {
9324 if c.header_ == nil {
9325 c.header_ = make(http.Header)
9326 }
9327 return c.header_
9328 }
9329
9330 func (c *BillingAccountsSinksGetCall) doRequest(alt string) (*http.Response, error) {
9331 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9332 if c.ifNoneMatch_ != "" {
9333 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9334 }
9335 var body io.Reader = nil
9336 c.urlParams_.Set("alt", alt)
9337 c.urlParams_.Set("prettyPrint", "false")
9338 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
9339 urls += "?" + c.urlParams_.Encode()
9340 req, err := http.NewRequest("GET", urls, body)
9341 if err != nil {
9342 return nil, err
9343 }
9344 req.Header = reqHeaders
9345 googleapi.Expand(req.URL, map[string]string{
9346 "sinkName": c.sinkName,
9347 })
9348 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9349 }
9350
9351
9352
9353
9354
9355
9356 func (c *BillingAccountsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
9357 gensupport.SetOptions(c.urlParams_, opts...)
9358 res, err := c.doRequest("json")
9359 if res != nil && res.StatusCode == http.StatusNotModified {
9360 if res.Body != nil {
9361 res.Body.Close()
9362 }
9363 return nil, gensupport.WrapError(&googleapi.Error{
9364 Code: res.StatusCode,
9365 Header: res.Header,
9366 })
9367 }
9368 if err != nil {
9369 return nil, err
9370 }
9371 defer googleapi.CloseBody(res)
9372 if err := googleapi.CheckResponse(res); err != nil {
9373 return nil, gensupport.WrapError(err)
9374 }
9375 ret := &LogSink{
9376 ServerResponse: googleapi.ServerResponse{
9377 Header: res.Header,
9378 HTTPStatusCode: res.StatusCode,
9379 },
9380 }
9381 target := &ret
9382 if err := gensupport.DecodeResponse(target, res); err != nil {
9383 return nil, err
9384 }
9385 return ret, nil
9386 }
9387
9388 type BillingAccountsSinksListCall struct {
9389 s *Service
9390 parent string
9391 urlParams_ gensupport.URLParams
9392 ifNoneMatch_ string
9393 ctx_ context.Context
9394 header_ http.Header
9395 }
9396
9397
9398
9399
9400
9401
9402 func (r *BillingAccountsSinksService) List(parent string) *BillingAccountsSinksListCall {
9403 c := &BillingAccountsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9404 c.parent = parent
9405 return c
9406 }
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416 func (c *BillingAccountsSinksListCall) Filter(filter string) *BillingAccountsSinksListCall {
9417 c.urlParams_.Set("filter", filter)
9418 return c
9419 }
9420
9421
9422
9423
9424
9425 func (c *BillingAccountsSinksListCall) PageSize(pageSize int64) *BillingAccountsSinksListCall {
9426 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9427 return c
9428 }
9429
9430
9431
9432
9433
9434 func (c *BillingAccountsSinksListCall) PageToken(pageToken string) *BillingAccountsSinksListCall {
9435 c.urlParams_.Set("pageToken", pageToken)
9436 return c
9437 }
9438
9439
9440
9441
9442 func (c *BillingAccountsSinksListCall) Fields(s ...googleapi.Field) *BillingAccountsSinksListCall {
9443 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9444 return c
9445 }
9446
9447
9448
9449
9450 func (c *BillingAccountsSinksListCall) IfNoneMatch(entityTag string) *BillingAccountsSinksListCall {
9451 c.ifNoneMatch_ = entityTag
9452 return c
9453 }
9454
9455
9456 func (c *BillingAccountsSinksListCall) Context(ctx context.Context) *BillingAccountsSinksListCall {
9457 c.ctx_ = ctx
9458 return c
9459 }
9460
9461
9462
9463 func (c *BillingAccountsSinksListCall) Header() http.Header {
9464 if c.header_ == nil {
9465 c.header_ = make(http.Header)
9466 }
9467 return c.header_
9468 }
9469
9470 func (c *BillingAccountsSinksListCall) doRequest(alt string) (*http.Response, error) {
9471 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9472 if c.ifNoneMatch_ != "" {
9473 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9474 }
9475 var body io.Reader = nil
9476 c.urlParams_.Set("alt", alt)
9477 c.urlParams_.Set("prettyPrint", "false")
9478 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
9479 urls += "?" + c.urlParams_.Encode()
9480 req, err := http.NewRequest("GET", urls, body)
9481 if err != nil {
9482 return nil, err
9483 }
9484 req.Header = reqHeaders
9485 googleapi.Expand(req.URL, map[string]string{
9486 "parent": c.parent,
9487 })
9488 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9489 }
9490
9491
9492
9493
9494
9495
9496
9497 func (c *BillingAccountsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
9498 gensupport.SetOptions(c.urlParams_, opts...)
9499 res, err := c.doRequest("json")
9500 if res != nil && res.StatusCode == http.StatusNotModified {
9501 if res.Body != nil {
9502 res.Body.Close()
9503 }
9504 return nil, gensupport.WrapError(&googleapi.Error{
9505 Code: res.StatusCode,
9506 Header: res.Header,
9507 })
9508 }
9509 if err != nil {
9510 return nil, err
9511 }
9512 defer googleapi.CloseBody(res)
9513 if err := googleapi.CheckResponse(res); err != nil {
9514 return nil, gensupport.WrapError(err)
9515 }
9516 ret := &ListSinksResponse{
9517 ServerResponse: googleapi.ServerResponse{
9518 Header: res.Header,
9519 HTTPStatusCode: res.StatusCode,
9520 },
9521 }
9522 target := &ret
9523 if err := gensupport.DecodeResponse(target, res); err != nil {
9524 return nil, err
9525 }
9526 return ret, nil
9527 }
9528
9529
9530
9531
9532 func (c *BillingAccountsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
9533 c.ctx_ = ctx
9534 defer c.PageToken(c.urlParams_.Get("pageToken"))
9535 for {
9536 x, err := c.Do()
9537 if err != nil {
9538 return err
9539 }
9540 if err := f(x); err != nil {
9541 return err
9542 }
9543 if x.NextPageToken == "" {
9544 return nil
9545 }
9546 c.PageToken(x.NextPageToken)
9547 }
9548 }
9549
9550 type BillingAccountsSinksPatchCall struct {
9551 s *Service
9552 sinkNameid string
9553 logsink *LogSink
9554 urlParams_ gensupport.URLParams
9555 ctx_ context.Context
9556 header_ http.Header
9557 }
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571 func (r *BillingAccountsSinksService) Patch(sinkNameid string, logsink *LogSink) *BillingAccountsSinksPatchCall {
9572 c := &BillingAccountsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9573 c.sinkNameid = sinkNameid
9574 c.logsink = logsink
9575 return c
9576 }
9577
9578
9579
9580
9581
9582
9583
9584 func (c *BillingAccountsSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *BillingAccountsSinksPatchCall {
9585 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
9586 return c
9587 }
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599 func (c *BillingAccountsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksPatchCall {
9600 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
9601 return c
9602 }
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614 func (c *BillingAccountsSinksPatchCall) UpdateMask(updateMask string) *BillingAccountsSinksPatchCall {
9615 c.urlParams_.Set("updateMask", updateMask)
9616 return c
9617 }
9618
9619
9620
9621
9622 func (c *BillingAccountsSinksPatchCall) Fields(s ...googleapi.Field) *BillingAccountsSinksPatchCall {
9623 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9624 return c
9625 }
9626
9627
9628 func (c *BillingAccountsSinksPatchCall) Context(ctx context.Context) *BillingAccountsSinksPatchCall {
9629 c.ctx_ = ctx
9630 return c
9631 }
9632
9633
9634
9635 func (c *BillingAccountsSinksPatchCall) Header() http.Header {
9636 if c.header_ == nil {
9637 c.header_ = make(http.Header)
9638 }
9639 return c.header_
9640 }
9641
9642 func (c *BillingAccountsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
9643 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9644 var body io.Reader = nil
9645 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
9646 if err != nil {
9647 return nil, err
9648 }
9649 c.urlParams_.Set("alt", alt)
9650 c.urlParams_.Set("prettyPrint", "false")
9651 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
9652 urls += "?" + c.urlParams_.Encode()
9653 req, err := http.NewRequest("PATCH", urls, body)
9654 if err != nil {
9655 return nil, err
9656 }
9657 req.Header = reqHeaders
9658 googleapi.Expand(req.URL, map[string]string{
9659 "sinkName": c.sinkNameid,
9660 })
9661 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9662 }
9663
9664
9665
9666
9667
9668
9669 func (c *BillingAccountsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
9670 gensupport.SetOptions(c.urlParams_, opts...)
9671 res, err := c.doRequest("json")
9672 if res != nil && res.StatusCode == http.StatusNotModified {
9673 if res.Body != nil {
9674 res.Body.Close()
9675 }
9676 return nil, gensupport.WrapError(&googleapi.Error{
9677 Code: res.StatusCode,
9678 Header: res.Header,
9679 })
9680 }
9681 if err != nil {
9682 return nil, err
9683 }
9684 defer googleapi.CloseBody(res)
9685 if err := googleapi.CheckResponse(res); err != nil {
9686 return nil, gensupport.WrapError(err)
9687 }
9688 ret := &LogSink{
9689 ServerResponse: googleapi.ServerResponse{
9690 Header: res.Header,
9691 HTTPStatusCode: res.StatusCode,
9692 },
9693 }
9694 target := &ret
9695 if err := gensupport.DecodeResponse(target, res); err != nil {
9696 return nil, err
9697 }
9698 return ret, nil
9699 }
9700
9701 type BillingAccountsSinksUpdateCall struct {
9702 s *Service
9703 sinkNameid string
9704 logsink *LogSink
9705 urlParams_ gensupport.URLParams
9706 ctx_ context.Context
9707 header_ http.Header
9708 }
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722 func (r *BillingAccountsSinksService) Update(sinkNameid string, logsink *LogSink) *BillingAccountsSinksUpdateCall {
9723 c := &BillingAccountsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9724 c.sinkNameid = sinkNameid
9725 c.logsink = logsink
9726 return c
9727 }
9728
9729
9730
9731
9732
9733
9734
9735 func (c *BillingAccountsSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *BillingAccountsSinksUpdateCall {
9736 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
9737 return c
9738 }
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750 func (c *BillingAccountsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksUpdateCall {
9751 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
9752 return c
9753 }
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765 func (c *BillingAccountsSinksUpdateCall) UpdateMask(updateMask string) *BillingAccountsSinksUpdateCall {
9766 c.urlParams_.Set("updateMask", updateMask)
9767 return c
9768 }
9769
9770
9771
9772
9773 func (c *BillingAccountsSinksUpdateCall) Fields(s ...googleapi.Field) *BillingAccountsSinksUpdateCall {
9774 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9775 return c
9776 }
9777
9778
9779 func (c *BillingAccountsSinksUpdateCall) Context(ctx context.Context) *BillingAccountsSinksUpdateCall {
9780 c.ctx_ = ctx
9781 return c
9782 }
9783
9784
9785
9786 func (c *BillingAccountsSinksUpdateCall) Header() http.Header {
9787 if c.header_ == nil {
9788 c.header_ = make(http.Header)
9789 }
9790 return c.header_
9791 }
9792
9793 func (c *BillingAccountsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
9794 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9795 var body io.Reader = nil
9796 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
9797 if err != nil {
9798 return nil, err
9799 }
9800 c.urlParams_.Set("alt", alt)
9801 c.urlParams_.Set("prettyPrint", "false")
9802 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
9803 urls += "?" + c.urlParams_.Encode()
9804 req, err := http.NewRequest("PUT", urls, body)
9805 if err != nil {
9806 return nil, err
9807 }
9808 req.Header = reqHeaders
9809 googleapi.Expand(req.URL, map[string]string{
9810 "sinkName": c.sinkNameid,
9811 })
9812 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9813 }
9814
9815
9816
9817
9818
9819
9820 func (c *BillingAccountsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
9821 gensupport.SetOptions(c.urlParams_, opts...)
9822 res, err := c.doRequest("json")
9823 if res != nil && res.StatusCode == http.StatusNotModified {
9824 if res.Body != nil {
9825 res.Body.Close()
9826 }
9827 return nil, gensupport.WrapError(&googleapi.Error{
9828 Code: res.StatusCode,
9829 Header: res.Header,
9830 })
9831 }
9832 if err != nil {
9833 return nil, err
9834 }
9835 defer googleapi.CloseBody(res)
9836 if err := googleapi.CheckResponse(res); err != nil {
9837 return nil, gensupport.WrapError(err)
9838 }
9839 ret := &LogSink{
9840 ServerResponse: googleapi.ServerResponse{
9841 Header: res.Header,
9842 HTTPStatusCode: res.StatusCode,
9843 },
9844 }
9845 target := &ret
9846 if err := gensupport.DecodeResponse(target, res); err != nil {
9847 return nil, err
9848 }
9849 return ret, nil
9850 }
9851
9852 type EntriesCopyCall struct {
9853 s *Service
9854 copylogentriesrequest *CopyLogEntriesRequest
9855 urlParams_ gensupport.URLParams
9856 ctx_ context.Context
9857 header_ http.Header
9858 }
9859
9860
9861
9862 func (r *EntriesService) Copy(copylogentriesrequest *CopyLogEntriesRequest) *EntriesCopyCall {
9863 c := &EntriesCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9864 c.copylogentriesrequest = copylogentriesrequest
9865 return c
9866 }
9867
9868
9869
9870
9871 func (c *EntriesCopyCall) Fields(s ...googleapi.Field) *EntriesCopyCall {
9872 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9873 return c
9874 }
9875
9876
9877 func (c *EntriesCopyCall) Context(ctx context.Context) *EntriesCopyCall {
9878 c.ctx_ = ctx
9879 return c
9880 }
9881
9882
9883
9884 func (c *EntriesCopyCall) Header() http.Header {
9885 if c.header_ == nil {
9886 c.header_ = make(http.Header)
9887 }
9888 return c.header_
9889 }
9890
9891 func (c *EntriesCopyCall) doRequest(alt string) (*http.Response, error) {
9892 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9893 var body io.Reader = nil
9894 body, err := googleapi.WithoutDataWrapper.JSONReader(c.copylogentriesrequest)
9895 if err != nil {
9896 return nil, err
9897 }
9898 c.urlParams_.Set("alt", alt)
9899 c.urlParams_.Set("prettyPrint", "false")
9900 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:copy")
9901 urls += "?" + c.urlParams_.Encode()
9902 req, err := http.NewRequest("POST", urls, body)
9903 if err != nil {
9904 return nil, err
9905 }
9906 req.Header = reqHeaders
9907 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9908 }
9909
9910
9911
9912
9913
9914
9915 func (c *EntriesCopyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9916 gensupport.SetOptions(c.urlParams_, opts...)
9917 res, err := c.doRequest("json")
9918 if res != nil && res.StatusCode == http.StatusNotModified {
9919 if res.Body != nil {
9920 res.Body.Close()
9921 }
9922 return nil, gensupport.WrapError(&googleapi.Error{
9923 Code: res.StatusCode,
9924 Header: res.Header,
9925 })
9926 }
9927 if err != nil {
9928 return nil, err
9929 }
9930 defer googleapi.CloseBody(res)
9931 if err := googleapi.CheckResponse(res); err != nil {
9932 return nil, gensupport.WrapError(err)
9933 }
9934 ret := &Operation{
9935 ServerResponse: googleapi.ServerResponse{
9936 Header: res.Header,
9937 HTTPStatusCode: res.StatusCode,
9938 },
9939 }
9940 target := &ret
9941 if err := gensupport.DecodeResponse(target, res); err != nil {
9942 return nil, err
9943 }
9944 return ret, nil
9945 }
9946
9947 type EntriesListCall struct {
9948 s *Service
9949 listlogentriesrequest *ListLogEntriesRequest
9950 urlParams_ gensupport.URLParams
9951 ctx_ context.Context
9952 header_ http.Header
9953 }
9954
9955
9956
9957
9958
9959 func (r *EntriesService) List(listlogentriesrequest *ListLogEntriesRequest) *EntriesListCall {
9960 c := &EntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9961 c.listlogentriesrequest = listlogentriesrequest
9962 return c
9963 }
9964
9965
9966
9967
9968 func (c *EntriesListCall) Fields(s ...googleapi.Field) *EntriesListCall {
9969 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9970 return c
9971 }
9972
9973
9974 func (c *EntriesListCall) Context(ctx context.Context) *EntriesListCall {
9975 c.ctx_ = ctx
9976 return c
9977 }
9978
9979
9980
9981 func (c *EntriesListCall) Header() http.Header {
9982 if c.header_ == nil {
9983 c.header_ = make(http.Header)
9984 }
9985 return c.header_
9986 }
9987
9988 func (c *EntriesListCall) doRequest(alt string) (*http.Response, error) {
9989 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9990 var body io.Reader = nil
9991 body, err := googleapi.WithoutDataWrapper.JSONReader(c.listlogentriesrequest)
9992 if err != nil {
9993 return nil, err
9994 }
9995 c.urlParams_.Set("alt", alt)
9996 c.urlParams_.Set("prettyPrint", "false")
9997 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:list")
9998 urls += "?" + c.urlParams_.Encode()
9999 req, err := http.NewRequest("POST", urls, body)
10000 if err != nil {
10001 return nil, err
10002 }
10003 req.Header = reqHeaders
10004 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10005 }
10006
10007
10008
10009
10010
10011
10012
10013 func (c *EntriesListCall) Do(opts ...googleapi.CallOption) (*ListLogEntriesResponse, error) {
10014 gensupport.SetOptions(c.urlParams_, opts...)
10015 res, err := c.doRequest("json")
10016 if res != nil && res.StatusCode == http.StatusNotModified {
10017 if res.Body != nil {
10018 res.Body.Close()
10019 }
10020 return nil, gensupport.WrapError(&googleapi.Error{
10021 Code: res.StatusCode,
10022 Header: res.Header,
10023 })
10024 }
10025 if err != nil {
10026 return nil, err
10027 }
10028 defer googleapi.CloseBody(res)
10029 if err := googleapi.CheckResponse(res); err != nil {
10030 return nil, gensupport.WrapError(err)
10031 }
10032 ret := &ListLogEntriesResponse{
10033 ServerResponse: googleapi.ServerResponse{
10034 Header: res.Header,
10035 HTTPStatusCode: res.StatusCode,
10036 },
10037 }
10038 target := &ret
10039 if err := gensupport.DecodeResponse(target, res); err != nil {
10040 return nil, err
10041 }
10042 return ret, nil
10043 }
10044
10045
10046
10047
10048 func (c *EntriesListCall) Pages(ctx context.Context, f func(*ListLogEntriesResponse) error) error {
10049 c.ctx_ = ctx
10050 defer func(pt string) { c.listlogentriesrequest.PageToken = pt }(c.listlogentriesrequest.PageToken)
10051 for {
10052 x, err := c.Do()
10053 if err != nil {
10054 return err
10055 }
10056 if err := f(x); err != nil {
10057 return err
10058 }
10059 if x.NextPageToken == "" {
10060 return nil
10061 }
10062 c.listlogentriesrequest.PageToken = x.NextPageToken
10063 }
10064 }
10065
10066 type EntriesTailCall struct {
10067 s *Service
10068 taillogentriesrequest *TailLogEntriesRequest
10069 urlParams_ gensupport.URLParams
10070 ctx_ context.Context
10071 header_ http.Header
10072 }
10073
10074
10075
10076 func (r *EntriesService) Tail(taillogentriesrequest *TailLogEntriesRequest) *EntriesTailCall {
10077 c := &EntriesTailCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10078 c.taillogentriesrequest = taillogentriesrequest
10079 return c
10080 }
10081
10082
10083
10084
10085 func (c *EntriesTailCall) Fields(s ...googleapi.Field) *EntriesTailCall {
10086 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10087 return c
10088 }
10089
10090
10091 func (c *EntriesTailCall) Context(ctx context.Context) *EntriesTailCall {
10092 c.ctx_ = ctx
10093 return c
10094 }
10095
10096
10097
10098 func (c *EntriesTailCall) Header() http.Header {
10099 if c.header_ == nil {
10100 c.header_ = make(http.Header)
10101 }
10102 return c.header_
10103 }
10104
10105 func (c *EntriesTailCall) doRequest(alt string) (*http.Response, error) {
10106 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10107 var body io.Reader = nil
10108 body, err := googleapi.WithoutDataWrapper.JSONReader(c.taillogentriesrequest)
10109 if err != nil {
10110 return nil, err
10111 }
10112 c.urlParams_.Set("alt", alt)
10113 c.urlParams_.Set("prettyPrint", "false")
10114 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:tail")
10115 urls += "?" + c.urlParams_.Encode()
10116 req, err := http.NewRequest("POST", urls, body)
10117 if err != nil {
10118 return nil, err
10119 }
10120 req.Header = reqHeaders
10121 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10122 }
10123
10124
10125
10126
10127
10128
10129
10130 func (c *EntriesTailCall) Do(opts ...googleapi.CallOption) (*TailLogEntriesResponse, error) {
10131 gensupport.SetOptions(c.urlParams_, opts...)
10132 res, err := c.doRequest("json")
10133 if res != nil && res.StatusCode == http.StatusNotModified {
10134 if res.Body != nil {
10135 res.Body.Close()
10136 }
10137 return nil, gensupport.WrapError(&googleapi.Error{
10138 Code: res.StatusCode,
10139 Header: res.Header,
10140 })
10141 }
10142 if err != nil {
10143 return nil, err
10144 }
10145 defer googleapi.CloseBody(res)
10146 if err := googleapi.CheckResponse(res); err != nil {
10147 return nil, gensupport.WrapError(err)
10148 }
10149 ret := &TailLogEntriesResponse{
10150 ServerResponse: googleapi.ServerResponse{
10151 Header: res.Header,
10152 HTTPStatusCode: res.StatusCode,
10153 },
10154 }
10155 target := &ret
10156 if err := gensupport.DecodeResponse(target, res); err != nil {
10157 return nil, err
10158 }
10159 return ret, nil
10160 }
10161
10162 type EntriesWriteCall struct {
10163 s *Service
10164 writelogentriesrequest *WriteLogEntriesRequest
10165 urlParams_ gensupport.URLParams
10166 ctx_ context.Context
10167 header_ http.Header
10168 }
10169
10170
10171
10172
10173
10174
10175
10176
10177 func (r *EntriesService) Write(writelogentriesrequest *WriteLogEntriesRequest) *EntriesWriteCall {
10178 c := &EntriesWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10179 c.writelogentriesrequest = writelogentriesrequest
10180 return c
10181 }
10182
10183
10184
10185
10186 func (c *EntriesWriteCall) Fields(s ...googleapi.Field) *EntriesWriteCall {
10187 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10188 return c
10189 }
10190
10191
10192 func (c *EntriesWriteCall) Context(ctx context.Context) *EntriesWriteCall {
10193 c.ctx_ = ctx
10194 return c
10195 }
10196
10197
10198
10199 func (c *EntriesWriteCall) Header() http.Header {
10200 if c.header_ == nil {
10201 c.header_ = make(http.Header)
10202 }
10203 return c.header_
10204 }
10205
10206 func (c *EntriesWriteCall) doRequest(alt string) (*http.Response, error) {
10207 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10208 var body io.Reader = nil
10209 body, err := googleapi.WithoutDataWrapper.JSONReader(c.writelogentriesrequest)
10210 if err != nil {
10211 return nil, err
10212 }
10213 c.urlParams_.Set("alt", alt)
10214 c.urlParams_.Set("prettyPrint", "false")
10215 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:write")
10216 urls += "?" + c.urlParams_.Encode()
10217 req, err := http.NewRequest("POST", urls, body)
10218 if err != nil {
10219 return nil, err
10220 }
10221 req.Header = reqHeaders
10222 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10223 }
10224
10225
10226
10227
10228
10229
10230
10231 func (c *EntriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteLogEntriesResponse, error) {
10232 gensupport.SetOptions(c.urlParams_, opts...)
10233 res, err := c.doRequest("json")
10234 if res != nil && res.StatusCode == http.StatusNotModified {
10235 if res.Body != nil {
10236 res.Body.Close()
10237 }
10238 return nil, gensupport.WrapError(&googleapi.Error{
10239 Code: res.StatusCode,
10240 Header: res.Header,
10241 })
10242 }
10243 if err != nil {
10244 return nil, err
10245 }
10246 defer googleapi.CloseBody(res)
10247 if err := googleapi.CheckResponse(res); err != nil {
10248 return nil, gensupport.WrapError(err)
10249 }
10250 ret := &WriteLogEntriesResponse{
10251 ServerResponse: googleapi.ServerResponse{
10252 Header: res.Header,
10253 HTTPStatusCode: res.StatusCode,
10254 },
10255 }
10256 target := &ret
10257 if err := gensupport.DecodeResponse(target, res); err != nil {
10258 return nil, err
10259 }
10260 return ret, nil
10261 }
10262
10263 type ExclusionsCreateCall struct {
10264 s *Service
10265 parent string
10266 logexclusion *LogExclusion
10267 urlParams_ gensupport.URLParams
10268 ctx_ context.Context
10269 header_ http.Header
10270 }
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280 func (r *ExclusionsService) Create(parent string, logexclusion *LogExclusion) *ExclusionsCreateCall {
10281 c := &ExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10282 c.parent = parent
10283 c.logexclusion = logexclusion
10284 return c
10285 }
10286
10287
10288
10289
10290 func (c *ExclusionsCreateCall) Fields(s ...googleapi.Field) *ExclusionsCreateCall {
10291 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10292 return c
10293 }
10294
10295
10296 func (c *ExclusionsCreateCall) Context(ctx context.Context) *ExclusionsCreateCall {
10297 c.ctx_ = ctx
10298 return c
10299 }
10300
10301
10302
10303 func (c *ExclusionsCreateCall) Header() http.Header {
10304 if c.header_ == nil {
10305 c.header_ = make(http.Header)
10306 }
10307 return c.header_
10308 }
10309
10310 func (c *ExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
10311 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10312 var body io.Reader = nil
10313 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
10314 if err != nil {
10315 return nil, err
10316 }
10317 c.urlParams_.Set("alt", alt)
10318 c.urlParams_.Set("prettyPrint", "false")
10319 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
10320 urls += "?" + c.urlParams_.Encode()
10321 req, err := http.NewRequest("POST", urls, body)
10322 if err != nil {
10323 return nil, err
10324 }
10325 req.Header = reqHeaders
10326 googleapi.Expand(req.URL, map[string]string{
10327 "parent": c.parent,
10328 })
10329 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10330 }
10331
10332
10333
10334
10335
10336
10337 func (c *ExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
10338 gensupport.SetOptions(c.urlParams_, opts...)
10339 res, err := c.doRequest("json")
10340 if res != nil && res.StatusCode == http.StatusNotModified {
10341 if res.Body != nil {
10342 res.Body.Close()
10343 }
10344 return nil, gensupport.WrapError(&googleapi.Error{
10345 Code: res.StatusCode,
10346 Header: res.Header,
10347 })
10348 }
10349 if err != nil {
10350 return nil, err
10351 }
10352 defer googleapi.CloseBody(res)
10353 if err := googleapi.CheckResponse(res); err != nil {
10354 return nil, gensupport.WrapError(err)
10355 }
10356 ret := &LogExclusion{
10357 ServerResponse: googleapi.ServerResponse{
10358 Header: res.Header,
10359 HTTPStatusCode: res.StatusCode,
10360 },
10361 }
10362 target := &ret
10363 if err := gensupport.DecodeResponse(target, res); err != nil {
10364 return nil, err
10365 }
10366 return ret, nil
10367 }
10368
10369 type ExclusionsDeleteCall struct {
10370 s *Service
10371 name string
10372 urlParams_ gensupport.URLParams
10373 ctx_ context.Context
10374 header_ http.Header
10375 }
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385 func (r *ExclusionsService) Delete(name string) *ExclusionsDeleteCall {
10386 c := &ExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10387 c.name = name
10388 return c
10389 }
10390
10391
10392
10393
10394 func (c *ExclusionsDeleteCall) Fields(s ...googleapi.Field) *ExclusionsDeleteCall {
10395 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10396 return c
10397 }
10398
10399
10400 func (c *ExclusionsDeleteCall) Context(ctx context.Context) *ExclusionsDeleteCall {
10401 c.ctx_ = ctx
10402 return c
10403 }
10404
10405
10406
10407 func (c *ExclusionsDeleteCall) Header() http.Header {
10408 if c.header_ == nil {
10409 c.header_ = make(http.Header)
10410 }
10411 return c.header_
10412 }
10413
10414 func (c *ExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
10415 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10416 var body io.Reader = nil
10417 c.urlParams_.Set("alt", alt)
10418 c.urlParams_.Set("prettyPrint", "false")
10419 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
10420 urls += "?" + c.urlParams_.Encode()
10421 req, err := http.NewRequest("DELETE", urls, body)
10422 if err != nil {
10423 return nil, err
10424 }
10425 req.Header = reqHeaders
10426 googleapi.Expand(req.URL, map[string]string{
10427 "name": c.name,
10428 })
10429 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10430 }
10431
10432
10433
10434
10435
10436
10437 func (c *ExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10438 gensupport.SetOptions(c.urlParams_, opts...)
10439 res, err := c.doRequest("json")
10440 if res != nil && res.StatusCode == http.StatusNotModified {
10441 if res.Body != nil {
10442 res.Body.Close()
10443 }
10444 return nil, gensupport.WrapError(&googleapi.Error{
10445 Code: res.StatusCode,
10446 Header: res.Header,
10447 })
10448 }
10449 if err != nil {
10450 return nil, err
10451 }
10452 defer googleapi.CloseBody(res)
10453 if err := googleapi.CheckResponse(res); err != nil {
10454 return nil, gensupport.WrapError(err)
10455 }
10456 ret := &Empty{
10457 ServerResponse: googleapi.ServerResponse{
10458 Header: res.Header,
10459 HTTPStatusCode: res.StatusCode,
10460 },
10461 }
10462 target := &ret
10463 if err := gensupport.DecodeResponse(target, res); err != nil {
10464 return nil, err
10465 }
10466 return ret, nil
10467 }
10468
10469 type ExclusionsGetCall struct {
10470 s *Service
10471 name string
10472 urlParams_ gensupport.URLParams
10473 ifNoneMatch_ string
10474 ctx_ context.Context
10475 header_ http.Header
10476 }
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486 func (r *ExclusionsService) Get(name string) *ExclusionsGetCall {
10487 c := &ExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10488 c.name = name
10489 return c
10490 }
10491
10492
10493
10494
10495 func (c *ExclusionsGetCall) Fields(s ...googleapi.Field) *ExclusionsGetCall {
10496 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10497 return c
10498 }
10499
10500
10501
10502
10503 func (c *ExclusionsGetCall) IfNoneMatch(entityTag string) *ExclusionsGetCall {
10504 c.ifNoneMatch_ = entityTag
10505 return c
10506 }
10507
10508
10509 func (c *ExclusionsGetCall) Context(ctx context.Context) *ExclusionsGetCall {
10510 c.ctx_ = ctx
10511 return c
10512 }
10513
10514
10515
10516 func (c *ExclusionsGetCall) Header() http.Header {
10517 if c.header_ == nil {
10518 c.header_ = make(http.Header)
10519 }
10520 return c.header_
10521 }
10522
10523 func (c *ExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
10524 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10525 if c.ifNoneMatch_ != "" {
10526 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10527 }
10528 var body io.Reader = nil
10529 c.urlParams_.Set("alt", alt)
10530 c.urlParams_.Set("prettyPrint", "false")
10531 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
10532 urls += "?" + c.urlParams_.Encode()
10533 req, err := http.NewRequest("GET", urls, body)
10534 if err != nil {
10535 return nil, err
10536 }
10537 req.Header = reqHeaders
10538 googleapi.Expand(req.URL, map[string]string{
10539 "name": c.name,
10540 })
10541 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10542 }
10543
10544
10545
10546
10547
10548
10549 func (c *ExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
10550 gensupport.SetOptions(c.urlParams_, opts...)
10551 res, err := c.doRequest("json")
10552 if res != nil && res.StatusCode == http.StatusNotModified {
10553 if res.Body != nil {
10554 res.Body.Close()
10555 }
10556 return nil, gensupport.WrapError(&googleapi.Error{
10557 Code: res.StatusCode,
10558 Header: res.Header,
10559 })
10560 }
10561 if err != nil {
10562 return nil, err
10563 }
10564 defer googleapi.CloseBody(res)
10565 if err := googleapi.CheckResponse(res); err != nil {
10566 return nil, gensupport.WrapError(err)
10567 }
10568 ret := &LogExclusion{
10569 ServerResponse: googleapi.ServerResponse{
10570 Header: res.Header,
10571 HTTPStatusCode: res.StatusCode,
10572 },
10573 }
10574 target := &ret
10575 if err := gensupport.DecodeResponse(target, res); err != nil {
10576 return nil, err
10577 }
10578 return ret, nil
10579 }
10580
10581 type ExclusionsListCall struct {
10582 s *Service
10583 parent string
10584 urlParams_ gensupport.URLParams
10585 ifNoneMatch_ string
10586 ctx_ context.Context
10587 header_ http.Header
10588 }
10589
10590
10591
10592
10593
10594
10595 func (r *ExclusionsService) List(parent string) *ExclusionsListCall {
10596 c := &ExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10597 c.parent = parent
10598 return c
10599 }
10600
10601
10602
10603
10604
10605 func (c *ExclusionsListCall) PageSize(pageSize int64) *ExclusionsListCall {
10606 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10607 return c
10608 }
10609
10610
10611
10612
10613
10614 func (c *ExclusionsListCall) PageToken(pageToken string) *ExclusionsListCall {
10615 c.urlParams_.Set("pageToken", pageToken)
10616 return c
10617 }
10618
10619
10620
10621
10622 func (c *ExclusionsListCall) Fields(s ...googleapi.Field) *ExclusionsListCall {
10623 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10624 return c
10625 }
10626
10627
10628
10629
10630 func (c *ExclusionsListCall) IfNoneMatch(entityTag string) *ExclusionsListCall {
10631 c.ifNoneMatch_ = entityTag
10632 return c
10633 }
10634
10635
10636 func (c *ExclusionsListCall) Context(ctx context.Context) *ExclusionsListCall {
10637 c.ctx_ = ctx
10638 return c
10639 }
10640
10641
10642
10643 func (c *ExclusionsListCall) Header() http.Header {
10644 if c.header_ == nil {
10645 c.header_ = make(http.Header)
10646 }
10647 return c.header_
10648 }
10649
10650 func (c *ExclusionsListCall) doRequest(alt string) (*http.Response, error) {
10651 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10652 if c.ifNoneMatch_ != "" {
10653 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10654 }
10655 var body io.Reader = nil
10656 c.urlParams_.Set("alt", alt)
10657 c.urlParams_.Set("prettyPrint", "false")
10658 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
10659 urls += "?" + c.urlParams_.Encode()
10660 req, err := http.NewRequest("GET", urls, body)
10661 if err != nil {
10662 return nil, err
10663 }
10664 req.Header = reqHeaders
10665 googleapi.Expand(req.URL, map[string]string{
10666 "parent": c.parent,
10667 })
10668 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10669 }
10670
10671
10672
10673
10674
10675
10676
10677 func (c *ExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
10678 gensupport.SetOptions(c.urlParams_, opts...)
10679 res, err := c.doRequest("json")
10680 if res != nil && res.StatusCode == http.StatusNotModified {
10681 if res.Body != nil {
10682 res.Body.Close()
10683 }
10684 return nil, gensupport.WrapError(&googleapi.Error{
10685 Code: res.StatusCode,
10686 Header: res.Header,
10687 })
10688 }
10689 if err != nil {
10690 return nil, err
10691 }
10692 defer googleapi.CloseBody(res)
10693 if err := googleapi.CheckResponse(res); err != nil {
10694 return nil, gensupport.WrapError(err)
10695 }
10696 ret := &ListExclusionsResponse{
10697 ServerResponse: googleapi.ServerResponse{
10698 Header: res.Header,
10699 HTTPStatusCode: res.StatusCode,
10700 },
10701 }
10702 target := &ret
10703 if err := gensupport.DecodeResponse(target, res); err != nil {
10704 return nil, err
10705 }
10706 return ret, nil
10707 }
10708
10709
10710
10711
10712 func (c *ExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
10713 c.ctx_ = ctx
10714 defer c.PageToken(c.urlParams_.Get("pageToken"))
10715 for {
10716 x, err := c.Do()
10717 if err != nil {
10718 return err
10719 }
10720 if err := f(x); err != nil {
10721 return err
10722 }
10723 if x.NextPageToken == "" {
10724 return nil
10725 }
10726 c.PageToken(x.NextPageToken)
10727 }
10728 }
10729
10730 type ExclusionsPatchCall struct {
10731 s *Service
10732 name string
10733 logexclusion *LogExclusion
10734 urlParams_ gensupport.URLParams
10735 ctx_ context.Context
10736 header_ http.Header
10737 }
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748 func (r *ExclusionsService) Patch(name string, logexclusion *LogExclusion) *ExclusionsPatchCall {
10749 c := &ExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10750 c.name = name
10751 c.logexclusion = logexclusion
10752 return c
10753 }
10754
10755
10756
10757
10758
10759
10760
10761 func (c *ExclusionsPatchCall) UpdateMask(updateMask string) *ExclusionsPatchCall {
10762 c.urlParams_.Set("updateMask", updateMask)
10763 return c
10764 }
10765
10766
10767
10768
10769 func (c *ExclusionsPatchCall) Fields(s ...googleapi.Field) *ExclusionsPatchCall {
10770 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10771 return c
10772 }
10773
10774
10775 func (c *ExclusionsPatchCall) Context(ctx context.Context) *ExclusionsPatchCall {
10776 c.ctx_ = ctx
10777 return c
10778 }
10779
10780
10781
10782 func (c *ExclusionsPatchCall) Header() http.Header {
10783 if c.header_ == nil {
10784 c.header_ = make(http.Header)
10785 }
10786 return c.header_
10787 }
10788
10789 func (c *ExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
10790 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10791 var body io.Reader = nil
10792 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
10793 if err != nil {
10794 return nil, err
10795 }
10796 c.urlParams_.Set("alt", alt)
10797 c.urlParams_.Set("prettyPrint", "false")
10798 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
10799 urls += "?" + c.urlParams_.Encode()
10800 req, err := http.NewRequest("PATCH", urls, body)
10801 if err != nil {
10802 return nil, err
10803 }
10804 req.Header = reqHeaders
10805 googleapi.Expand(req.URL, map[string]string{
10806 "name": c.name,
10807 })
10808 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10809 }
10810
10811
10812
10813
10814
10815
10816 func (c *ExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
10817 gensupport.SetOptions(c.urlParams_, opts...)
10818 res, err := c.doRequest("json")
10819 if res != nil && res.StatusCode == http.StatusNotModified {
10820 if res.Body != nil {
10821 res.Body.Close()
10822 }
10823 return nil, gensupport.WrapError(&googleapi.Error{
10824 Code: res.StatusCode,
10825 Header: res.Header,
10826 })
10827 }
10828 if err != nil {
10829 return nil, err
10830 }
10831 defer googleapi.CloseBody(res)
10832 if err := googleapi.CheckResponse(res); err != nil {
10833 return nil, gensupport.WrapError(err)
10834 }
10835 ret := &LogExclusion{
10836 ServerResponse: googleapi.ServerResponse{
10837 Header: res.Header,
10838 HTTPStatusCode: res.StatusCode,
10839 },
10840 }
10841 target := &ret
10842 if err := gensupport.DecodeResponse(target, res); err != nil {
10843 return nil, err
10844 }
10845 return ret, nil
10846 }
10847
10848 type FoldersGetCmekSettingsCall struct {
10849 s *Service
10850 name string
10851 urlParams_ gensupport.URLParams
10852 ifNoneMatch_ string
10853 ctx_ context.Context
10854 header_ http.Header
10855 }
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874 func (r *FoldersService) GetCmekSettings(name string) *FoldersGetCmekSettingsCall {
10875 c := &FoldersGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10876 c.name = name
10877 return c
10878 }
10879
10880
10881
10882
10883 func (c *FoldersGetCmekSettingsCall) Fields(s ...googleapi.Field) *FoldersGetCmekSettingsCall {
10884 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10885 return c
10886 }
10887
10888
10889
10890
10891 func (c *FoldersGetCmekSettingsCall) IfNoneMatch(entityTag string) *FoldersGetCmekSettingsCall {
10892 c.ifNoneMatch_ = entityTag
10893 return c
10894 }
10895
10896
10897 func (c *FoldersGetCmekSettingsCall) Context(ctx context.Context) *FoldersGetCmekSettingsCall {
10898 c.ctx_ = ctx
10899 return c
10900 }
10901
10902
10903
10904 func (c *FoldersGetCmekSettingsCall) Header() http.Header {
10905 if c.header_ == nil {
10906 c.header_ = make(http.Header)
10907 }
10908 return c.header_
10909 }
10910
10911 func (c *FoldersGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
10912 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10913 if c.ifNoneMatch_ != "" {
10914 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10915 }
10916 var body io.Reader = nil
10917 c.urlParams_.Set("alt", alt)
10918 c.urlParams_.Set("prettyPrint", "false")
10919 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
10920 urls += "?" + c.urlParams_.Encode()
10921 req, err := http.NewRequest("GET", urls, body)
10922 if err != nil {
10923 return nil, err
10924 }
10925 req.Header = reqHeaders
10926 googleapi.Expand(req.URL, map[string]string{
10927 "name": c.name,
10928 })
10929 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10930 }
10931
10932
10933
10934
10935
10936
10937 func (c *FoldersGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
10938 gensupport.SetOptions(c.urlParams_, opts...)
10939 res, err := c.doRequest("json")
10940 if res != nil && res.StatusCode == http.StatusNotModified {
10941 if res.Body != nil {
10942 res.Body.Close()
10943 }
10944 return nil, gensupport.WrapError(&googleapi.Error{
10945 Code: res.StatusCode,
10946 Header: res.Header,
10947 })
10948 }
10949 if err != nil {
10950 return nil, err
10951 }
10952 defer googleapi.CloseBody(res)
10953 if err := googleapi.CheckResponse(res); err != nil {
10954 return nil, gensupport.WrapError(err)
10955 }
10956 ret := &CmekSettings{
10957 ServerResponse: googleapi.ServerResponse{
10958 Header: res.Header,
10959 HTTPStatusCode: res.StatusCode,
10960 },
10961 }
10962 target := &ret
10963 if err := gensupport.DecodeResponse(target, res); err != nil {
10964 return nil, err
10965 }
10966 return ret, nil
10967 }
10968
10969 type FoldersGetSettingsCall struct {
10970 s *Service
10971 name string
10972 urlParams_ gensupport.URLParams
10973 ifNoneMatch_ string
10974 ctx_ context.Context
10975 header_ http.Header
10976 }
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991 func (r *FoldersService) GetSettings(name string) *FoldersGetSettingsCall {
10992 c := &FoldersGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10993 c.name = name
10994 return c
10995 }
10996
10997
10998
10999
11000 func (c *FoldersGetSettingsCall) Fields(s ...googleapi.Field) *FoldersGetSettingsCall {
11001 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11002 return c
11003 }
11004
11005
11006
11007
11008 func (c *FoldersGetSettingsCall) IfNoneMatch(entityTag string) *FoldersGetSettingsCall {
11009 c.ifNoneMatch_ = entityTag
11010 return c
11011 }
11012
11013
11014 func (c *FoldersGetSettingsCall) Context(ctx context.Context) *FoldersGetSettingsCall {
11015 c.ctx_ = ctx
11016 return c
11017 }
11018
11019
11020
11021 func (c *FoldersGetSettingsCall) Header() http.Header {
11022 if c.header_ == nil {
11023 c.header_ = make(http.Header)
11024 }
11025 return c.header_
11026 }
11027
11028 func (c *FoldersGetSettingsCall) doRequest(alt string) (*http.Response, error) {
11029 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11030 if c.ifNoneMatch_ != "" {
11031 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11032 }
11033 var body io.Reader = nil
11034 c.urlParams_.Set("alt", alt)
11035 c.urlParams_.Set("prettyPrint", "false")
11036 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
11037 urls += "?" + c.urlParams_.Encode()
11038 req, err := http.NewRequest("GET", urls, body)
11039 if err != nil {
11040 return nil, err
11041 }
11042 req.Header = reqHeaders
11043 googleapi.Expand(req.URL, map[string]string{
11044 "name": c.name,
11045 })
11046 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11047 }
11048
11049
11050
11051
11052
11053
11054 func (c *FoldersGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
11055 gensupport.SetOptions(c.urlParams_, opts...)
11056 res, err := c.doRequest("json")
11057 if res != nil && res.StatusCode == http.StatusNotModified {
11058 if res.Body != nil {
11059 res.Body.Close()
11060 }
11061 return nil, gensupport.WrapError(&googleapi.Error{
11062 Code: res.StatusCode,
11063 Header: res.Header,
11064 })
11065 }
11066 if err != nil {
11067 return nil, err
11068 }
11069 defer googleapi.CloseBody(res)
11070 if err := googleapi.CheckResponse(res); err != nil {
11071 return nil, gensupport.WrapError(err)
11072 }
11073 ret := &Settings{
11074 ServerResponse: googleapi.ServerResponse{
11075 Header: res.Header,
11076 HTTPStatusCode: res.StatusCode,
11077 },
11078 }
11079 target := &ret
11080 if err := gensupport.DecodeResponse(target, res); err != nil {
11081 return nil, err
11082 }
11083 return ret, nil
11084 }
11085
11086 type FoldersUpdateSettingsCall struct {
11087 s *Service
11088 name string
11089 settings *Settings
11090 urlParams_ gensupport.URLParams
11091 ctx_ context.Context
11092 header_ http.Header
11093 }
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110 func (r *FoldersService) UpdateSettings(name string, settings *Settings) *FoldersUpdateSettingsCall {
11111 c := &FoldersUpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11112 c.name = name
11113 c.settings = settings
11114 return c
11115 }
11116
11117
11118
11119
11120
11121
11122 func (c *FoldersUpdateSettingsCall) UpdateMask(updateMask string) *FoldersUpdateSettingsCall {
11123 c.urlParams_.Set("updateMask", updateMask)
11124 return c
11125 }
11126
11127
11128
11129
11130 func (c *FoldersUpdateSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateSettingsCall {
11131 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11132 return c
11133 }
11134
11135
11136 func (c *FoldersUpdateSettingsCall) Context(ctx context.Context) *FoldersUpdateSettingsCall {
11137 c.ctx_ = ctx
11138 return c
11139 }
11140
11141
11142
11143 func (c *FoldersUpdateSettingsCall) Header() http.Header {
11144 if c.header_ == nil {
11145 c.header_ = make(http.Header)
11146 }
11147 return c.header_
11148 }
11149
11150 func (c *FoldersUpdateSettingsCall) doRequest(alt string) (*http.Response, error) {
11151 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11152 var body io.Reader = nil
11153 body, err := googleapi.WithoutDataWrapper.JSONReader(c.settings)
11154 if err != nil {
11155 return nil, err
11156 }
11157 c.urlParams_.Set("alt", alt)
11158 c.urlParams_.Set("prettyPrint", "false")
11159 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
11160 urls += "?" + c.urlParams_.Encode()
11161 req, err := http.NewRequest("PATCH", urls, body)
11162 if err != nil {
11163 return nil, err
11164 }
11165 req.Header = reqHeaders
11166 googleapi.Expand(req.URL, map[string]string{
11167 "name": c.name,
11168 })
11169 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11170 }
11171
11172
11173
11174
11175
11176
11177 func (c *FoldersUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
11178 gensupport.SetOptions(c.urlParams_, opts...)
11179 res, err := c.doRequest("json")
11180 if res != nil && res.StatusCode == http.StatusNotModified {
11181 if res.Body != nil {
11182 res.Body.Close()
11183 }
11184 return nil, gensupport.WrapError(&googleapi.Error{
11185 Code: res.StatusCode,
11186 Header: res.Header,
11187 })
11188 }
11189 if err != nil {
11190 return nil, err
11191 }
11192 defer googleapi.CloseBody(res)
11193 if err := googleapi.CheckResponse(res); err != nil {
11194 return nil, gensupport.WrapError(err)
11195 }
11196 ret := &Settings{
11197 ServerResponse: googleapi.ServerResponse{
11198 Header: res.Header,
11199 HTTPStatusCode: res.StatusCode,
11200 },
11201 }
11202 target := &ret
11203 if err := gensupport.DecodeResponse(target, res); err != nil {
11204 return nil, err
11205 }
11206 return ret, nil
11207 }
11208
11209 type FoldersExclusionsCreateCall struct {
11210 s *Service
11211 parent string
11212 logexclusion *LogExclusion
11213 urlParams_ gensupport.URLParams
11214 ctx_ context.Context
11215 header_ http.Header
11216 }
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226 func (r *FoldersExclusionsService) Create(parent string, logexclusion *LogExclusion) *FoldersExclusionsCreateCall {
11227 c := &FoldersExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11228 c.parent = parent
11229 c.logexclusion = logexclusion
11230 return c
11231 }
11232
11233
11234
11235
11236 func (c *FoldersExclusionsCreateCall) Fields(s ...googleapi.Field) *FoldersExclusionsCreateCall {
11237 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11238 return c
11239 }
11240
11241
11242 func (c *FoldersExclusionsCreateCall) Context(ctx context.Context) *FoldersExclusionsCreateCall {
11243 c.ctx_ = ctx
11244 return c
11245 }
11246
11247
11248
11249 func (c *FoldersExclusionsCreateCall) Header() http.Header {
11250 if c.header_ == nil {
11251 c.header_ = make(http.Header)
11252 }
11253 return c.header_
11254 }
11255
11256 func (c *FoldersExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
11257 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11258 var body io.Reader = nil
11259 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
11260 if err != nil {
11261 return nil, err
11262 }
11263 c.urlParams_.Set("alt", alt)
11264 c.urlParams_.Set("prettyPrint", "false")
11265 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
11266 urls += "?" + c.urlParams_.Encode()
11267 req, err := http.NewRequest("POST", urls, body)
11268 if err != nil {
11269 return nil, err
11270 }
11271 req.Header = reqHeaders
11272 googleapi.Expand(req.URL, map[string]string{
11273 "parent": c.parent,
11274 })
11275 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11276 }
11277
11278
11279
11280
11281
11282
11283 func (c *FoldersExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
11284 gensupport.SetOptions(c.urlParams_, opts...)
11285 res, err := c.doRequest("json")
11286 if res != nil && res.StatusCode == http.StatusNotModified {
11287 if res.Body != nil {
11288 res.Body.Close()
11289 }
11290 return nil, gensupport.WrapError(&googleapi.Error{
11291 Code: res.StatusCode,
11292 Header: res.Header,
11293 })
11294 }
11295 if err != nil {
11296 return nil, err
11297 }
11298 defer googleapi.CloseBody(res)
11299 if err := googleapi.CheckResponse(res); err != nil {
11300 return nil, gensupport.WrapError(err)
11301 }
11302 ret := &LogExclusion{
11303 ServerResponse: googleapi.ServerResponse{
11304 Header: res.Header,
11305 HTTPStatusCode: res.StatusCode,
11306 },
11307 }
11308 target := &ret
11309 if err := gensupport.DecodeResponse(target, res); err != nil {
11310 return nil, err
11311 }
11312 return ret, nil
11313 }
11314
11315 type FoldersExclusionsDeleteCall struct {
11316 s *Service
11317 name string
11318 urlParams_ gensupport.URLParams
11319 ctx_ context.Context
11320 header_ http.Header
11321 }
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331 func (r *FoldersExclusionsService) Delete(name string) *FoldersExclusionsDeleteCall {
11332 c := &FoldersExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11333 c.name = name
11334 return c
11335 }
11336
11337
11338
11339
11340 func (c *FoldersExclusionsDeleteCall) Fields(s ...googleapi.Field) *FoldersExclusionsDeleteCall {
11341 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11342 return c
11343 }
11344
11345
11346 func (c *FoldersExclusionsDeleteCall) Context(ctx context.Context) *FoldersExclusionsDeleteCall {
11347 c.ctx_ = ctx
11348 return c
11349 }
11350
11351
11352
11353 func (c *FoldersExclusionsDeleteCall) Header() http.Header {
11354 if c.header_ == nil {
11355 c.header_ = make(http.Header)
11356 }
11357 return c.header_
11358 }
11359
11360 func (c *FoldersExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
11361 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11362 var body io.Reader = nil
11363 c.urlParams_.Set("alt", alt)
11364 c.urlParams_.Set("prettyPrint", "false")
11365 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
11366 urls += "?" + c.urlParams_.Encode()
11367 req, err := http.NewRequest("DELETE", urls, body)
11368 if err != nil {
11369 return nil, err
11370 }
11371 req.Header = reqHeaders
11372 googleapi.Expand(req.URL, map[string]string{
11373 "name": c.name,
11374 })
11375 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11376 }
11377
11378
11379
11380
11381
11382
11383 func (c *FoldersExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11384 gensupport.SetOptions(c.urlParams_, opts...)
11385 res, err := c.doRequest("json")
11386 if res != nil && res.StatusCode == http.StatusNotModified {
11387 if res.Body != nil {
11388 res.Body.Close()
11389 }
11390 return nil, gensupport.WrapError(&googleapi.Error{
11391 Code: res.StatusCode,
11392 Header: res.Header,
11393 })
11394 }
11395 if err != nil {
11396 return nil, err
11397 }
11398 defer googleapi.CloseBody(res)
11399 if err := googleapi.CheckResponse(res); err != nil {
11400 return nil, gensupport.WrapError(err)
11401 }
11402 ret := &Empty{
11403 ServerResponse: googleapi.ServerResponse{
11404 Header: res.Header,
11405 HTTPStatusCode: res.StatusCode,
11406 },
11407 }
11408 target := &ret
11409 if err := gensupport.DecodeResponse(target, res); err != nil {
11410 return nil, err
11411 }
11412 return ret, nil
11413 }
11414
11415 type FoldersExclusionsGetCall struct {
11416 s *Service
11417 name string
11418 urlParams_ gensupport.URLParams
11419 ifNoneMatch_ string
11420 ctx_ context.Context
11421 header_ http.Header
11422 }
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432 func (r *FoldersExclusionsService) Get(name string) *FoldersExclusionsGetCall {
11433 c := &FoldersExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11434 c.name = name
11435 return c
11436 }
11437
11438
11439
11440
11441 func (c *FoldersExclusionsGetCall) Fields(s ...googleapi.Field) *FoldersExclusionsGetCall {
11442 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11443 return c
11444 }
11445
11446
11447
11448
11449 func (c *FoldersExclusionsGetCall) IfNoneMatch(entityTag string) *FoldersExclusionsGetCall {
11450 c.ifNoneMatch_ = entityTag
11451 return c
11452 }
11453
11454
11455 func (c *FoldersExclusionsGetCall) Context(ctx context.Context) *FoldersExclusionsGetCall {
11456 c.ctx_ = ctx
11457 return c
11458 }
11459
11460
11461
11462 func (c *FoldersExclusionsGetCall) Header() http.Header {
11463 if c.header_ == nil {
11464 c.header_ = make(http.Header)
11465 }
11466 return c.header_
11467 }
11468
11469 func (c *FoldersExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
11470 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11471 if c.ifNoneMatch_ != "" {
11472 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11473 }
11474 var body io.Reader = nil
11475 c.urlParams_.Set("alt", alt)
11476 c.urlParams_.Set("prettyPrint", "false")
11477 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
11478 urls += "?" + c.urlParams_.Encode()
11479 req, err := http.NewRequest("GET", urls, body)
11480 if err != nil {
11481 return nil, err
11482 }
11483 req.Header = reqHeaders
11484 googleapi.Expand(req.URL, map[string]string{
11485 "name": c.name,
11486 })
11487 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11488 }
11489
11490
11491
11492
11493
11494
11495 func (c *FoldersExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
11496 gensupport.SetOptions(c.urlParams_, opts...)
11497 res, err := c.doRequest("json")
11498 if res != nil && res.StatusCode == http.StatusNotModified {
11499 if res.Body != nil {
11500 res.Body.Close()
11501 }
11502 return nil, gensupport.WrapError(&googleapi.Error{
11503 Code: res.StatusCode,
11504 Header: res.Header,
11505 })
11506 }
11507 if err != nil {
11508 return nil, err
11509 }
11510 defer googleapi.CloseBody(res)
11511 if err := googleapi.CheckResponse(res); err != nil {
11512 return nil, gensupport.WrapError(err)
11513 }
11514 ret := &LogExclusion{
11515 ServerResponse: googleapi.ServerResponse{
11516 Header: res.Header,
11517 HTTPStatusCode: res.StatusCode,
11518 },
11519 }
11520 target := &ret
11521 if err := gensupport.DecodeResponse(target, res); err != nil {
11522 return nil, err
11523 }
11524 return ret, nil
11525 }
11526
11527 type FoldersExclusionsListCall struct {
11528 s *Service
11529 parent string
11530 urlParams_ gensupport.URLParams
11531 ifNoneMatch_ string
11532 ctx_ context.Context
11533 header_ http.Header
11534 }
11535
11536
11537
11538
11539
11540
11541 func (r *FoldersExclusionsService) List(parent string) *FoldersExclusionsListCall {
11542 c := &FoldersExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11543 c.parent = parent
11544 return c
11545 }
11546
11547
11548
11549
11550
11551 func (c *FoldersExclusionsListCall) PageSize(pageSize int64) *FoldersExclusionsListCall {
11552 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11553 return c
11554 }
11555
11556
11557
11558
11559
11560 func (c *FoldersExclusionsListCall) PageToken(pageToken string) *FoldersExclusionsListCall {
11561 c.urlParams_.Set("pageToken", pageToken)
11562 return c
11563 }
11564
11565
11566
11567
11568 func (c *FoldersExclusionsListCall) Fields(s ...googleapi.Field) *FoldersExclusionsListCall {
11569 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11570 return c
11571 }
11572
11573
11574
11575
11576 func (c *FoldersExclusionsListCall) IfNoneMatch(entityTag string) *FoldersExclusionsListCall {
11577 c.ifNoneMatch_ = entityTag
11578 return c
11579 }
11580
11581
11582 func (c *FoldersExclusionsListCall) Context(ctx context.Context) *FoldersExclusionsListCall {
11583 c.ctx_ = ctx
11584 return c
11585 }
11586
11587
11588
11589 func (c *FoldersExclusionsListCall) Header() http.Header {
11590 if c.header_ == nil {
11591 c.header_ = make(http.Header)
11592 }
11593 return c.header_
11594 }
11595
11596 func (c *FoldersExclusionsListCall) doRequest(alt string) (*http.Response, error) {
11597 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11598 if c.ifNoneMatch_ != "" {
11599 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11600 }
11601 var body io.Reader = nil
11602 c.urlParams_.Set("alt", alt)
11603 c.urlParams_.Set("prettyPrint", "false")
11604 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
11605 urls += "?" + c.urlParams_.Encode()
11606 req, err := http.NewRequest("GET", urls, body)
11607 if err != nil {
11608 return nil, err
11609 }
11610 req.Header = reqHeaders
11611 googleapi.Expand(req.URL, map[string]string{
11612 "parent": c.parent,
11613 })
11614 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11615 }
11616
11617
11618
11619
11620
11621
11622
11623 func (c *FoldersExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
11624 gensupport.SetOptions(c.urlParams_, opts...)
11625 res, err := c.doRequest("json")
11626 if res != nil && res.StatusCode == http.StatusNotModified {
11627 if res.Body != nil {
11628 res.Body.Close()
11629 }
11630 return nil, gensupport.WrapError(&googleapi.Error{
11631 Code: res.StatusCode,
11632 Header: res.Header,
11633 })
11634 }
11635 if err != nil {
11636 return nil, err
11637 }
11638 defer googleapi.CloseBody(res)
11639 if err := googleapi.CheckResponse(res); err != nil {
11640 return nil, gensupport.WrapError(err)
11641 }
11642 ret := &ListExclusionsResponse{
11643 ServerResponse: googleapi.ServerResponse{
11644 Header: res.Header,
11645 HTTPStatusCode: res.StatusCode,
11646 },
11647 }
11648 target := &ret
11649 if err := gensupport.DecodeResponse(target, res); err != nil {
11650 return nil, err
11651 }
11652 return ret, nil
11653 }
11654
11655
11656
11657
11658 func (c *FoldersExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
11659 c.ctx_ = ctx
11660 defer c.PageToken(c.urlParams_.Get("pageToken"))
11661 for {
11662 x, err := c.Do()
11663 if err != nil {
11664 return err
11665 }
11666 if err := f(x); err != nil {
11667 return err
11668 }
11669 if x.NextPageToken == "" {
11670 return nil
11671 }
11672 c.PageToken(x.NextPageToken)
11673 }
11674 }
11675
11676 type FoldersExclusionsPatchCall struct {
11677 s *Service
11678 name string
11679 logexclusion *LogExclusion
11680 urlParams_ gensupport.URLParams
11681 ctx_ context.Context
11682 header_ http.Header
11683 }
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694 func (r *FoldersExclusionsService) Patch(name string, logexclusion *LogExclusion) *FoldersExclusionsPatchCall {
11695 c := &FoldersExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11696 c.name = name
11697 c.logexclusion = logexclusion
11698 return c
11699 }
11700
11701
11702
11703
11704
11705
11706
11707 func (c *FoldersExclusionsPatchCall) UpdateMask(updateMask string) *FoldersExclusionsPatchCall {
11708 c.urlParams_.Set("updateMask", updateMask)
11709 return c
11710 }
11711
11712
11713
11714
11715 func (c *FoldersExclusionsPatchCall) Fields(s ...googleapi.Field) *FoldersExclusionsPatchCall {
11716 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11717 return c
11718 }
11719
11720
11721 func (c *FoldersExclusionsPatchCall) Context(ctx context.Context) *FoldersExclusionsPatchCall {
11722 c.ctx_ = ctx
11723 return c
11724 }
11725
11726
11727
11728 func (c *FoldersExclusionsPatchCall) Header() http.Header {
11729 if c.header_ == nil {
11730 c.header_ = make(http.Header)
11731 }
11732 return c.header_
11733 }
11734
11735 func (c *FoldersExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
11736 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11737 var body io.Reader = nil
11738 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
11739 if err != nil {
11740 return nil, err
11741 }
11742 c.urlParams_.Set("alt", alt)
11743 c.urlParams_.Set("prettyPrint", "false")
11744 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
11745 urls += "?" + c.urlParams_.Encode()
11746 req, err := http.NewRequest("PATCH", urls, body)
11747 if err != nil {
11748 return nil, err
11749 }
11750 req.Header = reqHeaders
11751 googleapi.Expand(req.URL, map[string]string{
11752 "name": c.name,
11753 })
11754 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11755 }
11756
11757
11758
11759
11760
11761
11762 func (c *FoldersExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
11763 gensupport.SetOptions(c.urlParams_, opts...)
11764 res, err := c.doRequest("json")
11765 if res != nil && res.StatusCode == http.StatusNotModified {
11766 if res.Body != nil {
11767 res.Body.Close()
11768 }
11769 return nil, gensupport.WrapError(&googleapi.Error{
11770 Code: res.StatusCode,
11771 Header: res.Header,
11772 })
11773 }
11774 if err != nil {
11775 return nil, err
11776 }
11777 defer googleapi.CloseBody(res)
11778 if err := googleapi.CheckResponse(res); err != nil {
11779 return nil, gensupport.WrapError(err)
11780 }
11781 ret := &LogExclusion{
11782 ServerResponse: googleapi.ServerResponse{
11783 Header: res.Header,
11784 HTTPStatusCode: res.StatusCode,
11785 },
11786 }
11787 target := &ret
11788 if err := gensupport.DecodeResponse(target, res); err != nil {
11789 return nil, err
11790 }
11791 return ret, nil
11792 }
11793
11794 type FoldersLocationsGetCall struct {
11795 s *Service
11796 name string
11797 urlParams_ gensupport.URLParams
11798 ifNoneMatch_ string
11799 ctx_ context.Context
11800 header_ http.Header
11801 }
11802
11803
11804
11805
11806 func (r *FoldersLocationsService) Get(name string) *FoldersLocationsGetCall {
11807 c := &FoldersLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11808 c.name = name
11809 return c
11810 }
11811
11812
11813
11814
11815 func (c *FoldersLocationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsGetCall {
11816 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11817 return c
11818 }
11819
11820
11821
11822
11823 func (c *FoldersLocationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsGetCall {
11824 c.ifNoneMatch_ = entityTag
11825 return c
11826 }
11827
11828
11829 func (c *FoldersLocationsGetCall) Context(ctx context.Context) *FoldersLocationsGetCall {
11830 c.ctx_ = ctx
11831 return c
11832 }
11833
11834
11835
11836 func (c *FoldersLocationsGetCall) Header() http.Header {
11837 if c.header_ == nil {
11838 c.header_ = make(http.Header)
11839 }
11840 return c.header_
11841 }
11842
11843 func (c *FoldersLocationsGetCall) doRequest(alt string) (*http.Response, error) {
11844 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11845 if c.ifNoneMatch_ != "" {
11846 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11847 }
11848 var body io.Reader = nil
11849 c.urlParams_.Set("alt", alt)
11850 c.urlParams_.Set("prettyPrint", "false")
11851 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
11852 urls += "?" + c.urlParams_.Encode()
11853 req, err := http.NewRequest("GET", urls, body)
11854 if err != nil {
11855 return nil, err
11856 }
11857 req.Header = reqHeaders
11858 googleapi.Expand(req.URL, map[string]string{
11859 "name": c.name,
11860 })
11861 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11862 }
11863
11864
11865
11866
11867
11868
11869 func (c *FoldersLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
11870 gensupport.SetOptions(c.urlParams_, opts...)
11871 res, err := c.doRequest("json")
11872 if res != nil && res.StatusCode == http.StatusNotModified {
11873 if res.Body != nil {
11874 res.Body.Close()
11875 }
11876 return nil, gensupport.WrapError(&googleapi.Error{
11877 Code: res.StatusCode,
11878 Header: res.Header,
11879 })
11880 }
11881 if err != nil {
11882 return nil, err
11883 }
11884 defer googleapi.CloseBody(res)
11885 if err := googleapi.CheckResponse(res); err != nil {
11886 return nil, gensupport.WrapError(err)
11887 }
11888 ret := &Location{
11889 ServerResponse: googleapi.ServerResponse{
11890 Header: res.Header,
11891 HTTPStatusCode: res.StatusCode,
11892 },
11893 }
11894 target := &ret
11895 if err := gensupport.DecodeResponse(target, res); err != nil {
11896 return nil, err
11897 }
11898 return ret, nil
11899 }
11900
11901 type FoldersLocationsListCall struct {
11902 s *Service
11903 name string
11904 urlParams_ gensupport.URLParams
11905 ifNoneMatch_ string
11906 ctx_ context.Context
11907 header_ http.Header
11908 }
11909
11910
11911
11912
11913 func (r *FoldersLocationsService) List(name string) *FoldersLocationsListCall {
11914 c := &FoldersLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11915 c.name = name
11916 return c
11917 }
11918
11919
11920
11921
11922
11923 func (c *FoldersLocationsListCall) Filter(filter string) *FoldersLocationsListCall {
11924 c.urlParams_.Set("filter", filter)
11925 return c
11926 }
11927
11928
11929
11930 func (c *FoldersLocationsListCall) PageSize(pageSize int64) *FoldersLocationsListCall {
11931 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11932 return c
11933 }
11934
11935
11936
11937
11938 func (c *FoldersLocationsListCall) PageToken(pageToken string) *FoldersLocationsListCall {
11939 c.urlParams_.Set("pageToken", pageToken)
11940 return c
11941 }
11942
11943
11944
11945
11946 func (c *FoldersLocationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsListCall {
11947 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11948 return c
11949 }
11950
11951
11952
11953
11954 func (c *FoldersLocationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsListCall {
11955 c.ifNoneMatch_ = entityTag
11956 return c
11957 }
11958
11959
11960 func (c *FoldersLocationsListCall) Context(ctx context.Context) *FoldersLocationsListCall {
11961 c.ctx_ = ctx
11962 return c
11963 }
11964
11965
11966
11967 func (c *FoldersLocationsListCall) Header() http.Header {
11968 if c.header_ == nil {
11969 c.header_ = make(http.Header)
11970 }
11971 return c.header_
11972 }
11973
11974 func (c *FoldersLocationsListCall) doRequest(alt string) (*http.Response, error) {
11975 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11976 if c.ifNoneMatch_ != "" {
11977 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11978 }
11979 var body io.Reader = nil
11980 c.urlParams_.Set("alt", alt)
11981 c.urlParams_.Set("prettyPrint", "false")
11982 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
11983 urls += "?" + c.urlParams_.Encode()
11984 req, err := http.NewRequest("GET", urls, body)
11985 if err != nil {
11986 return nil, err
11987 }
11988 req.Header = reqHeaders
11989 googleapi.Expand(req.URL, map[string]string{
11990 "name": c.name,
11991 })
11992 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11993 }
11994
11995
11996
11997
11998
11999
12000
12001 func (c *FoldersLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
12002 gensupport.SetOptions(c.urlParams_, opts...)
12003 res, err := c.doRequest("json")
12004 if res != nil && res.StatusCode == http.StatusNotModified {
12005 if res.Body != nil {
12006 res.Body.Close()
12007 }
12008 return nil, gensupport.WrapError(&googleapi.Error{
12009 Code: res.StatusCode,
12010 Header: res.Header,
12011 })
12012 }
12013 if err != nil {
12014 return nil, err
12015 }
12016 defer googleapi.CloseBody(res)
12017 if err := googleapi.CheckResponse(res); err != nil {
12018 return nil, gensupport.WrapError(err)
12019 }
12020 ret := &ListLocationsResponse{
12021 ServerResponse: googleapi.ServerResponse{
12022 Header: res.Header,
12023 HTTPStatusCode: res.StatusCode,
12024 },
12025 }
12026 target := &ret
12027 if err := gensupport.DecodeResponse(target, res); err != nil {
12028 return nil, err
12029 }
12030 return ret, nil
12031 }
12032
12033
12034
12035
12036 func (c *FoldersLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
12037 c.ctx_ = ctx
12038 defer c.PageToken(c.urlParams_.Get("pageToken"))
12039 for {
12040 x, err := c.Do()
12041 if err != nil {
12042 return err
12043 }
12044 if err := f(x); err != nil {
12045 return err
12046 }
12047 if x.NextPageToken == "" {
12048 return nil
12049 }
12050 c.PageToken(x.NextPageToken)
12051 }
12052 }
12053
12054 type FoldersLocationsBucketsCreateCall struct {
12055 s *Service
12056 parent string
12057 logbucket *LogBucket
12058 urlParams_ gensupport.URLParams
12059 ctx_ context.Context
12060 header_ http.Header
12061 }
12062
12063
12064
12065
12066
12067
12068
12069 func (r *FoldersLocationsBucketsService) Create(parent string, logbucket *LogBucket) *FoldersLocationsBucketsCreateCall {
12070 c := &FoldersLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12071 c.parent = parent
12072 c.logbucket = logbucket
12073 return c
12074 }
12075
12076
12077
12078
12079
12080 func (c *FoldersLocationsBucketsCreateCall) BucketId(bucketId string) *FoldersLocationsBucketsCreateCall {
12081 c.urlParams_.Set("bucketId", bucketId)
12082 return c
12083 }
12084
12085
12086
12087
12088 func (c *FoldersLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsCreateCall {
12089 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12090 return c
12091 }
12092
12093
12094 func (c *FoldersLocationsBucketsCreateCall) Context(ctx context.Context) *FoldersLocationsBucketsCreateCall {
12095 c.ctx_ = ctx
12096 return c
12097 }
12098
12099
12100
12101 func (c *FoldersLocationsBucketsCreateCall) Header() http.Header {
12102 if c.header_ == nil {
12103 c.header_ = make(http.Header)
12104 }
12105 return c.header_
12106 }
12107
12108 func (c *FoldersLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
12109 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12110 var body io.Reader = nil
12111 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
12112 if err != nil {
12113 return nil, err
12114 }
12115 c.urlParams_.Set("alt", alt)
12116 c.urlParams_.Set("prettyPrint", "false")
12117 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
12118 urls += "?" + c.urlParams_.Encode()
12119 req, err := http.NewRequest("POST", urls, body)
12120 if err != nil {
12121 return nil, err
12122 }
12123 req.Header = reqHeaders
12124 googleapi.Expand(req.URL, map[string]string{
12125 "parent": c.parent,
12126 })
12127 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12128 }
12129
12130
12131
12132
12133
12134
12135 func (c *FoldersLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
12136 gensupport.SetOptions(c.urlParams_, opts...)
12137 res, err := c.doRequest("json")
12138 if res != nil && res.StatusCode == http.StatusNotModified {
12139 if res.Body != nil {
12140 res.Body.Close()
12141 }
12142 return nil, gensupport.WrapError(&googleapi.Error{
12143 Code: res.StatusCode,
12144 Header: res.Header,
12145 })
12146 }
12147 if err != nil {
12148 return nil, err
12149 }
12150 defer googleapi.CloseBody(res)
12151 if err := googleapi.CheckResponse(res); err != nil {
12152 return nil, gensupport.WrapError(err)
12153 }
12154 ret := &LogBucket{
12155 ServerResponse: googleapi.ServerResponse{
12156 Header: res.Header,
12157 HTTPStatusCode: res.StatusCode,
12158 },
12159 }
12160 target := &ret
12161 if err := gensupport.DecodeResponse(target, res); err != nil {
12162 return nil, err
12163 }
12164 return ret, nil
12165 }
12166
12167 type FoldersLocationsBucketsCreateAsyncCall struct {
12168 s *Service
12169 parent string
12170 logbucket *LogBucket
12171 urlParams_ gensupport.URLParams
12172 ctx_ context.Context
12173 header_ http.Header
12174 }
12175
12176
12177
12178
12179
12180
12181
12182
12183 func (r *FoldersLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *FoldersLocationsBucketsCreateAsyncCall {
12184 c := &FoldersLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12185 c.parent = parent
12186 c.logbucket = logbucket
12187 return c
12188 }
12189
12190
12191
12192
12193
12194 func (c *FoldersLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *FoldersLocationsBucketsCreateAsyncCall {
12195 c.urlParams_.Set("bucketId", bucketId)
12196 return c
12197 }
12198
12199
12200
12201
12202 func (c *FoldersLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsCreateAsyncCall {
12203 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12204 return c
12205 }
12206
12207
12208 func (c *FoldersLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *FoldersLocationsBucketsCreateAsyncCall {
12209 c.ctx_ = ctx
12210 return c
12211 }
12212
12213
12214
12215 func (c *FoldersLocationsBucketsCreateAsyncCall) Header() http.Header {
12216 if c.header_ == nil {
12217 c.header_ = make(http.Header)
12218 }
12219 return c.header_
12220 }
12221
12222 func (c *FoldersLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) {
12223 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12224 var body io.Reader = nil
12225 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
12226 if err != nil {
12227 return nil, err
12228 }
12229 c.urlParams_.Set("alt", alt)
12230 c.urlParams_.Set("prettyPrint", "false")
12231 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync")
12232 urls += "?" + c.urlParams_.Encode()
12233 req, err := http.NewRequest("POST", urls, body)
12234 if err != nil {
12235 return nil, err
12236 }
12237 req.Header = reqHeaders
12238 googleapi.Expand(req.URL, map[string]string{
12239 "parent": c.parent,
12240 })
12241 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12242 }
12243
12244
12245
12246
12247
12248
12249 func (c *FoldersLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12250 gensupport.SetOptions(c.urlParams_, opts...)
12251 res, err := c.doRequest("json")
12252 if res != nil && res.StatusCode == http.StatusNotModified {
12253 if res.Body != nil {
12254 res.Body.Close()
12255 }
12256 return nil, gensupport.WrapError(&googleapi.Error{
12257 Code: res.StatusCode,
12258 Header: res.Header,
12259 })
12260 }
12261 if err != nil {
12262 return nil, err
12263 }
12264 defer googleapi.CloseBody(res)
12265 if err := googleapi.CheckResponse(res); err != nil {
12266 return nil, gensupport.WrapError(err)
12267 }
12268 ret := &Operation{
12269 ServerResponse: googleapi.ServerResponse{
12270 Header: res.Header,
12271 HTTPStatusCode: res.StatusCode,
12272 },
12273 }
12274 target := &ret
12275 if err := gensupport.DecodeResponse(target, res); err != nil {
12276 return nil, err
12277 }
12278 return ret, nil
12279 }
12280
12281 type FoldersLocationsBucketsDeleteCall struct {
12282 s *Service
12283 name string
12284 urlParams_ gensupport.URLParams
12285 ctx_ context.Context
12286 header_ http.Header
12287 }
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300 func (r *FoldersLocationsBucketsService) Delete(name string) *FoldersLocationsBucketsDeleteCall {
12301 c := &FoldersLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12302 c.name = name
12303 return c
12304 }
12305
12306
12307
12308
12309 func (c *FoldersLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsDeleteCall {
12310 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12311 return c
12312 }
12313
12314
12315 func (c *FoldersLocationsBucketsDeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsDeleteCall {
12316 c.ctx_ = ctx
12317 return c
12318 }
12319
12320
12321
12322 func (c *FoldersLocationsBucketsDeleteCall) Header() http.Header {
12323 if c.header_ == nil {
12324 c.header_ = make(http.Header)
12325 }
12326 return c.header_
12327 }
12328
12329 func (c *FoldersLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
12330 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12331 var body io.Reader = nil
12332 c.urlParams_.Set("alt", alt)
12333 c.urlParams_.Set("prettyPrint", "false")
12334 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
12335 urls += "?" + c.urlParams_.Encode()
12336 req, err := http.NewRequest("DELETE", urls, body)
12337 if err != nil {
12338 return nil, err
12339 }
12340 req.Header = reqHeaders
12341 googleapi.Expand(req.URL, map[string]string{
12342 "name": c.name,
12343 })
12344 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12345 }
12346
12347
12348
12349
12350
12351
12352 func (c *FoldersLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12353 gensupport.SetOptions(c.urlParams_, opts...)
12354 res, err := c.doRequest("json")
12355 if res != nil && res.StatusCode == http.StatusNotModified {
12356 if res.Body != nil {
12357 res.Body.Close()
12358 }
12359 return nil, gensupport.WrapError(&googleapi.Error{
12360 Code: res.StatusCode,
12361 Header: res.Header,
12362 })
12363 }
12364 if err != nil {
12365 return nil, err
12366 }
12367 defer googleapi.CloseBody(res)
12368 if err := googleapi.CheckResponse(res); err != nil {
12369 return nil, gensupport.WrapError(err)
12370 }
12371 ret := &Empty{
12372 ServerResponse: googleapi.ServerResponse{
12373 Header: res.Header,
12374 HTTPStatusCode: res.StatusCode,
12375 },
12376 }
12377 target := &ret
12378 if err := gensupport.DecodeResponse(target, res); err != nil {
12379 return nil, err
12380 }
12381 return ret, nil
12382 }
12383
12384 type FoldersLocationsBucketsGetCall struct {
12385 s *Service
12386 name string
12387 urlParams_ gensupport.URLParams
12388 ifNoneMatch_ string
12389 ctx_ context.Context
12390 header_ http.Header
12391 }
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402 func (r *FoldersLocationsBucketsService) Get(name string) *FoldersLocationsBucketsGetCall {
12403 c := &FoldersLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12404 c.name = name
12405 return c
12406 }
12407
12408
12409
12410
12411 func (c *FoldersLocationsBucketsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsGetCall {
12412 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12413 return c
12414 }
12415
12416
12417
12418
12419 func (c *FoldersLocationsBucketsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsGetCall {
12420 c.ifNoneMatch_ = entityTag
12421 return c
12422 }
12423
12424
12425 func (c *FoldersLocationsBucketsGetCall) Context(ctx context.Context) *FoldersLocationsBucketsGetCall {
12426 c.ctx_ = ctx
12427 return c
12428 }
12429
12430
12431
12432 func (c *FoldersLocationsBucketsGetCall) Header() http.Header {
12433 if c.header_ == nil {
12434 c.header_ = make(http.Header)
12435 }
12436 return c.header_
12437 }
12438
12439 func (c *FoldersLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
12440 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12441 if c.ifNoneMatch_ != "" {
12442 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12443 }
12444 var body io.Reader = nil
12445 c.urlParams_.Set("alt", alt)
12446 c.urlParams_.Set("prettyPrint", "false")
12447 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
12448 urls += "?" + c.urlParams_.Encode()
12449 req, err := http.NewRequest("GET", urls, body)
12450 if err != nil {
12451 return nil, err
12452 }
12453 req.Header = reqHeaders
12454 googleapi.Expand(req.URL, map[string]string{
12455 "name": c.name,
12456 })
12457 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12458 }
12459
12460
12461
12462
12463
12464
12465 func (c *FoldersLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
12466 gensupport.SetOptions(c.urlParams_, opts...)
12467 res, err := c.doRequest("json")
12468 if res != nil && res.StatusCode == http.StatusNotModified {
12469 if res.Body != nil {
12470 res.Body.Close()
12471 }
12472 return nil, gensupport.WrapError(&googleapi.Error{
12473 Code: res.StatusCode,
12474 Header: res.Header,
12475 })
12476 }
12477 if err != nil {
12478 return nil, err
12479 }
12480 defer googleapi.CloseBody(res)
12481 if err := googleapi.CheckResponse(res); err != nil {
12482 return nil, gensupport.WrapError(err)
12483 }
12484 ret := &LogBucket{
12485 ServerResponse: googleapi.ServerResponse{
12486 Header: res.Header,
12487 HTTPStatusCode: res.StatusCode,
12488 },
12489 }
12490 target := &ret
12491 if err := gensupport.DecodeResponse(target, res); err != nil {
12492 return nil, err
12493 }
12494 return ret, nil
12495 }
12496
12497 type FoldersLocationsBucketsListCall struct {
12498 s *Service
12499 parent string
12500 urlParams_ gensupport.URLParams
12501 ifNoneMatch_ string
12502 ctx_ context.Context
12503 header_ http.Header
12504 }
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515 func (r *FoldersLocationsBucketsService) List(parent string) *FoldersLocationsBucketsListCall {
12516 c := &FoldersLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12517 c.parent = parent
12518 return c
12519 }
12520
12521
12522
12523
12524
12525 func (c *FoldersLocationsBucketsListCall) PageSize(pageSize int64) *FoldersLocationsBucketsListCall {
12526 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12527 return c
12528 }
12529
12530
12531
12532
12533
12534 func (c *FoldersLocationsBucketsListCall) PageToken(pageToken string) *FoldersLocationsBucketsListCall {
12535 c.urlParams_.Set("pageToken", pageToken)
12536 return c
12537 }
12538
12539
12540
12541
12542 func (c *FoldersLocationsBucketsListCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsListCall {
12543 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12544 return c
12545 }
12546
12547
12548
12549
12550 func (c *FoldersLocationsBucketsListCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsListCall {
12551 c.ifNoneMatch_ = entityTag
12552 return c
12553 }
12554
12555
12556 func (c *FoldersLocationsBucketsListCall) Context(ctx context.Context) *FoldersLocationsBucketsListCall {
12557 c.ctx_ = ctx
12558 return c
12559 }
12560
12561
12562
12563 func (c *FoldersLocationsBucketsListCall) Header() http.Header {
12564 if c.header_ == nil {
12565 c.header_ = make(http.Header)
12566 }
12567 return c.header_
12568 }
12569
12570 func (c *FoldersLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
12571 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12572 if c.ifNoneMatch_ != "" {
12573 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12574 }
12575 var body io.Reader = nil
12576 c.urlParams_.Set("alt", alt)
12577 c.urlParams_.Set("prettyPrint", "false")
12578 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
12579 urls += "?" + c.urlParams_.Encode()
12580 req, err := http.NewRequest("GET", urls, body)
12581 if err != nil {
12582 return nil, err
12583 }
12584 req.Header = reqHeaders
12585 googleapi.Expand(req.URL, map[string]string{
12586 "parent": c.parent,
12587 })
12588 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12589 }
12590
12591
12592
12593
12594
12595
12596
12597 func (c *FoldersLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
12598 gensupport.SetOptions(c.urlParams_, opts...)
12599 res, err := c.doRequest("json")
12600 if res != nil && res.StatusCode == http.StatusNotModified {
12601 if res.Body != nil {
12602 res.Body.Close()
12603 }
12604 return nil, gensupport.WrapError(&googleapi.Error{
12605 Code: res.StatusCode,
12606 Header: res.Header,
12607 })
12608 }
12609 if err != nil {
12610 return nil, err
12611 }
12612 defer googleapi.CloseBody(res)
12613 if err := googleapi.CheckResponse(res); err != nil {
12614 return nil, gensupport.WrapError(err)
12615 }
12616 ret := &ListBucketsResponse{
12617 ServerResponse: googleapi.ServerResponse{
12618 Header: res.Header,
12619 HTTPStatusCode: res.StatusCode,
12620 },
12621 }
12622 target := &ret
12623 if err := gensupport.DecodeResponse(target, res); err != nil {
12624 return nil, err
12625 }
12626 return ret, nil
12627 }
12628
12629
12630
12631
12632 func (c *FoldersLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
12633 c.ctx_ = ctx
12634 defer c.PageToken(c.urlParams_.Get("pageToken"))
12635 for {
12636 x, err := c.Do()
12637 if err != nil {
12638 return err
12639 }
12640 if err := f(x); err != nil {
12641 return err
12642 }
12643 if x.NextPageToken == "" {
12644 return nil
12645 }
12646 c.PageToken(x.NextPageToken)
12647 }
12648 }
12649
12650 type FoldersLocationsBucketsPatchCall struct {
12651 s *Service
12652 name string
12653 logbucket *LogBucket
12654 urlParams_ gensupport.URLParams
12655 ctx_ context.Context
12656 header_ http.Header
12657 }
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670 func (r *FoldersLocationsBucketsService) Patch(name string, logbucket *LogBucket) *FoldersLocationsBucketsPatchCall {
12671 c := &FoldersLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12672 c.name = name
12673 c.logbucket = logbucket
12674 return c
12675 }
12676
12677
12678
12679
12680
12681
12682
12683 func (c *FoldersLocationsBucketsPatchCall) UpdateMask(updateMask string) *FoldersLocationsBucketsPatchCall {
12684 c.urlParams_.Set("updateMask", updateMask)
12685 return c
12686 }
12687
12688
12689
12690
12691 func (c *FoldersLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsPatchCall {
12692 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12693 return c
12694 }
12695
12696
12697 func (c *FoldersLocationsBucketsPatchCall) Context(ctx context.Context) *FoldersLocationsBucketsPatchCall {
12698 c.ctx_ = ctx
12699 return c
12700 }
12701
12702
12703
12704 func (c *FoldersLocationsBucketsPatchCall) Header() http.Header {
12705 if c.header_ == nil {
12706 c.header_ = make(http.Header)
12707 }
12708 return c.header_
12709 }
12710
12711 func (c *FoldersLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
12712 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12713 var body io.Reader = nil
12714 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
12715 if err != nil {
12716 return nil, err
12717 }
12718 c.urlParams_.Set("alt", alt)
12719 c.urlParams_.Set("prettyPrint", "false")
12720 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
12721 urls += "?" + c.urlParams_.Encode()
12722 req, err := http.NewRequest("PATCH", urls, body)
12723 if err != nil {
12724 return nil, err
12725 }
12726 req.Header = reqHeaders
12727 googleapi.Expand(req.URL, map[string]string{
12728 "name": c.name,
12729 })
12730 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12731 }
12732
12733
12734
12735
12736
12737
12738 func (c *FoldersLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
12739 gensupport.SetOptions(c.urlParams_, opts...)
12740 res, err := c.doRequest("json")
12741 if res != nil && res.StatusCode == http.StatusNotModified {
12742 if res.Body != nil {
12743 res.Body.Close()
12744 }
12745 return nil, gensupport.WrapError(&googleapi.Error{
12746 Code: res.StatusCode,
12747 Header: res.Header,
12748 })
12749 }
12750 if err != nil {
12751 return nil, err
12752 }
12753 defer googleapi.CloseBody(res)
12754 if err := googleapi.CheckResponse(res); err != nil {
12755 return nil, gensupport.WrapError(err)
12756 }
12757 ret := &LogBucket{
12758 ServerResponse: googleapi.ServerResponse{
12759 Header: res.Header,
12760 HTTPStatusCode: res.StatusCode,
12761 },
12762 }
12763 target := &ret
12764 if err := gensupport.DecodeResponse(target, res); err != nil {
12765 return nil, err
12766 }
12767 return ret, nil
12768 }
12769
12770 type FoldersLocationsBucketsUndeleteCall struct {
12771 s *Service
12772 name string
12773 undeletebucketrequest *UndeleteBucketRequest
12774 urlParams_ gensupport.URLParams
12775 ctx_ context.Context
12776 header_ http.Header
12777 }
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789 func (r *FoldersLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *FoldersLocationsBucketsUndeleteCall {
12790 c := &FoldersLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12791 c.name = name
12792 c.undeletebucketrequest = undeletebucketrequest
12793 return c
12794 }
12795
12796
12797
12798
12799 func (c *FoldersLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsUndeleteCall {
12800 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12801 return c
12802 }
12803
12804
12805 func (c *FoldersLocationsBucketsUndeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsUndeleteCall {
12806 c.ctx_ = ctx
12807 return c
12808 }
12809
12810
12811
12812 func (c *FoldersLocationsBucketsUndeleteCall) Header() http.Header {
12813 if c.header_ == nil {
12814 c.header_ = make(http.Header)
12815 }
12816 return c.header_
12817 }
12818
12819 func (c *FoldersLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
12820 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12821 var body io.Reader = nil
12822 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
12823 if err != nil {
12824 return nil, err
12825 }
12826 c.urlParams_.Set("alt", alt)
12827 c.urlParams_.Set("prettyPrint", "false")
12828 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
12829 urls += "?" + c.urlParams_.Encode()
12830 req, err := http.NewRequest("POST", urls, body)
12831 if err != nil {
12832 return nil, err
12833 }
12834 req.Header = reqHeaders
12835 googleapi.Expand(req.URL, map[string]string{
12836 "name": c.name,
12837 })
12838 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12839 }
12840
12841
12842
12843
12844
12845
12846 func (c *FoldersLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12847 gensupport.SetOptions(c.urlParams_, opts...)
12848 res, err := c.doRequest("json")
12849 if res != nil && res.StatusCode == http.StatusNotModified {
12850 if res.Body != nil {
12851 res.Body.Close()
12852 }
12853 return nil, gensupport.WrapError(&googleapi.Error{
12854 Code: res.StatusCode,
12855 Header: res.Header,
12856 })
12857 }
12858 if err != nil {
12859 return nil, err
12860 }
12861 defer googleapi.CloseBody(res)
12862 if err := googleapi.CheckResponse(res); err != nil {
12863 return nil, gensupport.WrapError(err)
12864 }
12865 ret := &Empty{
12866 ServerResponse: googleapi.ServerResponse{
12867 Header: res.Header,
12868 HTTPStatusCode: res.StatusCode,
12869 },
12870 }
12871 target := &ret
12872 if err := gensupport.DecodeResponse(target, res); err != nil {
12873 return nil, err
12874 }
12875 return ret, nil
12876 }
12877
12878 type FoldersLocationsBucketsUpdateAsyncCall struct {
12879 s *Service
12880 name string
12881 logbucket *LogBucket
12882 urlParams_ gensupport.URLParams
12883 ctx_ context.Context
12884 header_ http.Header
12885 }
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899 func (r *FoldersLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *FoldersLocationsBucketsUpdateAsyncCall {
12900 c := &FoldersLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12901 c.name = name
12902 c.logbucket = logbucket
12903 return c
12904 }
12905
12906
12907
12908
12909
12910
12911
12912 func (c *FoldersLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *FoldersLocationsBucketsUpdateAsyncCall {
12913 c.urlParams_.Set("updateMask", updateMask)
12914 return c
12915 }
12916
12917
12918
12919
12920 func (c *FoldersLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsUpdateAsyncCall {
12921 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12922 return c
12923 }
12924
12925
12926 func (c *FoldersLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *FoldersLocationsBucketsUpdateAsyncCall {
12927 c.ctx_ = ctx
12928 return c
12929 }
12930
12931
12932
12933 func (c *FoldersLocationsBucketsUpdateAsyncCall) Header() http.Header {
12934 if c.header_ == nil {
12935 c.header_ = make(http.Header)
12936 }
12937 return c.header_
12938 }
12939
12940 func (c *FoldersLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) {
12941 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12942 var body io.Reader = nil
12943 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
12944 if err != nil {
12945 return nil, err
12946 }
12947 c.urlParams_.Set("alt", alt)
12948 c.urlParams_.Set("prettyPrint", "false")
12949 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync")
12950 urls += "?" + c.urlParams_.Encode()
12951 req, err := http.NewRequest("POST", urls, body)
12952 if err != nil {
12953 return nil, err
12954 }
12955 req.Header = reqHeaders
12956 googleapi.Expand(req.URL, map[string]string{
12957 "name": c.name,
12958 })
12959 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12960 }
12961
12962
12963
12964
12965
12966
12967 func (c *FoldersLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12968 gensupport.SetOptions(c.urlParams_, opts...)
12969 res, err := c.doRequest("json")
12970 if res != nil && res.StatusCode == http.StatusNotModified {
12971 if res.Body != nil {
12972 res.Body.Close()
12973 }
12974 return nil, gensupport.WrapError(&googleapi.Error{
12975 Code: res.StatusCode,
12976 Header: res.Header,
12977 })
12978 }
12979 if err != nil {
12980 return nil, err
12981 }
12982 defer googleapi.CloseBody(res)
12983 if err := googleapi.CheckResponse(res); err != nil {
12984 return nil, gensupport.WrapError(err)
12985 }
12986 ret := &Operation{
12987 ServerResponse: googleapi.ServerResponse{
12988 Header: res.Header,
12989 HTTPStatusCode: res.StatusCode,
12990 },
12991 }
12992 target := &ret
12993 if err := gensupport.DecodeResponse(target, res); err != nil {
12994 return nil, err
12995 }
12996 return ret, nil
12997 }
12998
12999 type FoldersLocationsBucketsLinksCreateCall struct {
13000 s *Service
13001 parent string
13002 link *Link
13003 urlParams_ gensupport.URLParams
13004 ctx_ context.Context
13005 header_ http.Header
13006 }
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018 func (r *FoldersLocationsBucketsLinksService) Create(parent string, link *Link) *FoldersLocationsBucketsLinksCreateCall {
13019 c := &FoldersLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13020 c.parent = parent
13021 c.link = link
13022 return c
13023 }
13024
13025
13026
13027
13028 func (c *FoldersLocationsBucketsLinksCreateCall) LinkId(linkId string) *FoldersLocationsBucketsLinksCreateCall {
13029 c.urlParams_.Set("linkId", linkId)
13030 return c
13031 }
13032
13033
13034
13035
13036 func (c *FoldersLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsLinksCreateCall {
13037 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13038 return c
13039 }
13040
13041
13042 func (c *FoldersLocationsBucketsLinksCreateCall) Context(ctx context.Context) *FoldersLocationsBucketsLinksCreateCall {
13043 c.ctx_ = ctx
13044 return c
13045 }
13046
13047
13048
13049 func (c *FoldersLocationsBucketsLinksCreateCall) Header() http.Header {
13050 if c.header_ == nil {
13051 c.header_ = make(http.Header)
13052 }
13053 return c.header_
13054 }
13055
13056 func (c *FoldersLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
13057 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13058 var body io.Reader = nil
13059 body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
13060 if err != nil {
13061 return nil, err
13062 }
13063 c.urlParams_.Set("alt", alt)
13064 c.urlParams_.Set("prettyPrint", "false")
13065 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
13066 urls += "?" + c.urlParams_.Encode()
13067 req, err := http.NewRequest("POST", urls, body)
13068 if err != nil {
13069 return nil, err
13070 }
13071 req.Header = reqHeaders
13072 googleapi.Expand(req.URL, map[string]string{
13073 "parent": c.parent,
13074 })
13075 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13076 }
13077
13078
13079
13080
13081
13082
13083 func (c *FoldersLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13084 gensupport.SetOptions(c.urlParams_, opts...)
13085 res, err := c.doRequest("json")
13086 if res != nil && res.StatusCode == http.StatusNotModified {
13087 if res.Body != nil {
13088 res.Body.Close()
13089 }
13090 return nil, gensupport.WrapError(&googleapi.Error{
13091 Code: res.StatusCode,
13092 Header: res.Header,
13093 })
13094 }
13095 if err != nil {
13096 return nil, err
13097 }
13098 defer googleapi.CloseBody(res)
13099 if err := googleapi.CheckResponse(res); err != nil {
13100 return nil, gensupport.WrapError(err)
13101 }
13102 ret := &Operation{
13103 ServerResponse: googleapi.ServerResponse{
13104 Header: res.Header,
13105 HTTPStatusCode: res.StatusCode,
13106 },
13107 }
13108 target := &ret
13109 if err := gensupport.DecodeResponse(target, res); err != nil {
13110 return nil, err
13111 }
13112 return ret, nil
13113 }
13114
13115 type FoldersLocationsBucketsLinksDeleteCall struct {
13116 s *Service
13117 name string
13118 urlParams_ gensupport.URLParams
13119 ctx_ context.Context
13120 header_ http.Header
13121 }
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135 func (r *FoldersLocationsBucketsLinksService) Delete(name string) *FoldersLocationsBucketsLinksDeleteCall {
13136 c := &FoldersLocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13137 c.name = name
13138 return c
13139 }
13140
13141
13142
13143
13144 func (c *FoldersLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsLinksDeleteCall {
13145 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13146 return c
13147 }
13148
13149
13150 func (c *FoldersLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsLinksDeleteCall {
13151 c.ctx_ = ctx
13152 return c
13153 }
13154
13155
13156
13157 func (c *FoldersLocationsBucketsLinksDeleteCall) Header() http.Header {
13158 if c.header_ == nil {
13159 c.header_ = make(http.Header)
13160 }
13161 return c.header_
13162 }
13163
13164 func (c *FoldersLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
13165 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13166 var body io.Reader = nil
13167 c.urlParams_.Set("alt", alt)
13168 c.urlParams_.Set("prettyPrint", "false")
13169 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
13170 urls += "?" + c.urlParams_.Encode()
13171 req, err := http.NewRequest("DELETE", urls, body)
13172 if err != nil {
13173 return nil, err
13174 }
13175 req.Header = reqHeaders
13176 googleapi.Expand(req.URL, map[string]string{
13177 "name": c.name,
13178 })
13179 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13180 }
13181
13182
13183
13184
13185
13186
13187 func (c *FoldersLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13188 gensupport.SetOptions(c.urlParams_, opts...)
13189 res, err := c.doRequest("json")
13190 if res != nil && res.StatusCode == http.StatusNotModified {
13191 if res.Body != nil {
13192 res.Body.Close()
13193 }
13194 return nil, gensupport.WrapError(&googleapi.Error{
13195 Code: res.StatusCode,
13196 Header: res.Header,
13197 })
13198 }
13199 if err != nil {
13200 return nil, err
13201 }
13202 defer googleapi.CloseBody(res)
13203 if err := googleapi.CheckResponse(res); err != nil {
13204 return nil, gensupport.WrapError(err)
13205 }
13206 ret := &Operation{
13207 ServerResponse: googleapi.ServerResponse{
13208 Header: res.Header,
13209 HTTPStatusCode: res.StatusCode,
13210 },
13211 }
13212 target := &ret
13213 if err := gensupport.DecodeResponse(target, res); err != nil {
13214 return nil, err
13215 }
13216 return ret, nil
13217 }
13218
13219 type FoldersLocationsBucketsLinksGetCall struct {
13220 s *Service
13221 name string
13222 urlParams_ gensupport.URLParams
13223 ifNoneMatch_ string
13224 ctx_ context.Context
13225 header_ http.Header
13226 }
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239 func (r *FoldersLocationsBucketsLinksService) Get(name string) *FoldersLocationsBucketsLinksGetCall {
13240 c := &FoldersLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13241 c.name = name
13242 return c
13243 }
13244
13245
13246
13247
13248 func (c *FoldersLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsLinksGetCall {
13249 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13250 return c
13251 }
13252
13253
13254
13255
13256 func (c *FoldersLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsLinksGetCall {
13257 c.ifNoneMatch_ = entityTag
13258 return c
13259 }
13260
13261
13262 func (c *FoldersLocationsBucketsLinksGetCall) Context(ctx context.Context) *FoldersLocationsBucketsLinksGetCall {
13263 c.ctx_ = ctx
13264 return c
13265 }
13266
13267
13268
13269 func (c *FoldersLocationsBucketsLinksGetCall) Header() http.Header {
13270 if c.header_ == nil {
13271 c.header_ = make(http.Header)
13272 }
13273 return c.header_
13274 }
13275
13276 func (c *FoldersLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) {
13277 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13278 if c.ifNoneMatch_ != "" {
13279 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13280 }
13281 var body io.Reader = nil
13282 c.urlParams_.Set("alt", alt)
13283 c.urlParams_.Set("prettyPrint", "false")
13284 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
13285 urls += "?" + c.urlParams_.Encode()
13286 req, err := http.NewRequest("GET", urls, body)
13287 if err != nil {
13288 return nil, err
13289 }
13290 req.Header = reqHeaders
13291 googleapi.Expand(req.URL, map[string]string{
13292 "name": c.name,
13293 })
13294 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13295 }
13296
13297
13298
13299
13300
13301
13302 func (c *FoldersLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) {
13303 gensupport.SetOptions(c.urlParams_, opts...)
13304 res, err := c.doRequest("json")
13305 if res != nil && res.StatusCode == http.StatusNotModified {
13306 if res.Body != nil {
13307 res.Body.Close()
13308 }
13309 return nil, gensupport.WrapError(&googleapi.Error{
13310 Code: res.StatusCode,
13311 Header: res.Header,
13312 })
13313 }
13314 if err != nil {
13315 return nil, err
13316 }
13317 defer googleapi.CloseBody(res)
13318 if err := googleapi.CheckResponse(res); err != nil {
13319 return nil, gensupport.WrapError(err)
13320 }
13321 ret := &Link{
13322 ServerResponse: googleapi.ServerResponse{
13323 Header: res.Header,
13324 HTTPStatusCode: res.StatusCode,
13325 },
13326 }
13327 target := &ret
13328 if err := gensupport.DecodeResponse(target, res); err != nil {
13329 return nil, err
13330 }
13331 return ret, nil
13332 }
13333
13334 type FoldersLocationsBucketsLinksListCall struct {
13335 s *Service
13336 parent string
13337 urlParams_ gensupport.URLParams
13338 ifNoneMatch_ string
13339 ctx_ context.Context
13340 header_ http.Header
13341 }
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351 func (r *FoldersLocationsBucketsLinksService) List(parent string) *FoldersLocationsBucketsLinksListCall {
13352 c := &FoldersLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13353 c.parent = parent
13354 return c
13355 }
13356
13357
13358
13359 func (c *FoldersLocationsBucketsLinksListCall) PageSize(pageSize int64) *FoldersLocationsBucketsLinksListCall {
13360 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13361 return c
13362 }
13363
13364
13365
13366
13367 func (c *FoldersLocationsBucketsLinksListCall) PageToken(pageToken string) *FoldersLocationsBucketsLinksListCall {
13368 c.urlParams_.Set("pageToken", pageToken)
13369 return c
13370 }
13371
13372
13373
13374
13375 func (c *FoldersLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsLinksListCall {
13376 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13377 return c
13378 }
13379
13380
13381
13382
13383 func (c *FoldersLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsLinksListCall {
13384 c.ifNoneMatch_ = entityTag
13385 return c
13386 }
13387
13388
13389 func (c *FoldersLocationsBucketsLinksListCall) Context(ctx context.Context) *FoldersLocationsBucketsLinksListCall {
13390 c.ctx_ = ctx
13391 return c
13392 }
13393
13394
13395
13396 func (c *FoldersLocationsBucketsLinksListCall) Header() http.Header {
13397 if c.header_ == nil {
13398 c.header_ = make(http.Header)
13399 }
13400 return c.header_
13401 }
13402
13403 func (c *FoldersLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) {
13404 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13405 if c.ifNoneMatch_ != "" {
13406 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13407 }
13408 var body io.Reader = nil
13409 c.urlParams_.Set("alt", alt)
13410 c.urlParams_.Set("prettyPrint", "false")
13411 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
13412 urls += "?" + c.urlParams_.Encode()
13413 req, err := http.NewRequest("GET", urls, body)
13414 if err != nil {
13415 return nil, err
13416 }
13417 req.Header = reqHeaders
13418 googleapi.Expand(req.URL, map[string]string{
13419 "parent": c.parent,
13420 })
13421 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13422 }
13423
13424
13425
13426
13427
13428
13429
13430 func (c *FoldersLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) {
13431 gensupport.SetOptions(c.urlParams_, opts...)
13432 res, err := c.doRequest("json")
13433 if res != nil && res.StatusCode == http.StatusNotModified {
13434 if res.Body != nil {
13435 res.Body.Close()
13436 }
13437 return nil, gensupport.WrapError(&googleapi.Error{
13438 Code: res.StatusCode,
13439 Header: res.Header,
13440 })
13441 }
13442 if err != nil {
13443 return nil, err
13444 }
13445 defer googleapi.CloseBody(res)
13446 if err := googleapi.CheckResponse(res); err != nil {
13447 return nil, gensupport.WrapError(err)
13448 }
13449 ret := &ListLinksResponse{
13450 ServerResponse: googleapi.ServerResponse{
13451 Header: res.Header,
13452 HTTPStatusCode: res.StatusCode,
13453 },
13454 }
13455 target := &ret
13456 if err := gensupport.DecodeResponse(target, res); err != nil {
13457 return nil, err
13458 }
13459 return ret, nil
13460 }
13461
13462
13463
13464
13465 func (c *FoldersLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error {
13466 c.ctx_ = ctx
13467 defer c.PageToken(c.urlParams_.Get("pageToken"))
13468 for {
13469 x, err := c.Do()
13470 if err != nil {
13471 return err
13472 }
13473 if err := f(x); err != nil {
13474 return err
13475 }
13476 if x.NextPageToken == "" {
13477 return nil
13478 }
13479 c.PageToken(x.NextPageToken)
13480 }
13481 }
13482
13483 type FoldersLocationsBucketsViewsCreateCall struct {
13484 s *Service
13485 parent string
13486 logview *LogView
13487 urlParams_ gensupport.URLParams
13488 ctx_ context.Context
13489 header_ http.Header
13490 }
13491
13492
13493
13494
13495
13496
13497
13498 func (r *FoldersLocationsBucketsViewsService) Create(parent string, logview *LogView) *FoldersLocationsBucketsViewsCreateCall {
13499 c := &FoldersLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13500 c.parent = parent
13501 c.logview = logview
13502 return c
13503 }
13504
13505
13506
13507
13508 func (c *FoldersLocationsBucketsViewsCreateCall) ViewId(viewId string) *FoldersLocationsBucketsViewsCreateCall {
13509 c.urlParams_.Set("viewId", viewId)
13510 return c
13511 }
13512
13513
13514
13515
13516 func (c *FoldersLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsCreateCall {
13517 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13518 return c
13519 }
13520
13521
13522 func (c *FoldersLocationsBucketsViewsCreateCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsCreateCall {
13523 c.ctx_ = ctx
13524 return c
13525 }
13526
13527
13528
13529 func (c *FoldersLocationsBucketsViewsCreateCall) Header() http.Header {
13530 if c.header_ == nil {
13531 c.header_ = make(http.Header)
13532 }
13533 return c.header_
13534 }
13535
13536 func (c *FoldersLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
13537 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13538 var body io.Reader = nil
13539 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
13540 if err != nil {
13541 return nil, err
13542 }
13543 c.urlParams_.Set("alt", alt)
13544 c.urlParams_.Set("prettyPrint", "false")
13545 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
13546 urls += "?" + c.urlParams_.Encode()
13547 req, err := http.NewRequest("POST", urls, body)
13548 if err != nil {
13549 return nil, err
13550 }
13551 req.Header = reqHeaders
13552 googleapi.Expand(req.URL, map[string]string{
13553 "parent": c.parent,
13554 })
13555 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13556 }
13557
13558
13559
13560
13561
13562
13563 func (c *FoldersLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
13564 gensupport.SetOptions(c.urlParams_, opts...)
13565 res, err := c.doRequest("json")
13566 if res != nil && res.StatusCode == http.StatusNotModified {
13567 if res.Body != nil {
13568 res.Body.Close()
13569 }
13570 return nil, gensupport.WrapError(&googleapi.Error{
13571 Code: res.StatusCode,
13572 Header: res.Header,
13573 })
13574 }
13575 if err != nil {
13576 return nil, err
13577 }
13578 defer googleapi.CloseBody(res)
13579 if err := googleapi.CheckResponse(res); err != nil {
13580 return nil, gensupport.WrapError(err)
13581 }
13582 ret := &LogView{
13583 ServerResponse: googleapi.ServerResponse{
13584 Header: res.Header,
13585 HTTPStatusCode: res.StatusCode,
13586 },
13587 }
13588 target := &ret
13589 if err := gensupport.DecodeResponse(target, res); err != nil {
13590 return nil, err
13591 }
13592 return ret, nil
13593 }
13594
13595 type FoldersLocationsBucketsViewsDeleteCall struct {
13596 s *Service
13597 name string
13598 urlParams_ gensupport.URLParams
13599 ctx_ context.Context
13600 header_ http.Header
13601 }
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612 func (r *FoldersLocationsBucketsViewsService) Delete(name string) *FoldersLocationsBucketsViewsDeleteCall {
13613 c := &FoldersLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13614 c.name = name
13615 return c
13616 }
13617
13618
13619
13620
13621 func (c *FoldersLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsDeleteCall {
13622 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13623 return c
13624 }
13625
13626
13627 func (c *FoldersLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsDeleteCall {
13628 c.ctx_ = ctx
13629 return c
13630 }
13631
13632
13633
13634 func (c *FoldersLocationsBucketsViewsDeleteCall) Header() http.Header {
13635 if c.header_ == nil {
13636 c.header_ = make(http.Header)
13637 }
13638 return c.header_
13639 }
13640
13641 func (c *FoldersLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
13642 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13643 var body io.Reader = nil
13644 c.urlParams_.Set("alt", alt)
13645 c.urlParams_.Set("prettyPrint", "false")
13646 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
13647 urls += "?" + c.urlParams_.Encode()
13648 req, err := http.NewRequest("DELETE", urls, body)
13649 if err != nil {
13650 return nil, err
13651 }
13652 req.Header = reqHeaders
13653 googleapi.Expand(req.URL, map[string]string{
13654 "name": c.name,
13655 })
13656 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13657 }
13658
13659
13660
13661
13662
13663
13664 func (c *FoldersLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
13665 gensupport.SetOptions(c.urlParams_, opts...)
13666 res, err := c.doRequest("json")
13667 if res != nil && res.StatusCode == http.StatusNotModified {
13668 if res.Body != nil {
13669 res.Body.Close()
13670 }
13671 return nil, gensupport.WrapError(&googleapi.Error{
13672 Code: res.StatusCode,
13673 Header: res.Header,
13674 })
13675 }
13676 if err != nil {
13677 return nil, err
13678 }
13679 defer googleapi.CloseBody(res)
13680 if err := googleapi.CheckResponse(res); err != nil {
13681 return nil, gensupport.WrapError(err)
13682 }
13683 ret := &Empty{
13684 ServerResponse: googleapi.ServerResponse{
13685 Header: res.Header,
13686 HTTPStatusCode: res.StatusCode,
13687 },
13688 }
13689 target := &ret
13690 if err := gensupport.DecodeResponse(target, res); err != nil {
13691 return nil, err
13692 }
13693 return ret, nil
13694 }
13695
13696 type FoldersLocationsBucketsViewsGetCall struct {
13697 s *Service
13698 name string
13699 urlParams_ gensupport.URLParams
13700 ifNoneMatch_ string
13701 ctx_ context.Context
13702 header_ http.Header
13703 }
13704
13705
13706
13707
13708
13709
13710
13711
13712 func (r *FoldersLocationsBucketsViewsService) Get(name string) *FoldersLocationsBucketsViewsGetCall {
13713 c := &FoldersLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13714 c.name = name
13715 return c
13716 }
13717
13718
13719
13720
13721 func (c *FoldersLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsGetCall {
13722 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13723 return c
13724 }
13725
13726
13727
13728
13729 func (c *FoldersLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsViewsGetCall {
13730 c.ifNoneMatch_ = entityTag
13731 return c
13732 }
13733
13734
13735 func (c *FoldersLocationsBucketsViewsGetCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsGetCall {
13736 c.ctx_ = ctx
13737 return c
13738 }
13739
13740
13741
13742 func (c *FoldersLocationsBucketsViewsGetCall) Header() http.Header {
13743 if c.header_ == nil {
13744 c.header_ = make(http.Header)
13745 }
13746 return c.header_
13747 }
13748
13749 func (c *FoldersLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
13750 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13751 if c.ifNoneMatch_ != "" {
13752 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13753 }
13754 var body io.Reader = nil
13755 c.urlParams_.Set("alt", alt)
13756 c.urlParams_.Set("prettyPrint", "false")
13757 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
13758 urls += "?" + c.urlParams_.Encode()
13759 req, err := http.NewRequest("GET", urls, body)
13760 if err != nil {
13761 return nil, err
13762 }
13763 req.Header = reqHeaders
13764 googleapi.Expand(req.URL, map[string]string{
13765 "name": c.name,
13766 })
13767 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13768 }
13769
13770
13771
13772
13773
13774
13775 func (c *FoldersLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
13776 gensupport.SetOptions(c.urlParams_, opts...)
13777 res, err := c.doRequest("json")
13778 if res != nil && res.StatusCode == http.StatusNotModified {
13779 if res.Body != nil {
13780 res.Body.Close()
13781 }
13782 return nil, gensupport.WrapError(&googleapi.Error{
13783 Code: res.StatusCode,
13784 Header: res.Header,
13785 })
13786 }
13787 if err != nil {
13788 return nil, err
13789 }
13790 defer googleapi.CloseBody(res)
13791 if err := googleapi.CheckResponse(res); err != nil {
13792 return nil, gensupport.WrapError(err)
13793 }
13794 ret := &LogView{
13795 ServerResponse: googleapi.ServerResponse{
13796 Header: res.Header,
13797 HTTPStatusCode: res.StatusCode,
13798 },
13799 }
13800 target := &ret
13801 if err := gensupport.DecodeResponse(target, res); err != nil {
13802 return nil, err
13803 }
13804 return ret, nil
13805 }
13806
13807 type FoldersLocationsBucketsViewsGetIamPolicyCall struct {
13808 s *Service
13809 resource string
13810 getiampolicyrequest *GetIamPolicyRequest
13811 urlParams_ gensupport.URLParams
13812 ctx_ context.Context
13813 header_ http.Header
13814 }
13815
13816
13817
13818
13819
13820
13821
13822 func (r *FoldersLocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *FoldersLocationsBucketsViewsGetIamPolicyCall {
13823 c := &FoldersLocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13824 c.resource = resource
13825 c.getiampolicyrequest = getiampolicyrequest
13826 return c
13827 }
13828
13829
13830
13831
13832 func (c *FoldersLocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsGetIamPolicyCall {
13833 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13834 return c
13835 }
13836
13837
13838 func (c *FoldersLocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsGetIamPolicyCall {
13839 c.ctx_ = ctx
13840 return c
13841 }
13842
13843
13844
13845 func (c *FoldersLocationsBucketsViewsGetIamPolicyCall) Header() http.Header {
13846 if c.header_ == nil {
13847 c.header_ = make(http.Header)
13848 }
13849 return c.header_
13850 }
13851
13852 func (c *FoldersLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13853 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13854 var body io.Reader = nil
13855 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
13856 if err != nil {
13857 return nil, err
13858 }
13859 c.urlParams_.Set("alt", alt)
13860 c.urlParams_.Set("prettyPrint", "false")
13861 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
13862 urls += "?" + c.urlParams_.Encode()
13863 req, err := http.NewRequest("POST", urls, body)
13864 if err != nil {
13865 return nil, err
13866 }
13867 req.Header = reqHeaders
13868 googleapi.Expand(req.URL, map[string]string{
13869 "resource": c.resource,
13870 })
13871 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13872 }
13873
13874
13875
13876
13877
13878
13879 func (c *FoldersLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13880 gensupport.SetOptions(c.urlParams_, opts...)
13881 res, err := c.doRequest("json")
13882 if res != nil && res.StatusCode == http.StatusNotModified {
13883 if res.Body != nil {
13884 res.Body.Close()
13885 }
13886 return nil, gensupport.WrapError(&googleapi.Error{
13887 Code: res.StatusCode,
13888 Header: res.Header,
13889 })
13890 }
13891 if err != nil {
13892 return nil, err
13893 }
13894 defer googleapi.CloseBody(res)
13895 if err := googleapi.CheckResponse(res); err != nil {
13896 return nil, gensupport.WrapError(err)
13897 }
13898 ret := &Policy{
13899 ServerResponse: googleapi.ServerResponse{
13900 Header: res.Header,
13901 HTTPStatusCode: res.StatusCode,
13902 },
13903 }
13904 target := &ret
13905 if err := gensupport.DecodeResponse(target, res); err != nil {
13906 return nil, err
13907 }
13908 return ret, nil
13909 }
13910
13911 type FoldersLocationsBucketsViewsListCall struct {
13912 s *Service
13913 parent string
13914 urlParams_ gensupport.URLParams
13915 ifNoneMatch_ string
13916 ctx_ context.Context
13917 header_ http.Header
13918 }
13919
13920
13921
13922
13923
13924 func (r *FoldersLocationsBucketsViewsService) List(parent string) *FoldersLocationsBucketsViewsListCall {
13925 c := &FoldersLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13926 c.parent = parent
13927 return c
13928 }
13929
13930
13931
13932
13933
13934 func (c *FoldersLocationsBucketsViewsListCall) PageSize(pageSize int64) *FoldersLocationsBucketsViewsListCall {
13935 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13936 return c
13937 }
13938
13939
13940
13941
13942
13943 func (c *FoldersLocationsBucketsViewsListCall) PageToken(pageToken string) *FoldersLocationsBucketsViewsListCall {
13944 c.urlParams_.Set("pageToken", pageToken)
13945 return c
13946 }
13947
13948
13949
13950
13951 func (c *FoldersLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsListCall {
13952 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13953 return c
13954 }
13955
13956
13957
13958
13959 func (c *FoldersLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsViewsListCall {
13960 c.ifNoneMatch_ = entityTag
13961 return c
13962 }
13963
13964
13965 func (c *FoldersLocationsBucketsViewsListCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsListCall {
13966 c.ctx_ = ctx
13967 return c
13968 }
13969
13970
13971
13972 func (c *FoldersLocationsBucketsViewsListCall) Header() http.Header {
13973 if c.header_ == nil {
13974 c.header_ = make(http.Header)
13975 }
13976 return c.header_
13977 }
13978
13979 func (c *FoldersLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
13980 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13981 if c.ifNoneMatch_ != "" {
13982 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13983 }
13984 var body io.Reader = nil
13985 c.urlParams_.Set("alt", alt)
13986 c.urlParams_.Set("prettyPrint", "false")
13987 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
13988 urls += "?" + c.urlParams_.Encode()
13989 req, err := http.NewRequest("GET", urls, body)
13990 if err != nil {
13991 return nil, err
13992 }
13993 req.Header = reqHeaders
13994 googleapi.Expand(req.URL, map[string]string{
13995 "parent": c.parent,
13996 })
13997 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13998 }
13999
14000
14001
14002
14003
14004
14005
14006 func (c *FoldersLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
14007 gensupport.SetOptions(c.urlParams_, opts...)
14008 res, err := c.doRequest("json")
14009 if res != nil && res.StatusCode == http.StatusNotModified {
14010 if res.Body != nil {
14011 res.Body.Close()
14012 }
14013 return nil, gensupport.WrapError(&googleapi.Error{
14014 Code: res.StatusCode,
14015 Header: res.Header,
14016 })
14017 }
14018 if err != nil {
14019 return nil, err
14020 }
14021 defer googleapi.CloseBody(res)
14022 if err := googleapi.CheckResponse(res); err != nil {
14023 return nil, gensupport.WrapError(err)
14024 }
14025 ret := &ListViewsResponse{
14026 ServerResponse: googleapi.ServerResponse{
14027 Header: res.Header,
14028 HTTPStatusCode: res.StatusCode,
14029 },
14030 }
14031 target := &ret
14032 if err := gensupport.DecodeResponse(target, res); err != nil {
14033 return nil, err
14034 }
14035 return ret, nil
14036 }
14037
14038
14039
14040
14041 func (c *FoldersLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
14042 c.ctx_ = ctx
14043 defer c.PageToken(c.urlParams_.Get("pageToken"))
14044 for {
14045 x, err := c.Do()
14046 if err != nil {
14047 return err
14048 }
14049 if err := f(x); err != nil {
14050 return err
14051 }
14052 if x.NextPageToken == "" {
14053 return nil
14054 }
14055 c.PageToken(x.NextPageToken)
14056 }
14057 }
14058
14059 type FoldersLocationsBucketsViewsPatchCall struct {
14060 s *Service
14061 name string
14062 logview *LogView
14063 urlParams_ gensupport.URLParams
14064 ctx_ context.Context
14065 header_ http.Header
14066 }
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079 func (r *FoldersLocationsBucketsViewsService) Patch(name string, logview *LogView) *FoldersLocationsBucketsViewsPatchCall {
14080 c := &FoldersLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14081 c.name = name
14082 c.logview = logview
14083 return c
14084 }
14085
14086
14087
14088
14089
14090
14091
14092 func (c *FoldersLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *FoldersLocationsBucketsViewsPatchCall {
14093 c.urlParams_.Set("updateMask", updateMask)
14094 return c
14095 }
14096
14097
14098
14099
14100 func (c *FoldersLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsPatchCall {
14101 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14102 return c
14103 }
14104
14105
14106 func (c *FoldersLocationsBucketsViewsPatchCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsPatchCall {
14107 c.ctx_ = ctx
14108 return c
14109 }
14110
14111
14112
14113 func (c *FoldersLocationsBucketsViewsPatchCall) Header() http.Header {
14114 if c.header_ == nil {
14115 c.header_ = make(http.Header)
14116 }
14117 return c.header_
14118 }
14119
14120 func (c *FoldersLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
14121 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14122 var body io.Reader = nil
14123 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
14124 if err != nil {
14125 return nil, err
14126 }
14127 c.urlParams_.Set("alt", alt)
14128 c.urlParams_.Set("prettyPrint", "false")
14129 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
14130 urls += "?" + c.urlParams_.Encode()
14131 req, err := http.NewRequest("PATCH", urls, body)
14132 if err != nil {
14133 return nil, err
14134 }
14135 req.Header = reqHeaders
14136 googleapi.Expand(req.URL, map[string]string{
14137 "name": c.name,
14138 })
14139 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14140 }
14141
14142
14143
14144
14145
14146
14147 func (c *FoldersLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
14148 gensupport.SetOptions(c.urlParams_, opts...)
14149 res, err := c.doRequest("json")
14150 if res != nil && res.StatusCode == http.StatusNotModified {
14151 if res.Body != nil {
14152 res.Body.Close()
14153 }
14154 return nil, gensupport.WrapError(&googleapi.Error{
14155 Code: res.StatusCode,
14156 Header: res.Header,
14157 })
14158 }
14159 if err != nil {
14160 return nil, err
14161 }
14162 defer googleapi.CloseBody(res)
14163 if err := googleapi.CheckResponse(res); err != nil {
14164 return nil, gensupport.WrapError(err)
14165 }
14166 ret := &LogView{
14167 ServerResponse: googleapi.ServerResponse{
14168 Header: res.Header,
14169 HTTPStatusCode: res.StatusCode,
14170 },
14171 }
14172 target := &ret
14173 if err := gensupport.DecodeResponse(target, res); err != nil {
14174 return nil, err
14175 }
14176 return ret, nil
14177 }
14178
14179 type FoldersLocationsBucketsViewsSetIamPolicyCall struct {
14180 s *Service
14181 resource string
14182 setiampolicyrequest *SetIamPolicyRequest
14183 urlParams_ gensupport.URLParams
14184 ctx_ context.Context
14185 header_ http.Header
14186 }
14187
14188
14189
14190
14191
14192
14193
14194
14195 func (r *FoldersLocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *FoldersLocationsBucketsViewsSetIamPolicyCall {
14196 c := &FoldersLocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14197 c.resource = resource
14198 c.setiampolicyrequest = setiampolicyrequest
14199 return c
14200 }
14201
14202
14203
14204
14205 func (c *FoldersLocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsSetIamPolicyCall {
14206 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14207 return c
14208 }
14209
14210
14211 func (c *FoldersLocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsSetIamPolicyCall {
14212 c.ctx_ = ctx
14213 return c
14214 }
14215
14216
14217
14218 func (c *FoldersLocationsBucketsViewsSetIamPolicyCall) Header() http.Header {
14219 if c.header_ == nil {
14220 c.header_ = make(http.Header)
14221 }
14222 return c.header_
14223 }
14224
14225 func (c *FoldersLocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14226 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14227 var body io.Reader = nil
14228 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
14229 if err != nil {
14230 return nil, err
14231 }
14232 c.urlParams_.Set("alt", alt)
14233 c.urlParams_.Set("prettyPrint", "false")
14234 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
14235 urls += "?" + c.urlParams_.Encode()
14236 req, err := http.NewRequest("POST", urls, body)
14237 if err != nil {
14238 return nil, err
14239 }
14240 req.Header = reqHeaders
14241 googleapi.Expand(req.URL, map[string]string{
14242 "resource": c.resource,
14243 })
14244 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14245 }
14246
14247
14248
14249
14250
14251
14252 func (c *FoldersLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14253 gensupport.SetOptions(c.urlParams_, opts...)
14254 res, err := c.doRequest("json")
14255 if res != nil && res.StatusCode == http.StatusNotModified {
14256 if res.Body != nil {
14257 res.Body.Close()
14258 }
14259 return nil, gensupport.WrapError(&googleapi.Error{
14260 Code: res.StatusCode,
14261 Header: res.Header,
14262 })
14263 }
14264 if err != nil {
14265 return nil, err
14266 }
14267 defer googleapi.CloseBody(res)
14268 if err := googleapi.CheckResponse(res); err != nil {
14269 return nil, gensupport.WrapError(err)
14270 }
14271 ret := &Policy{
14272 ServerResponse: googleapi.ServerResponse{
14273 Header: res.Header,
14274 HTTPStatusCode: res.StatusCode,
14275 },
14276 }
14277 target := &ret
14278 if err := gensupport.DecodeResponse(target, res); err != nil {
14279 return nil, err
14280 }
14281 return ret, nil
14282 }
14283
14284 type FoldersLocationsBucketsViewsTestIamPermissionsCall struct {
14285 s *Service
14286 resource string
14287 testiampermissionsrequest *TestIamPermissionsRequest
14288 urlParams_ gensupport.URLParams
14289 ctx_ context.Context
14290 header_ http.Header
14291 }
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303 func (r *FoldersLocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *FoldersLocationsBucketsViewsTestIamPermissionsCall {
14304 c := &FoldersLocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14305 c.resource = resource
14306 c.testiampermissionsrequest = testiampermissionsrequest
14307 return c
14308 }
14309
14310
14311
14312
14313 func (c *FoldersLocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsTestIamPermissionsCall {
14314 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14315 return c
14316 }
14317
14318
14319 func (c *FoldersLocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsTestIamPermissionsCall {
14320 c.ctx_ = ctx
14321 return c
14322 }
14323
14324
14325
14326 func (c *FoldersLocationsBucketsViewsTestIamPermissionsCall) Header() http.Header {
14327 if c.header_ == nil {
14328 c.header_ = make(http.Header)
14329 }
14330 return c.header_
14331 }
14332
14333 func (c *FoldersLocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
14334 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14335 var body io.Reader = nil
14336 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
14337 if err != nil {
14338 return nil, err
14339 }
14340 c.urlParams_.Set("alt", alt)
14341 c.urlParams_.Set("prettyPrint", "false")
14342 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
14343 urls += "?" + c.urlParams_.Encode()
14344 req, err := http.NewRequest("POST", urls, body)
14345 if err != nil {
14346 return nil, err
14347 }
14348 req.Header = reqHeaders
14349 googleapi.Expand(req.URL, map[string]string{
14350 "resource": c.resource,
14351 })
14352 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14353 }
14354
14355
14356
14357
14358
14359
14360
14361 func (c *FoldersLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
14362 gensupport.SetOptions(c.urlParams_, opts...)
14363 res, err := c.doRequest("json")
14364 if res != nil && res.StatusCode == http.StatusNotModified {
14365 if res.Body != nil {
14366 res.Body.Close()
14367 }
14368 return nil, gensupport.WrapError(&googleapi.Error{
14369 Code: res.StatusCode,
14370 Header: res.Header,
14371 })
14372 }
14373 if err != nil {
14374 return nil, err
14375 }
14376 defer googleapi.CloseBody(res)
14377 if err := googleapi.CheckResponse(res); err != nil {
14378 return nil, gensupport.WrapError(err)
14379 }
14380 ret := &TestIamPermissionsResponse{
14381 ServerResponse: googleapi.ServerResponse{
14382 Header: res.Header,
14383 HTTPStatusCode: res.StatusCode,
14384 },
14385 }
14386 target := &ret
14387 if err := gensupport.DecodeResponse(target, res); err != nil {
14388 return nil, err
14389 }
14390 return ret, nil
14391 }
14392
14393 type FoldersLocationsBucketsViewsLogsListCall struct {
14394 s *Service
14395 parent string
14396 urlParams_ gensupport.URLParams
14397 ifNoneMatch_ string
14398 ctx_ context.Context
14399 header_ http.Header
14400 }
14401
14402
14403
14404
14405
14406
14407
14408 func (r *FoldersLocationsBucketsViewsLogsService) List(parent string) *FoldersLocationsBucketsViewsLogsListCall {
14409 c := &FoldersLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14410 c.parent = parent
14411 return c
14412 }
14413
14414
14415
14416
14417
14418 func (c *FoldersLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *FoldersLocationsBucketsViewsLogsListCall {
14419 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14420 return c
14421 }
14422
14423
14424
14425
14426
14427 func (c *FoldersLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *FoldersLocationsBucketsViewsLogsListCall {
14428 c.urlParams_.Set("pageToken", pageToken)
14429 return c
14430 }
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445 func (c *FoldersLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *FoldersLocationsBucketsViewsLogsListCall {
14446 c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
14447 return c
14448 }
14449
14450
14451
14452
14453 func (c *FoldersLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsLogsListCall {
14454 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14455 return c
14456 }
14457
14458
14459
14460
14461 func (c *FoldersLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsViewsLogsListCall {
14462 c.ifNoneMatch_ = entityTag
14463 return c
14464 }
14465
14466
14467 func (c *FoldersLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsLogsListCall {
14468 c.ctx_ = ctx
14469 return c
14470 }
14471
14472
14473
14474 func (c *FoldersLocationsBucketsViewsLogsListCall) Header() http.Header {
14475 if c.header_ == nil {
14476 c.header_ = make(http.Header)
14477 }
14478 return c.header_
14479 }
14480
14481 func (c *FoldersLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) {
14482 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14483 if c.ifNoneMatch_ != "" {
14484 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14485 }
14486 var body io.Reader = nil
14487 c.urlParams_.Set("alt", alt)
14488 c.urlParams_.Set("prettyPrint", "false")
14489 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
14490 urls += "?" + c.urlParams_.Encode()
14491 req, err := http.NewRequest("GET", urls, body)
14492 if err != nil {
14493 return nil, err
14494 }
14495 req.Header = reqHeaders
14496 googleapi.Expand(req.URL, map[string]string{
14497 "parent": c.parent,
14498 })
14499 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14500 }
14501
14502
14503
14504
14505
14506
14507
14508 func (c *FoldersLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
14509 gensupport.SetOptions(c.urlParams_, opts...)
14510 res, err := c.doRequest("json")
14511 if res != nil && res.StatusCode == http.StatusNotModified {
14512 if res.Body != nil {
14513 res.Body.Close()
14514 }
14515 return nil, gensupport.WrapError(&googleapi.Error{
14516 Code: res.StatusCode,
14517 Header: res.Header,
14518 })
14519 }
14520 if err != nil {
14521 return nil, err
14522 }
14523 defer googleapi.CloseBody(res)
14524 if err := googleapi.CheckResponse(res); err != nil {
14525 return nil, gensupport.WrapError(err)
14526 }
14527 ret := &ListLogsResponse{
14528 ServerResponse: googleapi.ServerResponse{
14529 Header: res.Header,
14530 HTTPStatusCode: res.StatusCode,
14531 },
14532 }
14533 target := &ret
14534 if err := gensupport.DecodeResponse(target, res); err != nil {
14535 return nil, err
14536 }
14537 return ret, nil
14538 }
14539
14540
14541
14542
14543 func (c *FoldersLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
14544 c.ctx_ = ctx
14545 defer c.PageToken(c.urlParams_.Get("pageToken"))
14546 for {
14547 x, err := c.Do()
14548 if err != nil {
14549 return err
14550 }
14551 if err := f(x); err != nil {
14552 return err
14553 }
14554 if x.NextPageToken == "" {
14555 return nil
14556 }
14557 c.PageToken(x.NextPageToken)
14558 }
14559 }
14560
14561 type FoldersLocationsOperationsCancelCall struct {
14562 s *Service
14563 name string
14564 canceloperationrequest *CancelOperationRequest
14565 urlParams_ gensupport.URLParams
14566 ctx_ context.Context
14567 header_ http.Header
14568 }
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581 func (r *FoldersLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *FoldersLocationsOperationsCancelCall {
14582 c := &FoldersLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14583 c.name = name
14584 c.canceloperationrequest = canceloperationrequest
14585 return c
14586 }
14587
14588
14589
14590
14591 func (c *FoldersLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsCancelCall {
14592 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14593 return c
14594 }
14595
14596
14597 func (c *FoldersLocationsOperationsCancelCall) Context(ctx context.Context) *FoldersLocationsOperationsCancelCall {
14598 c.ctx_ = ctx
14599 return c
14600 }
14601
14602
14603
14604 func (c *FoldersLocationsOperationsCancelCall) Header() http.Header {
14605 if c.header_ == nil {
14606 c.header_ = make(http.Header)
14607 }
14608 return c.header_
14609 }
14610
14611 func (c *FoldersLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
14612 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14613 var body io.Reader = nil
14614 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
14615 if err != nil {
14616 return nil, err
14617 }
14618 c.urlParams_.Set("alt", alt)
14619 c.urlParams_.Set("prettyPrint", "false")
14620 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
14621 urls += "?" + c.urlParams_.Encode()
14622 req, err := http.NewRequest("POST", urls, body)
14623 if err != nil {
14624 return nil, err
14625 }
14626 req.Header = reqHeaders
14627 googleapi.Expand(req.URL, map[string]string{
14628 "name": c.name,
14629 })
14630 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14631 }
14632
14633
14634
14635
14636
14637
14638 func (c *FoldersLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14639 gensupport.SetOptions(c.urlParams_, opts...)
14640 res, err := c.doRequest("json")
14641 if res != nil && res.StatusCode == http.StatusNotModified {
14642 if res.Body != nil {
14643 res.Body.Close()
14644 }
14645 return nil, gensupport.WrapError(&googleapi.Error{
14646 Code: res.StatusCode,
14647 Header: res.Header,
14648 })
14649 }
14650 if err != nil {
14651 return nil, err
14652 }
14653 defer googleapi.CloseBody(res)
14654 if err := googleapi.CheckResponse(res); err != nil {
14655 return nil, gensupport.WrapError(err)
14656 }
14657 ret := &Empty{
14658 ServerResponse: googleapi.ServerResponse{
14659 Header: res.Header,
14660 HTTPStatusCode: res.StatusCode,
14661 },
14662 }
14663 target := &ret
14664 if err := gensupport.DecodeResponse(target, res); err != nil {
14665 return nil, err
14666 }
14667 return ret, nil
14668 }
14669
14670 type FoldersLocationsOperationsGetCall struct {
14671 s *Service
14672 name string
14673 urlParams_ gensupport.URLParams
14674 ifNoneMatch_ string
14675 ctx_ context.Context
14676 header_ http.Header
14677 }
14678
14679
14680
14681
14682
14683
14684 func (r *FoldersLocationsOperationsService) Get(name string) *FoldersLocationsOperationsGetCall {
14685 c := &FoldersLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14686 c.name = name
14687 return c
14688 }
14689
14690
14691
14692
14693 func (c *FoldersLocationsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsGetCall {
14694 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14695 return c
14696 }
14697
14698
14699
14700
14701 func (c *FoldersLocationsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOperationsGetCall {
14702 c.ifNoneMatch_ = entityTag
14703 return c
14704 }
14705
14706
14707 func (c *FoldersLocationsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOperationsGetCall {
14708 c.ctx_ = ctx
14709 return c
14710 }
14711
14712
14713
14714 func (c *FoldersLocationsOperationsGetCall) Header() http.Header {
14715 if c.header_ == nil {
14716 c.header_ = make(http.Header)
14717 }
14718 return c.header_
14719 }
14720
14721 func (c *FoldersLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
14722 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14723 if c.ifNoneMatch_ != "" {
14724 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14725 }
14726 var body io.Reader = nil
14727 c.urlParams_.Set("alt", alt)
14728 c.urlParams_.Set("prettyPrint", "false")
14729 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
14730 urls += "?" + c.urlParams_.Encode()
14731 req, err := http.NewRequest("GET", urls, body)
14732 if err != nil {
14733 return nil, err
14734 }
14735 req.Header = reqHeaders
14736 googleapi.Expand(req.URL, map[string]string{
14737 "name": c.name,
14738 })
14739 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14740 }
14741
14742
14743
14744
14745
14746
14747 func (c *FoldersLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14748 gensupport.SetOptions(c.urlParams_, opts...)
14749 res, err := c.doRequest("json")
14750 if res != nil && res.StatusCode == http.StatusNotModified {
14751 if res.Body != nil {
14752 res.Body.Close()
14753 }
14754 return nil, gensupport.WrapError(&googleapi.Error{
14755 Code: res.StatusCode,
14756 Header: res.Header,
14757 })
14758 }
14759 if err != nil {
14760 return nil, err
14761 }
14762 defer googleapi.CloseBody(res)
14763 if err := googleapi.CheckResponse(res); err != nil {
14764 return nil, gensupport.WrapError(err)
14765 }
14766 ret := &Operation{
14767 ServerResponse: googleapi.ServerResponse{
14768 Header: res.Header,
14769 HTTPStatusCode: res.StatusCode,
14770 },
14771 }
14772 target := &ret
14773 if err := gensupport.DecodeResponse(target, res); err != nil {
14774 return nil, err
14775 }
14776 return ret, nil
14777 }
14778
14779 type FoldersLocationsOperationsListCall struct {
14780 s *Service
14781 name string
14782 urlParams_ gensupport.URLParams
14783 ifNoneMatch_ string
14784 ctx_ context.Context
14785 header_ http.Header
14786 }
14787
14788
14789
14790
14791
14792 func (r *FoldersLocationsOperationsService) List(name string) *FoldersLocationsOperationsListCall {
14793 c := &FoldersLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14794 c.name = name
14795 return c
14796 }
14797
14798
14799 func (c *FoldersLocationsOperationsListCall) Filter(filter string) *FoldersLocationsOperationsListCall {
14800 c.urlParams_.Set("filter", filter)
14801 return c
14802 }
14803
14804
14805
14806 func (c *FoldersLocationsOperationsListCall) PageSize(pageSize int64) *FoldersLocationsOperationsListCall {
14807 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14808 return c
14809 }
14810
14811
14812
14813 func (c *FoldersLocationsOperationsListCall) PageToken(pageToken string) *FoldersLocationsOperationsListCall {
14814 c.urlParams_.Set("pageToken", pageToken)
14815 return c
14816 }
14817
14818
14819
14820
14821 func (c *FoldersLocationsOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsListCall {
14822 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14823 return c
14824 }
14825
14826
14827
14828
14829 func (c *FoldersLocationsOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsOperationsListCall {
14830 c.ifNoneMatch_ = entityTag
14831 return c
14832 }
14833
14834
14835 func (c *FoldersLocationsOperationsListCall) Context(ctx context.Context) *FoldersLocationsOperationsListCall {
14836 c.ctx_ = ctx
14837 return c
14838 }
14839
14840
14841
14842 func (c *FoldersLocationsOperationsListCall) Header() http.Header {
14843 if c.header_ == nil {
14844 c.header_ = make(http.Header)
14845 }
14846 return c.header_
14847 }
14848
14849 func (c *FoldersLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
14850 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14851 if c.ifNoneMatch_ != "" {
14852 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14853 }
14854 var body io.Reader = nil
14855 c.urlParams_.Set("alt", alt)
14856 c.urlParams_.Set("prettyPrint", "false")
14857 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
14858 urls += "?" + c.urlParams_.Encode()
14859 req, err := http.NewRequest("GET", urls, body)
14860 if err != nil {
14861 return nil, err
14862 }
14863 req.Header = reqHeaders
14864 googleapi.Expand(req.URL, map[string]string{
14865 "name": c.name,
14866 })
14867 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14868 }
14869
14870
14871
14872
14873
14874
14875
14876 func (c *FoldersLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
14877 gensupport.SetOptions(c.urlParams_, opts...)
14878 res, err := c.doRequest("json")
14879 if res != nil && res.StatusCode == http.StatusNotModified {
14880 if res.Body != nil {
14881 res.Body.Close()
14882 }
14883 return nil, gensupport.WrapError(&googleapi.Error{
14884 Code: res.StatusCode,
14885 Header: res.Header,
14886 })
14887 }
14888 if err != nil {
14889 return nil, err
14890 }
14891 defer googleapi.CloseBody(res)
14892 if err := googleapi.CheckResponse(res); err != nil {
14893 return nil, gensupport.WrapError(err)
14894 }
14895 ret := &ListOperationsResponse{
14896 ServerResponse: googleapi.ServerResponse{
14897 Header: res.Header,
14898 HTTPStatusCode: res.StatusCode,
14899 },
14900 }
14901 target := &ret
14902 if err := gensupport.DecodeResponse(target, res); err != nil {
14903 return nil, err
14904 }
14905 return ret, nil
14906 }
14907
14908
14909
14910
14911 func (c *FoldersLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
14912 c.ctx_ = ctx
14913 defer c.PageToken(c.urlParams_.Get("pageToken"))
14914 for {
14915 x, err := c.Do()
14916 if err != nil {
14917 return err
14918 }
14919 if err := f(x); err != nil {
14920 return err
14921 }
14922 if x.NextPageToken == "" {
14923 return nil
14924 }
14925 c.PageToken(x.NextPageToken)
14926 }
14927 }
14928
14929 type FoldersLocationsRecentQueriesListCall struct {
14930 s *Service
14931 parent string
14932 urlParams_ gensupport.URLParams
14933 ifNoneMatch_ string
14934 ctx_ context.Context
14935 header_ http.Header
14936 }
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949 func (r *FoldersLocationsRecentQueriesService) List(parent string) *FoldersLocationsRecentQueriesListCall {
14950 c := &FoldersLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14951 c.parent = parent
14952 return c
14953 }
14954
14955
14956
14957
14958
14959 func (c *FoldersLocationsRecentQueriesListCall) PageSize(pageSize int64) *FoldersLocationsRecentQueriesListCall {
14960 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14961 return c
14962 }
14963
14964
14965
14966
14967
14968 func (c *FoldersLocationsRecentQueriesListCall) PageToken(pageToken string) *FoldersLocationsRecentQueriesListCall {
14969 c.urlParams_.Set("pageToken", pageToken)
14970 return c
14971 }
14972
14973
14974
14975
14976 func (c *FoldersLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *FoldersLocationsRecentQueriesListCall {
14977 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14978 return c
14979 }
14980
14981
14982
14983
14984 func (c *FoldersLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *FoldersLocationsRecentQueriesListCall {
14985 c.ifNoneMatch_ = entityTag
14986 return c
14987 }
14988
14989
14990 func (c *FoldersLocationsRecentQueriesListCall) Context(ctx context.Context) *FoldersLocationsRecentQueriesListCall {
14991 c.ctx_ = ctx
14992 return c
14993 }
14994
14995
14996
14997 func (c *FoldersLocationsRecentQueriesListCall) Header() http.Header {
14998 if c.header_ == nil {
14999 c.header_ = make(http.Header)
15000 }
15001 return c.header_
15002 }
15003
15004 func (c *FoldersLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) {
15005 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15006 if c.ifNoneMatch_ != "" {
15007 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15008 }
15009 var body io.Reader = nil
15010 c.urlParams_.Set("alt", alt)
15011 c.urlParams_.Set("prettyPrint", "false")
15012 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries")
15013 urls += "?" + c.urlParams_.Encode()
15014 req, err := http.NewRequest("GET", urls, body)
15015 if err != nil {
15016 return nil, err
15017 }
15018 req.Header = reqHeaders
15019 googleapi.Expand(req.URL, map[string]string{
15020 "parent": c.parent,
15021 })
15022 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15023 }
15024
15025
15026
15027
15028
15029
15030
15031 func (c *FoldersLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) {
15032 gensupport.SetOptions(c.urlParams_, opts...)
15033 res, err := c.doRequest("json")
15034 if res != nil && res.StatusCode == http.StatusNotModified {
15035 if res.Body != nil {
15036 res.Body.Close()
15037 }
15038 return nil, gensupport.WrapError(&googleapi.Error{
15039 Code: res.StatusCode,
15040 Header: res.Header,
15041 })
15042 }
15043 if err != nil {
15044 return nil, err
15045 }
15046 defer googleapi.CloseBody(res)
15047 if err := googleapi.CheckResponse(res); err != nil {
15048 return nil, gensupport.WrapError(err)
15049 }
15050 ret := &ListRecentQueriesResponse{
15051 ServerResponse: googleapi.ServerResponse{
15052 Header: res.Header,
15053 HTTPStatusCode: res.StatusCode,
15054 },
15055 }
15056 target := &ret
15057 if err := gensupport.DecodeResponse(target, res); err != nil {
15058 return nil, err
15059 }
15060 return ret, nil
15061 }
15062
15063
15064
15065
15066 func (c *FoldersLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error {
15067 c.ctx_ = ctx
15068 defer c.PageToken(c.urlParams_.Get("pageToken"))
15069 for {
15070 x, err := c.Do()
15071 if err != nil {
15072 return err
15073 }
15074 if err := f(x); err != nil {
15075 return err
15076 }
15077 if x.NextPageToken == "" {
15078 return nil
15079 }
15080 c.PageToken(x.NextPageToken)
15081 }
15082 }
15083
15084 type FoldersLocationsSavedQueriesCreateCall struct {
15085 s *Service
15086 parent string
15087 savedquery *SavedQuery
15088 urlParams_ gensupport.URLParams
15089 ctx_ context.Context
15090 header_ http.Header
15091 }
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102 func (r *FoldersLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *FoldersLocationsSavedQueriesCreateCall {
15103 c := &FoldersLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15104 c.parent = parent
15105 c.savedquery = savedquery
15106 return c
15107 }
15108
15109
15110
15111
15112
15113
15114
15115
15116 func (c *FoldersLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *FoldersLocationsSavedQueriesCreateCall {
15117 c.urlParams_.Set("savedQueryId", savedQueryId)
15118 return c
15119 }
15120
15121
15122
15123
15124 func (c *FoldersLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesCreateCall {
15125 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15126 return c
15127 }
15128
15129
15130 func (c *FoldersLocationsSavedQueriesCreateCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesCreateCall {
15131 c.ctx_ = ctx
15132 return c
15133 }
15134
15135
15136
15137 func (c *FoldersLocationsSavedQueriesCreateCall) Header() http.Header {
15138 if c.header_ == nil {
15139 c.header_ = make(http.Header)
15140 }
15141 return c.header_
15142 }
15143
15144 func (c *FoldersLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) {
15145 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15146 var body io.Reader = nil
15147 body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery)
15148 if err != nil {
15149 return nil, err
15150 }
15151 c.urlParams_.Set("alt", alt)
15152 c.urlParams_.Set("prettyPrint", "false")
15153 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
15154 urls += "?" + c.urlParams_.Encode()
15155 req, err := http.NewRequest("POST", urls, body)
15156 if err != nil {
15157 return nil, err
15158 }
15159 req.Header = reqHeaders
15160 googleapi.Expand(req.URL, map[string]string{
15161 "parent": c.parent,
15162 })
15163 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15164 }
15165
15166
15167
15168
15169
15170
15171 func (c *FoldersLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
15172 gensupport.SetOptions(c.urlParams_, opts...)
15173 res, err := c.doRequest("json")
15174 if res != nil && res.StatusCode == http.StatusNotModified {
15175 if res.Body != nil {
15176 res.Body.Close()
15177 }
15178 return nil, gensupport.WrapError(&googleapi.Error{
15179 Code: res.StatusCode,
15180 Header: res.Header,
15181 })
15182 }
15183 if err != nil {
15184 return nil, err
15185 }
15186 defer googleapi.CloseBody(res)
15187 if err := googleapi.CheckResponse(res); err != nil {
15188 return nil, gensupport.WrapError(err)
15189 }
15190 ret := &SavedQuery{
15191 ServerResponse: googleapi.ServerResponse{
15192 Header: res.Header,
15193 HTTPStatusCode: res.StatusCode,
15194 },
15195 }
15196 target := &ret
15197 if err := gensupport.DecodeResponse(target, res); err != nil {
15198 return nil, err
15199 }
15200 return ret, nil
15201 }
15202
15203 type FoldersLocationsSavedQueriesDeleteCall struct {
15204 s *Service
15205 name string
15206 urlParams_ gensupport.URLParams
15207 ctx_ context.Context
15208 header_ http.Header
15209 }
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223 func (r *FoldersLocationsSavedQueriesService) Delete(name string) *FoldersLocationsSavedQueriesDeleteCall {
15224 c := &FoldersLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15225 c.name = name
15226 return c
15227 }
15228
15229
15230
15231
15232 func (c *FoldersLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesDeleteCall {
15233 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15234 return c
15235 }
15236
15237
15238 func (c *FoldersLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesDeleteCall {
15239 c.ctx_ = ctx
15240 return c
15241 }
15242
15243
15244
15245 func (c *FoldersLocationsSavedQueriesDeleteCall) Header() http.Header {
15246 if c.header_ == nil {
15247 c.header_ = make(http.Header)
15248 }
15249 return c.header_
15250 }
15251
15252 func (c *FoldersLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) {
15253 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15254 var body io.Reader = nil
15255 c.urlParams_.Set("alt", alt)
15256 c.urlParams_.Set("prettyPrint", "false")
15257 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
15258 urls += "?" + c.urlParams_.Encode()
15259 req, err := http.NewRequest("DELETE", urls, body)
15260 if err != nil {
15261 return nil, err
15262 }
15263 req.Header = reqHeaders
15264 googleapi.Expand(req.URL, map[string]string{
15265 "name": c.name,
15266 })
15267 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15268 }
15269
15270
15271
15272
15273
15274
15275 func (c *FoldersLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
15276 gensupport.SetOptions(c.urlParams_, opts...)
15277 res, err := c.doRequest("json")
15278 if res != nil && res.StatusCode == http.StatusNotModified {
15279 if res.Body != nil {
15280 res.Body.Close()
15281 }
15282 return nil, gensupport.WrapError(&googleapi.Error{
15283 Code: res.StatusCode,
15284 Header: res.Header,
15285 })
15286 }
15287 if err != nil {
15288 return nil, err
15289 }
15290 defer googleapi.CloseBody(res)
15291 if err := googleapi.CheckResponse(res); err != nil {
15292 return nil, gensupport.WrapError(err)
15293 }
15294 ret := &Empty{
15295 ServerResponse: googleapi.ServerResponse{
15296 Header: res.Header,
15297 HTTPStatusCode: res.StatusCode,
15298 },
15299 }
15300 target := &ret
15301 if err := gensupport.DecodeResponse(target, res); err != nil {
15302 return nil, err
15303 }
15304 return ret, nil
15305 }
15306
15307 type FoldersLocationsSavedQueriesListCall struct {
15308 s *Service
15309 parent string
15310 urlParams_ gensupport.URLParams
15311 ifNoneMatch_ string
15312 ctx_ context.Context
15313 header_ http.Header
15314 }
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328 func (r *FoldersLocationsSavedQueriesService) List(parent string) *FoldersLocationsSavedQueriesListCall {
15329 c := &FoldersLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15330 c.parent = parent
15331 return c
15332 }
15333
15334
15335
15336
15337
15338 func (c *FoldersLocationsSavedQueriesListCall) PageSize(pageSize int64) *FoldersLocationsSavedQueriesListCall {
15339 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15340 return c
15341 }
15342
15343
15344
15345
15346
15347 func (c *FoldersLocationsSavedQueriesListCall) PageToken(pageToken string) *FoldersLocationsSavedQueriesListCall {
15348 c.urlParams_.Set("pageToken", pageToken)
15349 return c
15350 }
15351
15352
15353
15354
15355 func (c *FoldersLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesListCall {
15356 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15357 return c
15358 }
15359
15360
15361
15362
15363 func (c *FoldersLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *FoldersLocationsSavedQueriesListCall {
15364 c.ifNoneMatch_ = entityTag
15365 return c
15366 }
15367
15368
15369 func (c *FoldersLocationsSavedQueriesListCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesListCall {
15370 c.ctx_ = ctx
15371 return c
15372 }
15373
15374
15375
15376 func (c *FoldersLocationsSavedQueriesListCall) Header() http.Header {
15377 if c.header_ == nil {
15378 c.header_ = make(http.Header)
15379 }
15380 return c.header_
15381 }
15382
15383 func (c *FoldersLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) {
15384 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15385 if c.ifNoneMatch_ != "" {
15386 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15387 }
15388 var body io.Reader = nil
15389 c.urlParams_.Set("alt", alt)
15390 c.urlParams_.Set("prettyPrint", "false")
15391 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
15392 urls += "?" + c.urlParams_.Encode()
15393 req, err := http.NewRequest("GET", urls, body)
15394 if err != nil {
15395 return nil, err
15396 }
15397 req.Header = reqHeaders
15398 googleapi.Expand(req.URL, map[string]string{
15399 "parent": c.parent,
15400 })
15401 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15402 }
15403
15404
15405
15406
15407
15408
15409
15410 func (c *FoldersLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) {
15411 gensupport.SetOptions(c.urlParams_, opts...)
15412 res, err := c.doRequest("json")
15413 if res != nil && res.StatusCode == http.StatusNotModified {
15414 if res.Body != nil {
15415 res.Body.Close()
15416 }
15417 return nil, gensupport.WrapError(&googleapi.Error{
15418 Code: res.StatusCode,
15419 Header: res.Header,
15420 })
15421 }
15422 if err != nil {
15423 return nil, err
15424 }
15425 defer googleapi.CloseBody(res)
15426 if err := googleapi.CheckResponse(res); err != nil {
15427 return nil, gensupport.WrapError(err)
15428 }
15429 ret := &ListSavedQueriesResponse{
15430 ServerResponse: googleapi.ServerResponse{
15431 Header: res.Header,
15432 HTTPStatusCode: res.StatusCode,
15433 },
15434 }
15435 target := &ret
15436 if err := gensupport.DecodeResponse(target, res); err != nil {
15437 return nil, err
15438 }
15439 return ret, nil
15440 }
15441
15442
15443
15444
15445 func (c *FoldersLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error {
15446 c.ctx_ = ctx
15447 defer c.PageToken(c.urlParams_.Get("pageToken"))
15448 for {
15449 x, err := c.Do()
15450 if err != nil {
15451 return err
15452 }
15453 if err := f(x); err != nil {
15454 return err
15455 }
15456 if x.NextPageToken == "" {
15457 return nil
15458 }
15459 c.PageToken(x.NextPageToken)
15460 }
15461 }
15462
15463 type FoldersLogsDeleteCall struct {
15464 s *Service
15465 logName string
15466 urlParams_ gensupport.URLParams
15467 ctx_ context.Context
15468 header_ http.Header
15469 }
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484 func (r *FoldersLogsService) Delete(logName string) *FoldersLogsDeleteCall {
15485 c := &FoldersLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15486 c.logName = logName
15487 return c
15488 }
15489
15490
15491
15492
15493 func (c *FoldersLogsDeleteCall) Fields(s ...googleapi.Field) *FoldersLogsDeleteCall {
15494 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15495 return c
15496 }
15497
15498
15499 func (c *FoldersLogsDeleteCall) Context(ctx context.Context) *FoldersLogsDeleteCall {
15500 c.ctx_ = ctx
15501 return c
15502 }
15503
15504
15505
15506 func (c *FoldersLogsDeleteCall) Header() http.Header {
15507 if c.header_ == nil {
15508 c.header_ = make(http.Header)
15509 }
15510 return c.header_
15511 }
15512
15513 func (c *FoldersLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
15514 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15515 var body io.Reader = nil
15516 c.urlParams_.Set("alt", alt)
15517 c.urlParams_.Set("prettyPrint", "false")
15518 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
15519 urls += "?" + c.urlParams_.Encode()
15520 req, err := http.NewRequest("DELETE", urls, body)
15521 if err != nil {
15522 return nil, err
15523 }
15524 req.Header = reqHeaders
15525 googleapi.Expand(req.URL, map[string]string{
15526 "logName": c.logName,
15527 })
15528 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15529 }
15530
15531
15532
15533
15534
15535
15536 func (c *FoldersLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
15537 gensupport.SetOptions(c.urlParams_, opts...)
15538 res, err := c.doRequest("json")
15539 if res != nil && res.StatusCode == http.StatusNotModified {
15540 if res.Body != nil {
15541 res.Body.Close()
15542 }
15543 return nil, gensupport.WrapError(&googleapi.Error{
15544 Code: res.StatusCode,
15545 Header: res.Header,
15546 })
15547 }
15548 if err != nil {
15549 return nil, err
15550 }
15551 defer googleapi.CloseBody(res)
15552 if err := googleapi.CheckResponse(res); err != nil {
15553 return nil, gensupport.WrapError(err)
15554 }
15555 ret := &Empty{
15556 ServerResponse: googleapi.ServerResponse{
15557 Header: res.Header,
15558 HTTPStatusCode: res.StatusCode,
15559 },
15560 }
15561 target := &ret
15562 if err := gensupport.DecodeResponse(target, res); err != nil {
15563 return nil, err
15564 }
15565 return ret, nil
15566 }
15567
15568 type FoldersLogsListCall struct {
15569 s *Service
15570 parent string
15571 urlParams_ gensupport.URLParams
15572 ifNoneMatch_ string
15573 ctx_ context.Context
15574 header_ http.Header
15575 }
15576
15577
15578
15579
15580
15581
15582
15583 func (r *FoldersLogsService) List(parent string) *FoldersLogsListCall {
15584 c := &FoldersLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15585 c.parent = parent
15586 return c
15587 }
15588
15589
15590
15591
15592
15593 func (c *FoldersLogsListCall) PageSize(pageSize int64) *FoldersLogsListCall {
15594 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15595 return c
15596 }
15597
15598
15599
15600
15601
15602 func (c *FoldersLogsListCall) PageToken(pageToken string) *FoldersLogsListCall {
15603 c.urlParams_.Set("pageToken", pageToken)
15604 return c
15605 }
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620 func (c *FoldersLogsListCall) ResourceNames(resourceNames ...string) *FoldersLogsListCall {
15621 c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
15622 return c
15623 }
15624
15625
15626
15627
15628 func (c *FoldersLogsListCall) Fields(s ...googleapi.Field) *FoldersLogsListCall {
15629 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15630 return c
15631 }
15632
15633
15634
15635
15636 func (c *FoldersLogsListCall) IfNoneMatch(entityTag string) *FoldersLogsListCall {
15637 c.ifNoneMatch_ = entityTag
15638 return c
15639 }
15640
15641
15642 func (c *FoldersLogsListCall) Context(ctx context.Context) *FoldersLogsListCall {
15643 c.ctx_ = ctx
15644 return c
15645 }
15646
15647
15648
15649 func (c *FoldersLogsListCall) Header() http.Header {
15650 if c.header_ == nil {
15651 c.header_ = make(http.Header)
15652 }
15653 return c.header_
15654 }
15655
15656 func (c *FoldersLogsListCall) doRequest(alt string) (*http.Response, error) {
15657 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15658 if c.ifNoneMatch_ != "" {
15659 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15660 }
15661 var body io.Reader = nil
15662 c.urlParams_.Set("alt", alt)
15663 c.urlParams_.Set("prettyPrint", "false")
15664 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
15665 urls += "?" + c.urlParams_.Encode()
15666 req, err := http.NewRequest("GET", urls, body)
15667 if err != nil {
15668 return nil, err
15669 }
15670 req.Header = reqHeaders
15671 googleapi.Expand(req.URL, map[string]string{
15672 "parent": c.parent,
15673 })
15674 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15675 }
15676
15677
15678
15679
15680
15681
15682
15683 func (c *FoldersLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
15684 gensupport.SetOptions(c.urlParams_, opts...)
15685 res, err := c.doRequest("json")
15686 if res != nil && res.StatusCode == http.StatusNotModified {
15687 if res.Body != nil {
15688 res.Body.Close()
15689 }
15690 return nil, gensupport.WrapError(&googleapi.Error{
15691 Code: res.StatusCode,
15692 Header: res.Header,
15693 })
15694 }
15695 if err != nil {
15696 return nil, err
15697 }
15698 defer googleapi.CloseBody(res)
15699 if err := googleapi.CheckResponse(res); err != nil {
15700 return nil, gensupport.WrapError(err)
15701 }
15702 ret := &ListLogsResponse{
15703 ServerResponse: googleapi.ServerResponse{
15704 Header: res.Header,
15705 HTTPStatusCode: res.StatusCode,
15706 },
15707 }
15708 target := &ret
15709 if err := gensupport.DecodeResponse(target, res); err != nil {
15710 return nil, err
15711 }
15712 return ret, nil
15713 }
15714
15715
15716
15717
15718 func (c *FoldersLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
15719 c.ctx_ = ctx
15720 defer c.PageToken(c.urlParams_.Get("pageToken"))
15721 for {
15722 x, err := c.Do()
15723 if err != nil {
15724 return err
15725 }
15726 if err := f(x); err != nil {
15727 return err
15728 }
15729 if x.NextPageToken == "" {
15730 return nil
15731 }
15732 c.PageToken(x.NextPageToken)
15733 }
15734 }
15735
15736 type FoldersSinksCreateCall struct {
15737 s *Service
15738 parent string
15739 logsink *LogSink
15740 urlParams_ gensupport.URLParams
15741 ctx_ context.Context
15742 header_ http.Header
15743 }
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754 func (r *FoldersSinksService) Create(parent string, logsink *LogSink) *FoldersSinksCreateCall {
15755 c := &FoldersSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15756 c.parent = parent
15757 c.logsink = logsink
15758 return c
15759 }
15760
15761
15762
15763
15764
15765
15766
15767 func (c *FoldersSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksCreateCall {
15768 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
15769 return c
15770 }
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784 func (c *FoldersSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksCreateCall {
15785 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
15786 return c
15787 }
15788
15789
15790
15791
15792 func (c *FoldersSinksCreateCall) Fields(s ...googleapi.Field) *FoldersSinksCreateCall {
15793 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15794 return c
15795 }
15796
15797
15798 func (c *FoldersSinksCreateCall) Context(ctx context.Context) *FoldersSinksCreateCall {
15799 c.ctx_ = ctx
15800 return c
15801 }
15802
15803
15804
15805 func (c *FoldersSinksCreateCall) Header() http.Header {
15806 if c.header_ == nil {
15807 c.header_ = make(http.Header)
15808 }
15809 return c.header_
15810 }
15811
15812 func (c *FoldersSinksCreateCall) doRequest(alt string) (*http.Response, error) {
15813 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15814 var body io.Reader = nil
15815 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
15816 if err != nil {
15817 return nil, err
15818 }
15819 c.urlParams_.Set("alt", alt)
15820 c.urlParams_.Set("prettyPrint", "false")
15821 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
15822 urls += "?" + c.urlParams_.Encode()
15823 req, err := http.NewRequest("POST", urls, body)
15824 if err != nil {
15825 return nil, err
15826 }
15827 req.Header = reqHeaders
15828 googleapi.Expand(req.URL, map[string]string{
15829 "parent": c.parent,
15830 })
15831 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15832 }
15833
15834
15835
15836
15837
15838
15839 func (c *FoldersSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
15840 gensupport.SetOptions(c.urlParams_, opts...)
15841 res, err := c.doRequest("json")
15842 if res != nil && res.StatusCode == http.StatusNotModified {
15843 if res.Body != nil {
15844 res.Body.Close()
15845 }
15846 return nil, gensupport.WrapError(&googleapi.Error{
15847 Code: res.StatusCode,
15848 Header: res.Header,
15849 })
15850 }
15851 if err != nil {
15852 return nil, err
15853 }
15854 defer googleapi.CloseBody(res)
15855 if err := googleapi.CheckResponse(res); err != nil {
15856 return nil, gensupport.WrapError(err)
15857 }
15858 ret := &LogSink{
15859 ServerResponse: googleapi.ServerResponse{
15860 Header: res.Header,
15861 HTTPStatusCode: res.StatusCode,
15862 },
15863 }
15864 target := &ret
15865 if err := gensupport.DecodeResponse(target, res); err != nil {
15866 return nil, err
15867 }
15868 return ret, nil
15869 }
15870
15871 type FoldersSinksDeleteCall struct {
15872 s *Service
15873 sinkNameid string
15874 urlParams_ gensupport.URLParams
15875 ctx_ context.Context
15876 header_ http.Header
15877 }
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889 func (r *FoldersSinksService) Delete(sinkNameid string) *FoldersSinksDeleteCall {
15890 c := &FoldersSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15891 c.sinkNameid = sinkNameid
15892 return c
15893 }
15894
15895
15896
15897
15898 func (c *FoldersSinksDeleteCall) Fields(s ...googleapi.Field) *FoldersSinksDeleteCall {
15899 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15900 return c
15901 }
15902
15903
15904 func (c *FoldersSinksDeleteCall) Context(ctx context.Context) *FoldersSinksDeleteCall {
15905 c.ctx_ = ctx
15906 return c
15907 }
15908
15909
15910
15911 func (c *FoldersSinksDeleteCall) Header() http.Header {
15912 if c.header_ == nil {
15913 c.header_ = make(http.Header)
15914 }
15915 return c.header_
15916 }
15917
15918 func (c *FoldersSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
15919 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15920 var body io.Reader = nil
15921 c.urlParams_.Set("alt", alt)
15922 c.urlParams_.Set("prettyPrint", "false")
15923 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
15924 urls += "?" + c.urlParams_.Encode()
15925 req, err := http.NewRequest("DELETE", urls, body)
15926 if err != nil {
15927 return nil, err
15928 }
15929 req.Header = reqHeaders
15930 googleapi.Expand(req.URL, map[string]string{
15931 "sinkName": c.sinkNameid,
15932 })
15933 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15934 }
15935
15936
15937
15938
15939
15940
15941 func (c *FoldersSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
15942 gensupport.SetOptions(c.urlParams_, opts...)
15943 res, err := c.doRequest("json")
15944 if res != nil && res.StatusCode == http.StatusNotModified {
15945 if res.Body != nil {
15946 res.Body.Close()
15947 }
15948 return nil, gensupport.WrapError(&googleapi.Error{
15949 Code: res.StatusCode,
15950 Header: res.Header,
15951 })
15952 }
15953 if err != nil {
15954 return nil, err
15955 }
15956 defer googleapi.CloseBody(res)
15957 if err := googleapi.CheckResponse(res); err != nil {
15958 return nil, gensupport.WrapError(err)
15959 }
15960 ret := &Empty{
15961 ServerResponse: googleapi.ServerResponse{
15962 Header: res.Header,
15963 HTTPStatusCode: res.StatusCode,
15964 },
15965 }
15966 target := &ret
15967 if err := gensupport.DecodeResponse(target, res); err != nil {
15968 return nil, err
15969 }
15970 return ret, nil
15971 }
15972
15973 type FoldersSinksGetCall struct {
15974 s *Service
15975 sinkName string
15976 urlParams_ gensupport.URLParams
15977 ifNoneMatch_ string
15978 ctx_ context.Context
15979 header_ http.Header
15980 }
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990 func (r *FoldersSinksService) Get(sinkName string) *FoldersSinksGetCall {
15991 c := &FoldersSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15992 c.sinkName = sinkName
15993 return c
15994 }
15995
15996
15997
15998
15999 func (c *FoldersSinksGetCall) Fields(s ...googleapi.Field) *FoldersSinksGetCall {
16000 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16001 return c
16002 }
16003
16004
16005
16006
16007 func (c *FoldersSinksGetCall) IfNoneMatch(entityTag string) *FoldersSinksGetCall {
16008 c.ifNoneMatch_ = entityTag
16009 return c
16010 }
16011
16012
16013 func (c *FoldersSinksGetCall) Context(ctx context.Context) *FoldersSinksGetCall {
16014 c.ctx_ = ctx
16015 return c
16016 }
16017
16018
16019
16020 func (c *FoldersSinksGetCall) Header() http.Header {
16021 if c.header_ == nil {
16022 c.header_ = make(http.Header)
16023 }
16024 return c.header_
16025 }
16026
16027 func (c *FoldersSinksGetCall) doRequest(alt string) (*http.Response, error) {
16028 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16029 if c.ifNoneMatch_ != "" {
16030 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16031 }
16032 var body io.Reader = nil
16033 c.urlParams_.Set("alt", alt)
16034 c.urlParams_.Set("prettyPrint", "false")
16035 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
16036 urls += "?" + c.urlParams_.Encode()
16037 req, err := http.NewRequest("GET", urls, body)
16038 if err != nil {
16039 return nil, err
16040 }
16041 req.Header = reqHeaders
16042 googleapi.Expand(req.URL, map[string]string{
16043 "sinkName": c.sinkName,
16044 })
16045 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16046 }
16047
16048
16049
16050
16051
16052
16053 func (c *FoldersSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
16054 gensupport.SetOptions(c.urlParams_, opts...)
16055 res, err := c.doRequest("json")
16056 if res != nil && res.StatusCode == http.StatusNotModified {
16057 if res.Body != nil {
16058 res.Body.Close()
16059 }
16060 return nil, gensupport.WrapError(&googleapi.Error{
16061 Code: res.StatusCode,
16062 Header: res.Header,
16063 })
16064 }
16065 if err != nil {
16066 return nil, err
16067 }
16068 defer googleapi.CloseBody(res)
16069 if err := googleapi.CheckResponse(res); err != nil {
16070 return nil, gensupport.WrapError(err)
16071 }
16072 ret := &LogSink{
16073 ServerResponse: googleapi.ServerResponse{
16074 Header: res.Header,
16075 HTTPStatusCode: res.StatusCode,
16076 },
16077 }
16078 target := &ret
16079 if err := gensupport.DecodeResponse(target, res); err != nil {
16080 return nil, err
16081 }
16082 return ret, nil
16083 }
16084
16085 type FoldersSinksListCall struct {
16086 s *Service
16087 parent string
16088 urlParams_ gensupport.URLParams
16089 ifNoneMatch_ string
16090 ctx_ context.Context
16091 header_ http.Header
16092 }
16093
16094
16095
16096
16097
16098
16099 func (r *FoldersSinksService) List(parent string) *FoldersSinksListCall {
16100 c := &FoldersSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16101 c.parent = parent
16102 return c
16103 }
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113 func (c *FoldersSinksListCall) Filter(filter string) *FoldersSinksListCall {
16114 c.urlParams_.Set("filter", filter)
16115 return c
16116 }
16117
16118
16119
16120
16121
16122 func (c *FoldersSinksListCall) PageSize(pageSize int64) *FoldersSinksListCall {
16123 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16124 return c
16125 }
16126
16127
16128
16129
16130
16131 func (c *FoldersSinksListCall) PageToken(pageToken string) *FoldersSinksListCall {
16132 c.urlParams_.Set("pageToken", pageToken)
16133 return c
16134 }
16135
16136
16137
16138
16139 func (c *FoldersSinksListCall) Fields(s ...googleapi.Field) *FoldersSinksListCall {
16140 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16141 return c
16142 }
16143
16144
16145
16146
16147 func (c *FoldersSinksListCall) IfNoneMatch(entityTag string) *FoldersSinksListCall {
16148 c.ifNoneMatch_ = entityTag
16149 return c
16150 }
16151
16152
16153 func (c *FoldersSinksListCall) Context(ctx context.Context) *FoldersSinksListCall {
16154 c.ctx_ = ctx
16155 return c
16156 }
16157
16158
16159
16160 func (c *FoldersSinksListCall) Header() http.Header {
16161 if c.header_ == nil {
16162 c.header_ = make(http.Header)
16163 }
16164 return c.header_
16165 }
16166
16167 func (c *FoldersSinksListCall) doRequest(alt string) (*http.Response, error) {
16168 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16169 if c.ifNoneMatch_ != "" {
16170 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16171 }
16172 var body io.Reader = nil
16173 c.urlParams_.Set("alt", alt)
16174 c.urlParams_.Set("prettyPrint", "false")
16175 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
16176 urls += "?" + c.urlParams_.Encode()
16177 req, err := http.NewRequest("GET", urls, body)
16178 if err != nil {
16179 return nil, err
16180 }
16181 req.Header = reqHeaders
16182 googleapi.Expand(req.URL, map[string]string{
16183 "parent": c.parent,
16184 })
16185 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16186 }
16187
16188
16189
16190
16191
16192
16193
16194 func (c *FoldersSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
16195 gensupport.SetOptions(c.urlParams_, opts...)
16196 res, err := c.doRequest("json")
16197 if res != nil && res.StatusCode == http.StatusNotModified {
16198 if res.Body != nil {
16199 res.Body.Close()
16200 }
16201 return nil, gensupport.WrapError(&googleapi.Error{
16202 Code: res.StatusCode,
16203 Header: res.Header,
16204 })
16205 }
16206 if err != nil {
16207 return nil, err
16208 }
16209 defer googleapi.CloseBody(res)
16210 if err := googleapi.CheckResponse(res); err != nil {
16211 return nil, gensupport.WrapError(err)
16212 }
16213 ret := &ListSinksResponse{
16214 ServerResponse: googleapi.ServerResponse{
16215 Header: res.Header,
16216 HTTPStatusCode: res.StatusCode,
16217 },
16218 }
16219 target := &ret
16220 if err := gensupport.DecodeResponse(target, res); err != nil {
16221 return nil, err
16222 }
16223 return ret, nil
16224 }
16225
16226
16227
16228
16229 func (c *FoldersSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
16230 c.ctx_ = ctx
16231 defer c.PageToken(c.urlParams_.Get("pageToken"))
16232 for {
16233 x, err := c.Do()
16234 if err != nil {
16235 return err
16236 }
16237 if err := f(x); err != nil {
16238 return err
16239 }
16240 if x.NextPageToken == "" {
16241 return nil
16242 }
16243 c.PageToken(x.NextPageToken)
16244 }
16245 }
16246
16247 type FoldersSinksPatchCall struct {
16248 s *Service
16249 sinkNameid string
16250 logsink *LogSink
16251 urlParams_ gensupport.URLParams
16252 ctx_ context.Context
16253 header_ http.Header
16254 }
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268 func (r *FoldersSinksService) Patch(sinkNameid string, logsink *LogSink) *FoldersSinksPatchCall {
16269 c := &FoldersSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16270 c.sinkNameid = sinkNameid
16271 c.logsink = logsink
16272 return c
16273 }
16274
16275
16276
16277
16278
16279
16280
16281 func (c *FoldersSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksPatchCall {
16282 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
16283 return c
16284 }
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296 func (c *FoldersSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksPatchCall {
16297 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
16298 return c
16299 }
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311 func (c *FoldersSinksPatchCall) UpdateMask(updateMask string) *FoldersSinksPatchCall {
16312 c.urlParams_.Set("updateMask", updateMask)
16313 return c
16314 }
16315
16316
16317
16318
16319 func (c *FoldersSinksPatchCall) Fields(s ...googleapi.Field) *FoldersSinksPatchCall {
16320 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16321 return c
16322 }
16323
16324
16325 func (c *FoldersSinksPatchCall) Context(ctx context.Context) *FoldersSinksPatchCall {
16326 c.ctx_ = ctx
16327 return c
16328 }
16329
16330
16331
16332 func (c *FoldersSinksPatchCall) Header() http.Header {
16333 if c.header_ == nil {
16334 c.header_ = make(http.Header)
16335 }
16336 return c.header_
16337 }
16338
16339 func (c *FoldersSinksPatchCall) doRequest(alt string) (*http.Response, error) {
16340 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16341 var body io.Reader = nil
16342 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
16343 if err != nil {
16344 return nil, err
16345 }
16346 c.urlParams_.Set("alt", alt)
16347 c.urlParams_.Set("prettyPrint", "false")
16348 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
16349 urls += "?" + c.urlParams_.Encode()
16350 req, err := http.NewRequest("PATCH", urls, body)
16351 if err != nil {
16352 return nil, err
16353 }
16354 req.Header = reqHeaders
16355 googleapi.Expand(req.URL, map[string]string{
16356 "sinkName": c.sinkNameid,
16357 })
16358 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16359 }
16360
16361
16362
16363
16364
16365
16366 func (c *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
16367 gensupport.SetOptions(c.urlParams_, opts...)
16368 res, err := c.doRequest("json")
16369 if res != nil && res.StatusCode == http.StatusNotModified {
16370 if res.Body != nil {
16371 res.Body.Close()
16372 }
16373 return nil, gensupport.WrapError(&googleapi.Error{
16374 Code: res.StatusCode,
16375 Header: res.Header,
16376 })
16377 }
16378 if err != nil {
16379 return nil, err
16380 }
16381 defer googleapi.CloseBody(res)
16382 if err := googleapi.CheckResponse(res); err != nil {
16383 return nil, gensupport.WrapError(err)
16384 }
16385 ret := &LogSink{
16386 ServerResponse: googleapi.ServerResponse{
16387 Header: res.Header,
16388 HTTPStatusCode: res.StatusCode,
16389 },
16390 }
16391 target := &ret
16392 if err := gensupport.DecodeResponse(target, res); err != nil {
16393 return nil, err
16394 }
16395 return ret, nil
16396 }
16397
16398 type FoldersSinksUpdateCall struct {
16399 s *Service
16400 sinkNameid string
16401 logsink *LogSink
16402 urlParams_ gensupport.URLParams
16403 ctx_ context.Context
16404 header_ http.Header
16405 }
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419 func (r *FoldersSinksService) Update(sinkNameid string, logsink *LogSink) *FoldersSinksUpdateCall {
16420 c := &FoldersSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16421 c.sinkNameid = sinkNameid
16422 c.logsink = logsink
16423 return c
16424 }
16425
16426
16427
16428
16429
16430
16431
16432 func (c *FoldersSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksUpdateCall {
16433 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
16434 return c
16435 }
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447 func (c *FoldersSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksUpdateCall {
16448 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
16449 return c
16450 }
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462 func (c *FoldersSinksUpdateCall) UpdateMask(updateMask string) *FoldersSinksUpdateCall {
16463 c.urlParams_.Set("updateMask", updateMask)
16464 return c
16465 }
16466
16467
16468
16469
16470 func (c *FoldersSinksUpdateCall) Fields(s ...googleapi.Field) *FoldersSinksUpdateCall {
16471 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16472 return c
16473 }
16474
16475
16476 func (c *FoldersSinksUpdateCall) Context(ctx context.Context) *FoldersSinksUpdateCall {
16477 c.ctx_ = ctx
16478 return c
16479 }
16480
16481
16482
16483 func (c *FoldersSinksUpdateCall) Header() http.Header {
16484 if c.header_ == nil {
16485 c.header_ = make(http.Header)
16486 }
16487 return c.header_
16488 }
16489
16490 func (c *FoldersSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
16491 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16492 var body io.Reader = nil
16493 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
16494 if err != nil {
16495 return nil, err
16496 }
16497 c.urlParams_.Set("alt", alt)
16498 c.urlParams_.Set("prettyPrint", "false")
16499 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
16500 urls += "?" + c.urlParams_.Encode()
16501 req, err := http.NewRequest("PUT", urls, body)
16502 if err != nil {
16503 return nil, err
16504 }
16505 req.Header = reqHeaders
16506 googleapi.Expand(req.URL, map[string]string{
16507 "sinkName": c.sinkNameid,
16508 })
16509 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16510 }
16511
16512
16513
16514
16515
16516
16517 func (c *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
16518 gensupport.SetOptions(c.urlParams_, opts...)
16519 res, err := c.doRequest("json")
16520 if res != nil && res.StatusCode == http.StatusNotModified {
16521 if res.Body != nil {
16522 res.Body.Close()
16523 }
16524 return nil, gensupport.WrapError(&googleapi.Error{
16525 Code: res.StatusCode,
16526 Header: res.Header,
16527 })
16528 }
16529 if err != nil {
16530 return nil, err
16531 }
16532 defer googleapi.CloseBody(res)
16533 if err := googleapi.CheckResponse(res); err != nil {
16534 return nil, gensupport.WrapError(err)
16535 }
16536 ret := &LogSink{
16537 ServerResponse: googleapi.ServerResponse{
16538 Header: res.Header,
16539 HTTPStatusCode: res.StatusCode,
16540 },
16541 }
16542 target := &ret
16543 if err := gensupport.DecodeResponse(target, res); err != nil {
16544 return nil, err
16545 }
16546 return ret, nil
16547 }
16548
16549 type LocationsGetCall struct {
16550 s *Service
16551 name string
16552 urlParams_ gensupport.URLParams
16553 ifNoneMatch_ string
16554 ctx_ context.Context
16555 header_ http.Header
16556 }
16557
16558
16559
16560
16561 func (r *LocationsService) Get(name string) *LocationsGetCall {
16562 c := &LocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16563 c.name = name
16564 return c
16565 }
16566
16567
16568
16569
16570 func (c *LocationsGetCall) Fields(s ...googleapi.Field) *LocationsGetCall {
16571 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16572 return c
16573 }
16574
16575
16576
16577
16578 func (c *LocationsGetCall) IfNoneMatch(entityTag string) *LocationsGetCall {
16579 c.ifNoneMatch_ = entityTag
16580 return c
16581 }
16582
16583
16584 func (c *LocationsGetCall) Context(ctx context.Context) *LocationsGetCall {
16585 c.ctx_ = ctx
16586 return c
16587 }
16588
16589
16590
16591 func (c *LocationsGetCall) Header() http.Header {
16592 if c.header_ == nil {
16593 c.header_ = make(http.Header)
16594 }
16595 return c.header_
16596 }
16597
16598 func (c *LocationsGetCall) doRequest(alt string) (*http.Response, error) {
16599 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16600 if c.ifNoneMatch_ != "" {
16601 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16602 }
16603 var body io.Reader = nil
16604 c.urlParams_.Set("alt", alt)
16605 c.urlParams_.Set("prettyPrint", "false")
16606 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
16607 urls += "?" + c.urlParams_.Encode()
16608 req, err := http.NewRequest("GET", urls, body)
16609 if err != nil {
16610 return nil, err
16611 }
16612 req.Header = reqHeaders
16613 googleapi.Expand(req.URL, map[string]string{
16614 "name": c.name,
16615 })
16616 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16617 }
16618
16619
16620
16621
16622
16623
16624 func (c *LocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
16625 gensupport.SetOptions(c.urlParams_, opts...)
16626 res, err := c.doRequest("json")
16627 if res != nil && res.StatusCode == http.StatusNotModified {
16628 if res.Body != nil {
16629 res.Body.Close()
16630 }
16631 return nil, gensupport.WrapError(&googleapi.Error{
16632 Code: res.StatusCode,
16633 Header: res.Header,
16634 })
16635 }
16636 if err != nil {
16637 return nil, err
16638 }
16639 defer googleapi.CloseBody(res)
16640 if err := googleapi.CheckResponse(res); err != nil {
16641 return nil, gensupport.WrapError(err)
16642 }
16643 ret := &Location{
16644 ServerResponse: googleapi.ServerResponse{
16645 Header: res.Header,
16646 HTTPStatusCode: res.StatusCode,
16647 },
16648 }
16649 target := &ret
16650 if err := gensupport.DecodeResponse(target, res); err != nil {
16651 return nil, err
16652 }
16653 return ret, nil
16654 }
16655
16656 type LocationsListCall struct {
16657 s *Service
16658 name string
16659 urlParams_ gensupport.URLParams
16660 ifNoneMatch_ string
16661 ctx_ context.Context
16662 header_ http.Header
16663 }
16664
16665
16666
16667
16668 func (r *LocationsService) List(name string) *LocationsListCall {
16669 c := &LocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16670 c.name = name
16671 return c
16672 }
16673
16674
16675
16676
16677
16678 func (c *LocationsListCall) Filter(filter string) *LocationsListCall {
16679 c.urlParams_.Set("filter", filter)
16680 return c
16681 }
16682
16683
16684
16685 func (c *LocationsListCall) PageSize(pageSize int64) *LocationsListCall {
16686 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16687 return c
16688 }
16689
16690
16691
16692
16693 func (c *LocationsListCall) PageToken(pageToken string) *LocationsListCall {
16694 c.urlParams_.Set("pageToken", pageToken)
16695 return c
16696 }
16697
16698
16699
16700
16701 func (c *LocationsListCall) Fields(s ...googleapi.Field) *LocationsListCall {
16702 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16703 return c
16704 }
16705
16706
16707
16708
16709 func (c *LocationsListCall) IfNoneMatch(entityTag string) *LocationsListCall {
16710 c.ifNoneMatch_ = entityTag
16711 return c
16712 }
16713
16714
16715 func (c *LocationsListCall) Context(ctx context.Context) *LocationsListCall {
16716 c.ctx_ = ctx
16717 return c
16718 }
16719
16720
16721
16722 func (c *LocationsListCall) Header() http.Header {
16723 if c.header_ == nil {
16724 c.header_ = make(http.Header)
16725 }
16726 return c.header_
16727 }
16728
16729 func (c *LocationsListCall) doRequest(alt string) (*http.Response, error) {
16730 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16731 if c.ifNoneMatch_ != "" {
16732 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16733 }
16734 var body io.Reader = nil
16735 c.urlParams_.Set("alt", alt)
16736 c.urlParams_.Set("prettyPrint", "false")
16737 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
16738 urls += "?" + c.urlParams_.Encode()
16739 req, err := http.NewRequest("GET", urls, body)
16740 if err != nil {
16741 return nil, err
16742 }
16743 req.Header = reqHeaders
16744 googleapi.Expand(req.URL, map[string]string{
16745 "name": c.name,
16746 })
16747 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16748 }
16749
16750
16751
16752
16753
16754
16755
16756 func (c *LocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
16757 gensupport.SetOptions(c.urlParams_, opts...)
16758 res, err := c.doRequest("json")
16759 if res != nil && res.StatusCode == http.StatusNotModified {
16760 if res.Body != nil {
16761 res.Body.Close()
16762 }
16763 return nil, gensupport.WrapError(&googleapi.Error{
16764 Code: res.StatusCode,
16765 Header: res.Header,
16766 })
16767 }
16768 if err != nil {
16769 return nil, err
16770 }
16771 defer googleapi.CloseBody(res)
16772 if err := googleapi.CheckResponse(res); err != nil {
16773 return nil, gensupport.WrapError(err)
16774 }
16775 ret := &ListLocationsResponse{
16776 ServerResponse: googleapi.ServerResponse{
16777 Header: res.Header,
16778 HTTPStatusCode: res.StatusCode,
16779 },
16780 }
16781 target := &ret
16782 if err := gensupport.DecodeResponse(target, res); err != nil {
16783 return nil, err
16784 }
16785 return ret, nil
16786 }
16787
16788
16789
16790
16791 func (c *LocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
16792 c.ctx_ = ctx
16793 defer c.PageToken(c.urlParams_.Get("pageToken"))
16794 for {
16795 x, err := c.Do()
16796 if err != nil {
16797 return err
16798 }
16799 if err := f(x); err != nil {
16800 return err
16801 }
16802 if x.NextPageToken == "" {
16803 return nil
16804 }
16805 c.PageToken(x.NextPageToken)
16806 }
16807 }
16808
16809 type LocationsBucketsCreateCall struct {
16810 s *Service
16811 parent string
16812 logbucket *LogBucket
16813 urlParams_ gensupport.URLParams
16814 ctx_ context.Context
16815 header_ http.Header
16816 }
16817
16818
16819
16820
16821
16822
16823
16824 func (r *LocationsBucketsService) Create(parent string, logbucket *LogBucket) *LocationsBucketsCreateCall {
16825 c := &LocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16826 c.parent = parent
16827 c.logbucket = logbucket
16828 return c
16829 }
16830
16831
16832
16833
16834
16835 func (c *LocationsBucketsCreateCall) BucketId(bucketId string) *LocationsBucketsCreateCall {
16836 c.urlParams_.Set("bucketId", bucketId)
16837 return c
16838 }
16839
16840
16841
16842
16843 func (c *LocationsBucketsCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsCreateCall {
16844 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16845 return c
16846 }
16847
16848
16849 func (c *LocationsBucketsCreateCall) Context(ctx context.Context) *LocationsBucketsCreateCall {
16850 c.ctx_ = ctx
16851 return c
16852 }
16853
16854
16855
16856 func (c *LocationsBucketsCreateCall) Header() http.Header {
16857 if c.header_ == nil {
16858 c.header_ = make(http.Header)
16859 }
16860 return c.header_
16861 }
16862
16863 func (c *LocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
16864 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16865 var body io.Reader = nil
16866 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
16867 if err != nil {
16868 return nil, err
16869 }
16870 c.urlParams_.Set("alt", alt)
16871 c.urlParams_.Set("prettyPrint", "false")
16872 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
16873 urls += "?" + c.urlParams_.Encode()
16874 req, err := http.NewRequest("POST", urls, body)
16875 if err != nil {
16876 return nil, err
16877 }
16878 req.Header = reqHeaders
16879 googleapi.Expand(req.URL, map[string]string{
16880 "parent": c.parent,
16881 })
16882 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16883 }
16884
16885
16886
16887
16888
16889
16890 func (c *LocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
16891 gensupport.SetOptions(c.urlParams_, opts...)
16892 res, err := c.doRequest("json")
16893 if res != nil && res.StatusCode == http.StatusNotModified {
16894 if res.Body != nil {
16895 res.Body.Close()
16896 }
16897 return nil, gensupport.WrapError(&googleapi.Error{
16898 Code: res.StatusCode,
16899 Header: res.Header,
16900 })
16901 }
16902 if err != nil {
16903 return nil, err
16904 }
16905 defer googleapi.CloseBody(res)
16906 if err := googleapi.CheckResponse(res); err != nil {
16907 return nil, gensupport.WrapError(err)
16908 }
16909 ret := &LogBucket{
16910 ServerResponse: googleapi.ServerResponse{
16911 Header: res.Header,
16912 HTTPStatusCode: res.StatusCode,
16913 },
16914 }
16915 target := &ret
16916 if err := gensupport.DecodeResponse(target, res); err != nil {
16917 return nil, err
16918 }
16919 return ret, nil
16920 }
16921
16922 type LocationsBucketsCreateAsyncCall struct {
16923 s *Service
16924 parent string
16925 logbucket *LogBucket
16926 urlParams_ gensupport.URLParams
16927 ctx_ context.Context
16928 header_ http.Header
16929 }
16930
16931
16932
16933
16934
16935
16936
16937
16938 func (r *LocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *LocationsBucketsCreateAsyncCall {
16939 c := &LocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16940 c.parent = parent
16941 c.logbucket = logbucket
16942 return c
16943 }
16944
16945
16946
16947
16948
16949 func (c *LocationsBucketsCreateAsyncCall) BucketId(bucketId string) *LocationsBucketsCreateAsyncCall {
16950 c.urlParams_.Set("bucketId", bucketId)
16951 return c
16952 }
16953
16954
16955
16956
16957 func (c *LocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *LocationsBucketsCreateAsyncCall {
16958 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16959 return c
16960 }
16961
16962
16963 func (c *LocationsBucketsCreateAsyncCall) Context(ctx context.Context) *LocationsBucketsCreateAsyncCall {
16964 c.ctx_ = ctx
16965 return c
16966 }
16967
16968
16969
16970 func (c *LocationsBucketsCreateAsyncCall) Header() http.Header {
16971 if c.header_ == nil {
16972 c.header_ = make(http.Header)
16973 }
16974 return c.header_
16975 }
16976
16977 func (c *LocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) {
16978 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16979 var body io.Reader = nil
16980 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
16981 if err != nil {
16982 return nil, err
16983 }
16984 c.urlParams_.Set("alt", alt)
16985 c.urlParams_.Set("prettyPrint", "false")
16986 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync")
16987 urls += "?" + c.urlParams_.Encode()
16988 req, err := http.NewRequest("POST", urls, body)
16989 if err != nil {
16990 return nil, err
16991 }
16992 req.Header = reqHeaders
16993 googleapi.Expand(req.URL, map[string]string{
16994 "parent": c.parent,
16995 })
16996 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16997 }
16998
16999
17000
17001
17002
17003
17004 func (c *LocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17005 gensupport.SetOptions(c.urlParams_, opts...)
17006 res, err := c.doRequest("json")
17007 if res != nil && res.StatusCode == http.StatusNotModified {
17008 if res.Body != nil {
17009 res.Body.Close()
17010 }
17011 return nil, gensupport.WrapError(&googleapi.Error{
17012 Code: res.StatusCode,
17013 Header: res.Header,
17014 })
17015 }
17016 if err != nil {
17017 return nil, err
17018 }
17019 defer googleapi.CloseBody(res)
17020 if err := googleapi.CheckResponse(res); err != nil {
17021 return nil, gensupport.WrapError(err)
17022 }
17023 ret := &Operation{
17024 ServerResponse: googleapi.ServerResponse{
17025 Header: res.Header,
17026 HTTPStatusCode: res.StatusCode,
17027 },
17028 }
17029 target := &ret
17030 if err := gensupport.DecodeResponse(target, res); err != nil {
17031 return nil, err
17032 }
17033 return ret, nil
17034 }
17035
17036 type LocationsBucketsDeleteCall struct {
17037 s *Service
17038 name string
17039 urlParams_ gensupport.URLParams
17040 ctx_ context.Context
17041 header_ http.Header
17042 }
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055 func (r *LocationsBucketsService) Delete(name string) *LocationsBucketsDeleteCall {
17056 c := &LocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17057 c.name = name
17058 return c
17059 }
17060
17061
17062
17063
17064 func (c *LocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsDeleteCall {
17065 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17066 return c
17067 }
17068
17069
17070 func (c *LocationsBucketsDeleteCall) Context(ctx context.Context) *LocationsBucketsDeleteCall {
17071 c.ctx_ = ctx
17072 return c
17073 }
17074
17075
17076
17077 func (c *LocationsBucketsDeleteCall) Header() http.Header {
17078 if c.header_ == nil {
17079 c.header_ = make(http.Header)
17080 }
17081 return c.header_
17082 }
17083
17084 func (c *LocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
17085 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17086 var body io.Reader = nil
17087 c.urlParams_.Set("alt", alt)
17088 c.urlParams_.Set("prettyPrint", "false")
17089 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
17090 urls += "?" + c.urlParams_.Encode()
17091 req, err := http.NewRequest("DELETE", urls, body)
17092 if err != nil {
17093 return nil, err
17094 }
17095 req.Header = reqHeaders
17096 googleapi.Expand(req.URL, map[string]string{
17097 "name": c.name,
17098 })
17099 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17100 }
17101
17102
17103
17104
17105
17106
17107 func (c *LocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
17108 gensupport.SetOptions(c.urlParams_, opts...)
17109 res, err := c.doRequest("json")
17110 if res != nil && res.StatusCode == http.StatusNotModified {
17111 if res.Body != nil {
17112 res.Body.Close()
17113 }
17114 return nil, gensupport.WrapError(&googleapi.Error{
17115 Code: res.StatusCode,
17116 Header: res.Header,
17117 })
17118 }
17119 if err != nil {
17120 return nil, err
17121 }
17122 defer googleapi.CloseBody(res)
17123 if err := googleapi.CheckResponse(res); err != nil {
17124 return nil, gensupport.WrapError(err)
17125 }
17126 ret := &Empty{
17127 ServerResponse: googleapi.ServerResponse{
17128 Header: res.Header,
17129 HTTPStatusCode: res.StatusCode,
17130 },
17131 }
17132 target := &ret
17133 if err := gensupport.DecodeResponse(target, res); err != nil {
17134 return nil, err
17135 }
17136 return ret, nil
17137 }
17138
17139 type LocationsBucketsGetCall struct {
17140 s *Service
17141 name string
17142 urlParams_ gensupport.URLParams
17143 ifNoneMatch_ string
17144 ctx_ context.Context
17145 header_ http.Header
17146 }
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157 func (r *LocationsBucketsService) Get(name string) *LocationsBucketsGetCall {
17158 c := &LocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17159 c.name = name
17160 return c
17161 }
17162
17163
17164
17165
17166 func (c *LocationsBucketsGetCall) Fields(s ...googleapi.Field) *LocationsBucketsGetCall {
17167 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17168 return c
17169 }
17170
17171
17172
17173
17174 func (c *LocationsBucketsGetCall) IfNoneMatch(entityTag string) *LocationsBucketsGetCall {
17175 c.ifNoneMatch_ = entityTag
17176 return c
17177 }
17178
17179
17180 func (c *LocationsBucketsGetCall) Context(ctx context.Context) *LocationsBucketsGetCall {
17181 c.ctx_ = ctx
17182 return c
17183 }
17184
17185
17186
17187 func (c *LocationsBucketsGetCall) Header() http.Header {
17188 if c.header_ == nil {
17189 c.header_ = make(http.Header)
17190 }
17191 return c.header_
17192 }
17193
17194 func (c *LocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
17195 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17196 if c.ifNoneMatch_ != "" {
17197 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17198 }
17199 var body io.Reader = nil
17200 c.urlParams_.Set("alt", alt)
17201 c.urlParams_.Set("prettyPrint", "false")
17202 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
17203 urls += "?" + c.urlParams_.Encode()
17204 req, err := http.NewRequest("GET", urls, body)
17205 if err != nil {
17206 return nil, err
17207 }
17208 req.Header = reqHeaders
17209 googleapi.Expand(req.URL, map[string]string{
17210 "name": c.name,
17211 })
17212 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17213 }
17214
17215
17216
17217
17218
17219
17220 func (c *LocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
17221 gensupport.SetOptions(c.urlParams_, opts...)
17222 res, err := c.doRequest("json")
17223 if res != nil && res.StatusCode == http.StatusNotModified {
17224 if res.Body != nil {
17225 res.Body.Close()
17226 }
17227 return nil, gensupport.WrapError(&googleapi.Error{
17228 Code: res.StatusCode,
17229 Header: res.Header,
17230 })
17231 }
17232 if err != nil {
17233 return nil, err
17234 }
17235 defer googleapi.CloseBody(res)
17236 if err := googleapi.CheckResponse(res); err != nil {
17237 return nil, gensupport.WrapError(err)
17238 }
17239 ret := &LogBucket{
17240 ServerResponse: googleapi.ServerResponse{
17241 Header: res.Header,
17242 HTTPStatusCode: res.StatusCode,
17243 },
17244 }
17245 target := &ret
17246 if err := gensupport.DecodeResponse(target, res); err != nil {
17247 return nil, err
17248 }
17249 return ret, nil
17250 }
17251
17252 type LocationsBucketsListCall struct {
17253 s *Service
17254 parent string
17255 urlParams_ gensupport.URLParams
17256 ifNoneMatch_ string
17257 ctx_ context.Context
17258 header_ http.Header
17259 }
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270 func (r *LocationsBucketsService) List(parent string) *LocationsBucketsListCall {
17271 c := &LocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17272 c.parent = parent
17273 return c
17274 }
17275
17276
17277
17278
17279
17280 func (c *LocationsBucketsListCall) PageSize(pageSize int64) *LocationsBucketsListCall {
17281 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17282 return c
17283 }
17284
17285
17286
17287
17288
17289 func (c *LocationsBucketsListCall) PageToken(pageToken string) *LocationsBucketsListCall {
17290 c.urlParams_.Set("pageToken", pageToken)
17291 return c
17292 }
17293
17294
17295
17296
17297 func (c *LocationsBucketsListCall) Fields(s ...googleapi.Field) *LocationsBucketsListCall {
17298 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17299 return c
17300 }
17301
17302
17303
17304
17305 func (c *LocationsBucketsListCall) IfNoneMatch(entityTag string) *LocationsBucketsListCall {
17306 c.ifNoneMatch_ = entityTag
17307 return c
17308 }
17309
17310
17311 func (c *LocationsBucketsListCall) Context(ctx context.Context) *LocationsBucketsListCall {
17312 c.ctx_ = ctx
17313 return c
17314 }
17315
17316
17317
17318 func (c *LocationsBucketsListCall) Header() http.Header {
17319 if c.header_ == nil {
17320 c.header_ = make(http.Header)
17321 }
17322 return c.header_
17323 }
17324
17325 func (c *LocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
17326 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17327 if c.ifNoneMatch_ != "" {
17328 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17329 }
17330 var body io.Reader = nil
17331 c.urlParams_.Set("alt", alt)
17332 c.urlParams_.Set("prettyPrint", "false")
17333 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
17334 urls += "?" + c.urlParams_.Encode()
17335 req, err := http.NewRequest("GET", urls, body)
17336 if err != nil {
17337 return nil, err
17338 }
17339 req.Header = reqHeaders
17340 googleapi.Expand(req.URL, map[string]string{
17341 "parent": c.parent,
17342 })
17343 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17344 }
17345
17346
17347
17348
17349
17350
17351
17352 func (c *LocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
17353 gensupport.SetOptions(c.urlParams_, opts...)
17354 res, err := c.doRequest("json")
17355 if res != nil && res.StatusCode == http.StatusNotModified {
17356 if res.Body != nil {
17357 res.Body.Close()
17358 }
17359 return nil, gensupport.WrapError(&googleapi.Error{
17360 Code: res.StatusCode,
17361 Header: res.Header,
17362 })
17363 }
17364 if err != nil {
17365 return nil, err
17366 }
17367 defer googleapi.CloseBody(res)
17368 if err := googleapi.CheckResponse(res); err != nil {
17369 return nil, gensupport.WrapError(err)
17370 }
17371 ret := &ListBucketsResponse{
17372 ServerResponse: googleapi.ServerResponse{
17373 Header: res.Header,
17374 HTTPStatusCode: res.StatusCode,
17375 },
17376 }
17377 target := &ret
17378 if err := gensupport.DecodeResponse(target, res); err != nil {
17379 return nil, err
17380 }
17381 return ret, nil
17382 }
17383
17384
17385
17386
17387 func (c *LocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
17388 c.ctx_ = ctx
17389 defer c.PageToken(c.urlParams_.Get("pageToken"))
17390 for {
17391 x, err := c.Do()
17392 if err != nil {
17393 return err
17394 }
17395 if err := f(x); err != nil {
17396 return err
17397 }
17398 if x.NextPageToken == "" {
17399 return nil
17400 }
17401 c.PageToken(x.NextPageToken)
17402 }
17403 }
17404
17405 type LocationsBucketsPatchCall struct {
17406 s *Service
17407 name string
17408 logbucket *LogBucket
17409 urlParams_ gensupport.URLParams
17410 ctx_ context.Context
17411 header_ http.Header
17412 }
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425 func (r *LocationsBucketsService) Patch(name string, logbucket *LogBucket) *LocationsBucketsPatchCall {
17426 c := &LocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17427 c.name = name
17428 c.logbucket = logbucket
17429 return c
17430 }
17431
17432
17433
17434
17435
17436
17437
17438 func (c *LocationsBucketsPatchCall) UpdateMask(updateMask string) *LocationsBucketsPatchCall {
17439 c.urlParams_.Set("updateMask", updateMask)
17440 return c
17441 }
17442
17443
17444
17445
17446 func (c *LocationsBucketsPatchCall) Fields(s ...googleapi.Field) *LocationsBucketsPatchCall {
17447 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17448 return c
17449 }
17450
17451
17452 func (c *LocationsBucketsPatchCall) Context(ctx context.Context) *LocationsBucketsPatchCall {
17453 c.ctx_ = ctx
17454 return c
17455 }
17456
17457
17458
17459 func (c *LocationsBucketsPatchCall) Header() http.Header {
17460 if c.header_ == nil {
17461 c.header_ = make(http.Header)
17462 }
17463 return c.header_
17464 }
17465
17466 func (c *LocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
17467 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17468 var body io.Reader = nil
17469 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
17470 if err != nil {
17471 return nil, err
17472 }
17473 c.urlParams_.Set("alt", alt)
17474 c.urlParams_.Set("prettyPrint", "false")
17475 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
17476 urls += "?" + c.urlParams_.Encode()
17477 req, err := http.NewRequest("PATCH", urls, body)
17478 if err != nil {
17479 return nil, err
17480 }
17481 req.Header = reqHeaders
17482 googleapi.Expand(req.URL, map[string]string{
17483 "name": c.name,
17484 })
17485 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17486 }
17487
17488
17489
17490
17491
17492
17493 func (c *LocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
17494 gensupport.SetOptions(c.urlParams_, opts...)
17495 res, err := c.doRequest("json")
17496 if res != nil && res.StatusCode == http.StatusNotModified {
17497 if res.Body != nil {
17498 res.Body.Close()
17499 }
17500 return nil, gensupport.WrapError(&googleapi.Error{
17501 Code: res.StatusCode,
17502 Header: res.Header,
17503 })
17504 }
17505 if err != nil {
17506 return nil, err
17507 }
17508 defer googleapi.CloseBody(res)
17509 if err := googleapi.CheckResponse(res); err != nil {
17510 return nil, gensupport.WrapError(err)
17511 }
17512 ret := &LogBucket{
17513 ServerResponse: googleapi.ServerResponse{
17514 Header: res.Header,
17515 HTTPStatusCode: res.StatusCode,
17516 },
17517 }
17518 target := &ret
17519 if err := gensupport.DecodeResponse(target, res); err != nil {
17520 return nil, err
17521 }
17522 return ret, nil
17523 }
17524
17525 type LocationsBucketsUndeleteCall struct {
17526 s *Service
17527 name string
17528 undeletebucketrequest *UndeleteBucketRequest
17529 urlParams_ gensupport.URLParams
17530 ctx_ context.Context
17531 header_ http.Header
17532 }
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544 func (r *LocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *LocationsBucketsUndeleteCall {
17545 c := &LocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17546 c.name = name
17547 c.undeletebucketrequest = undeletebucketrequest
17548 return c
17549 }
17550
17551
17552
17553
17554 func (c *LocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsUndeleteCall {
17555 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17556 return c
17557 }
17558
17559
17560 func (c *LocationsBucketsUndeleteCall) Context(ctx context.Context) *LocationsBucketsUndeleteCall {
17561 c.ctx_ = ctx
17562 return c
17563 }
17564
17565
17566
17567 func (c *LocationsBucketsUndeleteCall) Header() http.Header {
17568 if c.header_ == nil {
17569 c.header_ = make(http.Header)
17570 }
17571 return c.header_
17572 }
17573
17574 func (c *LocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
17575 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17576 var body io.Reader = nil
17577 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
17578 if err != nil {
17579 return nil, err
17580 }
17581 c.urlParams_.Set("alt", alt)
17582 c.urlParams_.Set("prettyPrint", "false")
17583 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
17584 urls += "?" + c.urlParams_.Encode()
17585 req, err := http.NewRequest("POST", urls, body)
17586 if err != nil {
17587 return nil, err
17588 }
17589 req.Header = reqHeaders
17590 googleapi.Expand(req.URL, map[string]string{
17591 "name": c.name,
17592 })
17593 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17594 }
17595
17596
17597
17598
17599
17600
17601 func (c *LocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
17602 gensupport.SetOptions(c.urlParams_, opts...)
17603 res, err := c.doRequest("json")
17604 if res != nil && res.StatusCode == http.StatusNotModified {
17605 if res.Body != nil {
17606 res.Body.Close()
17607 }
17608 return nil, gensupport.WrapError(&googleapi.Error{
17609 Code: res.StatusCode,
17610 Header: res.Header,
17611 })
17612 }
17613 if err != nil {
17614 return nil, err
17615 }
17616 defer googleapi.CloseBody(res)
17617 if err := googleapi.CheckResponse(res); err != nil {
17618 return nil, gensupport.WrapError(err)
17619 }
17620 ret := &Empty{
17621 ServerResponse: googleapi.ServerResponse{
17622 Header: res.Header,
17623 HTTPStatusCode: res.StatusCode,
17624 },
17625 }
17626 target := &ret
17627 if err := gensupport.DecodeResponse(target, res); err != nil {
17628 return nil, err
17629 }
17630 return ret, nil
17631 }
17632
17633 type LocationsBucketsUpdateAsyncCall struct {
17634 s *Service
17635 name string
17636 logbucket *LogBucket
17637 urlParams_ gensupport.URLParams
17638 ctx_ context.Context
17639 header_ http.Header
17640 }
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654 func (r *LocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *LocationsBucketsUpdateAsyncCall {
17655 c := &LocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17656 c.name = name
17657 c.logbucket = logbucket
17658 return c
17659 }
17660
17661
17662
17663
17664
17665
17666
17667 func (c *LocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *LocationsBucketsUpdateAsyncCall {
17668 c.urlParams_.Set("updateMask", updateMask)
17669 return c
17670 }
17671
17672
17673
17674
17675 func (c *LocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *LocationsBucketsUpdateAsyncCall {
17676 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17677 return c
17678 }
17679
17680
17681 func (c *LocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *LocationsBucketsUpdateAsyncCall {
17682 c.ctx_ = ctx
17683 return c
17684 }
17685
17686
17687
17688 func (c *LocationsBucketsUpdateAsyncCall) Header() http.Header {
17689 if c.header_ == nil {
17690 c.header_ = make(http.Header)
17691 }
17692 return c.header_
17693 }
17694
17695 func (c *LocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) {
17696 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17697 var body io.Reader = nil
17698 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
17699 if err != nil {
17700 return nil, err
17701 }
17702 c.urlParams_.Set("alt", alt)
17703 c.urlParams_.Set("prettyPrint", "false")
17704 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync")
17705 urls += "?" + c.urlParams_.Encode()
17706 req, err := http.NewRequest("POST", urls, body)
17707 if err != nil {
17708 return nil, err
17709 }
17710 req.Header = reqHeaders
17711 googleapi.Expand(req.URL, map[string]string{
17712 "name": c.name,
17713 })
17714 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17715 }
17716
17717
17718
17719
17720
17721
17722 func (c *LocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17723 gensupport.SetOptions(c.urlParams_, opts...)
17724 res, err := c.doRequest("json")
17725 if res != nil && res.StatusCode == http.StatusNotModified {
17726 if res.Body != nil {
17727 res.Body.Close()
17728 }
17729 return nil, gensupport.WrapError(&googleapi.Error{
17730 Code: res.StatusCode,
17731 Header: res.Header,
17732 })
17733 }
17734 if err != nil {
17735 return nil, err
17736 }
17737 defer googleapi.CloseBody(res)
17738 if err := googleapi.CheckResponse(res); err != nil {
17739 return nil, gensupport.WrapError(err)
17740 }
17741 ret := &Operation{
17742 ServerResponse: googleapi.ServerResponse{
17743 Header: res.Header,
17744 HTTPStatusCode: res.StatusCode,
17745 },
17746 }
17747 target := &ret
17748 if err := gensupport.DecodeResponse(target, res); err != nil {
17749 return nil, err
17750 }
17751 return ret, nil
17752 }
17753
17754 type LocationsBucketsLinksCreateCall struct {
17755 s *Service
17756 parent string
17757 link *Link
17758 urlParams_ gensupport.URLParams
17759 ctx_ context.Context
17760 header_ http.Header
17761 }
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773 func (r *LocationsBucketsLinksService) Create(parent string, link *Link) *LocationsBucketsLinksCreateCall {
17774 c := &LocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17775 c.parent = parent
17776 c.link = link
17777 return c
17778 }
17779
17780
17781
17782
17783 func (c *LocationsBucketsLinksCreateCall) LinkId(linkId string) *LocationsBucketsLinksCreateCall {
17784 c.urlParams_.Set("linkId", linkId)
17785 return c
17786 }
17787
17788
17789
17790
17791 func (c *LocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksCreateCall {
17792 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17793 return c
17794 }
17795
17796
17797 func (c *LocationsBucketsLinksCreateCall) Context(ctx context.Context) *LocationsBucketsLinksCreateCall {
17798 c.ctx_ = ctx
17799 return c
17800 }
17801
17802
17803
17804 func (c *LocationsBucketsLinksCreateCall) Header() http.Header {
17805 if c.header_ == nil {
17806 c.header_ = make(http.Header)
17807 }
17808 return c.header_
17809 }
17810
17811 func (c *LocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
17812 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17813 var body io.Reader = nil
17814 body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
17815 if err != nil {
17816 return nil, err
17817 }
17818 c.urlParams_.Set("alt", alt)
17819 c.urlParams_.Set("prettyPrint", "false")
17820 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
17821 urls += "?" + c.urlParams_.Encode()
17822 req, err := http.NewRequest("POST", urls, body)
17823 if err != nil {
17824 return nil, err
17825 }
17826 req.Header = reqHeaders
17827 googleapi.Expand(req.URL, map[string]string{
17828 "parent": c.parent,
17829 })
17830 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17831 }
17832
17833
17834
17835
17836
17837
17838 func (c *LocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17839 gensupport.SetOptions(c.urlParams_, opts...)
17840 res, err := c.doRequest("json")
17841 if res != nil && res.StatusCode == http.StatusNotModified {
17842 if res.Body != nil {
17843 res.Body.Close()
17844 }
17845 return nil, gensupport.WrapError(&googleapi.Error{
17846 Code: res.StatusCode,
17847 Header: res.Header,
17848 })
17849 }
17850 if err != nil {
17851 return nil, err
17852 }
17853 defer googleapi.CloseBody(res)
17854 if err := googleapi.CheckResponse(res); err != nil {
17855 return nil, gensupport.WrapError(err)
17856 }
17857 ret := &Operation{
17858 ServerResponse: googleapi.ServerResponse{
17859 Header: res.Header,
17860 HTTPStatusCode: res.StatusCode,
17861 },
17862 }
17863 target := &ret
17864 if err := gensupport.DecodeResponse(target, res); err != nil {
17865 return nil, err
17866 }
17867 return ret, nil
17868 }
17869
17870 type LocationsBucketsLinksDeleteCall struct {
17871 s *Service
17872 name string
17873 urlParams_ gensupport.URLParams
17874 ctx_ context.Context
17875 header_ http.Header
17876 }
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890 func (r *LocationsBucketsLinksService) Delete(name string) *LocationsBucketsLinksDeleteCall {
17891 c := &LocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17892 c.name = name
17893 return c
17894 }
17895
17896
17897
17898
17899 func (c *LocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksDeleteCall {
17900 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17901 return c
17902 }
17903
17904
17905 func (c *LocationsBucketsLinksDeleteCall) Context(ctx context.Context) *LocationsBucketsLinksDeleteCall {
17906 c.ctx_ = ctx
17907 return c
17908 }
17909
17910
17911
17912 func (c *LocationsBucketsLinksDeleteCall) Header() http.Header {
17913 if c.header_ == nil {
17914 c.header_ = make(http.Header)
17915 }
17916 return c.header_
17917 }
17918
17919 func (c *LocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
17920 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17921 var body io.Reader = nil
17922 c.urlParams_.Set("alt", alt)
17923 c.urlParams_.Set("prettyPrint", "false")
17924 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
17925 urls += "?" + c.urlParams_.Encode()
17926 req, err := http.NewRequest("DELETE", urls, body)
17927 if err != nil {
17928 return nil, err
17929 }
17930 req.Header = reqHeaders
17931 googleapi.Expand(req.URL, map[string]string{
17932 "name": c.name,
17933 })
17934 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17935 }
17936
17937
17938
17939
17940
17941
17942 func (c *LocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17943 gensupport.SetOptions(c.urlParams_, opts...)
17944 res, err := c.doRequest("json")
17945 if res != nil && res.StatusCode == http.StatusNotModified {
17946 if res.Body != nil {
17947 res.Body.Close()
17948 }
17949 return nil, gensupport.WrapError(&googleapi.Error{
17950 Code: res.StatusCode,
17951 Header: res.Header,
17952 })
17953 }
17954 if err != nil {
17955 return nil, err
17956 }
17957 defer googleapi.CloseBody(res)
17958 if err := googleapi.CheckResponse(res); err != nil {
17959 return nil, gensupport.WrapError(err)
17960 }
17961 ret := &Operation{
17962 ServerResponse: googleapi.ServerResponse{
17963 Header: res.Header,
17964 HTTPStatusCode: res.StatusCode,
17965 },
17966 }
17967 target := &ret
17968 if err := gensupport.DecodeResponse(target, res); err != nil {
17969 return nil, err
17970 }
17971 return ret, nil
17972 }
17973
17974 type LocationsBucketsLinksGetCall struct {
17975 s *Service
17976 name string
17977 urlParams_ gensupport.URLParams
17978 ifNoneMatch_ string
17979 ctx_ context.Context
17980 header_ http.Header
17981 }
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994 func (r *LocationsBucketsLinksService) Get(name string) *LocationsBucketsLinksGetCall {
17995 c := &LocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17996 c.name = name
17997 return c
17998 }
17999
18000
18001
18002
18003 func (c *LocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksGetCall {
18004 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18005 return c
18006 }
18007
18008
18009
18010
18011 func (c *LocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *LocationsBucketsLinksGetCall {
18012 c.ifNoneMatch_ = entityTag
18013 return c
18014 }
18015
18016
18017 func (c *LocationsBucketsLinksGetCall) Context(ctx context.Context) *LocationsBucketsLinksGetCall {
18018 c.ctx_ = ctx
18019 return c
18020 }
18021
18022
18023
18024 func (c *LocationsBucketsLinksGetCall) Header() http.Header {
18025 if c.header_ == nil {
18026 c.header_ = make(http.Header)
18027 }
18028 return c.header_
18029 }
18030
18031 func (c *LocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) {
18032 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18033 if c.ifNoneMatch_ != "" {
18034 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18035 }
18036 var body io.Reader = nil
18037 c.urlParams_.Set("alt", alt)
18038 c.urlParams_.Set("prettyPrint", "false")
18039 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
18040 urls += "?" + c.urlParams_.Encode()
18041 req, err := http.NewRequest("GET", urls, body)
18042 if err != nil {
18043 return nil, err
18044 }
18045 req.Header = reqHeaders
18046 googleapi.Expand(req.URL, map[string]string{
18047 "name": c.name,
18048 })
18049 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18050 }
18051
18052
18053
18054
18055
18056
18057 func (c *LocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) {
18058 gensupport.SetOptions(c.urlParams_, opts...)
18059 res, err := c.doRequest("json")
18060 if res != nil && res.StatusCode == http.StatusNotModified {
18061 if res.Body != nil {
18062 res.Body.Close()
18063 }
18064 return nil, gensupport.WrapError(&googleapi.Error{
18065 Code: res.StatusCode,
18066 Header: res.Header,
18067 })
18068 }
18069 if err != nil {
18070 return nil, err
18071 }
18072 defer googleapi.CloseBody(res)
18073 if err := googleapi.CheckResponse(res); err != nil {
18074 return nil, gensupport.WrapError(err)
18075 }
18076 ret := &Link{
18077 ServerResponse: googleapi.ServerResponse{
18078 Header: res.Header,
18079 HTTPStatusCode: res.StatusCode,
18080 },
18081 }
18082 target := &ret
18083 if err := gensupport.DecodeResponse(target, res); err != nil {
18084 return nil, err
18085 }
18086 return ret, nil
18087 }
18088
18089 type LocationsBucketsLinksListCall struct {
18090 s *Service
18091 parent string
18092 urlParams_ gensupport.URLParams
18093 ifNoneMatch_ string
18094 ctx_ context.Context
18095 header_ http.Header
18096 }
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106 func (r *LocationsBucketsLinksService) List(parent string) *LocationsBucketsLinksListCall {
18107 c := &LocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18108 c.parent = parent
18109 return c
18110 }
18111
18112
18113
18114 func (c *LocationsBucketsLinksListCall) PageSize(pageSize int64) *LocationsBucketsLinksListCall {
18115 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18116 return c
18117 }
18118
18119
18120
18121
18122 func (c *LocationsBucketsLinksListCall) PageToken(pageToken string) *LocationsBucketsLinksListCall {
18123 c.urlParams_.Set("pageToken", pageToken)
18124 return c
18125 }
18126
18127
18128
18129
18130 func (c *LocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksListCall {
18131 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18132 return c
18133 }
18134
18135
18136
18137
18138 func (c *LocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *LocationsBucketsLinksListCall {
18139 c.ifNoneMatch_ = entityTag
18140 return c
18141 }
18142
18143
18144 func (c *LocationsBucketsLinksListCall) Context(ctx context.Context) *LocationsBucketsLinksListCall {
18145 c.ctx_ = ctx
18146 return c
18147 }
18148
18149
18150
18151 func (c *LocationsBucketsLinksListCall) Header() http.Header {
18152 if c.header_ == nil {
18153 c.header_ = make(http.Header)
18154 }
18155 return c.header_
18156 }
18157
18158 func (c *LocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) {
18159 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18160 if c.ifNoneMatch_ != "" {
18161 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18162 }
18163 var body io.Reader = nil
18164 c.urlParams_.Set("alt", alt)
18165 c.urlParams_.Set("prettyPrint", "false")
18166 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
18167 urls += "?" + c.urlParams_.Encode()
18168 req, err := http.NewRequest("GET", urls, body)
18169 if err != nil {
18170 return nil, err
18171 }
18172 req.Header = reqHeaders
18173 googleapi.Expand(req.URL, map[string]string{
18174 "parent": c.parent,
18175 })
18176 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18177 }
18178
18179
18180
18181
18182
18183
18184
18185 func (c *LocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) {
18186 gensupport.SetOptions(c.urlParams_, opts...)
18187 res, err := c.doRequest("json")
18188 if res != nil && res.StatusCode == http.StatusNotModified {
18189 if res.Body != nil {
18190 res.Body.Close()
18191 }
18192 return nil, gensupport.WrapError(&googleapi.Error{
18193 Code: res.StatusCode,
18194 Header: res.Header,
18195 })
18196 }
18197 if err != nil {
18198 return nil, err
18199 }
18200 defer googleapi.CloseBody(res)
18201 if err := googleapi.CheckResponse(res); err != nil {
18202 return nil, gensupport.WrapError(err)
18203 }
18204 ret := &ListLinksResponse{
18205 ServerResponse: googleapi.ServerResponse{
18206 Header: res.Header,
18207 HTTPStatusCode: res.StatusCode,
18208 },
18209 }
18210 target := &ret
18211 if err := gensupport.DecodeResponse(target, res); err != nil {
18212 return nil, err
18213 }
18214 return ret, nil
18215 }
18216
18217
18218
18219
18220 func (c *LocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error {
18221 c.ctx_ = ctx
18222 defer c.PageToken(c.urlParams_.Get("pageToken"))
18223 for {
18224 x, err := c.Do()
18225 if err != nil {
18226 return err
18227 }
18228 if err := f(x); err != nil {
18229 return err
18230 }
18231 if x.NextPageToken == "" {
18232 return nil
18233 }
18234 c.PageToken(x.NextPageToken)
18235 }
18236 }
18237
18238 type LocationsBucketsViewsCreateCall struct {
18239 s *Service
18240 parent string
18241 logview *LogView
18242 urlParams_ gensupport.URLParams
18243 ctx_ context.Context
18244 header_ http.Header
18245 }
18246
18247
18248
18249
18250
18251
18252
18253 func (r *LocationsBucketsViewsService) Create(parent string, logview *LogView) *LocationsBucketsViewsCreateCall {
18254 c := &LocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18255 c.parent = parent
18256 c.logview = logview
18257 return c
18258 }
18259
18260
18261
18262
18263 func (c *LocationsBucketsViewsCreateCall) ViewId(viewId string) *LocationsBucketsViewsCreateCall {
18264 c.urlParams_.Set("viewId", viewId)
18265 return c
18266 }
18267
18268
18269
18270
18271 func (c *LocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsCreateCall {
18272 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18273 return c
18274 }
18275
18276
18277 func (c *LocationsBucketsViewsCreateCall) Context(ctx context.Context) *LocationsBucketsViewsCreateCall {
18278 c.ctx_ = ctx
18279 return c
18280 }
18281
18282
18283
18284 func (c *LocationsBucketsViewsCreateCall) Header() http.Header {
18285 if c.header_ == nil {
18286 c.header_ = make(http.Header)
18287 }
18288 return c.header_
18289 }
18290
18291 func (c *LocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
18292 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18293 var body io.Reader = nil
18294 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
18295 if err != nil {
18296 return nil, err
18297 }
18298 c.urlParams_.Set("alt", alt)
18299 c.urlParams_.Set("prettyPrint", "false")
18300 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
18301 urls += "?" + c.urlParams_.Encode()
18302 req, err := http.NewRequest("POST", urls, body)
18303 if err != nil {
18304 return nil, err
18305 }
18306 req.Header = reqHeaders
18307 googleapi.Expand(req.URL, map[string]string{
18308 "parent": c.parent,
18309 })
18310 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18311 }
18312
18313
18314
18315
18316
18317
18318 func (c *LocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
18319 gensupport.SetOptions(c.urlParams_, opts...)
18320 res, err := c.doRequest("json")
18321 if res != nil && res.StatusCode == http.StatusNotModified {
18322 if res.Body != nil {
18323 res.Body.Close()
18324 }
18325 return nil, gensupport.WrapError(&googleapi.Error{
18326 Code: res.StatusCode,
18327 Header: res.Header,
18328 })
18329 }
18330 if err != nil {
18331 return nil, err
18332 }
18333 defer googleapi.CloseBody(res)
18334 if err := googleapi.CheckResponse(res); err != nil {
18335 return nil, gensupport.WrapError(err)
18336 }
18337 ret := &LogView{
18338 ServerResponse: googleapi.ServerResponse{
18339 Header: res.Header,
18340 HTTPStatusCode: res.StatusCode,
18341 },
18342 }
18343 target := &ret
18344 if err := gensupport.DecodeResponse(target, res); err != nil {
18345 return nil, err
18346 }
18347 return ret, nil
18348 }
18349
18350 type LocationsBucketsViewsDeleteCall struct {
18351 s *Service
18352 name string
18353 urlParams_ gensupport.URLParams
18354 ctx_ context.Context
18355 header_ http.Header
18356 }
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367 func (r *LocationsBucketsViewsService) Delete(name string) *LocationsBucketsViewsDeleteCall {
18368 c := &LocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18369 c.name = name
18370 return c
18371 }
18372
18373
18374
18375
18376 func (c *LocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsDeleteCall {
18377 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18378 return c
18379 }
18380
18381
18382 func (c *LocationsBucketsViewsDeleteCall) Context(ctx context.Context) *LocationsBucketsViewsDeleteCall {
18383 c.ctx_ = ctx
18384 return c
18385 }
18386
18387
18388
18389 func (c *LocationsBucketsViewsDeleteCall) Header() http.Header {
18390 if c.header_ == nil {
18391 c.header_ = make(http.Header)
18392 }
18393 return c.header_
18394 }
18395
18396 func (c *LocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
18397 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18398 var body io.Reader = nil
18399 c.urlParams_.Set("alt", alt)
18400 c.urlParams_.Set("prettyPrint", "false")
18401 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
18402 urls += "?" + c.urlParams_.Encode()
18403 req, err := http.NewRequest("DELETE", urls, body)
18404 if err != nil {
18405 return nil, err
18406 }
18407 req.Header = reqHeaders
18408 googleapi.Expand(req.URL, map[string]string{
18409 "name": c.name,
18410 })
18411 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18412 }
18413
18414
18415
18416
18417
18418
18419 func (c *LocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
18420 gensupport.SetOptions(c.urlParams_, opts...)
18421 res, err := c.doRequest("json")
18422 if res != nil && res.StatusCode == http.StatusNotModified {
18423 if res.Body != nil {
18424 res.Body.Close()
18425 }
18426 return nil, gensupport.WrapError(&googleapi.Error{
18427 Code: res.StatusCode,
18428 Header: res.Header,
18429 })
18430 }
18431 if err != nil {
18432 return nil, err
18433 }
18434 defer googleapi.CloseBody(res)
18435 if err := googleapi.CheckResponse(res); err != nil {
18436 return nil, gensupport.WrapError(err)
18437 }
18438 ret := &Empty{
18439 ServerResponse: googleapi.ServerResponse{
18440 Header: res.Header,
18441 HTTPStatusCode: res.StatusCode,
18442 },
18443 }
18444 target := &ret
18445 if err := gensupport.DecodeResponse(target, res); err != nil {
18446 return nil, err
18447 }
18448 return ret, nil
18449 }
18450
18451 type LocationsBucketsViewsGetCall struct {
18452 s *Service
18453 name string
18454 urlParams_ gensupport.URLParams
18455 ifNoneMatch_ string
18456 ctx_ context.Context
18457 header_ http.Header
18458 }
18459
18460
18461
18462
18463
18464
18465
18466
18467 func (r *LocationsBucketsViewsService) Get(name string) *LocationsBucketsViewsGetCall {
18468 c := &LocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18469 c.name = name
18470 return c
18471 }
18472
18473
18474
18475
18476 func (c *LocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsGetCall {
18477 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18478 return c
18479 }
18480
18481
18482
18483
18484 func (c *LocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *LocationsBucketsViewsGetCall {
18485 c.ifNoneMatch_ = entityTag
18486 return c
18487 }
18488
18489
18490 func (c *LocationsBucketsViewsGetCall) Context(ctx context.Context) *LocationsBucketsViewsGetCall {
18491 c.ctx_ = ctx
18492 return c
18493 }
18494
18495
18496
18497 func (c *LocationsBucketsViewsGetCall) Header() http.Header {
18498 if c.header_ == nil {
18499 c.header_ = make(http.Header)
18500 }
18501 return c.header_
18502 }
18503
18504 func (c *LocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
18505 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18506 if c.ifNoneMatch_ != "" {
18507 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18508 }
18509 var body io.Reader = nil
18510 c.urlParams_.Set("alt", alt)
18511 c.urlParams_.Set("prettyPrint", "false")
18512 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
18513 urls += "?" + c.urlParams_.Encode()
18514 req, err := http.NewRequest("GET", urls, body)
18515 if err != nil {
18516 return nil, err
18517 }
18518 req.Header = reqHeaders
18519 googleapi.Expand(req.URL, map[string]string{
18520 "name": c.name,
18521 })
18522 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18523 }
18524
18525
18526
18527
18528
18529
18530 func (c *LocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
18531 gensupport.SetOptions(c.urlParams_, opts...)
18532 res, err := c.doRequest("json")
18533 if res != nil && res.StatusCode == http.StatusNotModified {
18534 if res.Body != nil {
18535 res.Body.Close()
18536 }
18537 return nil, gensupport.WrapError(&googleapi.Error{
18538 Code: res.StatusCode,
18539 Header: res.Header,
18540 })
18541 }
18542 if err != nil {
18543 return nil, err
18544 }
18545 defer googleapi.CloseBody(res)
18546 if err := googleapi.CheckResponse(res); err != nil {
18547 return nil, gensupport.WrapError(err)
18548 }
18549 ret := &LogView{
18550 ServerResponse: googleapi.ServerResponse{
18551 Header: res.Header,
18552 HTTPStatusCode: res.StatusCode,
18553 },
18554 }
18555 target := &ret
18556 if err := gensupport.DecodeResponse(target, res); err != nil {
18557 return nil, err
18558 }
18559 return ret, nil
18560 }
18561
18562 type LocationsBucketsViewsGetIamPolicyCall struct {
18563 s *Service
18564 resource string
18565 getiampolicyrequest *GetIamPolicyRequest
18566 urlParams_ gensupport.URLParams
18567 ctx_ context.Context
18568 header_ http.Header
18569 }
18570
18571
18572
18573
18574
18575
18576
18577 func (r *LocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *LocationsBucketsViewsGetIamPolicyCall {
18578 c := &LocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18579 c.resource = resource
18580 c.getiampolicyrequest = getiampolicyrequest
18581 return c
18582 }
18583
18584
18585
18586
18587 func (c *LocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsGetIamPolicyCall {
18588 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18589 return c
18590 }
18591
18592
18593 func (c *LocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *LocationsBucketsViewsGetIamPolicyCall {
18594 c.ctx_ = ctx
18595 return c
18596 }
18597
18598
18599
18600 func (c *LocationsBucketsViewsGetIamPolicyCall) Header() http.Header {
18601 if c.header_ == nil {
18602 c.header_ = make(http.Header)
18603 }
18604 return c.header_
18605 }
18606
18607 func (c *LocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
18608 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18609 var body io.Reader = nil
18610 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
18611 if err != nil {
18612 return nil, err
18613 }
18614 c.urlParams_.Set("alt", alt)
18615 c.urlParams_.Set("prettyPrint", "false")
18616 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
18617 urls += "?" + c.urlParams_.Encode()
18618 req, err := http.NewRequest("POST", urls, body)
18619 if err != nil {
18620 return nil, err
18621 }
18622 req.Header = reqHeaders
18623 googleapi.Expand(req.URL, map[string]string{
18624 "resource": c.resource,
18625 })
18626 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18627 }
18628
18629
18630
18631
18632
18633
18634 func (c *LocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
18635 gensupport.SetOptions(c.urlParams_, opts...)
18636 res, err := c.doRequest("json")
18637 if res != nil && res.StatusCode == http.StatusNotModified {
18638 if res.Body != nil {
18639 res.Body.Close()
18640 }
18641 return nil, gensupport.WrapError(&googleapi.Error{
18642 Code: res.StatusCode,
18643 Header: res.Header,
18644 })
18645 }
18646 if err != nil {
18647 return nil, err
18648 }
18649 defer googleapi.CloseBody(res)
18650 if err := googleapi.CheckResponse(res); err != nil {
18651 return nil, gensupport.WrapError(err)
18652 }
18653 ret := &Policy{
18654 ServerResponse: googleapi.ServerResponse{
18655 Header: res.Header,
18656 HTTPStatusCode: res.StatusCode,
18657 },
18658 }
18659 target := &ret
18660 if err := gensupport.DecodeResponse(target, res); err != nil {
18661 return nil, err
18662 }
18663 return ret, nil
18664 }
18665
18666 type LocationsBucketsViewsListCall struct {
18667 s *Service
18668 parent string
18669 urlParams_ gensupport.URLParams
18670 ifNoneMatch_ string
18671 ctx_ context.Context
18672 header_ http.Header
18673 }
18674
18675
18676
18677
18678
18679 func (r *LocationsBucketsViewsService) List(parent string) *LocationsBucketsViewsListCall {
18680 c := &LocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18681 c.parent = parent
18682 return c
18683 }
18684
18685
18686
18687
18688
18689 func (c *LocationsBucketsViewsListCall) PageSize(pageSize int64) *LocationsBucketsViewsListCall {
18690 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18691 return c
18692 }
18693
18694
18695
18696
18697
18698 func (c *LocationsBucketsViewsListCall) PageToken(pageToken string) *LocationsBucketsViewsListCall {
18699 c.urlParams_.Set("pageToken", pageToken)
18700 return c
18701 }
18702
18703
18704
18705
18706 func (c *LocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsListCall {
18707 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18708 return c
18709 }
18710
18711
18712
18713
18714 func (c *LocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *LocationsBucketsViewsListCall {
18715 c.ifNoneMatch_ = entityTag
18716 return c
18717 }
18718
18719
18720 func (c *LocationsBucketsViewsListCall) Context(ctx context.Context) *LocationsBucketsViewsListCall {
18721 c.ctx_ = ctx
18722 return c
18723 }
18724
18725
18726
18727 func (c *LocationsBucketsViewsListCall) Header() http.Header {
18728 if c.header_ == nil {
18729 c.header_ = make(http.Header)
18730 }
18731 return c.header_
18732 }
18733
18734 func (c *LocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
18735 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18736 if c.ifNoneMatch_ != "" {
18737 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18738 }
18739 var body io.Reader = nil
18740 c.urlParams_.Set("alt", alt)
18741 c.urlParams_.Set("prettyPrint", "false")
18742 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
18743 urls += "?" + c.urlParams_.Encode()
18744 req, err := http.NewRequest("GET", urls, body)
18745 if err != nil {
18746 return nil, err
18747 }
18748 req.Header = reqHeaders
18749 googleapi.Expand(req.URL, map[string]string{
18750 "parent": c.parent,
18751 })
18752 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18753 }
18754
18755
18756
18757
18758
18759
18760
18761 func (c *LocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
18762 gensupport.SetOptions(c.urlParams_, opts...)
18763 res, err := c.doRequest("json")
18764 if res != nil && res.StatusCode == http.StatusNotModified {
18765 if res.Body != nil {
18766 res.Body.Close()
18767 }
18768 return nil, gensupport.WrapError(&googleapi.Error{
18769 Code: res.StatusCode,
18770 Header: res.Header,
18771 })
18772 }
18773 if err != nil {
18774 return nil, err
18775 }
18776 defer googleapi.CloseBody(res)
18777 if err := googleapi.CheckResponse(res); err != nil {
18778 return nil, gensupport.WrapError(err)
18779 }
18780 ret := &ListViewsResponse{
18781 ServerResponse: googleapi.ServerResponse{
18782 Header: res.Header,
18783 HTTPStatusCode: res.StatusCode,
18784 },
18785 }
18786 target := &ret
18787 if err := gensupport.DecodeResponse(target, res); err != nil {
18788 return nil, err
18789 }
18790 return ret, nil
18791 }
18792
18793
18794
18795
18796 func (c *LocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
18797 c.ctx_ = ctx
18798 defer c.PageToken(c.urlParams_.Get("pageToken"))
18799 for {
18800 x, err := c.Do()
18801 if err != nil {
18802 return err
18803 }
18804 if err := f(x); err != nil {
18805 return err
18806 }
18807 if x.NextPageToken == "" {
18808 return nil
18809 }
18810 c.PageToken(x.NextPageToken)
18811 }
18812 }
18813
18814 type LocationsBucketsViewsPatchCall struct {
18815 s *Service
18816 name string
18817 logview *LogView
18818 urlParams_ gensupport.URLParams
18819 ctx_ context.Context
18820 header_ http.Header
18821 }
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834 func (r *LocationsBucketsViewsService) Patch(name string, logview *LogView) *LocationsBucketsViewsPatchCall {
18835 c := &LocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18836 c.name = name
18837 c.logview = logview
18838 return c
18839 }
18840
18841
18842
18843
18844
18845
18846
18847 func (c *LocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *LocationsBucketsViewsPatchCall {
18848 c.urlParams_.Set("updateMask", updateMask)
18849 return c
18850 }
18851
18852
18853
18854
18855 func (c *LocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsPatchCall {
18856 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18857 return c
18858 }
18859
18860
18861 func (c *LocationsBucketsViewsPatchCall) Context(ctx context.Context) *LocationsBucketsViewsPatchCall {
18862 c.ctx_ = ctx
18863 return c
18864 }
18865
18866
18867
18868 func (c *LocationsBucketsViewsPatchCall) Header() http.Header {
18869 if c.header_ == nil {
18870 c.header_ = make(http.Header)
18871 }
18872 return c.header_
18873 }
18874
18875 func (c *LocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
18876 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18877 var body io.Reader = nil
18878 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
18879 if err != nil {
18880 return nil, err
18881 }
18882 c.urlParams_.Set("alt", alt)
18883 c.urlParams_.Set("prettyPrint", "false")
18884 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
18885 urls += "?" + c.urlParams_.Encode()
18886 req, err := http.NewRequest("PATCH", urls, body)
18887 if err != nil {
18888 return nil, err
18889 }
18890 req.Header = reqHeaders
18891 googleapi.Expand(req.URL, map[string]string{
18892 "name": c.name,
18893 })
18894 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18895 }
18896
18897
18898
18899
18900
18901
18902 func (c *LocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
18903 gensupport.SetOptions(c.urlParams_, opts...)
18904 res, err := c.doRequest("json")
18905 if res != nil && res.StatusCode == http.StatusNotModified {
18906 if res.Body != nil {
18907 res.Body.Close()
18908 }
18909 return nil, gensupport.WrapError(&googleapi.Error{
18910 Code: res.StatusCode,
18911 Header: res.Header,
18912 })
18913 }
18914 if err != nil {
18915 return nil, err
18916 }
18917 defer googleapi.CloseBody(res)
18918 if err := googleapi.CheckResponse(res); err != nil {
18919 return nil, gensupport.WrapError(err)
18920 }
18921 ret := &LogView{
18922 ServerResponse: googleapi.ServerResponse{
18923 Header: res.Header,
18924 HTTPStatusCode: res.StatusCode,
18925 },
18926 }
18927 target := &ret
18928 if err := gensupport.DecodeResponse(target, res); err != nil {
18929 return nil, err
18930 }
18931 return ret, nil
18932 }
18933
18934 type LocationsBucketsViewsSetIamPolicyCall struct {
18935 s *Service
18936 resource string
18937 setiampolicyrequest *SetIamPolicyRequest
18938 urlParams_ gensupport.URLParams
18939 ctx_ context.Context
18940 header_ http.Header
18941 }
18942
18943
18944
18945
18946
18947
18948
18949
18950 func (r *LocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *LocationsBucketsViewsSetIamPolicyCall {
18951 c := &LocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18952 c.resource = resource
18953 c.setiampolicyrequest = setiampolicyrequest
18954 return c
18955 }
18956
18957
18958
18959
18960 func (c *LocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsSetIamPolicyCall {
18961 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18962 return c
18963 }
18964
18965
18966 func (c *LocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *LocationsBucketsViewsSetIamPolicyCall {
18967 c.ctx_ = ctx
18968 return c
18969 }
18970
18971
18972
18973 func (c *LocationsBucketsViewsSetIamPolicyCall) Header() http.Header {
18974 if c.header_ == nil {
18975 c.header_ = make(http.Header)
18976 }
18977 return c.header_
18978 }
18979
18980 func (c *LocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
18981 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18982 var body io.Reader = nil
18983 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
18984 if err != nil {
18985 return nil, err
18986 }
18987 c.urlParams_.Set("alt", alt)
18988 c.urlParams_.Set("prettyPrint", "false")
18989 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
18990 urls += "?" + c.urlParams_.Encode()
18991 req, err := http.NewRequest("POST", urls, body)
18992 if err != nil {
18993 return nil, err
18994 }
18995 req.Header = reqHeaders
18996 googleapi.Expand(req.URL, map[string]string{
18997 "resource": c.resource,
18998 })
18999 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19000 }
19001
19002
19003
19004
19005
19006
19007 func (c *LocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
19008 gensupport.SetOptions(c.urlParams_, opts...)
19009 res, err := c.doRequest("json")
19010 if res != nil && res.StatusCode == http.StatusNotModified {
19011 if res.Body != nil {
19012 res.Body.Close()
19013 }
19014 return nil, gensupport.WrapError(&googleapi.Error{
19015 Code: res.StatusCode,
19016 Header: res.Header,
19017 })
19018 }
19019 if err != nil {
19020 return nil, err
19021 }
19022 defer googleapi.CloseBody(res)
19023 if err := googleapi.CheckResponse(res); err != nil {
19024 return nil, gensupport.WrapError(err)
19025 }
19026 ret := &Policy{
19027 ServerResponse: googleapi.ServerResponse{
19028 Header: res.Header,
19029 HTTPStatusCode: res.StatusCode,
19030 },
19031 }
19032 target := &ret
19033 if err := gensupport.DecodeResponse(target, res); err != nil {
19034 return nil, err
19035 }
19036 return ret, nil
19037 }
19038
19039 type LocationsBucketsViewsTestIamPermissionsCall struct {
19040 s *Service
19041 resource string
19042 testiampermissionsrequest *TestIamPermissionsRequest
19043 urlParams_ gensupport.URLParams
19044 ctx_ context.Context
19045 header_ http.Header
19046 }
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058 func (r *LocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *LocationsBucketsViewsTestIamPermissionsCall {
19059 c := &LocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19060 c.resource = resource
19061 c.testiampermissionsrequest = testiampermissionsrequest
19062 return c
19063 }
19064
19065
19066
19067
19068 func (c *LocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsTestIamPermissionsCall {
19069 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19070 return c
19071 }
19072
19073
19074 func (c *LocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *LocationsBucketsViewsTestIamPermissionsCall {
19075 c.ctx_ = ctx
19076 return c
19077 }
19078
19079
19080
19081 func (c *LocationsBucketsViewsTestIamPermissionsCall) Header() http.Header {
19082 if c.header_ == nil {
19083 c.header_ = make(http.Header)
19084 }
19085 return c.header_
19086 }
19087
19088 func (c *LocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
19089 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19090 var body io.Reader = nil
19091 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
19092 if err != nil {
19093 return nil, err
19094 }
19095 c.urlParams_.Set("alt", alt)
19096 c.urlParams_.Set("prettyPrint", "false")
19097 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
19098 urls += "?" + c.urlParams_.Encode()
19099 req, err := http.NewRequest("POST", urls, body)
19100 if err != nil {
19101 return nil, err
19102 }
19103 req.Header = reqHeaders
19104 googleapi.Expand(req.URL, map[string]string{
19105 "resource": c.resource,
19106 })
19107 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19108 }
19109
19110
19111
19112
19113
19114
19115
19116 func (c *LocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
19117 gensupport.SetOptions(c.urlParams_, opts...)
19118 res, err := c.doRequest("json")
19119 if res != nil && res.StatusCode == http.StatusNotModified {
19120 if res.Body != nil {
19121 res.Body.Close()
19122 }
19123 return nil, gensupport.WrapError(&googleapi.Error{
19124 Code: res.StatusCode,
19125 Header: res.Header,
19126 })
19127 }
19128 if err != nil {
19129 return nil, err
19130 }
19131 defer googleapi.CloseBody(res)
19132 if err := googleapi.CheckResponse(res); err != nil {
19133 return nil, gensupport.WrapError(err)
19134 }
19135 ret := &TestIamPermissionsResponse{
19136 ServerResponse: googleapi.ServerResponse{
19137 Header: res.Header,
19138 HTTPStatusCode: res.StatusCode,
19139 },
19140 }
19141 target := &ret
19142 if err := gensupport.DecodeResponse(target, res); err != nil {
19143 return nil, err
19144 }
19145 return ret, nil
19146 }
19147
19148 type LocationsOperationsCancelCall struct {
19149 s *Service
19150 name string
19151 canceloperationrequest *CancelOperationRequest
19152 urlParams_ gensupport.URLParams
19153 ctx_ context.Context
19154 header_ http.Header
19155 }
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168 func (r *LocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *LocationsOperationsCancelCall {
19169 c := &LocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19170 c.name = name
19171 c.canceloperationrequest = canceloperationrequest
19172 return c
19173 }
19174
19175
19176
19177
19178 func (c *LocationsOperationsCancelCall) Fields(s ...googleapi.Field) *LocationsOperationsCancelCall {
19179 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19180 return c
19181 }
19182
19183
19184 func (c *LocationsOperationsCancelCall) Context(ctx context.Context) *LocationsOperationsCancelCall {
19185 c.ctx_ = ctx
19186 return c
19187 }
19188
19189
19190
19191 func (c *LocationsOperationsCancelCall) Header() http.Header {
19192 if c.header_ == nil {
19193 c.header_ = make(http.Header)
19194 }
19195 return c.header_
19196 }
19197
19198 func (c *LocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
19199 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19200 var body io.Reader = nil
19201 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
19202 if err != nil {
19203 return nil, err
19204 }
19205 c.urlParams_.Set("alt", alt)
19206 c.urlParams_.Set("prettyPrint", "false")
19207 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
19208 urls += "?" + c.urlParams_.Encode()
19209 req, err := http.NewRequest("POST", urls, body)
19210 if err != nil {
19211 return nil, err
19212 }
19213 req.Header = reqHeaders
19214 googleapi.Expand(req.URL, map[string]string{
19215 "name": c.name,
19216 })
19217 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19218 }
19219
19220
19221
19222
19223
19224
19225 func (c *LocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
19226 gensupport.SetOptions(c.urlParams_, opts...)
19227 res, err := c.doRequest("json")
19228 if res != nil && res.StatusCode == http.StatusNotModified {
19229 if res.Body != nil {
19230 res.Body.Close()
19231 }
19232 return nil, gensupport.WrapError(&googleapi.Error{
19233 Code: res.StatusCode,
19234 Header: res.Header,
19235 })
19236 }
19237 if err != nil {
19238 return nil, err
19239 }
19240 defer googleapi.CloseBody(res)
19241 if err := googleapi.CheckResponse(res); err != nil {
19242 return nil, gensupport.WrapError(err)
19243 }
19244 ret := &Empty{
19245 ServerResponse: googleapi.ServerResponse{
19246 Header: res.Header,
19247 HTTPStatusCode: res.StatusCode,
19248 },
19249 }
19250 target := &ret
19251 if err := gensupport.DecodeResponse(target, res); err != nil {
19252 return nil, err
19253 }
19254 return ret, nil
19255 }
19256
19257 type LocationsOperationsGetCall struct {
19258 s *Service
19259 name string
19260 urlParams_ gensupport.URLParams
19261 ifNoneMatch_ string
19262 ctx_ context.Context
19263 header_ http.Header
19264 }
19265
19266
19267
19268
19269
19270
19271 func (r *LocationsOperationsService) Get(name string) *LocationsOperationsGetCall {
19272 c := &LocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19273 c.name = name
19274 return c
19275 }
19276
19277
19278
19279
19280 func (c *LocationsOperationsGetCall) Fields(s ...googleapi.Field) *LocationsOperationsGetCall {
19281 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19282 return c
19283 }
19284
19285
19286
19287
19288 func (c *LocationsOperationsGetCall) IfNoneMatch(entityTag string) *LocationsOperationsGetCall {
19289 c.ifNoneMatch_ = entityTag
19290 return c
19291 }
19292
19293
19294 func (c *LocationsOperationsGetCall) Context(ctx context.Context) *LocationsOperationsGetCall {
19295 c.ctx_ = ctx
19296 return c
19297 }
19298
19299
19300
19301 func (c *LocationsOperationsGetCall) Header() http.Header {
19302 if c.header_ == nil {
19303 c.header_ = make(http.Header)
19304 }
19305 return c.header_
19306 }
19307
19308 func (c *LocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
19309 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19310 if c.ifNoneMatch_ != "" {
19311 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19312 }
19313 var body io.Reader = nil
19314 c.urlParams_.Set("alt", alt)
19315 c.urlParams_.Set("prettyPrint", "false")
19316 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
19317 urls += "?" + c.urlParams_.Encode()
19318 req, err := http.NewRequest("GET", urls, body)
19319 if err != nil {
19320 return nil, err
19321 }
19322 req.Header = reqHeaders
19323 googleapi.Expand(req.URL, map[string]string{
19324 "name": c.name,
19325 })
19326 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19327 }
19328
19329
19330
19331
19332
19333
19334 func (c *LocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19335 gensupport.SetOptions(c.urlParams_, opts...)
19336 res, err := c.doRequest("json")
19337 if res != nil && res.StatusCode == http.StatusNotModified {
19338 if res.Body != nil {
19339 res.Body.Close()
19340 }
19341 return nil, gensupport.WrapError(&googleapi.Error{
19342 Code: res.StatusCode,
19343 Header: res.Header,
19344 })
19345 }
19346 if err != nil {
19347 return nil, err
19348 }
19349 defer googleapi.CloseBody(res)
19350 if err := googleapi.CheckResponse(res); err != nil {
19351 return nil, gensupport.WrapError(err)
19352 }
19353 ret := &Operation{
19354 ServerResponse: googleapi.ServerResponse{
19355 Header: res.Header,
19356 HTTPStatusCode: res.StatusCode,
19357 },
19358 }
19359 target := &ret
19360 if err := gensupport.DecodeResponse(target, res); err != nil {
19361 return nil, err
19362 }
19363 return ret, nil
19364 }
19365
19366 type LocationsOperationsListCall struct {
19367 s *Service
19368 name string
19369 urlParams_ gensupport.URLParams
19370 ifNoneMatch_ string
19371 ctx_ context.Context
19372 header_ http.Header
19373 }
19374
19375
19376
19377
19378
19379 func (r *LocationsOperationsService) List(name string) *LocationsOperationsListCall {
19380 c := &LocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19381 c.name = name
19382 return c
19383 }
19384
19385
19386 func (c *LocationsOperationsListCall) Filter(filter string) *LocationsOperationsListCall {
19387 c.urlParams_.Set("filter", filter)
19388 return c
19389 }
19390
19391
19392
19393 func (c *LocationsOperationsListCall) PageSize(pageSize int64) *LocationsOperationsListCall {
19394 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19395 return c
19396 }
19397
19398
19399
19400 func (c *LocationsOperationsListCall) PageToken(pageToken string) *LocationsOperationsListCall {
19401 c.urlParams_.Set("pageToken", pageToken)
19402 return c
19403 }
19404
19405
19406
19407
19408 func (c *LocationsOperationsListCall) Fields(s ...googleapi.Field) *LocationsOperationsListCall {
19409 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19410 return c
19411 }
19412
19413
19414
19415
19416 func (c *LocationsOperationsListCall) IfNoneMatch(entityTag string) *LocationsOperationsListCall {
19417 c.ifNoneMatch_ = entityTag
19418 return c
19419 }
19420
19421
19422 func (c *LocationsOperationsListCall) Context(ctx context.Context) *LocationsOperationsListCall {
19423 c.ctx_ = ctx
19424 return c
19425 }
19426
19427
19428
19429 func (c *LocationsOperationsListCall) Header() http.Header {
19430 if c.header_ == nil {
19431 c.header_ = make(http.Header)
19432 }
19433 return c.header_
19434 }
19435
19436 func (c *LocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
19437 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19438 if c.ifNoneMatch_ != "" {
19439 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19440 }
19441 var body io.Reader = nil
19442 c.urlParams_.Set("alt", alt)
19443 c.urlParams_.Set("prettyPrint", "false")
19444 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
19445 urls += "?" + c.urlParams_.Encode()
19446 req, err := http.NewRequest("GET", urls, body)
19447 if err != nil {
19448 return nil, err
19449 }
19450 req.Header = reqHeaders
19451 googleapi.Expand(req.URL, map[string]string{
19452 "name": c.name,
19453 })
19454 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19455 }
19456
19457
19458
19459
19460
19461
19462
19463 func (c *LocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
19464 gensupport.SetOptions(c.urlParams_, opts...)
19465 res, err := c.doRequest("json")
19466 if res != nil && res.StatusCode == http.StatusNotModified {
19467 if res.Body != nil {
19468 res.Body.Close()
19469 }
19470 return nil, gensupport.WrapError(&googleapi.Error{
19471 Code: res.StatusCode,
19472 Header: res.Header,
19473 })
19474 }
19475 if err != nil {
19476 return nil, err
19477 }
19478 defer googleapi.CloseBody(res)
19479 if err := googleapi.CheckResponse(res); err != nil {
19480 return nil, gensupport.WrapError(err)
19481 }
19482 ret := &ListOperationsResponse{
19483 ServerResponse: googleapi.ServerResponse{
19484 Header: res.Header,
19485 HTTPStatusCode: res.StatusCode,
19486 },
19487 }
19488 target := &ret
19489 if err := gensupport.DecodeResponse(target, res); err != nil {
19490 return nil, err
19491 }
19492 return ret, nil
19493 }
19494
19495
19496
19497
19498 func (c *LocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
19499 c.ctx_ = ctx
19500 defer c.PageToken(c.urlParams_.Get("pageToken"))
19501 for {
19502 x, err := c.Do()
19503 if err != nil {
19504 return err
19505 }
19506 if err := f(x); err != nil {
19507 return err
19508 }
19509 if x.NextPageToken == "" {
19510 return nil
19511 }
19512 c.PageToken(x.NextPageToken)
19513 }
19514 }
19515
19516 type LogsDeleteCall struct {
19517 s *Service
19518 logName string
19519 urlParams_ gensupport.URLParams
19520 ctx_ context.Context
19521 header_ http.Header
19522 }
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537 func (r *LogsService) Delete(logName string) *LogsDeleteCall {
19538 c := &LogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19539 c.logName = logName
19540 return c
19541 }
19542
19543
19544
19545
19546 func (c *LogsDeleteCall) Fields(s ...googleapi.Field) *LogsDeleteCall {
19547 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19548 return c
19549 }
19550
19551
19552 func (c *LogsDeleteCall) Context(ctx context.Context) *LogsDeleteCall {
19553 c.ctx_ = ctx
19554 return c
19555 }
19556
19557
19558
19559 func (c *LogsDeleteCall) Header() http.Header {
19560 if c.header_ == nil {
19561 c.header_ = make(http.Header)
19562 }
19563 return c.header_
19564 }
19565
19566 func (c *LogsDeleteCall) doRequest(alt string) (*http.Response, error) {
19567 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19568 var body io.Reader = nil
19569 c.urlParams_.Set("alt", alt)
19570 c.urlParams_.Set("prettyPrint", "false")
19571 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
19572 urls += "?" + c.urlParams_.Encode()
19573 req, err := http.NewRequest("DELETE", urls, body)
19574 if err != nil {
19575 return nil, err
19576 }
19577 req.Header = reqHeaders
19578 googleapi.Expand(req.URL, map[string]string{
19579 "logName": c.logName,
19580 })
19581 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19582 }
19583
19584
19585
19586
19587
19588
19589 func (c *LogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
19590 gensupport.SetOptions(c.urlParams_, opts...)
19591 res, err := c.doRequest("json")
19592 if res != nil && res.StatusCode == http.StatusNotModified {
19593 if res.Body != nil {
19594 res.Body.Close()
19595 }
19596 return nil, gensupport.WrapError(&googleapi.Error{
19597 Code: res.StatusCode,
19598 Header: res.Header,
19599 })
19600 }
19601 if err != nil {
19602 return nil, err
19603 }
19604 defer googleapi.CloseBody(res)
19605 if err := googleapi.CheckResponse(res); err != nil {
19606 return nil, gensupport.WrapError(err)
19607 }
19608 ret := &Empty{
19609 ServerResponse: googleapi.ServerResponse{
19610 Header: res.Header,
19611 HTTPStatusCode: res.StatusCode,
19612 },
19613 }
19614 target := &ret
19615 if err := gensupport.DecodeResponse(target, res); err != nil {
19616 return nil, err
19617 }
19618 return ret, nil
19619 }
19620
19621 type LogsListCall struct {
19622 s *Service
19623 parent string
19624 urlParams_ gensupport.URLParams
19625 ifNoneMatch_ string
19626 ctx_ context.Context
19627 header_ http.Header
19628 }
19629
19630
19631
19632
19633
19634
19635
19636 func (r *LogsService) List(parent string) *LogsListCall {
19637 c := &LogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19638 c.parent = parent
19639 return c
19640 }
19641
19642
19643
19644
19645
19646 func (c *LogsListCall) PageSize(pageSize int64) *LogsListCall {
19647 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19648 return c
19649 }
19650
19651
19652
19653
19654
19655 func (c *LogsListCall) PageToken(pageToken string) *LogsListCall {
19656 c.urlParams_.Set("pageToken", pageToken)
19657 return c
19658 }
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673 func (c *LogsListCall) ResourceNames(resourceNames ...string) *LogsListCall {
19674 c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
19675 return c
19676 }
19677
19678
19679
19680
19681 func (c *LogsListCall) Fields(s ...googleapi.Field) *LogsListCall {
19682 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19683 return c
19684 }
19685
19686
19687
19688
19689 func (c *LogsListCall) IfNoneMatch(entityTag string) *LogsListCall {
19690 c.ifNoneMatch_ = entityTag
19691 return c
19692 }
19693
19694
19695 func (c *LogsListCall) Context(ctx context.Context) *LogsListCall {
19696 c.ctx_ = ctx
19697 return c
19698 }
19699
19700
19701
19702 func (c *LogsListCall) Header() http.Header {
19703 if c.header_ == nil {
19704 c.header_ = make(http.Header)
19705 }
19706 return c.header_
19707 }
19708
19709 func (c *LogsListCall) doRequest(alt string) (*http.Response, error) {
19710 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19711 if c.ifNoneMatch_ != "" {
19712 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19713 }
19714 var body io.Reader = nil
19715 c.urlParams_.Set("alt", alt)
19716 c.urlParams_.Set("prettyPrint", "false")
19717 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
19718 urls += "?" + c.urlParams_.Encode()
19719 req, err := http.NewRequest("GET", urls, body)
19720 if err != nil {
19721 return nil, err
19722 }
19723 req.Header = reqHeaders
19724 googleapi.Expand(req.URL, map[string]string{
19725 "parent": c.parent,
19726 })
19727 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19728 }
19729
19730
19731
19732
19733
19734
19735
19736 func (c *LogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
19737 gensupport.SetOptions(c.urlParams_, opts...)
19738 res, err := c.doRequest("json")
19739 if res != nil && res.StatusCode == http.StatusNotModified {
19740 if res.Body != nil {
19741 res.Body.Close()
19742 }
19743 return nil, gensupport.WrapError(&googleapi.Error{
19744 Code: res.StatusCode,
19745 Header: res.Header,
19746 })
19747 }
19748 if err != nil {
19749 return nil, err
19750 }
19751 defer googleapi.CloseBody(res)
19752 if err := googleapi.CheckResponse(res); err != nil {
19753 return nil, gensupport.WrapError(err)
19754 }
19755 ret := &ListLogsResponse{
19756 ServerResponse: googleapi.ServerResponse{
19757 Header: res.Header,
19758 HTTPStatusCode: res.StatusCode,
19759 },
19760 }
19761 target := &ret
19762 if err := gensupport.DecodeResponse(target, res); err != nil {
19763 return nil, err
19764 }
19765 return ret, nil
19766 }
19767
19768
19769
19770
19771 func (c *LogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
19772 c.ctx_ = ctx
19773 defer c.PageToken(c.urlParams_.Get("pageToken"))
19774 for {
19775 x, err := c.Do()
19776 if err != nil {
19777 return err
19778 }
19779 if err := f(x); err != nil {
19780 return err
19781 }
19782 if x.NextPageToken == "" {
19783 return nil
19784 }
19785 c.PageToken(x.NextPageToken)
19786 }
19787 }
19788
19789 type MonitoredResourceDescriptorsListCall struct {
19790 s *Service
19791 urlParams_ gensupport.URLParams
19792 ifNoneMatch_ string
19793 ctx_ context.Context
19794 header_ http.Header
19795 }
19796
19797
19798 func (r *MonitoredResourceDescriptorsService) List() *MonitoredResourceDescriptorsListCall {
19799 c := &MonitoredResourceDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19800 return c
19801 }
19802
19803
19804
19805
19806
19807 func (c *MonitoredResourceDescriptorsListCall) PageSize(pageSize int64) *MonitoredResourceDescriptorsListCall {
19808 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19809 return c
19810 }
19811
19812
19813
19814
19815
19816 func (c *MonitoredResourceDescriptorsListCall) PageToken(pageToken string) *MonitoredResourceDescriptorsListCall {
19817 c.urlParams_.Set("pageToken", pageToken)
19818 return c
19819 }
19820
19821
19822
19823
19824 func (c *MonitoredResourceDescriptorsListCall) Fields(s ...googleapi.Field) *MonitoredResourceDescriptorsListCall {
19825 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19826 return c
19827 }
19828
19829
19830
19831
19832 func (c *MonitoredResourceDescriptorsListCall) IfNoneMatch(entityTag string) *MonitoredResourceDescriptorsListCall {
19833 c.ifNoneMatch_ = entityTag
19834 return c
19835 }
19836
19837
19838 func (c *MonitoredResourceDescriptorsListCall) Context(ctx context.Context) *MonitoredResourceDescriptorsListCall {
19839 c.ctx_ = ctx
19840 return c
19841 }
19842
19843
19844
19845 func (c *MonitoredResourceDescriptorsListCall) Header() http.Header {
19846 if c.header_ == nil {
19847 c.header_ = make(http.Header)
19848 }
19849 return c.header_
19850 }
19851
19852 func (c *MonitoredResourceDescriptorsListCall) doRequest(alt string) (*http.Response, error) {
19853 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19854 if c.ifNoneMatch_ != "" {
19855 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19856 }
19857 var body io.Reader = nil
19858 c.urlParams_.Set("alt", alt)
19859 c.urlParams_.Set("prettyPrint", "false")
19860 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/monitoredResourceDescriptors")
19861 urls += "?" + c.urlParams_.Encode()
19862 req, err := http.NewRequest("GET", urls, body)
19863 if err != nil {
19864 return nil, err
19865 }
19866 req.Header = reqHeaders
19867 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19868 }
19869
19870
19871
19872
19873
19874
19875
19876 func (c *MonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) {
19877 gensupport.SetOptions(c.urlParams_, opts...)
19878 res, err := c.doRequest("json")
19879 if res != nil && res.StatusCode == http.StatusNotModified {
19880 if res.Body != nil {
19881 res.Body.Close()
19882 }
19883 return nil, gensupport.WrapError(&googleapi.Error{
19884 Code: res.StatusCode,
19885 Header: res.Header,
19886 })
19887 }
19888 if err != nil {
19889 return nil, err
19890 }
19891 defer googleapi.CloseBody(res)
19892 if err := googleapi.CheckResponse(res); err != nil {
19893 return nil, gensupport.WrapError(err)
19894 }
19895 ret := &ListMonitoredResourceDescriptorsResponse{
19896 ServerResponse: googleapi.ServerResponse{
19897 Header: res.Header,
19898 HTTPStatusCode: res.StatusCode,
19899 },
19900 }
19901 target := &ret
19902 if err := gensupport.DecodeResponse(target, res); err != nil {
19903 return nil, err
19904 }
19905 return ret, nil
19906 }
19907
19908
19909
19910
19911 func (c *MonitoredResourceDescriptorsListCall) Pages(ctx context.Context, f func(*ListMonitoredResourceDescriptorsResponse) error) error {
19912 c.ctx_ = ctx
19913 defer c.PageToken(c.urlParams_.Get("pageToken"))
19914 for {
19915 x, err := c.Do()
19916 if err != nil {
19917 return err
19918 }
19919 if err := f(x); err != nil {
19920 return err
19921 }
19922 if x.NextPageToken == "" {
19923 return nil
19924 }
19925 c.PageToken(x.NextPageToken)
19926 }
19927 }
19928
19929 type OrganizationsGetCmekSettingsCall struct {
19930 s *Service
19931 name string
19932 urlParams_ gensupport.URLParams
19933 ifNoneMatch_ string
19934 ctx_ context.Context
19935 header_ http.Header
19936 }
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955 func (r *OrganizationsService) GetCmekSettings(name string) *OrganizationsGetCmekSettingsCall {
19956 c := &OrganizationsGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19957 c.name = name
19958 return c
19959 }
19960
19961
19962
19963
19964 func (c *OrganizationsGetCmekSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetCmekSettingsCall {
19965 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19966 return c
19967 }
19968
19969
19970
19971
19972 func (c *OrganizationsGetCmekSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetCmekSettingsCall {
19973 c.ifNoneMatch_ = entityTag
19974 return c
19975 }
19976
19977
19978 func (c *OrganizationsGetCmekSettingsCall) Context(ctx context.Context) *OrganizationsGetCmekSettingsCall {
19979 c.ctx_ = ctx
19980 return c
19981 }
19982
19983
19984
19985 func (c *OrganizationsGetCmekSettingsCall) Header() http.Header {
19986 if c.header_ == nil {
19987 c.header_ = make(http.Header)
19988 }
19989 return c.header_
19990 }
19991
19992 func (c *OrganizationsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
19993 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19994 if c.ifNoneMatch_ != "" {
19995 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19996 }
19997 var body io.Reader = nil
19998 c.urlParams_.Set("alt", alt)
19999 c.urlParams_.Set("prettyPrint", "false")
20000 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
20001 urls += "?" + c.urlParams_.Encode()
20002 req, err := http.NewRequest("GET", urls, body)
20003 if err != nil {
20004 return nil, err
20005 }
20006 req.Header = reqHeaders
20007 googleapi.Expand(req.URL, map[string]string{
20008 "name": c.name,
20009 })
20010 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20011 }
20012
20013
20014
20015
20016
20017
20018 func (c *OrganizationsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
20019 gensupport.SetOptions(c.urlParams_, opts...)
20020 res, err := c.doRequest("json")
20021 if res != nil && res.StatusCode == http.StatusNotModified {
20022 if res.Body != nil {
20023 res.Body.Close()
20024 }
20025 return nil, gensupport.WrapError(&googleapi.Error{
20026 Code: res.StatusCode,
20027 Header: res.Header,
20028 })
20029 }
20030 if err != nil {
20031 return nil, err
20032 }
20033 defer googleapi.CloseBody(res)
20034 if err := googleapi.CheckResponse(res); err != nil {
20035 return nil, gensupport.WrapError(err)
20036 }
20037 ret := &CmekSettings{
20038 ServerResponse: googleapi.ServerResponse{
20039 Header: res.Header,
20040 HTTPStatusCode: res.StatusCode,
20041 },
20042 }
20043 target := &ret
20044 if err := gensupport.DecodeResponse(target, res); err != nil {
20045 return nil, err
20046 }
20047 return ret, nil
20048 }
20049
20050 type OrganizationsGetSettingsCall struct {
20051 s *Service
20052 name string
20053 urlParams_ gensupport.URLParams
20054 ifNoneMatch_ string
20055 ctx_ context.Context
20056 header_ http.Header
20057 }
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072 func (r *OrganizationsService) GetSettings(name string) *OrganizationsGetSettingsCall {
20073 c := &OrganizationsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20074 c.name = name
20075 return c
20076 }
20077
20078
20079
20080
20081 func (c *OrganizationsGetSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetSettingsCall {
20082 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20083 return c
20084 }
20085
20086
20087
20088
20089 func (c *OrganizationsGetSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetSettingsCall {
20090 c.ifNoneMatch_ = entityTag
20091 return c
20092 }
20093
20094
20095 func (c *OrganizationsGetSettingsCall) Context(ctx context.Context) *OrganizationsGetSettingsCall {
20096 c.ctx_ = ctx
20097 return c
20098 }
20099
20100
20101
20102 func (c *OrganizationsGetSettingsCall) Header() http.Header {
20103 if c.header_ == nil {
20104 c.header_ = make(http.Header)
20105 }
20106 return c.header_
20107 }
20108
20109 func (c *OrganizationsGetSettingsCall) doRequest(alt string) (*http.Response, error) {
20110 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20111 if c.ifNoneMatch_ != "" {
20112 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20113 }
20114 var body io.Reader = nil
20115 c.urlParams_.Set("alt", alt)
20116 c.urlParams_.Set("prettyPrint", "false")
20117 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
20118 urls += "?" + c.urlParams_.Encode()
20119 req, err := http.NewRequest("GET", urls, body)
20120 if err != nil {
20121 return nil, err
20122 }
20123 req.Header = reqHeaders
20124 googleapi.Expand(req.URL, map[string]string{
20125 "name": c.name,
20126 })
20127 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20128 }
20129
20130
20131
20132
20133
20134
20135 func (c *OrganizationsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
20136 gensupport.SetOptions(c.urlParams_, opts...)
20137 res, err := c.doRequest("json")
20138 if res != nil && res.StatusCode == http.StatusNotModified {
20139 if res.Body != nil {
20140 res.Body.Close()
20141 }
20142 return nil, gensupport.WrapError(&googleapi.Error{
20143 Code: res.StatusCode,
20144 Header: res.Header,
20145 })
20146 }
20147 if err != nil {
20148 return nil, err
20149 }
20150 defer googleapi.CloseBody(res)
20151 if err := googleapi.CheckResponse(res); err != nil {
20152 return nil, gensupport.WrapError(err)
20153 }
20154 ret := &Settings{
20155 ServerResponse: googleapi.ServerResponse{
20156 Header: res.Header,
20157 HTTPStatusCode: res.StatusCode,
20158 },
20159 }
20160 target := &ret
20161 if err := gensupport.DecodeResponse(target, res); err != nil {
20162 return nil, err
20163 }
20164 return ret, nil
20165 }
20166
20167 type OrganizationsUpdateCmekSettingsCall struct {
20168 s *Service
20169 name string
20170 cmeksettings *CmekSettings
20171 urlParams_ gensupport.URLParams
20172 ctx_ context.Context
20173 header_ http.Header
20174 }
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196 func (r *OrganizationsService) UpdateCmekSettings(name string, cmeksettings *CmekSettings) *OrganizationsUpdateCmekSettingsCall {
20197 c := &OrganizationsUpdateCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20198 c.name = name
20199 c.cmeksettings = cmeksettings
20200 return c
20201 }
20202
20203
20204
20205
20206
20207
20208 func (c *OrganizationsUpdateCmekSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateCmekSettingsCall {
20209 c.urlParams_.Set("updateMask", updateMask)
20210 return c
20211 }
20212
20213
20214
20215
20216 func (c *OrganizationsUpdateCmekSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateCmekSettingsCall {
20217 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20218 return c
20219 }
20220
20221
20222 func (c *OrganizationsUpdateCmekSettingsCall) Context(ctx context.Context) *OrganizationsUpdateCmekSettingsCall {
20223 c.ctx_ = ctx
20224 return c
20225 }
20226
20227
20228
20229 func (c *OrganizationsUpdateCmekSettingsCall) Header() http.Header {
20230 if c.header_ == nil {
20231 c.header_ = make(http.Header)
20232 }
20233 return c.header_
20234 }
20235
20236 func (c *OrganizationsUpdateCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
20237 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20238 var body io.Reader = nil
20239 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cmeksettings)
20240 if err != nil {
20241 return nil, err
20242 }
20243 c.urlParams_.Set("alt", alt)
20244 c.urlParams_.Set("prettyPrint", "false")
20245 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
20246 urls += "?" + c.urlParams_.Encode()
20247 req, err := http.NewRequest("PATCH", urls, body)
20248 if err != nil {
20249 return nil, err
20250 }
20251 req.Header = reqHeaders
20252 googleapi.Expand(req.URL, map[string]string{
20253 "name": c.name,
20254 })
20255 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20256 }
20257
20258
20259
20260
20261
20262
20263 func (c *OrganizationsUpdateCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
20264 gensupport.SetOptions(c.urlParams_, opts...)
20265 res, err := c.doRequest("json")
20266 if res != nil && res.StatusCode == http.StatusNotModified {
20267 if res.Body != nil {
20268 res.Body.Close()
20269 }
20270 return nil, gensupport.WrapError(&googleapi.Error{
20271 Code: res.StatusCode,
20272 Header: res.Header,
20273 })
20274 }
20275 if err != nil {
20276 return nil, err
20277 }
20278 defer googleapi.CloseBody(res)
20279 if err := googleapi.CheckResponse(res); err != nil {
20280 return nil, gensupport.WrapError(err)
20281 }
20282 ret := &CmekSettings{
20283 ServerResponse: googleapi.ServerResponse{
20284 Header: res.Header,
20285 HTTPStatusCode: res.StatusCode,
20286 },
20287 }
20288 target := &ret
20289 if err := gensupport.DecodeResponse(target, res); err != nil {
20290 return nil, err
20291 }
20292 return ret, nil
20293 }
20294
20295 type OrganizationsUpdateSettingsCall struct {
20296 s *Service
20297 name string
20298 settings *Settings
20299 urlParams_ gensupport.URLParams
20300 ctx_ context.Context
20301 header_ http.Header
20302 }
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319 func (r *OrganizationsService) UpdateSettings(name string, settings *Settings) *OrganizationsUpdateSettingsCall {
20320 c := &OrganizationsUpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20321 c.name = name
20322 c.settings = settings
20323 return c
20324 }
20325
20326
20327
20328
20329
20330
20331 func (c *OrganizationsUpdateSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateSettingsCall {
20332 c.urlParams_.Set("updateMask", updateMask)
20333 return c
20334 }
20335
20336
20337
20338
20339 func (c *OrganizationsUpdateSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateSettingsCall {
20340 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20341 return c
20342 }
20343
20344
20345 func (c *OrganizationsUpdateSettingsCall) Context(ctx context.Context) *OrganizationsUpdateSettingsCall {
20346 c.ctx_ = ctx
20347 return c
20348 }
20349
20350
20351
20352 func (c *OrganizationsUpdateSettingsCall) Header() http.Header {
20353 if c.header_ == nil {
20354 c.header_ = make(http.Header)
20355 }
20356 return c.header_
20357 }
20358
20359 func (c *OrganizationsUpdateSettingsCall) doRequest(alt string) (*http.Response, error) {
20360 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20361 var body io.Reader = nil
20362 body, err := googleapi.WithoutDataWrapper.JSONReader(c.settings)
20363 if err != nil {
20364 return nil, err
20365 }
20366 c.urlParams_.Set("alt", alt)
20367 c.urlParams_.Set("prettyPrint", "false")
20368 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
20369 urls += "?" + c.urlParams_.Encode()
20370 req, err := http.NewRequest("PATCH", urls, body)
20371 if err != nil {
20372 return nil, err
20373 }
20374 req.Header = reqHeaders
20375 googleapi.Expand(req.URL, map[string]string{
20376 "name": c.name,
20377 })
20378 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20379 }
20380
20381
20382
20383
20384
20385
20386 func (c *OrganizationsUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
20387 gensupport.SetOptions(c.urlParams_, opts...)
20388 res, err := c.doRequest("json")
20389 if res != nil && res.StatusCode == http.StatusNotModified {
20390 if res.Body != nil {
20391 res.Body.Close()
20392 }
20393 return nil, gensupport.WrapError(&googleapi.Error{
20394 Code: res.StatusCode,
20395 Header: res.Header,
20396 })
20397 }
20398 if err != nil {
20399 return nil, err
20400 }
20401 defer googleapi.CloseBody(res)
20402 if err := googleapi.CheckResponse(res); err != nil {
20403 return nil, gensupport.WrapError(err)
20404 }
20405 ret := &Settings{
20406 ServerResponse: googleapi.ServerResponse{
20407 Header: res.Header,
20408 HTTPStatusCode: res.StatusCode,
20409 },
20410 }
20411 target := &ret
20412 if err := gensupport.DecodeResponse(target, res); err != nil {
20413 return nil, err
20414 }
20415 return ret, nil
20416 }
20417
20418 type OrganizationsExclusionsCreateCall struct {
20419 s *Service
20420 parent string
20421 logexclusion *LogExclusion
20422 urlParams_ gensupport.URLParams
20423 ctx_ context.Context
20424 header_ http.Header
20425 }
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435 func (r *OrganizationsExclusionsService) Create(parent string, logexclusion *LogExclusion) *OrganizationsExclusionsCreateCall {
20436 c := &OrganizationsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20437 c.parent = parent
20438 c.logexclusion = logexclusion
20439 return c
20440 }
20441
20442
20443
20444
20445 func (c *OrganizationsExclusionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsCreateCall {
20446 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20447 return c
20448 }
20449
20450
20451 func (c *OrganizationsExclusionsCreateCall) Context(ctx context.Context) *OrganizationsExclusionsCreateCall {
20452 c.ctx_ = ctx
20453 return c
20454 }
20455
20456
20457
20458 func (c *OrganizationsExclusionsCreateCall) Header() http.Header {
20459 if c.header_ == nil {
20460 c.header_ = make(http.Header)
20461 }
20462 return c.header_
20463 }
20464
20465 func (c *OrganizationsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
20466 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20467 var body io.Reader = nil
20468 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
20469 if err != nil {
20470 return nil, err
20471 }
20472 c.urlParams_.Set("alt", alt)
20473 c.urlParams_.Set("prettyPrint", "false")
20474 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
20475 urls += "?" + c.urlParams_.Encode()
20476 req, err := http.NewRequest("POST", urls, body)
20477 if err != nil {
20478 return nil, err
20479 }
20480 req.Header = reqHeaders
20481 googleapi.Expand(req.URL, map[string]string{
20482 "parent": c.parent,
20483 })
20484 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20485 }
20486
20487
20488
20489
20490
20491
20492 func (c *OrganizationsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
20493 gensupport.SetOptions(c.urlParams_, opts...)
20494 res, err := c.doRequest("json")
20495 if res != nil && res.StatusCode == http.StatusNotModified {
20496 if res.Body != nil {
20497 res.Body.Close()
20498 }
20499 return nil, gensupport.WrapError(&googleapi.Error{
20500 Code: res.StatusCode,
20501 Header: res.Header,
20502 })
20503 }
20504 if err != nil {
20505 return nil, err
20506 }
20507 defer googleapi.CloseBody(res)
20508 if err := googleapi.CheckResponse(res); err != nil {
20509 return nil, gensupport.WrapError(err)
20510 }
20511 ret := &LogExclusion{
20512 ServerResponse: googleapi.ServerResponse{
20513 Header: res.Header,
20514 HTTPStatusCode: res.StatusCode,
20515 },
20516 }
20517 target := &ret
20518 if err := gensupport.DecodeResponse(target, res); err != nil {
20519 return nil, err
20520 }
20521 return ret, nil
20522 }
20523
20524 type OrganizationsExclusionsDeleteCall struct {
20525 s *Service
20526 name string
20527 urlParams_ gensupport.URLParams
20528 ctx_ context.Context
20529 header_ http.Header
20530 }
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540 func (r *OrganizationsExclusionsService) Delete(name string) *OrganizationsExclusionsDeleteCall {
20541 c := &OrganizationsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20542 c.name = name
20543 return c
20544 }
20545
20546
20547
20548
20549 func (c *OrganizationsExclusionsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsDeleteCall {
20550 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20551 return c
20552 }
20553
20554
20555 func (c *OrganizationsExclusionsDeleteCall) Context(ctx context.Context) *OrganizationsExclusionsDeleteCall {
20556 c.ctx_ = ctx
20557 return c
20558 }
20559
20560
20561
20562 func (c *OrganizationsExclusionsDeleteCall) Header() http.Header {
20563 if c.header_ == nil {
20564 c.header_ = make(http.Header)
20565 }
20566 return c.header_
20567 }
20568
20569 func (c *OrganizationsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
20570 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20571 var body io.Reader = nil
20572 c.urlParams_.Set("alt", alt)
20573 c.urlParams_.Set("prettyPrint", "false")
20574 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
20575 urls += "?" + c.urlParams_.Encode()
20576 req, err := http.NewRequest("DELETE", urls, body)
20577 if err != nil {
20578 return nil, err
20579 }
20580 req.Header = reqHeaders
20581 googleapi.Expand(req.URL, map[string]string{
20582 "name": c.name,
20583 })
20584 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20585 }
20586
20587
20588
20589
20590
20591
20592 func (c *OrganizationsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
20593 gensupport.SetOptions(c.urlParams_, opts...)
20594 res, err := c.doRequest("json")
20595 if res != nil && res.StatusCode == http.StatusNotModified {
20596 if res.Body != nil {
20597 res.Body.Close()
20598 }
20599 return nil, gensupport.WrapError(&googleapi.Error{
20600 Code: res.StatusCode,
20601 Header: res.Header,
20602 })
20603 }
20604 if err != nil {
20605 return nil, err
20606 }
20607 defer googleapi.CloseBody(res)
20608 if err := googleapi.CheckResponse(res); err != nil {
20609 return nil, gensupport.WrapError(err)
20610 }
20611 ret := &Empty{
20612 ServerResponse: googleapi.ServerResponse{
20613 Header: res.Header,
20614 HTTPStatusCode: res.StatusCode,
20615 },
20616 }
20617 target := &ret
20618 if err := gensupport.DecodeResponse(target, res); err != nil {
20619 return nil, err
20620 }
20621 return ret, nil
20622 }
20623
20624 type OrganizationsExclusionsGetCall struct {
20625 s *Service
20626 name string
20627 urlParams_ gensupport.URLParams
20628 ifNoneMatch_ string
20629 ctx_ context.Context
20630 header_ http.Header
20631 }
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641 func (r *OrganizationsExclusionsService) Get(name string) *OrganizationsExclusionsGetCall {
20642 c := &OrganizationsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20643 c.name = name
20644 return c
20645 }
20646
20647
20648
20649
20650 func (c *OrganizationsExclusionsGetCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsGetCall {
20651 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20652 return c
20653 }
20654
20655
20656
20657
20658 func (c *OrganizationsExclusionsGetCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsGetCall {
20659 c.ifNoneMatch_ = entityTag
20660 return c
20661 }
20662
20663
20664 func (c *OrganizationsExclusionsGetCall) Context(ctx context.Context) *OrganizationsExclusionsGetCall {
20665 c.ctx_ = ctx
20666 return c
20667 }
20668
20669
20670
20671 func (c *OrganizationsExclusionsGetCall) Header() http.Header {
20672 if c.header_ == nil {
20673 c.header_ = make(http.Header)
20674 }
20675 return c.header_
20676 }
20677
20678 func (c *OrganizationsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
20679 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20680 if c.ifNoneMatch_ != "" {
20681 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20682 }
20683 var body io.Reader = nil
20684 c.urlParams_.Set("alt", alt)
20685 c.urlParams_.Set("prettyPrint", "false")
20686 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
20687 urls += "?" + c.urlParams_.Encode()
20688 req, err := http.NewRequest("GET", urls, body)
20689 if err != nil {
20690 return nil, err
20691 }
20692 req.Header = reqHeaders
20693 googleapi.Expand(req.URL, map[string]string{
20694 "name": c.name,
20695 })
20696 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20697 }
20698
20699
20700
20701
20702
20703
20704 func (c *OrganizationsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
20705 gensupport.SetOptions(c.urlParams_, opts...)
20706 res, err := c.doRequest("json")
20707 if res != nil && res.StatusCode == http.StatusNotModified {
20708 if res.Body != nil {
20709 res.Body.Close()
20710 }
20711 return nil, gensupport.WrapError(&googleapi.Error{
20712 Code: res.StatusCode,
20713 Header: res.Header,
20714 })
20715 }
20716 if err != nil {
20717 return nil, err
20718 }
20719 defer googleapi.CloseBody(res)
20720 if err := googleapi.CheckResponse(res); err != nil {
20721 return nil, gensupport.WrapError(err)
20722 }
20723 ret := &LogExclusion{
20724 ServerResponse: googleapi.ServerResponse{
20725 Header: res.Header,
20726 HTTPStatusCode: res.StatusCode,
20727 },
20728 }
20729 target := &ret
20730 if err := gensupport.DecodeResponse(target, res); err != nil {
20731 return nil, err
20732 }
20733 return ret, nil
20734 }
20735
20736 type OrganizationsExclusionsListCall struct {
20737 s *Service
20738 parent string
20739 urlParams_ gensupport.URLParams
20740 ifNoneMatch_ string
20741 ctx_ context.Context
20742 header_ http.Header
20743 }
20744
20745
20746
20747
20748
20749
20750 func (r *OrganizationsExclusionsService) List(parent string) *OrganizationsExclusionsListCall {
20751 c := &OrganizationsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20752 c.parent = parent
20753 return c
20754 }
20755
20756
20757
20758
20759
20760 func (c *OrganizationsExclusionsListCall) PageSize(pageSize int64) *OrganizationsExclusionsListCall {
20761 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
20762 return c
20763 }
20764
20765
20766
20767
20768
20769 func (c *OrganizationsExclusionsListCall) PageToken(pageToken string) *OrganizationsExclusionsListCall {
20770 c.urlParams_.Set("pageToken", pageToken)
20771 return c
20772 }
20773
20774
20775
20776
20777 func (c *OrganizationsExclusionsListCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsListCall {
20778 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20779 return c
20780 }
20781
20782
20783
20784
20785 func (c *OrganizationsExclusionsListCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsListCall {
20786 c.ifNoneMatch_ = entityTag
20787 return c
20788 }
20789
20790
20791 func (c *OrganizationsExclusionsListCall) Context(ctx context.Context) *OrganizationsExclusionsListCall {
20792 c.ctx_ = ctx
20793 return c
20794 }
20795
20796
20797
20798 func (c *OrganizationsExclusionsListCall) Header() http.Header {
20799 if c.header_ == nil {
20800 c.header_ = make(http.Header)
20801 }
20802 return c.header_
20803 }
20804
20805 func (c *OrganizationsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
20806 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20807 if c.ifNoneMatch_ != "" {
20808 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20809 }
20810 var body io.Reader = nil
20811 c.urlParams_.Set("alt", alt)
20812 c.urlParams_.Set("prettyPrint", "false")
20813 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
20814 urls += "?" + c.urlParams_.Encode()
20815 req, err := http.NewRequest("GET", urls, body)
20816 if err != nil {
20817 return nil, err
20818 }
20819 req.Header = reqHeaders
20820 googleapi.Expand(req.URL, map[string]string{
20821 "parent": c.parent,
20822 })
20823 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20824 }
20825
20826
20827
20828
20829
20830
20831
20832 func (c *OrganizationsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
20833 gensupport.SetOptions(c.urlParams_, opts...)
20834 res, err := c.doRequest("json")
20835 if res != nil && res.StatusCode == http.StatusNotModified {
20836 if res.Body != nil {
20837 res.Body.Close()
20838 }
20839 return nil, gensupport.WrapError(&googleapi.Error{
20840 Code: res.StatusCode,
20841 Header: res.Header,
20842 })
20843 }
20844 if err != nil {
20845 return nil, err
20846 }
20847 defer googleapi.CloseBody(res)
20848 if err := googleapi.CheckResponse(res); err != nil {
20849 return nil, gensupport.WrapError(err)
20850 }
20851 ret := &ListExclusionsResponse{
20852 ServerResponse: googleapi.ServerResponse{
20853 Header: res.Header,
20854 HTTPStatusCode: res.StatusCode,
20855 },
20856 }
20857 target := &ret
20858 if err := gensupport.DecodeResponse(target, res); err != nil {
20859 return nil, err
20860 }
20861 return ret, nil
20862 }
20863
20864
20865
20866
20867 func (c *OrganizationsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
20868 c.ctx_ = ctx
20869 defer c.PageToken(c.urlParams_.Get("pageToken"))
20870 for {
20871 x, err := c.Do()
20872 if err != nil {
20873 return err
20874 }
20875 if err := f(x); err != nil {
20876 return err
20877 }
20878 if x.NextPageToken == "" {
20879 return nil
20880 }
20881 c.PageToken(x.NextPageToken)
20882 }
20883 }
20884
20885 type OrganizationsExclusionsPatchCall struct {
20886 s *Service
20887 name string
20888 logexclusion *LogExclusion
20889 urlParams_ gensupport.URLParams
20890 ctx_ context.Context
20891 header_ http.Header
20892 }
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903 func (r *OrganizationsExclusionsService) Patch(name string, logexclusion *LogExclusion) *OrganizationsExclusionsPatchCall {
20904 c := &OrganizationsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20905 c.name = name
20906 c.logexclusion = logexclusion
20907 return c
20908 }
20909
20910
20911
20912
20913
20914
20915
20916 func (c *OrganizationsExclusionsPatchCall) UpdateMask(updateMask string) *OrganizationsExclusionsPatchCall {
20917 c.urlParams_.Set("updateMask", updateMask)
20918 return c
20919 }
20920
20921
20922
20923
20924 func (c *OrganizationsExclusionsPatchCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsPatchCall {
20925 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20926 return c
20927 }
20928
20929
20930 func (c *OrganizationsExclusionsPatchCall) Context(ctx context.Context) *OrganizationsExclusionsPatchCall {
20931 c.ctx_ = ctx
20932 return c
20933 }
20934
20935
20936
20937 func (c *OrganizationsExclusionsPatchCall) Header() http.Header {
20938 if c.header_ == nil {
20939 c.header_ = make(http.Header)
20940 }
20941 return c.header_
20942 }
20943
20944 func (c *OrganizationsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
20945 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20946 var body io.Reader = nil
20947 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
20948 if err != nil {
20949 return nil, err
20950 }
20951 c.urlParams_.Set("alt", alt)
20952 c.urlParams_.Set("prettyPrint", "false")
20953 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
20954 urls += "?" + c.urlParams_.Encode()
20955 req, err := http.NewRequest("PATCH", urls, body)
20956 if err != nil {
20957 return nil, err
20958 }
20959 req.Header = reqHeaders
20960 googleapi.Expand(req.URL, map[string]string{
20961 "name": c.name,
20962 })
20963 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20964 }
20965
20966
20967
20968
20969
20970
20971 func (c *OrganizationsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
20972 gensupport.SetOptions(c.urlParams_, opts...)
20973 res, err := c.doRequest("json")
20974 if res != nil && res.StatusCode == http.StatusNotModified {
20975 if res.Body != nil {
20976 res.Body.Close()
20977 }
20978 return nil, gensupport.WrapError(&googleapi.Error{
20979 Code: res.StatusCode,
20980 Header: res.Header,
20981 })
20982 }
20983 if err != nil {
20984 return nil, err
20985 }
20986 defer googleapi.CloseBody(res)
20987 if err := googleapi.CheckResponse(res); err != nil {
20988 return nil, gensupport.WrapError(err)
20989 }
20990 ret := &LogExclusion{
20991 ServerResponse: googleapi.ServerResponse{
20992 Header: res.Header,
20993 HTTPStatusCode: res.StatusCode,
20994 },
20995 }
20996 target := &ret
20997 if err := gensupport.DecodeResponse(target, res); err != nil {
20998 return nil, err
20999 }
21000 return ret, nil
21001 }
21002
21003 type OrganizationsLocationsGetCall struct {
21004 s *Service
21005 name string
21006 urlParams_ gensupport.URLParams
21007 ifNoneMatch_ string
21008 ctx_ context.Context
21009 header_ http.Header
21010 }
21011
21012
21013
21014
21015 func (r *OrganizationsLocationsService) Get(name string) *OrganizationsLocationsGetCall {
21016 c := &OrganizationsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21017 c.name = name
21018 return c
21019 }
21020
21021
21022
21023
21024 func (c *OrganizationsLocationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGetCall {
21025 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21026 return c
21027 }
21028
21029
21030
21031
21032 func (c *OrganizationsLocationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGetCall {
21033 c.ifNoneMatch_ = entityTag
21034 return c
21035 }
21036
21037
21038 func (c *OrganizationsLocationsGetCall) Context(ctx context.Context) *OrganizationsLocationsGetCall {
21039 c.ctx_ = ctx
21040 return c
21041 }
21042
21043
21044
21045 func (c *OrganizationsLocationsGetCall) Header() http.Header {
21046 if c.header_ == nil {
21047 c.header_ = make(http.Header)
21048 }
21049 return c.header_
21050 }
21051
21052 func (c *OrganizationsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
21053 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21054 if c.ifNoneMatch_ != "" {
21055 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21056 }
21057 var body io.Reader = nil
21058 c.urlParams_.Set("alt", alt)
21059 c.urlParams_.Set("prettyPrint", "false")
21060 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
21061 urls += "?" + c.urlParams_.Encode()
21062 req, err := http.NewRequest("GET", urls, body)
21063 if err != nil {
21064 return nil, err
21065 }
21066 req.Header = reqHeaders
21067 googleapi.Expand(req.URL, map[string]string{
21068 "name": c.name,
21069 })
21070 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21071 }
21072
21073
21074
21075
21076
21077
21078 func (c *OrganizationsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
21079 gensupport.SetOptions(c.urlParams_, opts...)
21080 res, err := c.doRequest("json")
21081 if res != nil && res.StatusCode == http.StatusNotModified {
21082 if res.Body != nil {
21083 res.Body.Close()
21084 }
21085 return nil, gensupport.WrapError(&googleapi.Error{
21086 Code: res.StatusCode,
21087 Header: res.Header,
21088 })
21089 }
21090 if err != nil {
21091 return nil, err
21092 }
21093 defer googleapi.CloseBody(res)
21094 if err := googleapi.CheckResponse(res); err != nil {
21095 return nil, gensupport.WrapError(err)
21096 }
21097 ret := &Location{
21098 ServerResponse: googleapi.ServerResponse{
21099 Header: res.Header,
21100 HTTPStatusCode: res.StatusCode,
21101 },
21102 }
21103 target := &ret
21104 if err := gensupport.DecodeResponse(target, res); err != nil {
21105 return nil, err
21106 }
21107 return ret, nil
21108 }
21109
21110 type OrganizationsLocationsListCall struct {
21111 s *Service
21112 name string
21113 urlParams_ gensupport.URLParams
21114 ifNoneMatch_ string
21115 ctx_ context.Context
21116 header_ http.Header
21117 }
21118
21119
21120
21121
21122 func (r *OrganizationsLocationsService) List(name string) *OrganizationsLocationsListCall {
21123 c := &OrganizationsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21124 c.name = name
21125 return c
21126 }
21127
21128
21129
21130
21131
21132 func (c *OrganizationsLocationsListCall) Filter(filter string) *OrganizationsLocationsListCall {
21133 c.urlParams_.Set("filter", filter)
21134 return c
21135 }
21136
21137
21138
21139 func (c *OrganizationsLocationsListCall) PageSize(pageSize int64) *OrganizationsLocationsListCall {
21140 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
21141 return c
21142 }
21143
21144
21145
21146
21147 func (c *OrganizationsLocationsListCall) PageToken(pageToken string) *OrganizationsLocationsListCall {
21148 c.urlParams_.Set("pageToken", pageToken)
21149 return c
21150 }
21151
21152
21153
21154
21155 func (c *OrganizationsLocationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsListCall {
21156 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21157 return c
21158 }
21159
21160
21161
21162
21163 func (c *OrganizationsLocationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsListCall {
21164 c.ifNoneMatch_ = entityTag
21165 return c
21166 }
21167
21168
21169 func (c *OrganizationsLocationsListCall) Context(ctx context.Context) *OrganizationsLocationsListCall {
21170 c.ctx_ = ctx
21171 return c
21172 }
21173
21174
21175
21176 func (c *OrganizationsLocationsListCall) Header() http.Header {
21177 if c.header_ == nil {
21178 c.header_ = make(http.Header)
21179 }
21180 return c.header_
21181 }
21182
21183 func (c *OrganizationsLocationsListCall) doRequest(alt string) (*http.Response, error) {
21184 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21185 if c.ifNoneMatch_ != "" {
21186 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21187 }
21188 var body io.Reader = nil
21189 c.urlParams_.Set("alt", alt)
21190 c.urlParams_.Set("prettyPrint", "false")
21191 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
21192 urls += "?" + c.urlParams_.Encode()
21193 req, err := http.NewRequest("GET", urls, body)
21194 if err != nil {
21195 return nil, err
21196 }
21197 req.Header = reqHeaders
21198 googleapi.Expand(req.URL, map[string]string{
21199 "name": c.name,
21200 })
21201 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21202 }
21203
21204
21205
21206
21207
21208
21209
21210 func (c *OrganizationsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
21211 gensupport.SetOptions(c.urlParams_, opts...)
21212 res, err := c.doRequest("json")
21213 if res != nil && res.StatusCode == http.StatusNotModified {
21214 if res.Body != nil {
21215 res.Body.Close()
21216 }
21217 return nil, gensupport.WrapError(&googleapi.Error{
21218 Code: res.StatusCode,
21219 Header: res.Header,
21220 })
21221 }
21222 if err != nil {
21223 return nil, err
21224 }
21225 defer googleapi.CloseBody(res)
21226 if err := googleapi.CheckResponse(res); err != nil {
21227 return nil, gensupport.WrapError(err)
21228 }
21229 ret := &ListLocationsResponse{
21230 ServerResponse: googleapi.ServerResponse{
21231 Header: res.Header,
21232 HTTPStatusCode: res.StatusCode,
21233 },
21234 }
21235 target := &ret
21236 if err := gensupport.DecodeResponse(target, res); err != nil {
21237 return nil, err
21238 }
21239 return ret, nil
21240 }
21241
21242
21243
21244
21245 func (c *OrganizationsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
21246 c.ctx_ = ctx
21247 defer c.PageToken(c.urlParams_.Get("pageToken"))
21248 for {
21249 x, err := c.Do()
21250 if err != nil {
21251 return err
21252 }
21253 if err := f(x); err != nil {
21254 return err
21255 }
21256 if x.NextPageToken == "" {
21257 return nil
21258 }
21259 c.PageToken(x.NextPageToken)
21260 }
21261 }
21262
21263 type OrganizationsLocationsBucketsCreateCall struct {
21264 s *Service
21265 parent string
21266 logbucket *LogBucket
21267 urlParams_ gensupport.URLParams
21268 ctx_ context.Context
21269 header_ http.Header
21270 }
21271
21272
21273
21274
21275
21276
21277
21278 func (r *OrganizationsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *OrganizationsLocationsBucketsCreateCall {
21279 c := &OrganizationsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21280 c.parent = parent
21281 c.logbucket = logbucket
21282 return c
21283 }
21284
21285
21286
21287
21288
21289 func (c *OrganizationsLocationsBucketsCreateCall) BucketId(bucketId string) *OrganizationsLocationsBucketsCreateCall {
21290 c.urlParams_.Set("bucketId", bucketId)
21291 return c
21292 }
21293
21294
21295
21296
21297 func (c *OrganizationsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsCreateCall {
21298 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21299 return c
21300 }
21301
21302
21303 func (c *OrganizationsLocationsBucketsCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsCreateCall {
21304 c.ctx_ = ctx
21305 return c
21306 }
21307
21308
21309
21310 func (c *OrganizationsLocationsBucketsCreateCall) Header() http.Header {
21311 if c.header_ == nil {
21312 c.header_ = make(http.Header)
21313 }
21314 return c.header_
21315 }
21316
21317 func (c *OrganizationsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
21318 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21319 var body io.Reader = nil
21320 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
21321 if err != nil {
21322 return nil, err
21323 }
21324 c.urlParams_.Set("alt", alt)
21325 c.urlParams_.Set("prettyPrint", "false")
21326 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
21327 urls += "?" + c.urlParams_.Encode()
21328 req, err := http.NewRequest("POST", urls, body)
21329 if err != nil {
21330 return nil, err
21331 }
21332 req.Header = reqHeaders
21333 googleapi.Expand(req.URL, map[string]string{
21334 "parent": c.parent,
21335 })
21336 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21337 }
21338
21339
21340
21341
21342
21343
21344 func (c *OrganizationsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
21345 gensupport.SetOptions(c.urlParams_, opts...)
21346 res, err := c.doRequest("json")
21347 if res != nil && res.StatusCode == http.StatusNotModified {
21348 if res.Body != nil {
21349 res.Body.Close()
21350 }
21351 return nil, gensupport.WrapError(&googleapi.Error{
21352 Code: res.StatusCode,
21353 Header: res.Header,
21354 })
21355 }
21356 if err != nil {
21357 return nil, err
21358 }
21359 defer googleapi.CloseBody(res)
21360 if err := googleapi.CheckResponse(res); err != nil {
21361 return nil, gensupport.WrapError(err)
21362 }
21363 ret := &LogBucket{
21364 ServerResponse: googleapi.ServerResponse{
21365 Header: res.Header,
21366 HTTPStatusCode: res.StatusCode,
21367 },
21368 }
21369 target := &ret
21370 if err := gensupport.DecodeResponse(target, res); err != nil {
21371 return nil, err
21372 }
21373 return ret, nil
21374 }
21375
21376 type OrganizationsLocationsBucketsCreateAsyncCall struct {
21377 s *Service
21378 parent string
21379 logbucket *LogBucket
21380 urlParams_ gensupport.URLParams
21381 ctx_ context.Context
21382 header_ http.Header
21383 }
21384
21385
21386
21387
21388
21389
21390
21391
21392 func (r *OrganizationsLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *OrganizationsLocationsBucketsCreateAsyncCall {
21393 c := &OrganizationsLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21394 c.parent = parent
21395 c.logbucket = logbucket
21396 return c
21397 }
21398
21399
21400
21401
21402
21403 func (c *OrganizationsLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *OrganizationsLocationsBucketsCreateAsyncCall {
21404 c.urlParams_.Set("bucketId", bucketId)
21405 return c
21406 }
21407
21408
21409
21410
21411 func (c *OrganizationsLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsCreateAsyncCall {
21412 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21413 return c
21414 }
21415
21416
21417 func (c *OrganizationsLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *OrganizationsLocationsBucketsCreateAsyncCall {
21418 c.ctx_ = ctx
21419 return c
21420 }
21421
21422
21423
21424 func (c *OrganizationsLocationsBucketsCreateAsyncCall) Header() http.Header {
21425 if c.header_ == nil {
21426 c.header_ = make(http.Header)
21427 }
21428 return c.header_
21429 }
21430
21431 func (c *OrganizationsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) {
21432 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21433 var body io.Reader = nil
21434 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
21435 if err != nil {
21436 return nil, err
21437 }
21438 c.urlParams_.Set("alt", alt)
21439 c.urlParams_.Set("prettyPrint", "false")
21440 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync")
21441 urls += "?" + c.urlParams_.Encode()
21442 req, err := http.NewRequest("POST", urls, body)
21443 if err != nil {
21444 return nil, err
21445 }
21446 req.Header = reqHeaders
21447 googleapi.Expand(req.URL, map[string]string{
21448 "parent": c.parent,
21449 })
21450 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21451 }
21452
21453
21454
21455
21456
21457
21458 func (c *OrganizationsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21459 gensupport.SetOptions(c.urlParams_, opts...)
21460 res, err := c.doRequest("json")
21461 if res != nil && res.StatusCode == http.StatusNotModified {
21462 if res.Body != nil {
21463 res.Body.Close()
21464 }
21465 return nil, gensupport.WrapError(&googleapi.Error{
21466 Code: res.StatusCode,
21467 Header: res.Header,
21468 })
21469 }
21470 if err != nil {
21471 return nil, err
21472 }
21473 defer googleapi.CloseBody(res)
21474 if err := googleapi.CheckResponse(res); err != nil {
21475 return nil, gensupport.WrapError(err)
21476 }
21477 ret := &Operation{
21478 ServerResponse: googleapi.ServerResponse{
21479 Header: res.Header,
21480 HTTPStatusCode: res.StatusCode,
21481 },
21482 }
21483 target := &ret
21484 if err := gensupport.DecodeResponse(target, res); err != nil {
21485 return nil, err
21486 }
21487 return ret, nil
21488 }
21489
21490 type OrganizationsLocationsBucketsDeleteCall struct {
21491 s *Service
21492 name string
21493 urlParams_ gensupport.URLParams
21494 ctx_ context.Context
21495 header_ http.Header
21496 }
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509 func (r *OrganizationsLocationsBucketsService) Delete(name string) *OrganizationsLocationsBucketsDeleteCall {
21510 c := &OrganizationsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21511 c.name = name
21512 return c
21513 }
21514
21515
21516
21517
21518 func (c *OrganizationsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsDeleteCall {
21519 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21520 return c
21521 }
21522
21523
21524 func (c *OrganizationsLocationsBucketsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsDeleteCall {
21525 c.ctx_ = ctx
21526 return c
21527 }
21528
21529
21530
21531 func (c *OrganizationsLocationsBucketsDeleteCall) Header() http.Header {
21532 if c.header_ == nil {
21533 c.header_ = make(http.Header)
21534 }
21535 return c.header_
21536 }
21537
21538 func (c *OrganizationsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
21539 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21540 var body io.Reader = nil
21541 c.urlParams_.Set("alt", alt)
21542 c.urlParams_.Set("prettyPrint", "false")
21543 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
21544 urls += "?" + c.urlParams_.Encode()
21545 req, err := http.NewRequest("DELETE", urls, body)
21546 if err != nil {
21547 return nil, err
21548 }
21549 req.Header = reqHeaders
21550 googleapi.Expand(req.URL, map[string]string{
21551 "name": c.name,
21552 })
21553 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21554 }
21555
21556
21557
21558
21559
21560
21561 func (c *OrganizationsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
21562 gensupport.SetOptions(c.urlParams_, opts...)
21563 res, err := c.doRequest("json")
21564 if res != nil && res.StatusCode == http.StatusNotModified {
21565 if res.Body != nil {
21566 res.Body.Close()
21567 }
21568 return nil, gensupport.WrapError(&googleapi.Error{
21569 Code: res.StatusCode,
21570 Header: res.Header,
21571 })
21572 }
21573 if err != nil {
21574 return nil, err
21575 }
21576 defer googleapi.CloseBody(res)
21577 if err := googleapi.CheckResponse(res); err != nil {
21578 return nil, gensupport.WrapError(err)
21579 }
21580 ret := &Empty{
21581 ServerResponse: googleapi.ServerResponse{
21582 Header: res.Header,
21583 HTTPStatusCode: res.StatusCode,
21584 },
21585 }
21586 target := &ret
21587 if err := gensupport.DecodeResponse(target, res); err != nil {
21588 return nil, err
21589 }
21590 return ret, nil
21591 }
21592
21593 type OrganizationsLocationsBucketsGetCall struct {
21594 s *Service
21595 name string
21596 urlParams_ gensupport.URLParams
21597 ifNoneMatch_ string
21598 ctx_ context.Context
21599 header_ http.Header
21600 }
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611 func (r *OrganizationsLocationsBucketsService) Get(name string) *OrganizationsLocationsBucketsGetCall {
21612 c := &OrganizationsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21613 c.name = name
21614 return c
21615 }
21616
21617
21618
21619
21620 func (c *OrganizationsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsGetCall {
21621 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21622 return c
21623 }
21624
21625
21626
21627
21628 func (c *OrganizationsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsGetCall {
21629 c.ifNoneMatch_ = entityTag
21630 return c
21631 }
21632
21633
21634 func (c *OrganizationsLocationsBucketsGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsGetCall {
21635 c.ctx_ = ctx
21636 return c
21637 }
21638
21639
21640
21641 func (c *OrganizationsLocationsBucketsGetCall) Header() http.Header {
21642 if c.header_ == nil {
21643 c.header_ = make(http.Header)
21644 }
21645 return c.header_
21646 }
21647
21648 func (c *OrganizationsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
21649 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21650 if c.ifNoneMatch_ != "" {
21651 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21652 }
21653 var body io.Reader = nil
21654 c.urlParams_.Set("alt", alt)
21655 c.urlParams_.Set("prettyPrint", "false")
21656 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
21657 urls += "?" + c.urlParams_.Encode()
21658 req, err := http.NewRequest("GET", urls, body)
21659 if err != nil {
21660 return nil, err
21661 }
21662 req.Header = reqHeaders
21663 googleapi.Expand(req.URL, map[string]string{
21664 "name": c.name,
21665 })
21666 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21667 }
21668
21669
21670
21671
21672
21673
21674 func (c *OrganizationsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
21675 gensupport.SetOptions(c.urlParams_, opts...)
21676 res, err := c.doRequest("json")
21677 if res != nil && res.StatusCode == http.StatusNotModified {
21678 if res.Body != nil {
21679 res.Body.Close()
21680 }
21681 return nil, gensupport.WrapError(&googleapi.Error{
21682 Code: res.StatusCode,
21683 Header: res.Header,
21684 })
21685 }
21686 if err != nil {
21687 return nil, err
21688 }
21689 defer googleapi.CloseBody(res)
21690 if err := googleapi.CheckResponse(res); err != nil {
21691 return nil, gensupport.WrapError(err)
21692 }
21693 ret := &LogBucket{
21694 ServerResponse: googleapi.ServerResponse{
21695 Header: res.Header,
21696 HTTPStatusCode: res.StatusCode,
21697 },
21698 }
21699 target := &ret
21700 if err := gensupport.DecodeResponse(target, res); err != nil {
21701 return nil, err
21702 }
21703 return ret, nil
21704 }
21705
21706 type OrganizationsLocationsBucketsListCall struct {
21707 s *Service
21708 parent string
21709 urlParams_ gensupport.URLParams
21710 ifNoneMatch_ string
21711 ctx_ context.Context
21712 header_ http.Header
21713 }
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724 func (r *OrganizationsLocationsBucketsService) List(parent string) *OrganizationsLocationsBucketsListCall {
21725 c := &OrganizationsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21726 c.parent = parent
21727 return c
21728 }
21729
21730
21731
21732
21733
21734 func (c *OrganizationsLocationsBucketsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsListCall {
21735 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
21736 return c
21737 }
21738
21739
21740
21741
21742
21743 func (c *OrganizationsLocationsBucketsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsListCall {
21744 c.urlParams_.Set("pageToken", pageToken)
21745 return c
21746 }
21747
21748
21749
21750
21751 func (c *OrganizationsLocationsBucketsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsListCall {
21752 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21753 return c
21754 }
21755
21756
21757
21758
21759 func (c *OrganizationsLocationsBucketsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsListCall {
21760 c.ifNoneMatch_ = entityTag
21761 return c
21762 }
21763
21764
21765 func (c *OrganizationsLocationsBucketsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsListCall {
21766 c.ctx_ = ctx
21767 return c
21768 }
21769
21770
21771
21772 func (c *OrganizationsLocationsBucketsListCall) Header() http.Header {
21773 if c.header_ == nil {
21774 c.header_ = make(http.Header)
21775 }
21776 return c.header_
21777 }
21778
21779 func (c *OrganizationsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
21780 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21781 if c.ifNoneMatch_ != "" {
21782 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21783 }
21784 var body io.Reader = nil
21785 c.urlParams_.Set("alt", alt)
21786 c.urlParams_.Set("prettyPrint", "false")
21787 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
21788 urls += "?" + c.urlParams_.Encode()
21789 req, err := http.NewRequest("GET", urls, body)
21790 if err != nil {
21791 return nil, err
21792 }
21793 req.Header = reqHeaders
21794 googleapi.Expand(req.URL, map[string]string{
21795 "parent": c.parent,
21796 })
21797 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21798 }
21799
21800
21801
21802
21803
21804
21805
21806 func (c *OrganizationsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
21807 gensupport.SetOptions(c.urlParams_, opts...)
21808 res, err := c.doRequest("json")
21809 if res != nil && res.StatusCode == http.StatusNotModified {
21810 if res.Body != nil {
21811 res.Body.Close()
21812 }
21813 return nil, gensupport.WrapError(&googleapi.Error{
21814 Code: res.StatusCode,
21815 Header: res.Header,
21816 })
21817 }
21818 if err != nil {
21819 return nil, err
21820 }
21821 defer googleapi.CloseBody(res)
21822 if err := googleapi.CheckResponse(res); err != nil {
21823 return nil, gensupport.WrapError(err)
21824 }
21825 ret := &ListBucketsResponse{
21826 ServerResponse: googleapi.ServerResponse{
21827 Header: res.Header,
21828 HTTPStatusCode: res.StatusCode,
21829 },
21830 }
21831 target := &ret
21832 if err := gensupport.DecodeResponse(target, res); err != nil {
21833 return nil, err
21834 }
21835 return ret, nil
21836 }
21837
21838
21839
21840
21841 func (c *OrganizationsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
21842 c.ctx_ = ctx
21843 defer c.PageToken(c.urlParams_.Get("pageToken"))
21844 for {
21845 x, err := c.Do()
21846 if err != nil {
21847 return err
21848 }
21849 if err := f(x); err != nil {
21850 return err
21851 }
21852 if x.NextPageToken == "" {
21853 return nil
21854 }
21855 c.PageToken(x.NextPageToken)
21856 }
21857 }
21858
21859 type OrganizationsLocationsBucketsPatchCall struct {
21860 s *Service
21861 name string
21862 logbucket *LogBucket
21863 urlParams_ gensupport.URLParams
21864 ctx_ context.Context
21865 header_ http.Header
21866 }
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879 func (r *OrganizationsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *OrganizationsLocationsBucketsPatchCall {
21880 c := &OrganizationsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21881 c.name = name
21882 c.logbucket = logbucket
21883 return c
21884 }
21885
21886
21887
21888
21889
21890
21891
21892 func (c *OrganizationsLocationsBucketsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsPatchCall {
21893 c.urlParams_.Set("updateMask", updateMask)
21894 return c
21895 }
21896
21897
21898
21899
21900 func (c *OrganizationsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsPatchCall {
21901 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21902 return c
21903 }
21904
21905
21906 func (c *OrganizationsLocationsBucketsPatchCall) Context(ctx context.Context) *OrganizationsLocationsBucketsPatchCall {
21907 c.ctx_ = ctx
21908 return c
21909 }
21910
21911
21912
21913 func (c *OrganizationsLocationsBucketsPatchCall) Header() http.Header {
21914 if c.header_ == nil {
21915 c.header_ = make(http.Header)
21916 }
21917 return c.header_
21918 }
21919
21920 func (c *OrganizationsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
21921 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21922 var body io.Reader = nil
21923 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
21924 if err != nil {
21925 return nil, err
21926 }
21927 c.urlParams_.Set("alt", alt)
21928 c.urlParams_.Set("prettyPrint", "false")
21929 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
21930 urls += "?" + c.urlParams_.Encode()
21931 req, err := http.NewRequest("PATCH", urls, body)
21932 if err != nil {
21933 return nil, err
21934 }
21935 req.Header = reqHeaders
21936 googleapi.Expand(req.URL, map[string]string{
21937 "name": c.name,
21938 })
21939 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21940 }
21941
21942
21943
21944
21945
21946
21947 func (c *OrganizationsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
21948 gensupport.SetOptions(c.urlParams_, opts...)
21949 res, err := c.doRequest("json")
21950 if res != nil && res.StatusCode == http.StatusNotModified {
21951 if res.Body != nil {
21952 res.Body.Close()
21953 }
21954 return nil, gensupport.WrapError(&googleapi.Error{
21955 Code: res.StatusCode,
21956 Header: res.Header,
21957 })
21958 }
21959 if err != nil {
21960 return nil, err
21961 }
21962 defer googleapi.CloseBody(res)
21963 if err := googleapi.CheckResponse(res); err != nil {
21964 return nil, gensupport.WrapError(err)
21965 }
21966 ret := &LogBucket{
21967 ServerResponse: googleapi.ServerResponse{
21968 Header: res.Header,
21969 HTTPStatusCode: res.StatusCode,
21970 },
21971 }
21972 target := &ret
21973 if err := gensupport.DecodeResponse(target, res); err != nil {
21974 return nil, err
21975 }
21976 return ret, nil
21977 }
21978
21979 type OrganizationsLocationsBucketsUndeleteCall struct {
21980 s *Service
21981 name string
21982 undeletebucketrequest *UndeleteBucketRequest
21983 urlParams_ gensupport.URLParams
21984 ctx_ context.Context
21985 header_ http.Header
21986 }
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998 func (r *OrganizationsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *OrganizationsLocationsBucketsUndeleteCall {
21999 c := &OrganizationsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22000 c.name = name
22001 c.undeletebucketrequest = undeletebucketrequest
22002 return c
22003 }
22004
22005
22006
22007
22008 func (c *OrganizationsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsUndeleteCall {
22009 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22010 return c
22011 }
22012
22013
22014 func (c *OrganizationsLocationsBucketsUndeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsUndeleteCall {
22015 c.ctx_ = ctx
22016 return c
22017 }
22018
22019
22020
22021 func (c *OrganizationsLocationsBucketsUndeleteCall) Header() http.Header {
22022 if c.header_ == nil {
22023 c.header_ = make(http.Header)
22024 }
22025 return c.header_
22026 }
22027
22028 func (c *OrganizationsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
22029 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22030 var body io.Reader = nil
22031 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
22032 if err != nil {
22033 return nil, err
22034 }
22035 c.urlParams_.Set("alt", alt)
22036 c.urlParams_.Set("prettyPrint", "false")
22037 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
22038 urls += "?" + c.urlParams_.Encode()
22039 req, err := http.NewRequest("POST", urls, body)
22040 if err != nil {
22041 return nil, err
22042 }
22043 req.Header = reqHeaders
22044 googleapi.Expand(req.URL, map[string]string{
22045 "name": c.name,
22046 })
22047 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22048 }
22049
22050
22051
22052
22053
22054
22055 func (c *OrganizationsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
22056 gensupport.SetOptions(c.urlParams_, opts...)
22057 res, err := c.doRequest("json")
22058 if res != nil && res.StatusCode == http.StatusNotModified {
22059 if res.Body != nil {
22060 res.Body.Close()
22061 }
22062 return nil, gensupport.WrapError(&googleapi.Error{
22063 Code: res.StatusCode,
22064 Header: res.Header,
22065 })
22066 }
22067 if err != nil {
22068 return nil, err
22069 }
22070 defer googleapi.CloseBody(res)
22071 if err := googleapi.CheckResponse(res); err != nil {
22072 return nil, gensupport.WrapError(err)
22073 }
22074 ret := &Empty{
22075 ServerResponse: googleapi.ServerResponse{
22076 Header: res.Header,
22077 HTTPStatusCode: res.StatusCode,
22078 },
22079 }
22080 target := &ret
22081 if err := gensupport.DecodeResponse(target, res); err != nil {
22082 return nil, err
22083 }
22084 return ret, nil
22085 }
22086
22087 type OrganizationsLocationsBucketsUpdateAsyncCall struct {
22088 s *Service
22089 name string
22090 logbucket *LogBucket
22091 urlParams_ gensupport.URLParams
22092 ctx_ context.Context
22093 header_ http.Header
22094 }
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108 func (r *OrganizationsLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *OrganizationsLocationsBucketsUpdateAsyncCall {
22109 c := &OrganizationsLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22110 c.name = name
22111 c.logbucket = logbucket
22112 return c
22113 }
22114
22115
22116
22117
22118
22119
22120
22121 func (c *OrganizationsLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsUpdateAsyncCall {
22122 c.urlParams_.Set("updateMask", updateMask)
22123 return c
22124 }
22125
22126
22127
22128
22129 func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsUpdateAsyncCall {
22130 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22131 return c
22132 }
22133
22134
22135 func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *OrganizationsLocationsBucketsUpdateAsyncCall {
22136 c.ctx_ = ctx
22137 return c
22138 }
22139
22140
22141
22142 func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Header() http.Header {
22143 if c.header_ == nil {
22144 c.header_ = make(http.Header)
22145 }
22146 return c.header_
22147 }
22148
22149 func (c *OrganizationsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) {
22150 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22151 var body io.Reader = nil
22152 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
22153 if err != nil {
22154 return nil, err
22155 }
22156 c.urlParams_.Set("alt", alt)
22157 c.urlParams_.Set("prettyPrint", "false")
22158 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync")
22159 urls += "?" + c.urlParams_.Encode()
22160 req, err := http.NewRequest("POST", urls, body)
22161 if err != nil {
22162 return nil, err
22163 }
22164 req.Header = reqHeaders
22165 googleapi.Expand(req.URL, map[string]string{
22166 "name": c.name,
22167 })
22168 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22169 }
22170
22171
22172
22173
22174
22175
22176 func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22177 gensupport.SetOptions(c.urlParams_, opts...)
22178 res, err := c.doRequest("json")
22179 if res != nil && res.StatusCode == http.StatusNotModified {
22180 if res.Body != nil {
22181 res.Body.Close()
22182 }
22183 return nil, gensupport.WrapError(&googleapi.Error{
22184 Code: res.StatusCode,
22185 Header: res.Header,
22186 })
22187 }
22188 if err != nil {
22189 return nil, err
22190 }
22191 defer googleapi.CloseBody(res)
22192 if err := googleapi.CheckResponse(res); err != nil {
22193 return nil, gensupport.WrapError(err)
22194 }
22195 ret := &Operation{
22196 ServerResponse: googleapi.ServerResponse{
22197 Header: res.Header,
22198 HTTPStatusCode: res.StatusCode,
22199 },
22200 }
22201 target := &ret
22202 if err := gensupport.DecodeResponse(target, res); err != nil {
22203 return nil, err
22204 }
22205 return ret, nil
22206 }
22207
22208 type OrganizationsLocationsBucketsLinksCreateCall struct {
22209 s *Service
22210 parent string
22211 link *Link
22212 urlParams_ gensupport.URLParams
22213 ctx_ context.Context
22214 header_ http.Header
22215 }
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227 func (r *OrganizationsLocationsBucketsLinksService) Create(parent string, link *Link) *OrganizationsLocationsBucketsLinksCreateCall {
22228 c := &OrganizationsLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22229 c.parent = parent
22230 c.link = link
22231 return c
22232 }
22233
22234
22235
22236
22237 func (c *OrganizationsLocationsBucketsLinksCreateCall) LinkId(linkId string) *OrganizationsLocationsBucketsLinksCreateCall {
22238 c.urlParams_.Set("linkId", linkId)
22239 return c
22240 }
22241
22242
22243
22244
22245 func (c *OrganizationsLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksCreateCall {
22246 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22247 return c
22248 }
22249
22250
22251 func (c *OrganizationsLocationsBucketsLinksCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksCreateCall {
22252 c.ctx_ = ctx
22253 return c
22254 }
22255
22256
22257
22258 func (c *OrganizationsLocationsBucketsLinksCreateCall) Header() http.Header {
22259 if c.header_ == nil {
22260 c.header_ = make(http.Header)
22261 }
22262 return c.header_
22263 }
22264
22265 func (c *OrganizationsLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
22266 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22267 var body io.Reader = nil
22268 body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
22269 if err != nil {
22270 return nil, err
22271 }
22272 c.urlParams_.Set("alt", alt)
22273 c.urlParams_.Set("prettyPrint", "false")
22274 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
22275 urls += "?" + c.urlParams_.Encode()
22276 req, err := http.NewRequest("POST", urls, body)
22277 if err != nil {
22278 return nil, err
22279 }
22280 req.Header = reqHeaders
22281 googleapi.Expand(req.URL, map[string]string{
22282 "parent": c.parent,
22283 })
22284 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22285 }
22286
22287
22288
22289
22290
22291
22292 func (c *OrganizationsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22293 gensupport.SetOptions(c.urlParams_, opts...)
22294 res, err := c.doRequest("json")
22295 if res != nil && res.StatusCode == http.StatusNotModified {
22296 if res.Body != nil {
22297 res.Body.Close()
22298 }
22299 return nil, gensupport.WrapError(&googleapi.Error{
22300 Code: res.StatusCode,
22301 Header: res.Header,
22302 })
22303 }
22304 if err != nil {
22305 return nil, err
22306 }
22307 defer googleapi.CloseBody(res)
22308 if err := googleapi.CheckResponse(res); err != nil {
22309 return nil, gensupport.WrapError(err)
22310 }
22311 ret := &Operation{
22312 ServerResponse: googleapi.ServerResponse{
22313 Header: res.Header,
22314 HTTPStatusCode: res.StatusCode,
22315 },
22316 }
22317 target := &ret
22318 if err := gensupport.DecodeResponse(target, res); err != nil {
22319 return nil, err
22320 }
22321 return ret, nil
22322 }
22323
22324 type OrganizationsLocationsBucketsLinksDeleteCall struct {
22325 s *Service
22326 name string
22327 urlParams_ gensupport.URLParams
22328 ctx_ context.Context
22329 header_ http.Header
22330 }
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344 func (r *OrganizationsLocationsBucketsLinksService) Delete(name string) *OrganizationsLocationsBucketsLinksDeleteCall {
22345 c := &OrganizationsLocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22346 c.name = name
22347 return c
22348 }
22349
22350
22351
22352
22353 func (c *OrganizationsLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksDeleteCall {
22354 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22355 return c
22356 }
22357
22358
22359 func (c *OrganizationsLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksDeleteCall {
22360 c.ctx_ = ctx
22361 return c
22362 }
22363
22364
22365
22366 func (c *OrganizationsLocationsBucketsLinksDeleteCall) Header() http.Header {
22367 if c.header_ == nil {
22368 c.header_ = make(http.Header)
22369 }
22370 return c.header_
22371 }
22372
22373 func (c *OrganizationsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
22374 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22375 var body io.Reader = nil
22376 c.urlParams_.Set("alt", alt)
22377 c.urlParams_.Set("prettyPrint", "false")
22378 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
22379 urls += "?" + c.urlParams_.Encode()
22380 req, err := http.NewRequest("DELETE", urls, body)
22381 if err != nil {
22382 return nil, err
22383 }
22384 req.Header = reqHeaders
22385 googleapi.Expand(req.URL, map[string]string{
22386 "name": c.name,
22387 })
22388 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22389 }
22390
22391
22392
22393
22394
22395
22396 func (c *OrganizationsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22397 gensupport.SetOptions(c.urlParams_, opts...)
22398 res, err := c.doRequest("json")
22399 if res != nil && res.StatusCode == http.StatusNotModified {
22400 if res.Body != nil {
22401 res.Body.Close()
22402 }
22403 return nil, gensupport.WrapError(&googleapi.Error{
22404 Code: res.StatusCode,
22405 Header: res.Header,
22406 })
22407 }
22408 if err != nil {
22409 return nil, err
22410 }
22411 defer googleapi.CloseBody(res)
22412 if err := googleapi.CheckResponse(res); err != nil {
22413 return nil, gensupport.WrapError(err)
22414 }
22415 ret := &Operation{
22416 ServerResponse: googleapi.ServerResponse{
22417 Header: res.Header,
22418 HTTPStatusCode: res.StatusCode,
22419 },
22420 }
22421 target := &ret
22422 if err := gensupport.DecodeResponse(target, res); err != nil {
22423 return nil, err
22424 }
22425 return ret, nil
22426 }
22427
22428 type OrganizationsLocationsBucketsLinksGetCall struct {
22429 s *Service
22430 name string
22431 urlParams_ gensupport.URLParams
22432 ifNoneMatch_ string
22433 ctx_ context.Context
22434 header_ http.Header
22435 }
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448 func (r *OrganizationsLocationsBucketsLinksService) Get(name string) *OrganizationsLocationsBucketsLinksGetCall {
22449 c := &OrganizationsLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22450 c.name = name
22451 return c
22452 }
22453
22454
22455
22456
22457 func (c *OrganizationsLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksGetCall {
22458 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22459 return c
22460 }
22461
22462
22463
22464
22465 func (c *OrganizationsLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsLinksGetCall {
22466 c.ifNoneMatch_ = entityTag
22467 return c
22468 }
22469
22470
22471 func (c *OrganizationsLocationsBucketsLinksGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksGetCall {
22472 c.ctx_ = ctx
22473 return c
22474 }
22475
22476
22477
22478 func (c *OrganizationsLocationsBucketsLinksGetCall) Header() http.Header {
22479 if c.header_ == nil {
22480 c.header_ = make(http.Header)
22481 }
22482 return c.header_
22483 }
22484
22485 func (c *OrganizationsLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) {
22486 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22487 if c.ifNoneMatch_ != "" {
22488 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22489 }
22490 var body io.Reader = nil
22491 c.urlParams_.Set("alt", alt)
22492 c.urlParams_.Set("prettyPrint", "false")
22493 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
22494 urls += "?" + c.urlParams_.Encode()
22495 req, err := http.NewRequest("GET", urls, body)
22496 if err != nil {
22497 return nil, err
22498 }
22499 req.Header = reqHeaders
22500 googleapi.Expand(req.URL, map[string]string{
22501 "name": c.name,
22502 })
22503 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22504 }
22505
22506
22507
22508
22509
22510
22511 func (c *OrganizationsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) {
22512 gensupport.SetOptions(c.urlParams_, opts...)
22513 res, err := c.doRequest("json")
22514 if res != nil && res.StatusCode == http.StatusNotModified {
22515 if res.Body != nil {
22516 res.Body.Close()
22517 }
22518 return nil, gensupport.WrapError(&googleapi.Error{
22519 Code: res.StatusCode,
22520 Header: res.Header,
22521 })
22522 }
22523 if err != nil {
22524 return nil, err
22525 }
22526 defer googleapi.CloseBody(res)
22527 if err := googleapi.CheckResponse(res); err != nil {
22528 return nil, gensupport.WrapError(err)
22529 }
22530 ret := &Link{
22531 ServerResponse: googleapi.ServerResponse{
22532 Header: res.Header,
22533 HTTPStatusCode: res.StatusCode,
22534 },
22535 }
22536 target := &ret
22537 if err := gensupport.DecodeResponse(target, res); err != nil {
22538 return nil, err
22539 }
22540 return ret, nil
22541 }
22542
22543 type OrganizationsLocationsBucketsLinksListCall struct {
22544 s *Service
22545 parent string
22546 urlParams_ gensupport.URLParams
22547 ifNoneMatch_ string
22548 ctx_ context.Context
22549 header_ http.Header
22550 }
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560 func (r *OrganizationsLocationsBucketsLinksService) List(parent string) *OrganizationsLocationsBucketsLinksListCall {
22561 c := &OrganizationsLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22562 c.parent = parent
22563 return c
22564 }
22565
22566
22567
22568 func (c *OrganizationsLocationsBucketsLinksListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsLinksListCall {
22569 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22570 return c
22571 }
22572
22573
22574
22575
22576 func (c *OrganizationsLocationsBucketsLinksListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsLinksListCall {
22577 c.urlParams_.Set("pageToken", pageToken)
22578 return c
22579 }
22580
22581
22582
22583
22584 func (c *OrganizationsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksListCall {
22585 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22586 return c
22587 }
22588
22589
22590
22591
22592 func (c *OrganizationsLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsLinksListCall {
22593 c.ifNoneMatch_ = entityTag
22594 return c
22595 }
22596
22597
22598 func (c *OrganizationsLocationsBucketsLinksListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksListCall {
22599 c.ctx_ = ctx
22600 return c
22601 }
22602
22603
22604
22605 func (c *OrganizationsLocationsBucketsLinksListCall) Header() http.Header {
22606 if c.header_ == nil {
22607 c.header_ = make(http.Header)
22608 }
22609 return c.header_
22610 }
22611
22612 func (c *OrganizationsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) {
22613 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22614 if c.ifNoneMatch_ != "" {
22615 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22616 }
22617 var body io.Reader = nil
22618 c.urlParams_.Set("alt", alt)
22619 c.urlParams_.Set("prettyPrint", "false")
22620 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
22621 urls += "?" + c.urlParams_.Encode()
22622 req, err := http.NewRequest("GET", urls, body)
22623 if err != nil {
22624 return nil, err
22625 }
22626 req.Header = reqHeaders
22627 googleapi.Expand(req.URL, map[string]string{
22628 "parent": c.parent,
22629 })
22630 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22631 }
22632
22633
22634
22635
22636
22637
22638
22639 func (c *OrganizationsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) {
22640 gensupport.SetOptions(c.urlParams_, opts...)
22641 res, err := c.doRequest("json")
22642 if res != nil && res.StatusCode == http.StatusNotModified {
22643 if res.Body != nil {
22644 res.Body.Close()
22645 }
22646 return nil, gensupport.WrapError(&googleapi.Error{
22647 Code: res.StatusCode,
22648 Header: res.Header,
22649 })
22650 }
22651 if err != nil {
22652 return nil, err
22653 }
22654 defer googleapi.CloseBody(res)
22655 if err := googleapi.CheckResponse(res); err != nil {
22656 return nil, gensupport.WrapError(err)
22657 }
22658 ret := &ListLinksResponse{
22659 ServerResponse: googleapi.ServerResponse{
22660 Header: res.Header,
22661 HTTPStatusCode: res.StatusCode,
22662 },
22663 }
22664 target := &ret
22665 if err := gensupport.DecodeResponse(target, res); err != nil {
22666 return nil, err
22667 }
22668 return ret, nil
22669 }
22670
22671
22672
22673
22674 func (c *OrganizationsLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error {
22675 c.ctx_ = ctx
22676 defer c.PageToken(c.urlParams_.Get("pageToken"))
22677 for {
22678 x, err := c.Do()
22679 if err != nil {
22680 return err
22681 }
22682 if err := f(x); err != nil {
22683 return err
22684 }
22685 if x.NextPageToken == "" {
22686 return nil
22687 }
22688 c.PageToken(x.NextPageToken)
22689 }
22690 }
22691
22692 type OrganizationsLocationsBucketsViewsCreateCall struct {
22693 s *Service
22694 parent string
22695 logview *LogView
22696 urlParams_ gensupport.URLParams
22697 ctx_ context.Context
22698 header_ http.Header
22699 }
22700
22701
22702
22703
22704
22705
22706
22707 func (r *OrganizationsLocationsBucketsViewsService) Create(parent string, logview *LogView) *OrganizationsLocationsBucketsViewsCreateCall {
22708 c := &OrganizationsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22709 c.parent = parent
22710 c.logview = logview
22711 return c
22712 }
22713
22714
22715
22716
22717 func (c *OrganizationsLocationsBucketsViewsCreateCall) ViewId(viewId string) *OrganizationsLocationsBucketsViewsCreateCall {
22718 c.urlParams_.Set("viewId", viewId)
22719 return c
22720 }
22721
22722
22723
22724
22725 func (c *OrganizationsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsCreateCall {
22726 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22727 return c
22728 }
22729
22730
22731 func (c *OrganizationsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsCreateCall {
22732 c.ctx_ = ctx
22733 return c
22734 }
22735
22736
22737
22738 func (c *OrganizationsLocationsBucketsViewsCreateCall) Header() http.Header {
22739 if c.header_ == nil {
22740 c.header_ = make(http.Header)
22741 }
22742 return c.header_
22743 }
22744
22745 func (c *OrganizationsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
22746 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22747 var body io.Reader = nil
22748 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
22749 if err != nil {
22750 return nil, err
22751 }
22752 c.urlParams_.Set("alt", alt)
22753 c.urlParams_.Set("prettyPrint", "false")
22754 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
22755 urls += "?" + c.urlParams_.Encode()
22756 req, err := http.NewRequest("POST", urls, body)
22757 if err != nil {
22758 return nil, err
22759 }
22760 req.Header = reqHeaders
22761 googleapi.Expand(req.URL, map[string]string{
22762 "parent": c.parent,
22763 })
22764 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22765 }
22766
22767
22768
22769
22770
22771
22772 func (c *OrganizationsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
22773 gensupport.SetOptions(c.urlParams_, opts...)
22774 res, err := c.doRequest("json")
22775 if res != nil && res.StatusCode == http.StatusNotModified {
22776 if res.Body != nil {
22777 res.Body.Close()
22778 }
22779 return nil, gensupport.WrapError(&googleapi.Error{
22780 Code: res.StatusCode,
22781 Header: res.Header,
22782 })
22783 }
22784 if err != nil {
22785 return nil, err
22786 }
22787 defer googleapi.CloseBody(res)
22788 if err := googleapi.CheckResponse(res); err != nil {
22789 return nil, gensupport.WrapError(err)
22790 }
22791 ret := &LogView{
22792 ServerResponse: googleapi.ServerResponse{
22793 Header: res.Header,
22794 HTTPStatusCode: res.StatusCode,
22795 },
22796 }
22797 target := &ret
22798 if err := gensupport.DecodeResponse(target, res); err != nil {
22799 return nil, err
22800 }
22801 return ret, nil
22802 }
22803
22804 type OrganizationsLocationsBucketsViewsDeleteCall struct {
22805 s *Service
22806 name string
22807 urlParams_ gensupport.URLParams
22808 ctx_ context.Context
22809 header_ http.Header
22810 }
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821 func (r *OrganizationsLocationsBucketsViewsService) Delete(name string) *OrganizationsLocationsBucketsViewsDeleteCall {
22822 c := &OrganizationsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22823 c.name = name
22824 return c
22825 }
22826
22827
22828
22829
22830 func (c *OrganizationsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsDeleteCall {
22831 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22832 return c
22833 }
22834
22835
22836 func (c *OrganizationsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsDeleteCall {
22837 c.ctx_ = ctx
22838 return c
22839 }
22840
22841
22842
22843 func (c *OrganizationsLocationsBucketsViewsDeleteCall) Header() http.Header {
22844 if c.header_ == nil {
22845 c.header_ = make(http.Header)
22846 }
22847 return c.header_
22848 }
22849
22850 func (c *OrganizationsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
22851 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22852 var body io.Reader = nil
22853 c.urlParams_.Set("alt", alt)
22854 c.urlParams_.Set("prettyPrint", "false")
22855 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
22856 urls += "?" + c.urlParams_.Encode()
22857 req, err := http.NewRequest("DELETE", urls, body)
22858 if err != nil {
22859 return nil, err
22860 }
22861 req.Header = reqHeaders
22862 googleapi.Expand(req.URL, map[string]string{
22863 "name": c.name,
22864 })
22865 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22866 }
22867
22868
22869
22870
22871
22872
22873 func (c *OrganizationsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
22874 gensupport.SetOptions(c.urlParams_, opts...)
22875 res, err := c.doRequest("json")
22876 if res != nil && res.StatusCode == http.StatusNotModified {
22877 if res.Body != nil {
22878 res.Body.Close()
22879 }
22880 return nil, gensupport.WrapError(&googleapi.Error{
22881 Code: res.StatusCode,
22882 Header: res.Header,
22883 })
22884 }
22885 if err != nil {
22886 return nil, err
22887 }
22888 defer googleapi.CloseBody(res)
22889 if err := googleapi.CheckResponse(res); err != nil {
22890 return nil, gensupport.WrapError(err)
22891 }
22892 ret := &Empty{
22893 ServerResponse: googleapi.ServerResponse{
22894 Header: res.Header,
22895 HTTPStatusCode: res.StatusCode,
22896 },
22897 }
22898 target := &ret
22899 if err := gensupport.DecodeResponse(target, res); err != nil {
22900 return nil, err
22901 }
22902 return ret, nil
22903 }
22904
22905 type OrganizationsLocationsBucketsViewsGetCall struct {
22906 s *Service
22907 name string
22908 urlParams_ gensupport.URLParams
22909 ifNoneMatch_ string
22910 ctx_ context.Context
22911 header_ http.Header
22912 }
22913
22914
22915
22916
22917
22918
22919
22920
22921 func (r *OrganizationsLocationsBucketsViewsService) Get(name string) *OrganizationsLocationsBucketsViewsGetCall {
22922 c := &OrganizationsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22923 c.name = name
22924 return c
22925 }
22926
22927
22928
22929
22930 func (c *OrganizationsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsGetCall {
22931 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22932 return c
22933 }
22934
22935
22936
22937
22938 func (c *OrganizationsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsGetCall {
22939 c.ifNoneMatch_ = entityTag
22940 return c
22941 }
22942
22943
22944 func (c *OrganizationsLocationsBucketsViewsGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsGetCall {
22945 c.ctx_ = ctx
22946 return c
22947 }
22948
22949
22950
22951 func (c *OrganizationsLocationsBucketsViewsGetCall) Header() http.Header {
22952 if c.header_ == nil {
22953 c.header_ = make(http.Header)
22954 }
22955 return c.header_
22956 }
22957
22958 func (c *OrganizationsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
22959 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22960 if c.ifNoneMatch_ != "" {
22961 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22962 }
22963 var body io.Reader = nil
22964 c.urlParams_.Set("alt", alt)
22965 c.urlParams_.Set("prettyPrint", "false")
22966 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
22967 urls += "?" + c.urlParams_.Encode()
22968 req, err := http.NewRequest("GET", urls, body)
22969 if err != nil {
22970 return nil, err
22971 }
22972 req.Header = reqHeaders
22973 googleapi.Expand(req.URL, map[string]string{
22974 "name": c.name,
22975 })
22976 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22977 }
22978
22979
22980
22981
22982
22983
22984 func (c *OrganizationsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
22985 gensupport.SetOptions(c.urlParams_, opts...)
22986 res, err := c.doRequest("json")
22987 if res != nil && res.StatusCode == http.StatusNotModified {
22988 if res.Body != nil {
22989 res.Body.Close()
22990 }
22991 return nil, gensupport.WrapError(&googleapi.Error{
22992 Code: res.StatusCode,
22993 Header: res.Header,
22994 })
22995 }
22996 if err != nil {
22997 return nil, err
22998 }
22999 defer googleapi.CloseBody(res)
23000 if err := googleapi.CheckResponse(res); err != nil {
23001 return nil, gensupport.WrapError(err)
23002 }
23003 ret := &LogView{
23004 ServerResponse: googleapi.ServerResponse{
23005 Header: res.Header,
23006 HTTPStatusCode: res.StatusCode,
23007 },
23008 }
23009 target := &ret
23010 if err := gensupport.DecodeResponse(target, res); err != nil {
23011 return nil, err
23012 }
23013 return ret, nil
23014 }
23015
23016 type OrganizationsLocationsBucketsViewsGetIamPolicyCall struct {
23017 s *Service
23018 resource string
23019 getiampolicyrequest *GetIamPolicyRequest
23020 urlParams_ gensupport.URLParams
23021 ctx_ context.Context
23022 header_ http.Header
23023 }
23024
23025
23026
23027
23028
23029
23030
23031 func (r *OrganizationsLocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *OrganizationsLocationsBucketsViewsGetIamPolicyCall {
23032 c := &OrganizationsLocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23033 c.resource = resource
23034 c.getiampolicyrequest = getiampolicyrequest
23035 return c
23036 }
23037
23038
23039
23040
23041 func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsGetIamPolicyCall {
23042 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23043 return c
23044 }
23045
23046
23047 func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsGetIamPolicyCall {
23048 c.ctx_ = ctx
23049 return c
23050 }
23051
23052
23053
23054 func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Header() http.Header {
23055 if c.header_ == nil {
23056 c.header_ = make(http.Header)
23057 }
23058 return c.header_
23059 }
23060
23061 func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
23062 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23063 var body io.Reader = nil
23064 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
23065 if err != nil {
23066 return nil, err
23067 }
23068 c.urlParams_.Set("alt", alt)
23069 c.urlParams_.Set("prettyPrint", "false")
23070 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
23071 urls += "?" + c.urlParams_.Encode()
23072 req, err := http.NewRequest("POST", urls, body)
23073 if err != nil {
23074 return nil, err
23075 }
23076 req.Header = reqHeaders
23077 googleapi.Expand(req.URL, map[string]string{
23078 "resource": c.resource,
23079 })
23080 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23081 }
23082
23083
23084
23085
23086
23087
23088 func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
23089 gensupport.SetOptions(c.urlParams_, opts...)
23090 res, err := c.doRequest("json")
23091 if res != nil && res.StatusCode == http.StatusNotModified {
23092 if res.Body != nil {
23093 res.Body.Close()
23094 }
23095 return nil, gensupport.WrapError(&googleapi.Error{
23096 Code: res.StatusCode,
23097 Header: res.Header,
23098 })
23099 }
23100 if err != nil {
23101 return nil, err
23102 }
23103 defer googleapi.CloseBody(res)
23104 if err := googleapi.CheckResponse(res); err != nil {
23105 return nil, gensupport.WrapError(err)
23106 }
23107 ret := &Policy{
23108 ServerResponse: googleapi.ServerResponse{
23109 Header: res.Header,
23110 HTTPStatusCode: res.StatusCode,
23111 },
23112 }
23113 target := &ret
23114 if err := gensupport.DecodeResponse(target, res); err != nil {
23115 return nil, err
23116 }
23117 return ret, nil
23118 }
23119
23120 type OrganizationsLocationsBucketsViewsListCall struct {
23121 s *Service
23122 parent string
23123 urlParams_ gensupport.URLParams
23124 ifNoneMatch_ string
23125 ctx_ context.Context
23126 header_ http.Header
23127 }
23128
23129
23130
23131
23132
23133 func (r *OrganizationsLocationsBucketsViewsService) List(parent string) *OrganizationsLocationsBucketsViewsListCall {
23134 c := &OrganizationsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23135 c.parent = parent
23136 return c
23137 }
23138
23139
23140
23141
23142
23143 func (c *OrganizationsLocationsBucketsViewsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsViewsListCall {
23144 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23145 return c
23146 }
23147
23148
23149
23150
23151
23152 func (c *OrganizationsLocationsBucketsViewsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsViewsListCall {
23153 c.urlParams_.Set("pageToken", pageToken)
23154 return c
23155 }
23156
23157
23158
23159
23160 func (c *OrganizationsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsListCall {
23161 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23162 return c
23163 }
23164
23165
23166
23167
23168 func (c *OrganizationsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsListCall {
23169 c.ifNoneMatch_ = entityTag
23170 return c
23171 }
23172
23173
23174 func (c *OrganizationsLocationsBucketsViewsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsListCall {
23175 c.ctx_ = ctx
23176 return c
23177 }
23178
23179
23180
23181 func (c *OrganizationsLocationsBucketsViewsListCall) Header() http.Header {
23182 if c.header_ == nil {
23183 c.header_ = make(http.Header)
23184 }
23185 return c.header_
23186 }
23187
23188 func (c *OrganizationsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
23189 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23190 if c.ifNoneMatch_ != "" {
23191 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23192 }
23193 var body io.Reader = nil
23194 c.urlParams_.Set("alt", alt)
23195 c.urlParams_.Set("prettyPrint", "false")
23196 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
23197 urls += "?" + c.urlParams_.Encode()
23198 req, err := http.NewRequest("GET", urls, body)
23199 if err != nil {
23200 return nil, err
23201 }
23202 req.Header = reqHeaders
23203 googleapi.Expand(req.URL, map[string]string{
23204 "parent": c.parent,
23205 })
23206 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23207 }
23208
23209
23210
23211
23212
23213
23214
23215 func (c *OrganizationsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
23216 gensupport.SetOptions(c.urlParams_, opts...)
23217 res, err := c.doRequest("json")
23218 if res != nil && res.StatusCode == http.StatusNotModified {
23219 if res.Body != nil {
23220 res.Body.Close()
23221 }
23222 return nil, gensupport.WrapError(&googleapi.Error{
23223 Code: res.StatusCode,
23224 Header: res.Header,
23225 })
23226 }
23227 if err != nil {
23228 return nil, err
23229 }
23230 defer googleapi.CloseBody(res)
23231 if err := googleapi.CheckResponse(res); err != nil {
23232 return nil, gensupport.WrapError(err)
23233 }
23234 ret := &ListViewsResponse{
23235 ServerResponse: googleapi.ServerResponse{
23236 Header: res.Header,
23237 HTTPStatusCode: res.StatusCode,
23238 },
23239 }
23240 target := &ret
23241 if err := gensupport.DecodeResponse(target, res); err != nil {
23242 return nil, err
23243 }
23244 return ret, nil
23245 }
23246
23247
23248
23249
23250 func (c *OrganizationsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
23251 c.ctx_ = ctx
23252 defer c.PageToken(c.urlParams_.Get("pageToken"))
23253 for {
23254 x, err := c.Do()
23255 if err != nil {
23256 return err
23257 }
23258 if err := f(x); err != nil {
23259 return err
23260 }
23261 if x.NextPageToken == "" {
23262 return nil
23263 }
23264 c.PageToken(x.NextPageToken)
23265 }
23266 }
23267
23268 type OrganizationsLocationsBucketsViewsPatchCall struct {
23269 s *Service
23270 name string
23271 logview *LogView
23272 urlParams_ gensupport.URLParams
23273 ctx_ context.Context
23274 header_ http.Header
23275 }
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288 func (r *OrganizationsLocationsBucketsViewsService) Patch(name string, logview *LogView) *OrganizationsLocationsBucketsViewsPatchCall {
23289 c := &OrganizationsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23290 c.name = name
23291 c.logview = logview
23292 return c
23293 }
23294
23295
23296
23297
23298
23299
23300
23301 func (c *OrganizationsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsViewsPatchCall {
23302 c.urlParams_.Set("updateMask", updateMask)
23303 return c
23304 }
23305
23306
23307
23308
23309 func (c *OrganizationsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsPatchCall {
23310 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23311 return c
23312 }
23313
23314
23315 func (c *OrganizationsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsPatchCall {
23316 c.ctx_ = ctx
23317 return c
23318 }
23319
23320
23321
23322 func (c *OrganizationsLocationsBucketsViewsPatchCall) Header() http.Header {
23323 if c.header_ == nil {
23324 c.header_ = make(http.Header)
23325 }
23326 return c.header_
23327 }
23328
23329 func (c *OrganizationsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
23330 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23331 var body io.Reader = nil
23332 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
23333 if err != nil {
23334 return nil, err
23335 }
23336 c.urlParams_.Set("alt", alt)
23337 c.urlParams_.Set("prettyPrint", "false")
23338 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
23339 urls += "?" + c.urlParams_.Encode()
23340 req, err := http.NewRequest("PATCH", urls, body)
23341 if err != nil {
23342 return nil, err
23343 }
23344 req.Header = reqHeaders
23345 googleapi.Expand(req.URL, map[string]string{
23346 "name": c.name,
23347 })
23348 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23349 }
23350
23351
23352
23353
23354
23355
23356 func (c *OrganizationsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
23357 gensupport.SetOptions(c.urlParams_, opts...)
23358 res, err := c.doRequest("json")
23359 if res != nil && res.StatusCode == http.StatusNotModified {
23360 if res.Body != nil {
23361 res.Body.Close()
23362 }
23363 return nil, gensupport.WrapError(&googleapi.Error{
23364 Code: res.StatusCode,
23365 Header: res.Header,
23366 })
23367 }
23368 if err != nil {
23369 return nil, err
23370 }
23371 defer googleapi.CloseBody(res)
23372 if err := googleapi.CheckResponse(res); err != nil {
23373 return nil, gensupport.WrapError(err)
23374 }
23375 ret := &LogView{
23376 ServerResponse: googleapi.ServerResponse{
23377 Header: res.Header,
23378 HTTPStatusCode: res.StatusCode,
23379 },
23380 }
23381 target := &ret
23382 if err := gensupport.DecodeResponse(target, res); err != nil {
23383 return nil, err
23384 }
23385 return ret, nil
23386 }
23387
23388 type OrganizationsLocationsBucketsViewsSetIamPolicyCall struct {
23389 s *Service
23390 resource string
23391 setiampolicyrequest *SetIamPolicyRequest
23392 urlParams_ gensupport.URLParams
23393 ctx_ context.Context
23394 header_ http.Header
23395 }
23396
23397
23398
23399
23400
23401
23402
23403
23404 func (r *OrganizationsLocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *OrganizationsLocationsBucketsViewsSetIamPolicyCall {
23405 c := &OrganizationsLocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23406 c.resource = resource
23407 c.setiampolicyrequest = setiampolicyrequest
23408 return c
23409 }
23410
23411
23412
23413
23414 func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsSetIamPolicyCall {
23415 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23416 return c
23417 }
23418
23419
23420 func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsSetIamPolicyCall {
23421 c.ctx_ = ctx
23422 return c
23423 }
23424
23425
23426
23427 func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Header() http.Header {
23428 if c.header_ == nil {
23429 c.header_ = make(http.Header)
23430 }
23431 return c.header_
23432 }
23433
23434 func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
23435 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23436 var body io.Reader = nil
23437 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
23438 if err != nil {
23439 return nil, err
23440 }
23441 c.urlParams_.Set("alt", alt)
23442 c.urlParams_.Set("prettyPrint", "false")
23443 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
23444 urls += "?" + c.urlParams_.Encode()
23445 req, err := http.NewRequest("POST", urls, body)
23446 if err != nil {
23447 return nil, err
23448 }
23449 req.Header = reqHeaders
23450 googleapi.Expand(req.URL, map[string]string{
23451 "resource": c.resource,
23452 })
23453 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23454 }
23455
23456
23457
23458
23459
23460
23461 func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
23462 gensupport.SetOptions(c.urlParams_, opts...)
23463 res, err := c.doRequest("json")
23464 if res != nil && res.StatusCode == http.StatusNotModified {
23465 if res.Body != nil {
23466 res.Body.Close()
23467 }
23468 return nil, gensupport.WrapError(&googleapi.Error{
23469 Code: res.StatusCode,
23470 Header: res.Header,
23471 })
23472 }
23473 if err != nil {
23474 return nil, err
23475 }
23476 defer googleapi.CloseBody(res)
23477 if err := googleapi.CheckResponse(res); err != nil {
23478 return nil, gensupport.WrapError(err)
23479 }
23480 ret := &Policy{
23481 ServerResponse: googleapi.ServerResponse{
23482 Header: res.Header,
23483 HTTPStatusCode: res.StatusCode,
23484 },
23485 }
23486 target := &ret
23487 if err := gensupport.DecodeResponse(target, res); err != nil {
23488 return nil, err
23489 }
23490 return ret, nil
23491 }
23492
23493 type OrganizationsLocationsBucketsViewsTestIamPermissionsCall struct {
23494 s *Service
23495 resource string
23496 testiampermissionsrequest *TestIamPermissionsRequest
23497 urlParams_ gensupport.URLParams
23498 ctx_ context.Context
23499 header_ http.Header
23500 }
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512 func (r *OrganizationsLocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall {
23513 c := &OrganizationsLocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23514 c.resource = resource
23515 c.testiampermissionsrequest = testiampermissionsrequest
23516 return c
23517 }
23518
23519
23520
23521
23522 func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall {
23523 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23524 return c
23525 }
23526
23527
23528 func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall {
23529 c.ctx_ = ctx
23530 return c
23531 }
23532
23533
23534
23535 func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Header() http.Header {
23536 if c.header_ == nil {
23537 c.header_ = make(http.Header)
23538 }
23539 return c.header_
23540 }
23541
23542 func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
23543 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23544 var body io.Reader = nil
23545 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
23546 if err != nil {
23547 return nil, err
23548 }
23549 c.urlParams_.Set("alt", alt)
23550 c.urlParams_.Set("prettyPrint", "false")
23551 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
23552 urls += "?" + c.urlParams_.Encode()
23553 req, err := http.NewRequest("POST", urls, body)
23554 if err != nil {
23555 return nil, err
23556 }
23557 req.Header = reqHeaders
23558 googleapi.Expand(req.URL, map[string]string{
23559 "resource": c.resource,
23560 })
23561 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23562 }
23563
23564
23565
23566
23567
23568
23569
23570 func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
23571 gensupport.SetOptions(c.urlParams_, opts...)
23572 res, err := c.doRequest("json")
23573 if res != nil && res.StatusCode == http.StatusNotModified {
23574 if res.Body != nil {
23575 res.Body.Close()
23576 }
23577 return nil, gensupport.WrapError(&googleapi.Error{
23578 Code: res.StatusCode,
23579 Header: res.Header,
23580 })
23581 }
23582 if err != nil {
23583 return nil, err
23584 }
23585 defer googleapi.CloseBody(res)
23586 if err := googleapi.CheckResponse(res); err != nil {
23587 return nil, gensupport.WrapError(err)
23588 }
23589 ret := &TestIamPermissionsResponse{
23590 ServerResponse: googleapi.ServerResponse{
23591 Header: res.Header,
23592 HTTPStatusCode: res.StatusCode,
23593 },
23594 }
23595 target := &ret
23596 if err := gensupport.DecodeResponse(target, res); err != nil {
23597 return nil, err
23598 }
23599 return ret, nil
23600 }
23601
23602 type OrganizationsLocationsBucketsViewsLogsListCall struct {
23603 s *Service
23604 parent string
23605 urlParams_ gensupport.URLParams
23606 ifNoneMatch_ string
23607 ctx_ context.Context
23608 header_ http.Header
23609 }
23610
23611
23612
23613
23614
23615
23616
23617 func (r *OrganizationsLocationsBucketsViewsLogsService) List(parent string) *OrganizationsLocationsBucketsViewsLogsListCall {
23618 c := &OrganizationsLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23619 c.parent = parent
23620 return c
23621 }
23622
23623
23624
23625
23626
23627 func (c *OrganizationsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsViewsLogsListCall {
23628 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23629 return c
23630 }
23631
23632
23633
23634
23635
23636 func (c *OrganizationsLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsViewsLogsListCall {
23637 c.urlParams_.Set("pageToken", pageToken)
23638 return c
23639 }
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654 func (c *OrganizationsLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *OrganizationsLocationsBucketsViewsLogsListCall {
23655 c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
23656 return c
23657 }
23658
23659
23660
23661
23662 func (c *OrganizationsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsLogsListCall {
23663 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23664 return c
23665 }
23666
23667
23668
23669
23670 func (c *OrganizationsLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsLogsListCall {
23671 c.ifNoneMatch_ = entityTag
23672 return c
23673 }
23674
23675
23676 func (c *OrganizationsLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsLogsListCall {
23677 c.ctx_ = ctx
23678 return c
23679 }
23680
23681
23682
23683 func (c *OrganizationsLocationsBucketsViewsLogsListCall) Header() http.Header {
23684 if c.header_ == nil {
23685 c.header_ = make(http.Header)
23686 }
23687 return c.header_
23688 }
23689
23690 func (c *OrganizationsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) {
23691 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23692 if c.ifNoneMatch_ != "" {
23693 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23694 }
23695 var body io.Reader = nil
23696 c.urlParams_.Set("alt", alt)
23697 c.urlParams_.Set("prettyPrint", "false")
23698 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
23699 urls += "?" + c.urlParams_.Encode()
23700 req, err := http.NewRequest("GET", urls, body)
23701 if err != nil {
23702 return nil, err
23703 }
23704 req.Header = reqHeaders
23705 googleapi.Expand(req.URL, map[string]string{
23706 "parent": c.parent,
23707 })
23708 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23709 }
23710
23711
23712
23713
23714
23715
23716
23717 func (c *OrganizationsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
23718 gensupport.SetOptions(c.urlParams_, opts...)
23719 res, err := c.doRequest("json")
23720 if res != nil && res.StatusCode == http.StatusNotModified {
23721 if res.Body != nil {
23722 res.Body.Close()
23723 }
23724 return nil, gensupport.WrapError(&googleapi.Error{
23725 Code: res.StatusCode,
23726 Header: res.Header,
23727 })
23728 }
23729 if err != nil {
23730 return nil, err
23731 }
23732 defer googleapi.CloseBody(res)
23733 if err := googleapi.CheckResponse(res); err != nil {
23734 return nil, gensupport.WrapError(err)
23735 }
23736 ret := &ListLogsResponse{
23737 ServerResponse: googleapi.ServerResponse{
23738 Header: res.Header,
23739 HTTPStatusCode: res.StatusCode,
23740 },
23741 }
23742 target := &ret
23743 if err := gensupport.DecodeResponse(target, res); err != nil {
23744 return nil, err
23745 }
23746 return ret, nil
23747 }
23748
23749
23750
23751
23752 func (c *OrganizationsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
23753 c.ctx_ = ctx
23754 defer c.PageToken(c.urlParams_.Get("pageToken"))
23755 for {
23756 x, err := c.Do()
23757 if err != nil {
23758 return err
23759 }
23760 if err := f(x); err != nil {
23761 return err
23762 }
23763 if x.NextPageToken == "" {
23764 return nil
23765 }
23766 c.PageToken(x.NextPageToken)
23767 }
23768 }
23769
23770 type OrganizationsLocationsOperationsCancelCall struct {
23771 s *Service
23772 name string
23773 canceloperationrequest *CancelOperationRequest
23774 urlParams_ gensupport.URLParams
23775 ctx_ context.Context
23776 header_ http.Header
23777 }
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790 func (r *OrganizationsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OrganizationsLocationsOperationsCancelCall {
23791 c := &OrganizationsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23792 c.name = name
23793 c.canceloperationrequest = canceloperationrequest
23794 return c
23795 }
23796
23797
23798
23799
23800 func (c *OrganizationsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsCancelCall {
23801 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23802 return c
23803 }
23804
23805
23806 func (c *OrganizationsLocationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsLocationsOperationsCancelCall {
23807 c.ctx_ = ctx
23808 return c
23809 }
23810
23811
23812
23813 func (c *OrganizationsLocationsOperationsCancelCall) Header() http.Header {
23814 if c.header_ == nil {
23815 c.header_ = make(http.Header)
23816 }
23817 return c.header_
23818 }
23819
23820 func (c *OrganizationsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
23821 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23822 var body io.Reader = nil
23823 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
23824 if err != nil {
23825 return nil, err
23826 }
23827 c.urlParams_.Set("alt", alt)
23828 c.urlParams_.Set("prettyPrint", "false")
23829 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
23830 urls += "?" + c.urlParams_.Encode()
23831 req, err := http.NewRequest("POST", urls, body)
23832 if err != nil {
23833 return nil, err
23834 }
23835 req.Header = reqHeaders
23836 googleapi.Expand(req.URL, map[string]string{
23837 "name": c.name,
23838 })
23839 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23840 }
23841
23842
23843
23844
23845
23846
23847 func (c *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
23848 gensupport.SetOptions(c.urlParams_, opts...)
23849 res, err := c.doRequest("json")
23850 if res != nil && res.StatusCode == http.StatusNotModified {
23851 if res.Body != nil {
23852 res.Body.Close()
23853 }
23854 return nil, gensupport.WrapError(&googleapi.Error{
23855 Code: res.StatusCode,
23856 Header: res.Header,
23857 })
23858 }
23859 if err != nil {
23860 return nil, err
23861 }
23862 defer googleapi.CloseBody(res)
23863 if err := googleapi.CheckResponse(res); err != nil {
23864 return nil, gensupport.WrapError(err)
23865 }
23866 ret := &Empty{
23867 ServerResponse: googleapi.ServerResponse{
23868 Header: res.Header,
23869 HTTPStatusCode: res.StatusCode,
23870 },
23871 }
23872 target := &ret
23873 if err := gensupport.DecodeResponse(target, res); err != nil {
23874 return nil, err
23875 }
23876 return ret, nil
23877 }
23878
23879 type OrganizationsLocationsOperationsGetCall struct {
23880 s *Service
23881 name string
23882 urlParams_ gensupport.URLParams
23883 ifNoneMatch_ string
23884 ctx_ context.Context
23885 header_ http.Header
23886 }
23887
23888
23889
23890
23891
23892
23893 func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall {
23894 c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23895 c.name = name
23896 return c
23897 }
23898
23899
23900
23901
23902 func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall {
23903 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23904 return c
23905 }
23906
23907
23908
23909
23910 func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall {
23911 c.ifNoneMatch_ = entityTag
23912 return c
23913 }
23914
23915
23916 func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall {
23917 c.ctx_ = ctx
23918 return c
23919 }
23920
23921
23922
23923 func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header {
23924 if c.header_ == nil {
23925 c.header_ = make(http.Header)
23926 }
23927 return c.header_
23928 }
23929
23930 func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
23931 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23932 if c.ifNoneMatch_ != "" {
23933 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23934 }
23935 var body io.Reader = nil
23936 c.urlParams_.Set("alt", alt)
23937 c.urlParams_.Set("prettyPrint", "false")
23938 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
23939 urls += "?" + c.urlParams_.Encode()
23940 req, err := http.NewRequest("GET", urls, body)
23941 if err != nil {
23942 return nil, err
23943 }
23944 req.Header = reqHeaders
23945 googleapi.Expand(req.URL, map[string]string{
23946 "name": c.name,
23947 })
23948 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23949 }
23950
23951
23952
23953
23954
23955
23956 func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23957 gensupport.SetOptions(c.urlParams_, opts...)
23958 res, err := c.doRequest("json")
23959 if res != nil && res.StatusCode == http.StatusNotModified {
23960 if res.Body != nil {
23961 res.Body.Close()
23962 }
23963 return nil, gensupport.WrapError(&googleapi.Error{
23964 Code: res.StatusCode,
23965 Header: res.Header,
23966 })
23967 }
23968 if err != nil {
23969 return nil, err
23970 }
23971 defer googleapi.CloseBody(res)
23972 if err := googleapi.CheckResponse(res); err != nil {
23973 return nil, gensupport.WrapError(err)
23974 }
23975 ret := &Operation{
23976 ServerResponse: googleapi.ServerResponse{
23977 Header: res.Header,
23978 HTTPStatusCode: res.StatusCode,
23979 },
23980 }
23981 target := &ret
23982 if err := gensupport.DecodeResponse(target, res); err != nil {
23983 return nil, err
23984 }
23985 return ret, nil
23986 }
23987
23988 type OrganizationsLocationsOperationsListCall struct {
23989 s *Service
23990 name string
23991 urlParams_ gensupport.URLParams
23992 ifNoneMatch_ string
23993 ctx_ context.Context
23994 header_ http.Header
23995 }
23996
23997
23998
23999
24000
24001 func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall {
24002 c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24003 c.name = name
24004 return c
24005 }
24006
24007
24008 func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall {
24009 c.urlParams_.Set("filter", filter)
24010 return c
24011 }
24012
24013
24014
24015 func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall {
24016 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24017 return c
24018 }
24019
24020
24021
24022 func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall {
24023 c.urlParams_.Set("pageToken", pageToken)
24024 return c
24025 }
24026
24027
24028
24029
24030 func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall {
24031 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24032 return c
24033 }
24034
24035
24036
24037
24038 func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall {
24039 c.ifNoneMatch_ = entityTag
24040 return c
24041 }
24042
24043
24044 func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall {
24045 c.ctx_ = ctx
24046 return c
24047 }
24048
24049
24050
24051 func (c *OrganizationsLocationsOperationsListCall) Header() http.Header {
24052 if c.header_ == nil {
24053 c.header_ = make(http.Header)
24054 }
24055 return c.header_
24056 }
24057
24058 func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
24059 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24060 if c.ifNoneMatch_ != "" {
24061 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24062 }
24063 var body io.Reader = nil
24064 c.urlParams_.Set("alt", alt)
24065 c.urlParams_.Set("prettyPrint", "false")
24066 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
24067 urls += "?" + c.urlParams_.Encode()
24068 req, err := http.NewRequest("GET", urls, body)
24069 if err != nil {
24070 return nil, err
24071 }
24072 req.Header = reqHeaders
24073 googleapi.Expand(req.URL, map[string]string{
24074 "name": c.name,
24075 })
24076 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24077 }
24078
24079
24080
24081
24082
24083
24084
24085 func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
24086 gensupport.SetOptions(c.urlParams_, opts...)
24087 res, err := c.doRequest("json")
24088 if res != nil && res.StatusCode == http.StatusNotModified {
24089 if res.Body != nil {
24090 res.Body.Close()
24091 }
24092 return nil, gensupport.WrapError(&googleapi.Error{
24093 Code: res.StatusCode,
24094 Header: res.Header,
24095 })
24096 }
24097 if err != nil {
24098 return nil, err
24099 }
24100 defer googleapi.CloseBody(res)
24101 if err := googleapi.CheckResponse(res); err != nil {
24102 return nil, gensupport.WrapError(err)
24103 }
24104 ret := &ListOperationsResponse{
24105 ServerResponse: googleapi.ServerResponse{
24106 Header: res.Header,
24107 HTTPStatusCode: res.StatusCode,
24108 },
24109 }
24110 target := &ret
24111 if err := gensupport.DecodeResponse(target, res); err != nil {
24112 return nil, err
24113 }
24114 return ret, nil
24115 }
24116
24117
24118
24119
24120 func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
24121 c.ctx_ = ctx
24122 defer c.PageToken(c.urlParams_.Get("pageToken"))
24123 for {
24124 x, err := c.Do()
24125 if err != nil {
24126 return err
24127 }
24128 if err := f(x); err != nil {
24129 return err
24130 }
24131 if x.NextPageToken == "" {
24132 return nil
24133 }
24134 c.PageToken(x.NextPageToken)
24135 }
24136 }
24137
24138 type OrganizationsLocationsRecentQueriesListCall struct {
24139 s *Service
24140 parent string
24141 urlParams_ gensupport.URLParams
24142 ifNoneMatch_ string
24143 ctx_ context.Context
24144 header_ http.Header
24145 }
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158 func (r *OrganizationsLocationsRecentQueriesService) List(parent string) *OrganizationsLocationsRecentQueriesListCall {
24159 c := &OrganizationsLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24160 c.parent = parent
24161 return c
24162 }
24163
24164
24165
24166
24167
24168 func (c *OrganizationsLocationsRecentQueriesListCall) PageSize(pageSize int64) *OrganizationsLocationsRecentQueriesListCall {
24169 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24170 return c
24171 }
24172
24173
24174
24175
24176
24177 func (c *OrganizationsLocationsRecentQueriesListCall) PageToken(pageToken string) *OrganizationsLocationsRecentQueriesListCall {
24178 c.urlParams_.Set("pageToken", pageToken)
24179 return c
24180 }
24181
24182
24183
24184
24185 func (c *OrganizationsLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsRecentQueriesListCall {
24186 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24187 return c
24188 }
24189
24190
24191
24192
24193 func (c *OrganizationsLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsRecentQueriesListCall {
24194 c.ifNoneMatch_ = entityTag
24195 return c
24196 }
24197
24198
24199 func (c *OrganizationsLocationsRecentQueriesListCall) Context(ctx context.Context) *OrganizationsLocationsRecentQueriesListCall {
24200 c.ctx_ = ctx
24201 return c
24202 }
24203
24204
24205
24206 func (c *OrganizationsLocationsRecentQueriesListCall) Header() http.Header {
24207 if c.header_ == nil {
24208 c.header_ = make(http.Header)
24209 }
24210 return c.header_
24211 }
24212
24213 func (c *OrganizationsLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) {
24214 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24215 if c.ifNoneMatch_ != "" {
24216 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24217 }
24218 var body io.Reader = nil
24219 c.urlParams_.Set("alt", alt)
24220 c.urlParams_.Set("prettyPrint", "false")
24221 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries")
24222 urls += "?" + c.urlParams_.Encode()
24223 req, err := http.NewRequest("GET", urls, body)
24224 if err != nil {
24225 return nil, err
24226 }
24227 req.Header = reqHeaders
24228 googleapi.Expand(req.URL, map[string]string{
24229 "parent": c.parent,
24230 })
24231 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24232 }
24233
24234
24235
24236
24237
24238
24239
24240 func (c *OrganizationsLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) {
24241 gensupport.SetOptions(c.urlParams_, opts...)
24242 res, err := c.doRequest("json")
24243 if res != nil && res.StatusCode == http.StatusNotModified {
24244 if res.Body != nil {
24245 res.Body.Close()
24246 }
24247 return nil, gensupport.WrapError(&googleapi.Error{
24248 Code: res.StatusCode,
24249 Header: res.Header,
24250 })
24251 }
24252 if err != nil {
24253 return nil, err
24254 }
24255 defer googleapi.CloseBody(res)
24256 if err := googleapi.CheckResponse(res); err != nil {
24257 return nil, gensupport.WrapError(err)
24258 }
24259 ret := &ListRecentQueriesResponse{
24260 ServerResponse: googleapi.ServerResponse{
24261 Header: res.Header,
24262 HTTPStatusCode: res.StatusCode,
24263 },
24264 }
24265 target := &ret
24266 if err := gensupport.DecodeResponse(target, res); err != nil {
24267 return nil, err
24268 }
24269 return ret, nil
24270 }
24271
24272
24273
24274
24275 func (c *OrganizationsLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error {
24276 c.ctx_ = ctx
24277 defer c.PageToken(c.urlParams_.Get("pageToken"))
24278 for {
24279 x, err := c.Do()
24280 if err != nil {
24281 return err
24282 }
24283 if err := f(x); err != nil {
24284 return err
24285 }
24286 if x.NextPageToken == "" {
24287 return nil
24288 }
24289 c.PageToken(x.NextPageToken)
24290 }
24291 }
24292
24293 type OrganizationsLocationsSavedQueriesCreateCall struct {
24294 s *Service
24295 parent string
24296 savedquery *SavedQuery
24297 urlParams_ gensupport.URLParams
24298 ctx_ context.Context
24299 header_ http.Header
24300 }
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311 func (r *OrganizationsLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *OrganizationsLocationsSavedQueriesCreateCall {
24312 c := &OrganizationsLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24313 c.parent = parent
24314 c.savedquery = savedquery
24315 return c
24316 }
24317
24318
24319
24320
24321
24322
24323
24324
24325 func (c *OrganizationsLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *OrganizationsLocationsSavedQueriesCreateCall {
24326 c.urlParams_.Set("savedQueryId", savedQueryId)
24327 return c
24328 }
24329
24330
24331
24332
24333 func (c *OrganizationsLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesCreateCall {
24334 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24335 return c
24336 }
24337
24338
24339 func (c *OrganizationsLocationsSavedQueriesCreateCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesCreateCall {
24340 c.ctx_ = ctx
24341 return c
24342 }
24343
24344
24345
24346 func (c *OrganizationsLocationsSavedQueriesCreateCall) Header() http.Header {
24347 if c.header_ == nil {
24348 c.header_ = make(http.Header)
24349 }
24350 return c.header_
24351 }
24352
24353 func (c *OrganizationsLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) {
24354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24355 var body io.Reader = nil
24356 body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery)
24357 if err != nil {
24358 return nil, err
24359 }
24360 c.urlParams_.Set("alt", alt)
24361 c.urlParams_.Set("prettyPrint", "false")
24362 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
24363 urls += "?" + c.urlParams_.Encode()
24364 req, err := http.NewRequest("POST", urls, body)
24365 if err != nil {
24366 return nil, err
24367 }
24368 req.Header = reqHeaders
24369 googleapi.Expand(req.URL, map[string]string{
24370 "parent": c.parent,
24371 })
24372 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24373 }
24374
24375
24376
24377
24378
24379
24380 func (c *OrganizationsLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
24381 gensupport.SetOptions(c.urlParams_, opts...)
24382 res, err := c.doRequest("json")
24383 if res != nil && res.StatusCode == http.StatusNotModified {
24384 if res.Body != nil {
24385 res.Body.Close()
24386 }
24387 return nil, gensupport.WrapError(&googleapi.Error{
24388 Code: res.StatusCode,
24389 Header: res.Header,
24390 })
24391 }
24392 if err != nil {
24393 return nil, err
24394 }
24395 defer googleapi.CloseBody(res)
24396 if err := googleapi.CheckResponse(res); err != nil {
24397 return nil, gensupport.WrapError(err)
24398 }
24399 ret := &SavedQuery{
24400 ServerResponse: googleapi.ServerResponse{
24401 Header: res.Header,
24402 HTTPStatusCode: res.StatusCode,
24403 },
24404 }
24405 target := &ret
24406 if err := gensupport.DecodeResponse(target, res); err != nil {
24407 return nil, err
24408 }
24409 return ret, nil
24410 }
24411
24412 type OrganizationsLocationsSavedQueriesDeleteCall struct {
24413 s *Service
24414 name string
24415 urlParams_ gensupport.URLParams
24416 ctx_ context.Context
24417 header_ http.Header
24418 }
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432 func (r *OrganizationsLocationsSavedQueriesService) Delete(name string) *OrganizationsLocationsSavedQueriesDeleteCall {
24433 c := &OrganizationsLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24434 c.name = name
24435 return c
24436 }
24437
24438
24439
24440
24441 func (c *OrganizationsLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesDeleteCall {
24442 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24443 return c
24444 }
24445
24446
24447 func (c *OrganizationsLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesDeleteCall {
24448 c.ctx_ = ctx
24449 return c
24450 }
24451
24452
24453
24454 func (c *OrganizationsLocationsSavedQueriesDeleteCall) Header() http.Header {
24455 if c.header_ == nil {
24456 c.header_ = make(http.Header)
24457 }
24458 return c.header_
24459 }
24460
24461 func (c *OrganizationsLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) {
24462 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24463 var body io.Reader = nil
24464 c.urlParams_.Set("alt", alt)
24465 c.urlParams_.Set("prettyPrint", "false")
24466 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
24467 urls += "?" + c.urlParams_.Encode()
24468 req, err := http.NewRequest("DELETE", urls, body)
24469 if err != nil {
24470 return nil, err
24471 }
24472 req.Header = reqHeaders
24473 googleapi.Expand(req.URL, map[string]string{
24474 "name": c.name,
24475 })
24476 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24477 }
24478
24479
24480
24481
24482
24483
24484 func (c *OrganizationsLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
24485 gensupport.SetOptions(c.urlParams_, opts...)
24486 res, err := c.doRequest("json")
24487 if res != nil && res.StatusCode == http.StatusNotModified {
24488 if res.Body != nil {
24489 res.Body.Close()
24490 }
24491 return nil, gensupport.WrapError(&googleapi.Error{
24492 Code: res.StatusCode,
24493 Header: res.Header,
24494 })
24495 }
24496 if err != nil {
24497 return nil, err
24498 }
24499 defer googleapi.CloseBody(res)
24500 if err := googleapi.CheckResponse(res); err != nil {
24501 return nil, gensupport.WrapError(err)
24502 }
24503 ret := &Empty{
24504 ServerResponse: googleapi.ServerResponse{
24505 Header: res.Header,
24506 HTTPStatusCode: res.StatusCode,
24507 },
24508 }
24509 target := &ret
24510 if err := gensupport.DecodeResponse(target, res); err != nil {
24511 return nil, err
24512 }
24513 return ret, nil
24514 }
24515
24516 type OrganizationsLocationsSavedQueriesListCall struct {
24517 s *Service
24518 parent string
24519 urlParams_ gensupport.URLParams
24520 ifNoneMatch_ string
24521 ctx_ context.Context
24522 header_ http.Header
24523 }
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537 func (r *OrganizationsLocationsSavedQueriesService) List(parent string) *OrganizationsLocationsSavedQueriesListCall {
24538 c := &OrganizationsLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24539 c.parent = parent
24540 return c
24541 }
24542
24543
24544
24545
24546
24547 func (c *OrganizationsLocationsSavedQueriesListCall) PageSize(pageSize int64) *OrganizationsLocationsSavedQueriesListCall {
24548 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24549 return c
24550 }
24551
24552
24553
24554
24555
24556 func (c *OrganizationsLocationsSavedQueriesListCall) PageToken(pageToken string) *OrganizationsLocationsSavedQueriesListCall {
24557 c.urlParams_.Set("pageToken", pageToken)
24558 return c
24559 }
24560
24561
24562
24563
24564 func (c *OrganizationsLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesListCall {
24565 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24566 return c
24567 }
24568
24569
24570
24571
24572 func (c *OrganizationsLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSavedQueriesListCall {
24573 c.ifNoneMatch_ = entityTag
24574 return c
24575 }
24576
24577
24578 func (c *OrganizationsLocationsSavedQueriesListCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesListCall {
24579 c.ctx_ = ctx
24580 return c
24581 }
24582
24583
24584
24585 func (c *OrganizationsLocationsSavedQueriesListCall) Header() http.Header {
24586 if c.header_ == nil {
24587 c.header_ = make(http.Header)
24588 }
24589 return c.header_
24590 }
24591
24592 func (c *OrganizationsLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) {
24593 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24594 if c.ifNoneMatch_ != "" {
24595 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24596 }
24597 var body io.Reader = nil
24598 c.urlParams_.Set("alt", alt)
24599 c.urlParams_.Set("prettyPrint", "false")
24600 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
24601 urls += "?" + c.urlParams_.Encode()
24602 req, err := http.NewRequest("GET", urls, body)
24603 if err != nil {
24604 return nil, err
24605 }
24606 req.Header = reqHeaders
24607 googleapi.Expand(req.URL, map[string]string{
24608 "parent": c.parent,
24609 })
24610 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24611 }
24612
24613
24614
24615
24616
24617
24618
24619 func (c *OrganizationsLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) {
24620 gensupport.SetOptions(c.urlParams_, opts...)
24621 res, err := c.doRequest("json")
24622 if res != nil && res.StatusCode == http.StatusNotModified {
24623 if res.Body != nil {
24624 res.Body.Close()
24625 }
24626 return nil, gensupport.WrapError(&googleapi.Error{
24627 Code: res.StatusCode,
24628 Header: res.Header,
24629 })
24630 }
24631 if err != nil {
24632 return nil, err
24633 }
24634 defer googleapi.CloseBody(res)
24635 if err := googleapi.CheckResponse(res); err != nil {
24636 return nil, gensupport.WrapError(err)
24637 }
24638 ret := &ListSavedQueriesResponse{
24639 ServerResponse: googleapi.ServerResponse{
24640 Header: res.Header,
24641 HTTPStatusCode: res.StatusCode,
24642 },
24643 }
24644 target := &ret
24645 if err := gensupport.DecodeResponse(target, res); err != nil {
24646 return nil, err
24647 }
24648 return ret, nil
24649 }
24650
24651
24652
24653
24654 func (c *OrganizationsLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error {
24655 c.ctx_ = ctx
24656 defer c.PageToken(c.urlParams_.Get("pageToken"))
24657 for {
24658 x, err := c.Do()
24659 if err != nil {
24660 return err
24661 }
24662 if err := f(x); err != nil {
24663 return err
24664 }
24665 if x.NextPageToken == "" {
24666 return nil
24667 }
24668 c.PageToken(x.NextPageToken)
24669 }
24670 }
24671
24672 type OrganizationsLogsDeleteCall struct {
24673 s *Service
24674 logName string
24675 urlParams_ gensupport.URLParams
24676 ctx_ context.Context
24677 header_ http.Header
24678 }
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693 func (r *OrganizationsLogsService) Delete(logName string) *OrganizationsLogsDeleteCall {
24694 c := &OrganizationsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24695 c.logName = logName
24696 return c
24697 }
24698
24699
24700
24701
24702 func (c *OrganizationsLogsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLogsDeleteCall {
24703 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24704 return c
24705 }
24706
24707
24708 func (c *OrganizationsLogsDeleteCall) Context(ctx context.Context) *OrganizationsLogsDeleteCall {
24709 c.ctx_ = ctx
24710 return c
24711 }
24712
24713
24714
24715 func (c *OrganizationsLogsDeleteCall) Header() http.Header {
24716 if c.header_ == nil {
24717 c.header_ = make(http.Header)
24718 }
24719 return c.header_
24720 }
24721
24722 func (c *OrganizationsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
24723 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24724 var body io.Reader = nil
24725 c.urlParams_.Set("alt", alt)
24726 c.urlParams_.Set("prettyPrint", "false")
24727 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
24728 urls += "?" + c.urlParams_.Encode()
24729 req, err := http.NewRequest("DELETE", urls, body)
24730 if err != nil {
24731 return nil, err
24732 }
24733 req.Header = reqHeaders
24734 googleapi.Expand(req.URL, map[string]string{
24735 "logName": c.logName,
24736 })
24737 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24738 }
24739
24740
24741
24742
24743
24744
24745 func (c *OrganizationsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
24746 gensupport.SetOptions(c.urlParams_, opts...)
24747 res, err := c.doRequest("json")
24748 if res != nil && res.StatusCode == http.StatusNotModified {
24749 if res.Body != nil {
24750 res.Body.Close()
24751 }
24752 return nil, gensupport.WrapError(&googleapi.Error{
24753 Code: res.StatusCode,
24754 Header: res.Header,
24755 })
24756 }
24757 if err != nil {
24758 return nil, err
24759 }
24760 defer googleapi.CloseBody(res)
24761 if err := googleapi.CheckResponse(res); err != nil {
24762 return nil, gensupport.WrapError(err)
24763 }
24764 ret := &Empty{
24765 ServerResponse: googleapi.ServerResponse{
24766 Header: res.Header,
24767 HTTPStatusCode: res.StatusCode,
24768 },
24769 }
24770 target := &ret
24771 if err := gensupport.DecodeResponse(target, res); err != nil {
24772 return nil, err
24773 }
24774 return ret, nil
24775 }
24776
24777 type OrganizationsLogsListCall struct {
24778 s *Service
24779 parent string
24780 urlParams_ gensupport.URLParams
24781 ifNoneMatch_ string
24782 ctx_ context.Context
24783 header_ http.Header
24784 }
24785
24786
24787
24788
24789
24790
24791
24792 func (r *OrganizationsLogsService) List(parent string) *OrganizationsLogsListCall {
24793 c := &OrganizationsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24794 c.parent = parent
24795 return c
24796 }
24797
24798
24799
24800
24801
24802 func (c *OrganizationsLogsListCall) PageSize(pageSize int64) *OrganizationsLogsListCall {
24803 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24804 return c
24805 }
24806
24807
24808
24809
24810
24811 func (c *OrganizationsLogsListCall) PageToken(pageToken string) *OrganizationsLogsListCall {
24812 c.urlParams_.Set("pageToken", pageToken)
24813 return c
24814 }
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829 func (c *OrganizationsLogsListCall) ResourceNames(resourceNames ...string) *OrganizationsLogsListCall {
24830 c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
24831 return c
24832 }
24833
24834
24835
24836
24837 func (c *OrganizationsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsLogsListCall {
24838 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24839 return c
24840 }
24841
24842
24843
24844
24845 func (c *OrganizationsLogsListCall) IfNoneMatch(entityTag string) *OrganizationsLogsListCall {
24846 c.ifNoneMatch_ = entityTag
24847 return c
24848 }
24849
24850
24851 func (c *OrganizationsLogsListCall) Context(ctx context.Context) *OrganizationsLogsListCall {
24852 c.ctx_ = ctx
24853 return c
24854 }
24855
24856
24857
24858 func (c *OrganizationsLogsListCall) Header() http.Header {
24859 if c.header_ == nil {
24860 c.header_ = make(http.Header)
24861 }
24862 return c.header_
24863 }
24864
24865 func (c *OrganizationsLogsListCall) doRequest(alt string) (*http.Response, error) {
24866 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24867 if c.ifNoneMatch_ != "" {
24868 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24869 }
24870 var body io.Reader = nil
24871 c.urlParams_.Set("alt", alt)
24872 c.urlParams_.Set("prettyPrint", "false")
24873 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
24874 urls += "?" + c.urlParams_.Encode()
24875 req, err := http.NewRequest("GET", urls, body)
24876 if err != nil {
24877 return nil, err
24878 }
24879 req.Header = reqHeaders
24880 googleapi.Expand(req.URL, map[string]string{
24881 "parent": c.parent,
24882 })
24883 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24884 }
24885
24886
24887
24888
24889
24890
24891
24892 func (c *OrganizationsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
24893 gensupport.SetOptions(c.urlParams_, opts...)
24894 res, err := c.doRequest("json")
24895 if res != nil && res.StatusCode == http.StatusNotModified {
24896 if res.Body != nil {
24897 res.Body.Close()
24898 }
24899 return nil, gensupport.WrapError(&googleapi.Error{
24900 Code: res.StatusCode,
24901 Header: res.Header,
24902 })
24903 }
24904 if err != nil {
24905 return nil, err
24906 }
24907 defer googleapi.CloseBody(res)
24908 if err := googleapi.CheckResponse(res); err != nil {
24909 return nil, gensupport.WrapError(err)
24910 }
24911 ret := &ListLogsResponse{
24912 ServerResponse: googleapi.ServerResponse{
24913 Header: res.Header,
24914 HTTPStatusCode: res.StatusCode,
24915 },
24916 }
24917 target := &ret
24918 if err := gensupport.DecodeResponse(target, res); err != nil {
24919 return nil, err
24920 }
24921 return ret, nil
24922 }
24923
24924
24925
24926
24927 func (c *OrganizationsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
24928 c.ctx_ = ctx
24929 defer c.PageToken(c.urlParams_.Get("pageToken"))
24930 for {
24931 x, err := c.Do()
24932 if err != nil {
24933 return err
24934 }
24935 if err := f(x); err != nil {
24936 return err
24937 }
24938 if x.NextPageToken == "" {
24939 return nil
24940 }
24941 c.PageToken(x.NextPageToken)
24942 }
24943 }
24944
24945 type OrganizationsSinksCreateCall struct {
24946 s *Service
24947 parent string
24948 logsink *LogSink
24949 urlParams_ gensupport.URLParams
24950 ctx_ context.Context
24951 header_ http.Header
24952 }
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963 func (r *OrganizationsSinksService) Create(parent string, logsink *LogSink) *OrganizationsSinksCreateCall {
24964 c := &OrganizationsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24965 c.parent = parent
24966 c.logsink = logsink
24967 return c
24968 }
24969
24970
24971
24972
24973
24974
24975
24976 func (c *OrganizationsSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksCreateCall {
24977 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
24978 return c
24979 }
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993 func (c *OrganizationsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksCreateCall {
24994 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
24995 return c
24996 }
24997
24998
24999
25000
25001 func (c *OrganizationsSinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsSinksCreateCall {
25002 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25003 return c
25004 }
25005
25006
25007 func (c *OrganizationsSinksCreateCall) Context(ctx context.Context) *OrganizationsSinksCreateCall {
25008 c.ctx_ = ctx
25009 return c
25010 }
25011
25012
25013
25014 func (c *OrganizationsSinksCreateCall) Header() http.Header {
25015 if c.header_ == nil {
25016 c.header_ = make(http.Header)
25017 }
25018 return c.header_
25019 }
25020
25021 func (c *OrganizationsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
25022 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25023 var body io.Reader = nil
25024 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
25025 if err != nil {
25026 return nil, err
25027 }
25028 c.urlParams_.Set("alt", alt)
25029 c.urlParams_.Set("prettyPrint", "false")
25030 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
25031 urls += "?" + c.urlParams_.Encode()
25032 req, err := http.NewRequest("POST", urls, body)
25033 if err != nil {
25034 return nil, err
25035 }
25036 req.Header = reqHeaders
25037 googleapi.Expand(req.URL, map[string]string{
25038 "parent": c.parent,
25039 })
25040 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25041 }
25042
25043
25044
25045
25046
25047
25048 func (c *OrganizationsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
25049 gensupport.SetOptions(c.urlParams_, opts...)
25050 res, err := c.doRequest("json")
25051 if res != nil && res.StatusCode == http.StatusNotModified {
25052 if res.Body != nil {
25053 res.Body.Close()
25054 }
25055 return nil, gensupport.WrapError(&googleapi.Error{
25056 Code: res.StatusCode,
25057 Header: res.Header,
25058 })
25059 }
25060 if err != nil {
25061 return nil, err
25062 }
25063 defer googleapi.CloseBody(res)
25064 if err := googleapi.CheckResponse(res); err != nil {
25065 return nil, gensupport.WrapError(err)
25066 }
25067 ret := &LogSink{
25068 ServerResponse: googleapi.ServerResponse{
25069 Header: res.Header,
25070 HTTPStatusCode: res.StatusCode,
25071 },
25072 }
25073 target := &ret
25074 if err := gensupport.DecodeResponse(target, res); err != nil {
25075 return nil, err
25076 }
25077 return ret, nil
25078 }
25079
25080 type OrganizationsSinksDeleteCall struct {
25081 s *Service
25082 sinkNameid string
25083 urlParams_ gensupport.URLParams
25084 ctx_ context.Context
25085 header_ http.Header
25086 }
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098 func (r *OrganizationsSinksService) Delete(sinkNameid string) *OrganizationsSinksDeleteCall {
25099 c := &OrganizationsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25100 c.sinkNameid = sinkNameid
25101 return c
25102 }
25103
25104
25105
25106
25107 func (c *OrganizationsSinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsSinksDeleteCall {
25108 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25109 return c
25110 }
25111
25112
25113 func (c *OrganizationsSinksDeleteCall) Context(ctx context.Context) *OrganizationsSinksDeleteCall {
25114 c.ctx_ = ctx
25115 return c
25116 }
25117
25118
25119
25120 func (c *OrganizationsSinksDeleteCall) Header() http.Header {
25121 if c.header_ == nil {
25122 c.header_ = make(http.Header)
25123 }
25124 return c.header_
25125 }
25126
25127 func (c *OrganizationsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
25128 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25129 var body io.Reader = nil
25130 c.urlParams_.Set("alt", alt)
25131 c.urlParams_.Set("prettyPrint", "false")
25132 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
25133 urls += "?" + c.urlParams_.Encode()
25134 req, err := http.NewRequest("DELETE", urls, body)
25135 if err != nil {
25136 return nil, err
25137 }
25138 req.Header = reqHeaders
25139 googleapi.Expand(req.URL, map[string]string{
25140 "sinkName": c.sinkNameid,
25141 })
25142 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25143 }
25144
25145
25146
25147
25148
25149
25150 func (c *OrganizationsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
25151 gensupport.SetOptions(c.urlParams_, opts...)
25152 res, err := c.doRequest("json")
25153 if res != nil && res.StatusCode == http.StatusNotModified {
25154 if res.Body != nil {
25155 res.Body.Close()
25156 }
25157 return nil, gensupport.WrapError(&googleapi.Error{
25158 Code: res.StatusCode,
25159 Header: res.Header,
25160 })
25161 }
25162 if err != nil {
25163 return nil, err
25164 }
25165 defer googleapi.CloseBody(res)
25166 if err := googleapi.CheckResponse(res); err != nil {
25167 return nil, gensupport.WrapError(err)
25168 }
25169 ret := &Empty{
25170 ServerResponse: googleapi.ServerResponse{
25171 Header: res.Header,
25172 HTTPStatusCode: res.StatusCode,
25173 },
25174 }
25175 target := &ret
25176 if err := gensupport.DecodeResponse(target, res); err != nil {
25177 return nil, err
25178 }
25179 return ret, nil
25180 }
25181
25182 type OrganizationsSinksGetCall struct {
25183 s *Service
25184 sinkName string
25185 urlParams_ gensupport.URLParams
25186 ifNoneMatch_ string
25187 ctx_ context.Context
25188 header_ http.Header
25189 }
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199 func (r *OrganizationsSinksService) Get(sinkName string) *OrganizationsSinksGetCall {
25200 c := &OrganizationsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25201 c.sinkName = sinkName
25202 return c
25203 }
25204
25205
25206
25207
25208 func (c *OrganizationsSinksGetCall) Fields(s ...googleapi.Field) *OrganizationsSinksGetCall {
25209 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25210 return c
25211 }
25212
25213
25214
25215
25216 func (c *OrganizationsSinksGetCall) IfNoneMatch(entityTag string) *OrganizationsSinksGetCall {
25217 c.ifNoneMatch_ = entityTag
25218 return c
25219 }
25220
25221
25222 func (c *OrganizationsSinksGetCall) Context(ctx context.Context) *OrganizationsSinksGetCall {
25223 c.ctx_ = ctx
25224 return c
25225 }
25226
25227
25228
25229 func (c *OrganizationsSinksGetCall) Header() http.Header {
25230 if c.header_ == nil {
25231 c.header_ = make(http.Header)
25232 }
25233 return c.header_
25234 }
25235
25236 func (c *OrganizationsSinksGetCall) doRequest(alt string) (*http.Response, error) {
25237 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25238 if c.ifNoneMatch_ != "" {
25239 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25240 }
25241 var body io.Reader = nil
25242 c.urlParams_.Set("alt", alt)
25243 c.urlParams_.Set("prettyPrint", "false")
25244 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
25245 urls += "?" + c.urlParams_.Encode()
25246 req, err := http.NewRequest("GET", urls, body)
25247 if err != nil {
25248 return nil, err
25249 }
25250 req.Header = reqHeaders
25251 googleapi.Expand(req.URL, map[string]string{
25252 "sinkName": c.sinkName,
25253 })
25254 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25255 }
25256
25257
25258
25259
25260
25261
25262 func (c *OrganizationsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
25263 gensupport.SetOptions(c.urlParams_, opts...)
25264 res, err := c.doRequest("json")
25265 if res != nil && res.StatusCode == http.StatusNotModified {
25266 if res.Body != nil {
25267 res.Body.Close()
25268 }
25269 return nil, gensupport.WrapError(&googleapi.Error{
25270 Code: res.StatusCode,
25271 Header: res.Header,
25272 })
25273 }
25274 if err != nil {
25275 return nil, err
25276 }
25277 defer googleapi.CloseBody(res)
25278 if err := googleapi.CheckResponse(res); err != nil {
25279 return nil, gensupport.WrapError(err)
25280 }
25281 ret := &LogSink{
25282 ServerResponse: googleapi.ServerResponse{
25283 Header: res.Header,
25284 HTTPStatusCode: res.StatusCode,
25285 },
25286 }
25287 target := &ret
25288 if err := gensupport.DecodeResponse(target, res); err != nil {
25289 return nil, err
25290 }
25291 return ret, nil
25292 }
25293
25294 type OrganizationsSinksListCall struct {
25295 s *Service
25296 parent string
25297 urlParams_ gensupport.URLParams
25298 ifNoneMatch_ string
25299 ctx_ context.Context
25300 header_ http.Header
25301 }
25302
25303
25304
25305
25306
25307
25308 func (r *OrganizationsSinksService) List(parent string) *OrganizationsSinksListCall {
25309 c := &OrganizationsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25310 c.parent = parent
25311 return c
25312 }
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322 func (c *OrganizationsSinksListCall) Filter(filter string) *OrganizationsSinksListCall {
25323 c.urlParams_.Set("filter", filter)
25324 return c
25325 }
25326
25327
25328
25329
25330
25331 func (c *OrganizationsSinksListCall) PageSize(pageSize int64) *OrganizationsSinksListCall {
25332 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
25333 return c
25334 }
25335
25336
25337
25338
25339
25340 func (c *OrganizationsSinksListCall) PageToken(pageToken string) *OrganizationsSinksListCall {
25341 c.urlParams_.Set("pageToken", pageToken)
25342 return c
25343 }
25344
25345
25346
25347
25348 func (c *OrganizationsSinksListCall) Fields(s ...googleapi.Field) *OrganizationsSinksListCall {
25349 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25350 return c
25351 }
25352
25353
25354
25355
25356 func (c *OrganizationsSinksListCall) IfNoneMatch(entityTag string) *OrganizationsSinksListCall {
25357 c.ifNoneMatch_ = entityTag
25358 return c
25359 }
25360
25361
25362 func (c *OrganizationsSinksListCall) Context(ctx context.Context) *OrganizationsSinksListCall {
25363 c.ctx_ = ctx
25364 return c
25365 }
25366
25367
25368
25369 func (c *OrganizationsSinksListCall) Header() http.Header {
25370 if c.header_ == nil {
25371 c.header_ = make(http.Header)
25372 }
25373 return c.header_
25374 }
25375
25376 func (c *OrganizationsSinksListCall) doRequest(alt string) (*http.Response, error) {
25377 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25378 if c.ifNoneMatch_ != "" {
25379 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25380 }
25381 var body io.Reader = nil
25382 c.urlParams_.Set("alt", alt)
25383 c.urlParams_.Set("prettyPrint", "false")
25384 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
25385 urls += "?" + c.urlParams_.Encode()
25386 req, err := http.NewRequest("GET", urls, body)
25387 if err != nil {
25388 return nil, err
25389 }
25390 req.Header = reqHeaders
25391 googleapi.Expand(req.URL, map[string]string{
25392 "parent": c.parent,
25393 })
25394 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25395 }
25396
25397
25398
25399
25400
25401
25402
25403 func (c *OrganizationsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
25404 gensupport.SetOptions(c.urlParams_, opts...)
25405 res, err := c.doRequest("json")
25406 if res != nil && res.StatusCode == http.StatusNotModified {
25407 if res.Body != nil {
25408 res.Body.Close()
25409 }
25410 return nil, gensupport.WrapError(&googleapi.Error{
25411 Code: res.StatusCode,
25412 Header: res.Header,
25413 })
25414 }
25415 if err != nil {
25416 return nil, err
25417 }
25418 defer googleapi.CloseBody(res)
25419 if err := googleapi.CheckResponse(res); err != nil {
25420 return nil, gensupport.WrapError(err)
25421 }
25422 ret := &ListSinksResponse{
25423 ServerResponse: googleapi.ServerResponse{
25424 Header: res.Header,
25425 HTTPStatusCode: res.StatusCode,
25426 },
25427 }
25428 target := &ret
25429 if err := gensupport.DecodeResponse(target, res); err != nil {
25430 return nil, err
25431 }
25432 return ret, nil
25433 }
25434
25435
25436
25437
25438 func (c *OrganizationsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
25439 c.ctx_ = ctx
25440 defer c.PageToken(c.urlParams_.Get("pageToken"))
25441 for {
25442 x, err := c.Do()
25443 if err != nil {
25444 return err
25445 }
25446 if err := f(x); err != nil {
25447 return err
25448 }
25449 if x.NextPageToken == "" {
25450 return nil
25451 }
25452 c.PageToken(x.NextPageToken)
25453 }
25454 }
25455
25456 type OrganizationsSinksPatchCall struct {
25457 s *Service
25458 sinkNameid string
25459 logsink *LogSink
25460 urlParams_ gensupport.URLParams
25461 ctx_ context.Context
25462 header_ http.Header
25463 }
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477 func (r *OrganizationsSinksService) Patch(sinkNameid string, logsink *LogSink) *OrganizationsSinksPatchCall {
25478 c := &OrganizationsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25479 c.sinkNameid = sinkNameid
25480 c.logsink = logsink
25481 return c
25482 }
25483
25484
25485
25486
25487
25488
25489
25490 func (c *OrganizationsSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksPatchCall {
25491 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
25492 return c
25493 }
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505 func (c *OrganizationsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksPatchCall {
25506 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
25507 return c
25508 }
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520 func (c *OrganizationsSinksPatchCall) UpdateMask(updateMask string) *OrganizationsSinksPatchCall {
25521 c.urlParams_.Set("updateMask", updateMask)
25522 return c
25523 }
25524
25525
25526
25527
25528 func (c *OrganizationsSinksPatchCall) Fields(s ...googleapi.Field) *OrganizationsSinksPatchCall {
25529 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25530 return c
25531 }
25532
25533
25534 func (c *OrganizationsSinksPatchCall) Context(ctx context.Context) *OrganizationsSinksPatchCall {
25535 c.ctx_ = ctx
25536 return c
25537 }
25538
25539
25540
25541 func (c *OrganizationsSinksPatchCall) Header() http.Header {
25542 if c.header_ == nil {
25543 c.header_ = make(http.Header)
25544 }
25545 return c.header_
25546 }
25547
25548 func (c *OrganizationsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
25549 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25550 var body io.Reader = nil
25551 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
25552 if err != nil {
25553 return nil, err
25554 }
25555 c.urlParams_.Set("alt", alt)
25556 c.urlParams_.Set("prettyPrint", "false")
25557 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
25558 urls += "?" + c.urlParams_.Encode()
25559 req, err := http.NewRequest("PATCH", urls, body)
25560 if err != nil {
25561 return nil, err
25562 }
25563 req.Header = reqHeaders
25564 googleapi.Expand(req.URL, map[string]string{
25565 "sinkName": c.sinkNameid,
25566 })
25567 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25568 }
25569
25570
25571
25572
25573
25574
25575 func (c *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
25576 gensupport.SetOptions(c.urlParams_, opts...)
25577 res, err := c.doRequest("json")
25578 if res != nil && res.StatusCode == http.StatusNotModified {
25579 if res.Body != nil {
25580 res.Body.Close()
25581 }
25582 return nil, gensupport.WrapError(&googleapi.Error{
25583 Code: res.StatusCode,
25584 Header: res.Header,
25585 })
25586 }
25587 if err != nil {
25588 return nil, err
25589 }
25590 defer googleapi.CloseBody(res)
25591 if err := googleapi.CheckResponse(res); err != nil {
25592 return nil, gensupport.WrapError(err)
25593 }
25594 ret := &LogSink{
25595 ServerResponse: googleapi.ServerResponse{
25596 Header: res.Header,
25597 HTTPStatusCode: res.StatusCode,
25598 },
25599 }
25600 target := &ret
25601 if err := gensupport.DecodeResponse(target, res); err != nil {
25602 return nil, err
25603 }
25604 return ret, nil
25605 }
25606
25607 type OrganizationsSinksUpdateCall struct {
25608 s *Service
25609 sinkNameid string
25610 logsink *LogSink
25611 urlParams_ gensupport.URLParams
25612 ctx_ context.Context
25613 header_ http.Header
25614 }
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628 func (r *OrganizationsSinksService) Update(sinkNameid string, logsink *LogSink) *OrganizationsSinksUpdateCall {
25629 c := &OrganizationsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25630 c.sinkNameid = sinkNameid
25631 c.logsink = logsink
25632 return c
25633 }
25634
25635
25636
25637
25638
25639
25640
25641 func (c *OrganizationsSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksUpdateCall {
25642 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
25643 return c
25644 }
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656 func (c *OrganizationsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksUpdateCall {
25657 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
25658 return c
25659 }
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671 func (c *OrganizationsSinksUpdateCall) UpdateMask(updateMask string) *OrganizationsSinksUpdateCall {
25672 c.urlParams_.Set("updateMask", updateMask)
25673 return c
25674 }
25675
25676
25677
25678
25679 func (c *OrganizationsSinksUpdateCall) Fields(s ...googleapi.Field) *OrganizationsSinksUpdateCall {
25680 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25681 return c
25682 }
25683
25684
25685 func (c *OrganizationsSinksUpdateCall) Context(ctx context.Context) *OrganizationsSinksUpdateCall {
25686 c.ctx_ = ctx
25687 return c
25688 }
25689
25690
25691
25692 func (c *OrganizationsSinksUpdateCall) Header() http.Header {
25693 if c.header_ == nil {
25694 c.header_ = make(http.Header)
25695 }
25696 return c.header_
25697 }
25698
25699 func (c *OrganizationsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
25700 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25701 var body io.Reader = nil
25702 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
25703 if err != nil {
25704 return nil, err
25705 }
25706 c.urlParams_.Set("alt", alt)
25707 c.urlParams_.Set("prettyPrint", "false")
25708 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
25709 urls += "?" + c.urlParams_.Encode()
25710 req, err := http.NewRequest("PUT", urls, body)
25711 if err != nil {
25712 return nil, err
25713 }
25714 req.Header = reqHeaders
25715 googleapi.Expand(req.URL, map[string]string{
25716 "sinkName": c.sinkNameid,
25717 })
25718 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25719 }
25720
25721
25722
25723
25724
25725
25726 func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
25727 gensupport.SetOptions(c.urlParams_, opts...)
25728 res, err := c.doRequest("json")
25729 if res != nil && res.StatusCode == http.StatusNotModified {
25730 if res.Body != nil {
25731 res.Body.Close()
25732 }
25733 return nil, gensupport.WrapError(&googleapi.Error{
25734 Code: res.StatusCode,
25735 Header: res.Header,
25736 })
25737 }
25738 if err != nil {
25739 return nil, err
25740 }
25741 defer googleapi.CloseBody(res)
25742 if err := googleapi.CheckResponse(res); err != nil {
25743 return nil, gensupport.WrapError(err)
25744 }
25745 ret := &LogSink{
25746 ServerResponse: googleapi.ServerResponse{
25747 Header: res.Header,
25748 HTTPStatusCode: res.StatusCode,
25749 },
25750 }
25751 target := &ret
25752 if err := gensupport.DecodeResponse(target, res); err != nil {
25753 return nil, err
25754 }
25755 return ret, nil
25756 }
25757
25758 type ProjectsGetCmekSettingsCall struct {
25759 s *Service
25760 name string
25761 urlParams_ gensupport.URLParams
25762 ifNoneMatch_ string
25763 ctx_ context.Context
25764 header_ http.Header
25765 }
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784 func (r *ProjectsService) GetCmekSettings(name string) *ProjectsGetCmekSettingsCall {
25785 c := &ProjectsGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25786 c.name = name
25787 return c
25788 }
25789
25790
25791
25792
25793 func (c *ProjectsGetCmekSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetCmekSettingsCall {
25794 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25795 return c
25796 }
25797
25798
25799
25800
25801 func (c *ProjectsGetCmekSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetCmekSettingsCall {
25802 c.ifNoneMatch_ = entityTag
25803 return c
25804 }
25805
25806
25807 func (c *ProjectsGetCmekSettingsCall) Context(ctx context.Context) *ProjectsGetCmekSettingsCall {
25808 c.ctx_ = ctx
25809 return c
25810 }
25811
25812
25813
25814 func (c *ProjectsGetCmekSettingsCall) Header() http.Header {
25815 if c.header_ == nil {
25816 c.header_ = make(http.Header)
25817 }
25818 return c.header_
25819 }
25820
25821 func (c *ProjectsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
25822 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25823 if c.ifNoneMatch_ != "" {
25824 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25825 }
25826 var body io.Reader = nil
25827 c.urlParams_.Set("alt", alt)
25828 c.urlParams_.Set("prettyPrint", "false")
25829 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
25830 urls += "?" + c.urlParams_.Encode()
25831 req, err := http.NewRequest("GET", urls, body)
25832 if err != nil {
25833 return nil, err
25834 }
25835 req.Header = reqHeaders
25836 googleapi.Expand(req.URL, map[string]string{
25837 "name": c.name,
25838 })
25839 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25840 }
25841
25842
25843
25844
25845
25846
25847 func (c *ProjectsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
25848 gensupport.SetOptions(c.urlParams_, opts...)
25849 res, err := c.doRequest("json")
25850 if res != nil && res.StatusCode == http.StatusNotModified {
25851 if res.Body != nil {
25852 res.Body.Close()
25853 }
25854 return nil, gensupport.WrapError(&googleapi.Error{
25855 Code: res.StatusCode,
25856 Header: res.Header,
25857 })
25858 }
25859 if err != nil {
25860 return nil, err
25861 }
25862 defer googleapi.CloseBody(res)
25863 if err := googleapi.CheckResponse(res); err != nil {
25864 return nil, gensupport.WrapError(err)
25865 }
25866 ret := &CmekSettings{
25867 ServerResponse: googleapi.ServerResponse{
25868 Header: res.Header,
25869 HTTPStatusCode: res.StatusCode,
25870 },
25871 }
25872 target := &ret
25873 if err := gensupport.DecodeResponse(target, res); err != nil {
25874 return nil, err
25875 }
25876 return ret, nil
25877 }
25878
25879 type ProjectsGetSettingsCall struct {
25880 s *Service
25881 name string
25882 urlParams_ gensupport.URLParams
25883 ifNoneMatch_ string
25884 ctx_ context.Context
25885 header_ http.Header
25886 }
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901 func (r *ProjectsService) GetSettings(name string) *ProjectsGetSettingsCall {
25902 c := &ProjectsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25903 c.name = name
25904 return c
25905 }
25906
25907
25908
25909
25910 func (c *ProjectsGetSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetSettingsCall {
25911 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25912 return c
25913 }
25914
25915
25916
25917
25918 func (c *ProjectsGetSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetSettingsCall {
25919 c.ifNoneMatch_ = entityTag
25920 return c
25921 }
25922
25923
25924 func (c *ProjectsGetSettingsCall) Context(ctx context.Context) *ProjectsGetSettingsCall {
25925 c.ctx_ = ctx
25926 return c
25927 }
25928
25929
25930
25931 func (c *ProjectsGetSettingsCall) Header() http.Header {
25932 if c.header_ == nil {
25933 c.header_ = make(http.Header)
25934 }
25935 return c.header_
25936 }
25937
25938 func (c *ProjectsGetSettingsCall) doRequest(alt string) (*http.Response, error) {
25939 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25940 if c.ifNoneMatch_ != "" {
25941 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25942 }
25943 var body io.Reader = nil
25944 c.urlParams_.Set("alt", alt)
25945 c.urlParams_.Set("prettyPrint", "false")
25946 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
25947 urls += "?" + c.urlParams_.Encode()
25948 req, err := http.NewRequest("GET", urls, body)
25949 if err != nil {
25950 return nil, err
25951 }
25952 req.Header = reqHeaders
25953 googleapi.Expand(req.URL, map[string]string{
25954 "name": c.name,
25955 })
25956 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25957 }
25958
25959
25960
25961
25962
25963
25964 func (c *ProjectsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
25965 gensupport.SetOptions(c.urlParams_, opts...)
25966 res, err := c.doRequest("json")
25967 if res != nil && res.StatusCode == http.StatusNotModified {
25968 if res.Body != nil {
25969 res.Body.Close()
25970 }
25971 return nil, gensupport.WrapError(&googleapi.Error{
25972 Code: res.StatusCode,
25973 Header: res.Header,
25974 })
25975 }
25976 if err != nil {
25977 return nil, err
25978 }
25979 defer googleapi.CloseBody(res)
25980 if err := googleapi.CheckResponse(res); err != nil {
25981 return nil, gensupport.WrapError(err)
25982 }
25983 ret := &Settings{
25984 ServerResponse: googleapi.ServerResponse{
25985 Header: res.Header,
25986 HTTPStatusCode: res.StatusCode,
25987 },
25988 }
25989 target := &ret
25990 if err := gensupport.DecodeResponse(target, res); err != nil {
25991 return nil, err
25992 }
25993 return ret, nil
25994 }
25995
25996 type ProjectsExclusionsCreateCall struct {
25997 s *Service
25998 parent string
25999 logexclusion *LogExclusion
26000 urlParams_ gensupport.URLParams
26001 ctx_ context.Context
26002 header_ http.Header
26003 }
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013 func (r *ProjectsExclusionsService) Create(parent string, logexclusion *LogExclusion) *ProjectsExclusionsCreateCall {
26014 c := &ProjectsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26015 c.parent = parent
26016 c.logexclusion = logexclusion
26017 return c
26018 }
26019
26020
26021
26022
26023 func (c *ProjectsExclusionsCreateCall) Fields(s ...googleapi.Field) *ProjectsExclusionsCreateCall {
26024 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26025 return c
26026 }
26027
26028
26029 func (c *ProjectsExclusionsCreateCall) Context(ctx context.Context) *ProjectsExclusionsCreateCall {
26030 c.ctx_ = ctx
26031 return c
26032 }
26033
26034
26035
26036 func (c *ProjectsExclusionsCreateCall) Header() http.Header {
26037 if c.header_ == nil {
26038 c.header_ = make(http.Header)
26039 }
26040 return c.header_
26041 }
26042
26043 func (c *ProjectsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
26044 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26045 var body io.Reader = nil
26046 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
26047 if err != nil {
26048 return nil, err
26049 }
26050 c.urlParams_.Set("alt", alt)
26051 c.urlParams_.Set("prettyPrint", "false")
26052 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
26053 urls += "?" + c.urlParams_.Encode()
26054 req, err := http.NewRequest("POST", urls, body)
26055 if err != nil {
26056 return nil, err
26057 }
26058 req.Header = reqHeaders
26059 googleapi.Expand(req.URL, map[string]string{
26060 "parent": c.parent,
26061 })
26062 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26063 }
26064
26065
26066
26067
26068
26069
26070 func (c *ProjectsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
26071 gensupport.SetOptions(c.urlParams_, opts...)
26072 res, err := c.doRequest("json")
26073 if res != nil && res.StatusCode == http.StatusNotModified {
26074 if res.Body != nil {
26075 res.Body.Close()
26076 }
26077 return nil, gensupport.WrapError(&googleapi.Error{
26078 Code: res.StatusCode,
26079 Header: res.Header,
26080 })
26081 }
26082 if err != nil {
26083 return nil, err
26084 }
26085 defer googleapi.CloseBody(res)
26086 if err := googleapi.CheckResponse(res); err != nil {
26087 return nil, gensupport.WrapError(err)
26088 }
26089 ret := &LogExclusion{
26090 ServerResponse: googleapi.ServerResponse{
26091 Header: res.Header,
26092 HTTPStatusCode: res.StatusCode,
26093 },
26094 }
26095 target := &ret
26096 if err := gensupport.DecodeResponse(target, res); err != nil {
26097 return nil, err
26098 }
26099 return ret, nil
26100 }
26101
26102 type ProjectsExclusionsDeleteCall struct {
26103 s *Service
26104 name string
26105 urlParams_ gensupport.URLParams
26106 ctx_ context.Context
26107 header_ http.Header
26108 }
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118 func (r *ProjectsExclusionsService) Delete(name string) *ProjectsExclusionsDeleteCall {
26119 c := &ProjectsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26120 c.name = name
26121 return c
26122 }
26123
26124
26125
26126
26127 func (c *ProjectsExclusionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsExclusionsDeleteCall {
26128 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26129 return c
26130 }
26131
26132
26133 func (c *ProjectsExclusionsDeleteCall) Context(ctx context.Context) *ProjectsExclusionsDeleteCall {
26134 c.ctx_ = ctx
26135 return c
26136 }
26137
26138
26139
26140 func (c *ProjectsExclusionsDeleteCall) Header() http.Header {
26141 if c.header_ == nil {
26142 c.header_ = make(http.Header)
26143 }
26144 return c.header_
26145 }
26146
26147 func (c *ProjectsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
26148 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26149 var body io.Reader = nil
26150 c.urlParams_.Set("alt", alt)
26151 c.urlParams_.Set("prettyPrint", "false")
26152 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
26153 urls += "?" + c.urlParams_.Encode()
26154 req, err := http.NewRequest("DELETE", urls, body)
26155 if err != nil {
26156 return nil, err
26157 }
26158 req.Header = reqHeaders
26159 googleapi.Expand(req.URL, map[string]string{
26160 "name": c.name,
26161 })
26162 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26163 }
26164
26165
26166
26167
26168
26169
26170 func (c *ProjectsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
26171 gensupport.SetOptions(c.urlParams_, opts...)
26172 res, err := c.doRequest("json")
26173 if res != nil && res.StatusCode == http.StatusNotModified {
26174 if res.Body != nil {
26175 res.Body.Close()
26176 }
26177 return nil, gensupport.WrapError(&googleapi.Error{
26178 Code: res.StatusCode,
26179 Header: res.Header,
26180 })
26181 }
26182 if err != nil {
26183 return nil, err
26184 }
26185 defer googleapi.CloseBody(res)
26186 if err := googleapi.CheckResponse(res); err != nil {
26187 return nil, gensupport.WrapError(err)
26188 }
26189 ret := &Empty{
26190 ServerResponse: googleapi.ServerResponse{
26191 Header: res.Header,
26192 HTTPStatusCode: res.StatusCode,
26193 },
26194 }
26195 target := &ret
26196 if err := gensupport.DecodeResponse(target, res); err != nil {
26197 return nil, err
26198 }
26199 return ret, nil
26200 }
26201
26202 type ProjectsExclusionsGetCall struct {
26203 s *Service
26204 name string
26205 urlParams_ gensupport.URLParams
26206 ifNoneMatch_ string
26207 ctx_ context.Context
26208 header_ http.Header
26209 }
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219 func (r *ProjectsExclusionsService) Get(name string) *ProjectsExclusionsGetCall {
26220 c := &ProjectsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26221 c.name = name
26222 return c
26223 }
26224
26225
26226
26227
26228 func (c *ProjectsExclusionsGetCall) Fields(s ...googleapi.Field) *ProjectsExclusionsGetCall {
26229 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26230 return c
26231 }
26232
26233
26234
26235
26236 func (c *ProjectsExclusionsGetCall) IfNoneMatch(entityTag string) *ProjectsExclusionsGetCall {
26237 c.ifNoneMatch_ = entityTag
26238 return c
26239 }
26240
26241
26242 func (c *ProjectsExclusionsGetCall) Context(ctx context.Context) *ProjectsExclusionsGetCall {
26243 c.ctx_ = ctx
26244 return c
26245 }
26246
26247
26248
26249 func (c *ProjectsExclusionsGetCall) Header() http.Header {
26250 if c.header_ == nil {
26251 c.header_ = make(http.Header)
26252 }
26253 return c.header_
26254 }
26255
26256 func (c *ProjectsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
26257 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26258 if c.ifNoneMatch_ != "" {
26259 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26260 }
26261 var body io.Reader = nil
26262 c.urlParams_.Set("alt", alt)
26263 c.urlParams_.Set("prettyPrint", "false")
26264 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
26265 urls += "?" + c.urlParams_.Encode()
26266 req, err := http.NewRequest("GET", urls, body)
26267 if err != nil {
26268 return nil, err
26269 }
26270 req.Header = reqHeaders
26271 googleapi.Expand(req.URL, map[string]string{
26272 "name": c.name,
26273 })
26274 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26275 }
26276
26277
26278
26279
26280
26281
26282 func (c *ProjectsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
26283 gensupport.SetOptions(c.urlParams_, opts...)
26284 res, err := c.doRequest("json")
26285 if res != nil && res.StatusCode == http.StatusNotModified {
26286 if res.Body != nil {
26287 res.Body.Close()
26288 }
26289 return nil, gensupport.WrapError(&googleapi.Error{
26290 Code: res.StatusCode,
26291 Header: res.Header,
26292 })
26293 }
26294 if err != nil {
26295 return nil, err
26296 }
26297 defer googleapi.CloseBody(res)
26298 if err := googleapi.CheckResponse(res); err != nil {
26299 return nil, gensupport.WrapError(err)
26300 }
26301 ret := &LogExclusion{
26302 ServerResponse: googleapi.ServerResponse{
26303 Header: res.Header,
26304 HTTPStatusCode: res.StatusCode,
26305 },
26306 }
26307 target := &ret
26308 if err := gensupport.DecodeResponse(target, res); err != nil {
26309 return nil, err
26310 }
26311 return ret, nil
26312 }
26313
26314 type ProjectsExclusionsListCall struct {
26315 s *Service
26316 parent string
26317 urlParams_ gensupport.URLParams
26318 ifNoneMatch_ string
26319 ctx_ context.Context
26320 header_ http.Header
26321 }
26322
26323
26324
26325
26326
26327
26328 func (r *ProjectsExclusionsService) List(parent string) *ProjectsExclusionsListCall {
26329 c := &ProjectsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26330 c.parent = parent
26331 return c
26332 }
26333
26334
26335
26336
26337
26338 func (c *ProjectsExclusionsListCall) PageSize(pageSize int64) *ProjectsExclusionsListCall {
26339 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26340 return c
26341 }
26342
26343
26344
26345
26346
26347 func (c *ProjectsExclusionsListCall) PageToken(pageToken string) *ProjectsExclusionsListCall {
26348 c.urlParams_.Set("pageToken", pageToken)
26349 return c
26350 }
26351
26352
26353
26354
26355 func (c *ProjectsExclusionsListCall) Fields(s ...googleapi.Field) *ProjectsExclusionsListCall {
26356 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26357 return c
26358 }
26359
26360
26361
26362
26363 func (c *ProjectsExclusionsListCall) IfNoneMatch(entityTag string) *ProjectsExclusionsListCall {
26364 c.ifNoneMatch_ = entityTag
26365 return c
26366 }
26367
26368
26369 func (c *ProjectsExclusionsListCall) Context(ctx context.Context) *ProjectsExclusionsListCall {
26370 c.ctx_ = ctx
26371 return c
26372 }
26373
26374
26375
26376 func (c *ProjectsExclusionsListCall) Header() http.Header {
26377 if c.header_ == nil {
26378 c.header_ = make(http.Header)
26379 }
26380 return c.header_
26381 }
26382
26383 func (c *ProjectsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
26384 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26385 if c.ifNoneMatch_ != "" {
26386 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26387 }
26388 var body io.Reader = nil
26389 c.urlParams_.Set("alt", alt)
26390 c.urlParams_.Set("prettyPrint", "false")
26391 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
26392 urls += "?" + c.urlParams_.Encode()
26393 req, err := http.NewRequest("GET", urls, body)
26394 if err != nil {
26395 return nil, err
26396 }
26397 req.Header = reqHeaders
26398 googleapi.Expand(req.URL, map[string]string{
26399 "parent": c.parent,
26400 })
26401 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26402 }
26403
26404
26405
26406
26407
26408
26409
26410 func (c *ProjectsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
26411 gensupport.SetOptions(c.urlParams_, opts...)
26412 res, err := c.doRequest("json")
26413 if res != nil && res.StatusCode == http.StatusNotModified {
26414 if res.Body != nil {
26415 res.Body.Close()
26416 }
26417 return nil, gensupport.WrapError(&googleapi.Error{
26418 Code: res.StatusCode,
26419 Header: res.Header,
26420 })
26421 }
26422 if err != nil {
26423 return nil, err
26424 }
26425 defer googleapi.CloseBody(res)
26426 if err := googleapi.CheckResponse(res); err != nil {
26427 return nil, gensupport.WrapError(err)
26428 }
26429 ret := &ListExclusionsResponse{
26430 ServerResponse: googleapi.ServerResponse{
26431 Header: res.Header,
26432 HTTPStatusCode: res.StatusCode,
26433 },
26434 }
26435 target := &ret
26436 if err := gensupport.DecodeResponse(target, res); err != nil {
26437 return nil, err
26438 }
26439 return ret, nil
26440 }
26441
26442
26443
26444
26445 func (c *ProjectsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
26446 c.ctx_ = ctx
26447 defer c.PageToken(c.urlParams_.Get("pageToken"))
26448 for {
26449 x, err := c.Do()
26450 if err != nil {
26451 return err
26452 }
26453 if err := f(x); err != nil {
26454 return err
26455 }
26456 if x.NextPageToken == "" {
26457 return nil
26458 }
26459 c.PageToken(x.NextPageToken)
26460 }
26461 }
26462
26463 type ProjectsExclusionsPatchCall struct {
26464 s *Service
26465 name string
26466 logexclusion *LogExclusion
26467 urlParams_ gensupport.URLParams
26468 ctx_ context.Context
26469 header_ http.Header
26470 }
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481 func (r *ProjectsExclusionsService) Patch(name string, logexclusion *LogExclusion) *ProjectsExclusionsPatchCall {
26482 c := &ProjectsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26483 c.name = name
26484 c.logexclusion = logexclusion
26485 return c
26486 }
26487
26488
26489
26490
26491
26492
26493
26494 func (c *ProjectsExclusionsPatchCall) UpdateMask(updateMask string) *ProjectsExclusionsPatchCall {
26495 c.urlParams_.Set("updateMask", updateMask)
26496 return c
26497 }
26498
26499
26500
26501
26502 func (c *ProjectsExclusionsPatchCall) Fields(s ...googleapi.Field) *ProjectsExclusionsPatchCall {
26503 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26504 return c
26505 }
26506
26507
26508 func (c *ProjectsExclusionsPatchCall) Context(ctx context.Context) *ProjectsExclusionsPatchCall {
26509 c.ctx_ = ctx
26510 return c
26511 }
26512
26513
26514
26515 func (c *ProjectsExclusionsPatchCall) Header() http.Header {
26516 if c.header_ == nil {
26517 c.header_ = make(http.Header)
26518 }
26519 return c.header_
26520 }
26521
26522 func (c *ProjectsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
26523 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26524 var body io.Reader = nil
26525 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
26526 if err != nil {
26527 return nil, err
26528 }
26529 c.urlParams_.Set("alt", alt)
26530 c.urlParams_.Set("prettyPrint", "false")
26531 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
26532 urls += "?" + c.urlParams_.Encode()
26533 req, err := http.NewRequest("PATCH", urls, body)
26534 if err != nil {
26535 return nil, err
26536 }
26537 req.Header = reqHeaders
26538 googleapi.Expand(req.URL, map[string]string{
26539 "name": c.name,
26540 })
26541 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26542 }
26543
26544
26545
26546
26547
26548
26549 func (c *ProjectsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
26550 gensupport.SetOptions(c.urlParams_, opts...)
26551 res, err := c.doRequest("json")
26552 if res != nil && res.StatusCode == http.StatusNotModified {
26553 if res.Body != nil {
26554 res.Body.Close()
26555 }
26556 return nil, gensupport.WrapError(&googleapi.Error{
26557 Code: res.StatusCode,
26558 Header: res.Header,
26559 })
26560 }
26561 if err != nil {
26562 return nil, err
26563 }
26564 defer googleapi.CloseBody(res)
26565 if err := googleapi.CheckResponse(res); err != nil {
26566 return nil, gensupport.WrapError(err)
26567 }
26568 ret := &LogExclusion{
26569 ServerResponse: googleapi.ServerResponse{
26570 Header: res.Header,
26571 HTTPStatusCode: res.StatusCode,
26572 },
26573 }
26574 target := &ret
26575 if err := gensupport.DecodeResponse(target, res); err != nil {
26576 return nil, err
26577 }
26578 return ret, nil
26579 }
26580
26581 type ProjectsLocationsGetCall struct {
26582 s *Service
26583 name string
26584 urlParams_ gensupport.URLParams
26585 ifNoneMatch_ string
26586 ctx_ context.Context
26587 header_ http.Header
26588 }
26589
26590
26591
26592
26593 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
26594 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26595 c.name = name
26596 return c
26597 }
26598
26599
26600
26601
26602 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
26603 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26604 return c
26605 }
26606
26607
26608
26609
26610 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
26611 c.ifNoneMatch_ = entityTag
26612 return c
26613 }
26614
26615
26616 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
26617 c.ctx_ = ctx
26618 return c
26619 }
26620
26621
26622
26623 func (c *ProjectsLocationsGetCall) Header() http.Header {
26624 if c.header_ == nil {
26625 c.header_ = make(http.Header)
26626 }
26627 return c.header_
26628 }
26629
26630 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
26631 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26632 if c.ifNoneMatch_ != "" {
26633 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26634 }
26635 var body io.Reader = nil
26636 c.urlParams_.Set("alt", alt)
26637 c.urlParams_.Set("prettyPrint", "false")
26638 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
26639 urls += "?" + c.urlParams_.Encode()
26640 req, err := http.NewRequest("GET", urls, body)
26641 if err != nil {
26642 return nil, err
26643 }
26644 req.Header = reqHeaders
26645 googleapi.Expand(req.URL, map[string]string{
26646 "name": c.name,
26647 })
26648 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26649 }
26650
26651
26652
26653
26654
26655
26656 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
26657 gensupport.SetOptions(c.urlParams_, opts...)
26658 res, err := c.doRequest("json")
26659 if res != nil && res.StatusCode == http.StatusNotModified {
26660 if res.Body != nil {
26661 res.Body.Close()
26662 }
26663 return nil, gensupport.WrapError(&googleapi.Error{
26664 Code: res.StatusCode,
26665 Header: res.Header,
26666 })
26667 }
26668 if err != nil {
26669 return nil, err
26670 }
26671 defer googleapi.CloseBody(res)
26672 if err := googleapi.CheckResponse(res); err != nil {
26673 return nil, gensupport.WrapError(err)
26674 }
26675 ret := &Location{
26676 ServerResponse: googleapi.ServerResponse{
26677 Header: res.Header,
26678 HTTPStatusCode: res.StatusCode,
26679 },
26680 }
26681 target := &ret
26682 if err := gensupport.DecodeResponse(target, res); err != nil {
26683 return nil, err
26684 }
26685 return ret, nil
26686 }
26687
26688 type ProjectsLocationsListCall struct {
26689 s *Service
26690 name string
26691 urlParams_ gensupport.URLParams
26692 ifNoneMatch_ string
26693 ctx_ context.Context
26694 header_ http.Header
26695 }
26696
26697
26698
26699
26700 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
26701 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26702 c.name = name
26703 return c
26704 }
26705
26706
26707
26708
26709
26710 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
26711 c.urlParams_.Set("filter", filter)
26712 return c
26713 }
26714
26715
26716
26717 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
26718 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26719 return c
26720 }
26721
26722
26723
26724
26725 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
26726 c.urlParams_.Set("pageToken", pageToken)
26727 return c
26728 }
26729
26730
26731
26732
26733 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
26734 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26735 return c
26736 }
26737
26738
26739
26740
26741 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
26742 c.ifNoneMatch_ = entityTag
26743 return c
26744 }
26745
26746
26747 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
26748 c.ctx_ = ctx
26749 return c
26750 }
26751
26752
26753
26754 func (c *ProjectsLocationsListCall) Header() http.Header {
26755 if c.header_ == nil {
26756 c.header_ = make(http.Header)
26757 }
26758 return c.header_
26759 }
26760
26761 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
26762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26763 if c.ifNoneMatch_ != "" {
26764 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26765 }
26766 var body io.Reader = nil
26767 c.urlParams_.Set("alt", alt)
26768 c.urlParams_.Set("prettyPrint", "false")
26769 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
26770 urls += "?" + c.urlParams_.Encode()
26771 req, err := http.NewRequest("GET", urls, body)
26772 if err != nil {
26773 return nil, err
26774 }
26775 req.Header = reqHeaders
26776 googleapi.Expand(req.URL, map[string]string{
26777 "name": c.name,
26778 })
26779 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26780 }
26781
26782
26783
26784
26785
26786
26787
26788 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
26789 gensupport.SetOptions(c.urlParams_, opts...)
26790 res, err := c.doRequest("json")
26791 if res != nil && res.StatusCode == http.StatusNotModified {
26792 if res.Body != nil {
26793 res.Body.Close()
26794 }
26795 return nil, gensupport.WrapError(&googleapi.Error{
26796 Code: res.StatusCode,
26797 Header: res.Header,
26798 })
26799 }
26800 if err != nil {
26801 return nil, err
26802 }
26803 defer googleapi.CloseBody(res)
26804 if err := googleapi.CheckResponse(res); err != nil {
26805 return nil, gensupport.WrapError(err)
26806 }
26807 ret := &ListLocationsResponse{
26808 ServerResponse: googleapi.ServerResponse{
26809 Header: res.Header,
26810 HTTPStatusCode: res.StatusCode,
26811 },
26812 }
26813 target := &ret
26814 if err := gensupport.DecodeResponse(target, res); err != nil {
26815 return nil, err
26816 }
26817 return ret, nil
26818 }
26819
26820
26821
26822
26823 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
26824 c.ctx_ = ctx
26825 defer c.PageToken(c.urlParams_.Get("pageToken"))
26826 for {
26827 x, err := c.Do()
26828 if err != nil {
26829 return err
26830 }
26831 if err := f(x); err != nil {
26832 return err
26833 }
26834 if x.NextPageToken == "" {
26835 return nil
26836 }
26837 c.PageToken(x.NextPageToken)
26838 }
26839 }
26840
26841 type ProjectsLocationsBucketsCreateCall struct {
26842 s *Service
26843 parent string
26844 logbucket *LogBucket
26845 urlParams_ gensupport.URLParams
26846 ctx_ context.Context
26847 header_ http.Header
26848 }
26849
26850
26851
26852
26853
26854
26855
26856 func (r *ProjectsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *ProjectsLocationsBucketsCreateCall {
26857 c := &ProjectsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26858 c.parent = parent
26859 c.logbucket = logbucket
26860 return c
26861 }
26862
26863
26864
26865
26866
26867 func (c *ProjectsLocationsBucketsCreateCall) BucketId(bucketId string) *ProjectsLocationsBucketsCreateCall {
26868 c.urlParams_.Set("bucketId", bucketId)
26869 return c
26870 }
26871
26872
26873
26874
26875 func (c *ProjectsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsCreateCall {
26876 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26877 return c
26878 }
26879
26880
26881 func (c *ProjectsLocationsBucketsCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsCreateCall {
26882 c.ctx_ = ctx
26883 return c
26884 }
26885
26886
26887
26888 func (c *ProjectsLocationsBucketsCreateCall) Header() http.Header {
26889 if c.header_ == nil {
26890 c.header_ = make(http.Header)
26891 }
26892 return c.header_
26893 }
26894
26895 func (c *ProjectsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
26896 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26897 var body io.Reader = nil
26898 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
26899 if err != nil {
26900 return nil, err
26901 }
26902 c.urlParams_.Set("alt", alt)
26903 c.urlParams_.Set("prettyPrint", "false")
26904 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
26905 urls += "?" + c.urlParams_.Encode()
26906 req, err := http.NewRequest("POST", urls, body)
26907 if err != nil {
26908 return nil, err
26909 }
26910 req.Header = reqHeaders
26911 googleapi.Expand(req.URL, map[string]string{
26912 "parent": c.parent,
26913 })
26914 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26915 }
26916
26917
26918
26919
26920
26921
26922 func (c *ProjectsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
26923 gensupport.SetOptions(c.urlParams_, opts...)
26924 res, err := c.doRequest("json")
26925 if res != nil && res.StatusCode == http.StatusNotModified {
26926 if res.Body != nil {
26927 res.Body.Close()
26928 }
26929 return nil, gensupport.WrapError(&googleapi.Error{
26930 Code: res.StatusCode,
26931 Header: res.Header,
26932 })
26933 }
26934 if err != nil {
26935 return nil, err
26936 }
26937 defer googleapi.CloseBody(res)
26938 if err := googleapi.CheckResponse(res); err != nil {
26939 return nil, gensupport.WrapError(err)
26940 }
26941 ret := &LogBucket{
26942 ServerResponse: googleapi.ServerResponse{
26943 Header: res.Header,
26944 HTTPStatusCode: res.StatusCode,
26945 },
26946 }
26947 target := &ret
26948 if err := gensupport.DecodeResponse(target, res); err != nil {
26949 return nil, err
26950 }
26951 return ret, nil
26952 }
26953
26954 type ProjectsLocationsBucketsCreateAsyncCall struct {
26955 s *Service
26956 parent string
26957 logbucket *LogBucket
26958 urlParams_ gensupport.URLParams
26959 ctx_ context.Context
26960 header_ http.Header
26961 }
26962
26963
26964
26965
26966
26967
26968
26969
26970 func (r *ProjectsLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *ProjectsLocationsBucketsCreateAsyncCall {
26971 c := &ProjectsLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26972 c.parent = parent
26973 c.logbucket = logbucket
26974 return c
26975 }
26976
26977
26978
26979
26980
26981 func (c *ProjectsLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *ProjectsLocationsBucketsCreateAsyncCall {
26982 c.urlParams_.Set("bucketId", bucketId)
26983 return c
26984 }
26985
26986
26987
26988
26989 func (c *ProjectsLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsCreateAsyncCall {
26990 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26991 return c
26992 }
26993
26994
26995 func (c *ProjectsLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *ProjectsLocationsBucketsCreateAsyncCall {
26996 c.ctx_ = ctx
26997 return c
26998 }
26999
27000
27001
27002 func (c *ProjectsLocationsBucketsCreateAsyncCall) Header() http.Header {
27003 if c.header_ == nil {
27004 c.header_ = make(http.Header)
27005 }
27006 return c.header_
27007 }
27008
27009 func (c *ProjectsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) {
27010 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
27011 var body io.Reader = nil
27012 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
27013 if err != nil {
27014 return nil, err
27015 }
27016 c.urlParams_.Set("alt", alt)
27017 c.urlParams_.Set("prettyPrint", "false")
27018 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync")
27019 urls += "?" + c.urlParams_.Encode()
27020 req, err := http.NewRequest("POST", urls, body)
27021 if err != nil {
27022 return nil, err
27023 }
27024 req.Header = reqHeaders
27025 googleapi.Expand(req.URL, map[string]string{
27026 "parent": c.parent,
27027 })
27028 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27029 }
27030
27031
27032
27033
27034
27035
27036 func (c *ProjectsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27037 gensupport.SetOptions(c.urlParams_, opts...)
27038 res, err := c.doRequest("json")
27039 if res != nil && res.StatusCode == http.StatusNotModified {
27040 if res.Body != nil {
27041 res.Body.Close()
27042 }
27043 return nil, gensupport.WrapError(&googleapi.Error{
27044 Code: res.StatusCode,
27045 Header: res.Header,
27046 })
27047 }
27048 if err != nil {
27049 return nil, err
27050 }
27051 defer googleapi.CloseBody(res)
27052 if err := googleapi.CheckResponse(res); err != nil {
27053 return nil, gensupport.WrapError(err)
27054 }
27055 ret := &Operation{
27056 ServerResponse: googleapi.ServerResponse{
27057 Header: res.Header,
27058 HTTPStatusCode: res.StatusCode,
27059 },
27060 }
27061 target := &ret
27062 if err := gensupport.DecodeResponse(target, res); err != nil {
27063 return nil, err
27064 }
27065 return ret, nil
27066 }
27067
27068 type ProjectsLocationsBucketsDeleteCall struct {
27069 s *Service
27070 name string
27071 urlParams_ gensupport.URLParams
27072 ctx_ context.Context
27073 header_ http.Header
27074 }
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087 func (r *ProjectsLocationsBucketsService) Delete(name string) *ProjectsLocationsBucketsDeleteCall {
27088 c := &ProjectsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27089 c.name = name
27090 return c
27091 }
27092
27093
27094
27095
27096 func (c *ProjectsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsDeleteCall {
27097 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27098 return c
27099 }
27100
27101
27102 func (c *ProjectsLocationsBucketsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsDeleteCall {
27103 c.ctx_ = ctx
27104 return c
27105 }
27106
27107
27108
27109 func (c *ProjectsLocationsBucketsDeleteCall) Header() http.Header {
27110 if c.header_ == nil {
27111 c.header_ = make(http.Header)
27112 }
27113 return c.header_
27114 }
27115
27116 func (c *ProjectsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
27117 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27118 var body io.Reader = nil
27119 c.urlParams_.Set("alt", alt)
27120 c.urlParams_.Set("prettyPrint", "false")
27121 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
27122 urls += "?" + c.urlParams_.Encode()
27123 req, err := http.NewRequest("DELETE", urls, body)
27124 if err != nil {
27125 return nil, err
27126 }
27127 req.Header = reqHeaders
27128 googleapi.Expand(req.URL, map[string]string{
27129 "name": c.name,
27130 })
27131 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27132 }
27133
27134
27135
27136
27137
27138
27139 func (c *ProjectsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
27140 gensupport.SetOptions(c.urlParams_, opts...)
27141 res, err := c.doRequest("json")
27142 if res != nil && res.StatusCode == http.StatusNotModified {
27143 if res.Body != nil {
27144 res.Body.Close()
27145 }
27146 return nil, gensupport.WrapError(&googleapi.Error{
27147 Code: res.StatusCode,
27148 Header: res.Header,
27149 })
27150 }
27151 if err != nil {
27152 return nil, err
27153 }
27154 defer googleapi.CloseBody(res)
27155 if err := googleapi.CheckResponse(res); err != nil {
27156 return nil, gensupport.WrapError(err)
27157 }
27158 ret := &Empty{
27159 ServerResponse: googleapi.ServerResponse{
27160 Header: res.Header,
27161 HTTPStatusCode: res.StatusCode,
27162 },
27163 }
27164 target := &ret
27165 if err := gensupport.DecodeResponse(target, res); err != nil {
27166 return nil, err
27167 }
27168 return ret, nil
27169 }
27170
27171 type ProjectsLocationsBucketsGetCall struct {
27172 s *Service
27173 name string
27174 urlParams_ gensupport.URLParams
27175 ifNoneMatch_ string
27176 ctx_ context.Context
27177 header_ http.Header
27178 }
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189 func (r *ProjectsLocationsBucketsService) Get(name string) *ProjectsLocationsBucketsGetCall {
27190 c := &ProjectsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27191 c.name = name
27192 return c
27193 }
27194
27195
27196
27197
27198 func (c *ProjectsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsGetCall {
27199 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27200 return c
27201 }
27202
27203
27204
27205
27206 func (c *ProjectsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsGetCall {
27207 c.ifNoneMatch_ = entityTag
27208 return c
27209 }
27210
27211
27212 func (c *ProjectsLocationsBucketsGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsGetCall {
27213 c.ctx_ = ctx
27214 return c
27215 }
27216
27217
27218
27219 func (c *ProjectsLocationsBucketsGetCall) Header() http.Header {
27220 if c.header_ == nil {
27221 c.header_ = make(http.Header)
27222 }
27223 return c.header_
27224 }
27225
27226 func (c *ProjectsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
27227 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27228 if c.ifNoneMatch_ != "" {
27229 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27230 }
27231 var body io.Reader = nil
27232 c.urlParams_.Set("alt", alt)
27233 c.urlParams_.Set("prettyPrint", "false")
27234 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
27235 urls += "?" + c.urlParams_.Encode()
27236 req, err := http.NewRequest("GET", urls, body)
27237 if err != nil {
27238 return nil, err
27239 }
27240 req.Header = reqHeaders
27241 googleapi.Expand(req.URL, map[string]string{
27242 "name": c.name,
27243 })
27244 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27245 }
27246
27247
27248
27249
27250
27251
27252 func (c *ProjectsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
27253 gensupport.SetOptions(c.urlParams_, opts...)
27254 res, err := c.doRequest("json")
27255 if res != nil && res.StatusCode == http.StatusNotModified {
27256 if res.Body != nil {
27257 res.Body.Close()
27258 }
27259 return nil, gensupport.WrapError(&googleapi.Error{
27260 Code: res.StatusCode,
27261 Header: res.Header,
27262 })
27263 }
27264 if err != nil {
27265 return nil, err
27266 }
27267 defer googleapi.CloseBody(res)
27268 if err := googleapi.CheckResponse(res); err != nil {
27269 return nil, gensupport.WrapError(err)
27270 }
27271 ret := &LogBucket{
27272 ServerResponse: googleapi.ServerResponse{
27273 Header: res.Header,
27274 HTTPStatusCode: res.StatusCode,
27275 },
27276 }
27277 target := &ret
27278 if err := gensupport.DecodeResponse(target, res); err != nil {
27279 return nil, err
27280 }
27281 return ret, nil
27282 }
27283
27284 type ProjectsLocationsBucketsListCall struct {
27285 s *Service
27286 parent string
27287 urlParams_ gensupport.URLParams
27288 ifNoneMatch_ string
27289 ctx_ context.Context
27290 header_ http.Header
27291 }
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302 func (r *ProjectsLocationsBucketsService) List(parent string) *ProjectsLocationsBucketsListCall {
27303 c := &ProjectsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27304 c.parent = parent
27305 return c
27306 }
27307
27308
27309
27310
27311
27312 func (c *ProjectsLocationsBucketsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsListCall {
27313 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27314 return c
27315 }
27316
27317
27318
27319
27320
27321 func (c *ProjectsLocationsBucketsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsListCall {
27322 c.urlParams_.Set("pageToken", pageToken)
27323 return c
27324 }
27325
27326
27327
27328
27329 func (c *ProjectsLocationsBucketsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsListCall {
27330 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27331 return c
27332 }
27333
27334
27335
27336
27337 func (c *ProjectsLocationsBucketsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsListCall {
27338 c.ifNoneMatch_ = entityTag
27339 return c
27340 }
27341
27342
27343 func (c *ProjectsLocationsBucketsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsListCall {
27344 c.ctx_ = ctx
27345 return c
27346 }
27347
27348
27349
27350 func (c *ProjectsLocationsBucketsListCall) Header() http.Header {
27351 if c.header_ == nil {
27352 c.header_ = make(http.Header)
27353 }
27354 return c.header_
27355 }
27356
27357 func (c *ProjectsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
27358 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27359 if c.ifNoneMatch_ != "" {
27360 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27361 }
27362 var body io.Reader = nil
27363 c.urlParams_.Set("alt", alt)
27364 c.urlParams_.Set("prettyPrint", "false")
27365 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
27366 urls += "?" + c.urlParams_.Encode()
27367 req, err := http.NewRequest("GET", urls, body)
27368 if err != nil {
27369 return nil, err
27370 }
27371 req.Header = reqHeaders
27372 googleapi.Expand(req.URL, map[string]string{
27373 "parent": c.parent,
27374 })
27375 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27376 }
27377
27378
27379
27380
27381
27382
27383
27384 func (c *ProjectsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
27385 gensupport.SetOptions(c.urlParams_, opts...)
27386 res, err := c.doRequest("json")
27387 if res != nil && res.StatusCode == http.StatusNotModified {
27388 if res.Body != nil {
27389 res.Body.Close()
27390 }
27391 return nil, gensupport.WrapError(&googleapi.Error{
27392 Code: res.StatusCode,
27393 Header: res.Header,
27394 })
27395 }
27396 if err != nil {
27397 return nil, err
27398 }
27399 defer googleapi.CloseBody(res)
27400 if err := googleapi.CheckResponse(res); err != nil {
27401 return nil, gensupport.WrapError(err)
27402 }
27403 ret := &ListBucketsResponse{
27404 ServerResponse: googleapi.ServerResponse{
27405 Header: res.Header,
27406 HTTPStatusCode: res.StatusCode,
27407 },
27408 }
27409 target := &ret
27410 if err := gensupport.DecodeResponse(target, res); err != nil {
27411 return nil, err
27412 }
27413 return ret, nil
27414 }
27415
27416
27417
27418
27419 func (c *ProjectsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
27420 c.ctx_ = ctx
27421 defer c.PageToken(c.urlParams_.Get("pageToken"))
27422 for {
27423 x, err := c.Do()
27424 if err != nil {
27425 return err
27426 }
27427 if err := f(x); err != nil {
27428 return err
27429 }
27430 if x.NextPageToken == "" {
27431 return nil
27432 }
27433 c.PageToken(x.NextPageToken)
27434 }
27435 }
27436
27437 type ProjectsLocationsBucketsPatchCall struct {
27438 s *Service
27439 name string
27440 logbucket *LogBucket
27441 urlParams_ gensupport.URLParams
27442 ctx_ context.Context
27443 header_ http.Header
27444 }
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457 func (r *ProjectsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *ProjectsLocationsBucketsPatchCall {
27458 c := &ProjectsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27459 c.name = name
27460 c.logbucket = logbucket
27461 return c
27462 }
27463
27464
27465
27466
27467
27468
27469
27470 func (c *ProjectsLocationsBucketsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsPatchCall {
27471 c.urlParams_.Set("updateMask", updateMask)
27472 return c
27473 }
27474
27475
27476
27477
27478 func (c *ProjectsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsPatchCall {
27479 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27480 return c
27481 }
27482
27483
27484 func (c *ProjectsLocationsBucketsPatchCall) Context(ctx context.Context) *ProjectsLocationsBucketsPatchCall {
27485 c.ctx_ = ctx
27486 return c
27487 }
27488
27489
27490
27491 func (c *ProjectsLocationsBucketsPatchCall) Header() http.Header {
27492 if c.header_ == nil {
27493 c.header_ = make(http.Header)
27494 }
27495 return c.header_
27496 }
27497
27498 func (c *ProjectsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
27499 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
27500 var body io.Reader = nil
27501 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
27502 if err != nil {
27503 return nil, err
27504 }
27505 c.urlParams_.Set("alt", alt)
27506 c.urlParams_.Set("prettyPrint", "false")
27507 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
27508 urls += "?" + c.urlParams_.Encode()
27509 req, err := http.NewRequest("PATCH", urls, body)
27510 if err != nil {
27511 return nil, err
27512 }
27513 req.Header = reqHeaders
27514 googleapi.Expand(req.URL, map[string]string{
27515 "name": c.name,
27516 })
27517 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27518 }
27519
27520
27521
27522
27523
27524
27525 func (c *ProjectsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
27526 gensupport.SetOptions(c.urlParams_, opts...)
27527 res, err := c.doRequest("json")
27528 if res != nil && res.StatusCode == http.StatusNotModified {
27529 if res.Body != nil {
27530 res.Body.Close()
27531 }
27532 return nil, gensupport.WrapError(&googleapi.Error{
27533 Code: res.StatusCode,
27534 Header: res.Header,
27535 })
27536 }
27537 if err != nil {
27538 return nil, err
27539 }
27540 defer googleapi.CloseBody(res)
27541 if err := googleapi.CheckResponse(res); err != nil {
27542 return nil, gensupport.WrapError(err)
27543 }
27544 ret := &LogBucket{
27545 ServerResponse: googleapi.ServerResponse{
27546 Header: res.Header,
27547 HTTPStatusCode: res.StatusCode,
27548 },
27549 }
27550 target := &ret
27551 if err := gensupport.DecodeResponse(target, res); err != nil {
27552 return nil, err
27553 }
27554 return ret, nil
27555 }
27556
27557 type ProjectsLocationsBucketsUndeleteCall struct {
27558 s *Service
27559 name string
27560 undeletebucketrequest *UndeleteBucketRequest
27561 urlParams_ gensupport.URLParams
27562 ctx_ context.Context
27563 header_ http.Header
27564 }
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576 func (r *ProjectsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *ProjectsLocationsBucketsUndeleteCall {
27577 c := &ProjectsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27578 c.name = name
27579 c.undeletebucketrequest = undeletebucketrequest
27580 return c
27581 }
27582
27583
27584
27585
27586 func (c *ProjectsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsUndeleteCall {
27587 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27588 return c
27589 }
27590
27591
27592 func (c *ProjectsLocationsBucketsUndeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsUndeleteCall {
27593 c.ctx_ = ctx
27594 return c
27595 }
27596
27597
27598
27599 func (c *ProjectsLocationsBucketsUndeleteCall) Header() http.Header {
27600 if c.header_ == nil {
27601 c.header_ = make(http.Header)
27602 }
27603 return c.header_
27604 }
27605
27606 func (c *ProjectsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
27607 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
27608 var body io.Reader = nil
27609 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
27610 if err != nil {
27611 return nil, err
27612 }
27613 c.urlParams_.Set("alt", alt)
27614 c.urlParams_.Set("prettyPrint", "false")
27615 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
27616 urls += "?" + c.urlParams_.Encode()
27617 req, err := http.NewRequest("POST", urls, body)
27618 if err != nil {
27619 return nil, err
27620 }
27621 req.Header = reqHeaders
27622 googleapi.Expand(req.URL, map[string]string{
27623 "name": c.name,
27624 })
27625 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27626 }
27627
27628
27629
27630
27631
27632
27633 func (c *ProjectsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
27634 gensupport.SetOptions(c.urlParams_, opts...)
27635 res, err := c.doRequest("json")
27636 if res != nil && res.StatusCode == http.StatusNotModified {
27637 if res.Body != nil {
27638 res.Body.Close()
27639 }
27640 return nil, gensupport.WrapError(&googleapi.Error{
27641 Code: res.StatusCode,
27642 Header: res.Header,
27643 })
27644 }
27645 if err != nil {
27646 return nil, err
27647 }
27648 defer googleapi.CloseBody(res)
27649 if err := googleapi.CheckResponse(res); err != nil {
27650 return nil, gensupport.WrapError(err)
27651 }
27652 ret := &Empty{
27653 ServerResponse: googleapi.ServerResponse{
27654 Header: res.Header,
27655 HTTPStatusCode: res.StatusCode,
27656 },
27657 }
27658 target := &ret
27659 if err := gensupport.DecodeResponse(target, res); err != nil {
27660 return nil, err
27661 }
27662 return ret, nil
27663 }
27664
27665 type ProjectsLocationsBucketsUpdateAsyncCall struct {
27666 s *Service
27667 name string
27668 logbucket *LogBucket
27669 urlParams_ gensupport.URLParams
27670 ctx_ context.Context
27671 header_ http.Header
27672 }
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686 func (r *ProjectsLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *ProjectsLocationsBucketsUpdateAsyncCall {
27687 c := &ProjectsLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27688 c.name = name
27689 c.logbucket = logbucket
27690 return c
27691 }
27692
27693
27694
27695
27696
27697
27698
27699 func (c *ProjectsLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsUpdateAsyncCall {
27700 c.urlParams_.Set("updateMask", updateMask)
27701 return c
27702 }
27703
27704
27705
27706
27707 func (c *ProjectsLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsUpdateAsyncCall {
27708 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27709 return c
27710 }
27711
27712
27713 func (c *ProjectsLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *ProjectsLocationsBucketsUpdateAsyncCall {
27714 c.ctx_ = ctx
27715 return c
27716 }
27717
27718
27719
27720 func (c *ProjectsLocationsBucketsUpdateAsyncCall) Header() http.Header {
27721 if c.header_ == nil {
27722 c.header_ = make(http.Header)
27723 }
27724 return c.header_
27725 }
27726
27727 func (c *ProjectsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) {
27728 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
27729 var body io.Reader = nil
27730 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
27731 if err != nil {
27732 return nil, err
27733 }
27734 c.urlParams_.Set("alt", alt)
27735 c.urlParams_.Set("prettyPrint", "false")
27736 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync")
27737 urls += "?" + c.urlParams_.Encode()
27738 req, err := http.NewRequest("POST", urls, body)
27739 if err != nil {
27740 return nil, err
27741 }
27742 req.Header = reqHeaders
27743 googleapi.Expand(req.URL, map[string]string{
27744 "name": c.name,
27745 })
27746 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27747 }
27748
27749
27750
27751
27752
27753
27754 func (c *ProjectsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27755 gensupport.SetOptions(c.urlParams_, opts...)
27756 res, err := c.doRequest("json")
27757 if res != nil && res.StatusCode == http.StatusNotModified {
27758 if res.Body != nil {
27759 res.Body.Close()
27760 }
27761 return nil, gensupport.WrapError(&googleapi.Error{
27762 Code: res.StatusCode,
27763 Header: res.Header,
27764 })
27765 }
27766 if err != nil {
27767 return nil, err
27768 }
27769 defer googleapi.CloseBody(res)
27770 if err := googleapi.CheckResponse(res); err != nil {
27771 return nil, gensupport.WrapError(err)
27772 }
27773 ret := &Operation{
27774 ServerResponse: googleapi.ServerResponse{
27775 Header: res.Header,
27776 HTTPStatusCode: res.StatusCode,
27777 },
27778 }
27779 target := &ret
27780 if err := gensupport.DecodeResponse(target, res); err != nil {
27781 return nil, err
27782 }
27783 return ret, nil
27784 }
27785
27786 type ProjectsLocationsBucketsLinksCreateCall struct {
27787 s *Service
27788 parent string
27789 link *Link
27790 urlParams_ gensupport.URLParams
27791 ctx_ context.Context
27792 header_ http.Header
27793 }
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805 func (r *ProjectsLocationsBucketsLinksService) Create(parent string, link *Link) *ProjectsLocationsBucketsLinksCreateCall {
27806 c := &ProjectsLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27807 c.parent = parent
27808 c.link = link
27809 return c
27810 }
27811
27812
27813
27814
27815 func (c *ProjectsLocationsBucketsLinksCreateCall) LinkId(linkId string) *ProjectsLocationsBucketsLinksCreateCall {
27816 c.urlParams_.Set("linkId", linkId)
27817 return c
27818 }
27819
27820
27821
27822
27823 func (c *ProjectsLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksCreateCall {
27824 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27825 return c
27826 }
27827
27828
27829 func (c *ProjectsLocationsBucketsLinksCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksCreateCall {
27830 c.ctx_ = ctx
27831 return c
27832 }
27833
27834
27835
27836 func (c *ProjectsLocationsBucketsLinksCreateCall) Header() http.Header {
27837 if c.header_ == nil {
27838 c.header_ = make(http.Header)
27839 }
27840 return c.header_
27841 }
27842
27843 func (c *ProjectsLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
27844 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
27845 var body io.Reader = nil
27846 body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
27847 if err != nil {
27848 return nil, err
27849 }
27850 c.urlParams_.Set("alt", alt)
27851 c.urlParams_.Set("prettyPrint", "false")
27852 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
27853 urls += "?" + c.urlParams_.Encode()
27854 req, err := http.NewRequest("POST", urls, body)
27855 if err != nil {
27856 return nil, err
27857 }
27858 req.Header = reqHeaders
27859 googleapi.Expand(req.URL, map[string]string{
27860 "parent": c.parent,
27861 })
27862 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27863 }
27864
27865
27866
27867
27868
27869
27870 func (c *ProjectsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27871 gensupport.SetOptions(c.urlParams_, opts...)
27872 res, err := c.doRequest("json")
27873 if res != nil && res.StatusCode == http.StatusNotModified {
27874 if res.Body != nil {
27875 res.Body.Close()
27876 }
27877 return nil, gensupport.WrapError(&googleapi.Error{
27878 Code: res.StatusCode,
27879 Header: res.Header,
27880 })
27881 }
27882 if err != nil {
27883 return nil, err
27884 }
27885 defer googleapi.CloseBody(res)
27886 if err := googleapi.CheckResponse(res); err != nil {
27887 return nil, gensupport.WrapError(err)
27888 }
27889 ret := &Operation{
27890 ServerResponse: googleapi.ServerResponse{
27891 Header: res.Header,
27892 HTTPStatusCode: res.StatusCode,
27893 },
27894 }
27895 target := &ret
27896 if err := gensupport.DecodeResponse(target, res); err != nil {
27897 return nil, err
27898 }
27899 return ret, nil
27900 }
27901
27902 type ProjectsLocationsBucketsLinksDeleteCall struct {
27903 s *Service
27904 name string
27905 urlParams_ gensupport.URLParams
27906 ctx_ context.Context
27907 header_ http.Header
27908 }
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922 func (r *ProjectsLocationsBucketsLinksService) Delete(name string) *ProjectsLocationsBucketsLinksDeleteCall {
27923 c := &ProjectsLocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27924 c.name = name
27925 return c
27926 }
27927
27928
27929
27930
27931 func (c *ProjectsLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksDeleteCall {
27932 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27933 return c
27934 }
27935
27936
27937 func (c *ProjectsLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksDeleteCall {
27938 c.ctx_ = ctx
27939 return c
27940 }
27941
27942
27943
27944 func (c *ProjectsLocationsBucketsLinksDeleteCall) Header() http.Header {
27945 if c.header_ == nil {
27946 c.header_ = make(http.Header)
27947 }
27948 return c.header_
27949 }
27950
27951 func (c *ProjectsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
27952 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27953 var body io.Reader = nil
27954 c.urlParams_.Set("alt", alt)
27955 c.urlParams_.Set("prettyPrint", "false")
27956 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
27957 urls += "?" + c.urlParams_.Encode()
27958 req, err := http.NewRequest("DELETE", urls, body)
27959 if err != nil {
27960 return nil, err
27961 }
27962 req.Header = reqHeaders
27963 googleapi.Expand(req.URL, map[string]string{
27964 "name": c.name,
27965 })
27966 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27967 }
27968
27969
27970
27971
27972
27973
27974 func (c *ProjectsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27975 gensupport.SetOptions(c.urlParams_, opts...)
27976 res, err := c.doRequest("json")
27977 if res != nil && res.StatusCode == http.StatusNotModified {
27978 if res.Body != nil {
27979 res.Body.Close()
27980 }
27981 return nil, gensupport.WrapError(&googleapi.Error{
27982 Code: res.StatusCode,
27983 Header: res.Header,
27984 })
27985 }
27986 if err != nil {
27987 return nil, err
27988 }
27989 defer googleapi.CloseBody(res)
27990 if err := googleapi.CheckResponse(res); err != nil {
27991 return nil, gensupport.WrapError(err)
27992 }
27993 ret := &Operation{
27994 ServerResponse: googleapi.ServerResponse{
27995 Header: res.Header,
27996 HTTPStatusCode: res.StatusCode,
27997 },
27998 }
27999 target := &ret
28000 if err := gensupport.DecodeResponse(target, res); err != nil {
28001 return nil, err
28002 }
28003 return ret, nil
28004 }
28005
28006 type ProjectsLocationsBucketsLinksGetCall struct {
28007 s *Service
28008 name string
28009 urlParams_ gensupport.URLParams
28010 ifNoneMatch_ string
28011 ctx_ context.Context
28012 header_ http.Header
28013 }
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026 func (r *ProjectsLocationsBucketsLinksService) Get(name string) *ProjectsLocationsBucketsLinksGetCall {
28027 c := &ProjectsLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28028 c.name = name
28029 return c
28030 }
28031
28032
28033
28034
28035 func (c *ProjectsLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksGetCall {
28036 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28037 return c
28038 }
28039
28040
28041
28042
28043 func (c *ProjectsLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsLinksGetCall {
28044 c.ifNoneMatch_ = entityTag
28045 return c
28046 }
28047
28048
28049 func (c *ProjectsLocationsBucketsLinksGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksGetCall {
28050 c.ctx_ = ctx
28051 return c
28052 }
28053
28054
28055
28056 func (c *ProjectsLocationsBucketsLinksGetCall) Header() http.Header {
28057 if c.header_ == nil {
28058 c.header_ = make(http.Header)
28059 }
28060 return c.header_
28061 }
28062
28063 func (c *ProjectsLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) {
28064 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28065 if c.ifNoneMatch_ != "" {
28066 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28067 }
28068 var body io.Reader = nil
28069 c.urlParams_.Set("alt", alt)
28070 c.urlParams_.Set("prettyPrint", "false")
28071 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
28072 urls += "?" + c.urlParams_.Encode()
28073 req, err := http.NewRequest("GET", urls, body)
28074 if err != nil {
28075 return nil, err
28076 }
28077 req.Header = reqHeaders
28078 googleapi.Expand(req.URL, map[string]string{
28079 "name": c.name,
28080 })
28081 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28082 }
28083
28084
28085
28086
28087
28088
28089 func (c *ProjectsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) {
28090 gensupport.SetOptions(c.urlParams_, opts...)
28091 res, err := c.doRequest("json")
28092 if res != nil && res.StatusCode == http.StatusNotModified {
28093 if res.Body != nil {
28094 res.Body.Close()
28095 }
28096 return nil, gensupport.WrapError(&googleapi.Error{
28097 Code: res.StatusCode,
28098 Header: res.Header,
28099 })
28100 }
28101 if err != nil {
28102 return nil, err
28103 }
28104 defer googleapi.CloseBody(res)
28105 if err := googleapi.CheckResponse(res); err != nil {
28106 return nil, gensupport.WrapError(err)
28107 }
28108 ret := &Link{
28109 ServerResponse: googleapi.ServerResponse{
28110 Header: res.Header,
28111 HTTPStatusCode: res.StatusCode,
28112 },
28113 }
28114 target := &ret
28115 if err := gensupport.DecodeResponse(target, res); err != nil {
28116 return nil, err
28117 }
28118 return ret, nil
28119 }
28120
28121 type ProjectsLocationsBucketsLinksListCall struct {
28122 s *Service
28123 parent string
28124 urlParams_ gensupport.URLParams
28125 ifNoneMatch_ string
28126 ctx_ context.Context
28127 header_ http.Header
28128 }
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138 func (r *ProjectsLocationsBucketsLinksService) List(parent string) *ProjectsLocationsBucketsLinksListCall {
28139 c := &ProjectsLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28140 c.parent = parent
28141 return c
28142 }
28143
28144
28145
28146 func (c *ProjectsLocationsBucketsLinksListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsLinksListCall {
28147 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28148 return c
28149 }
28150
28151
28152
28153
28154 func (c *ProjectsLocationsBucketsLinksListCall) PageToken(pageToken string) *ProjectsLocationsBucketsLinksListCall {
28155 c.urlParams_.Set("pageToken", pageToken)
28156 return c
28157 }
28158
28159
28160
28161
28162 func (c *ProjectsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksListCall {
28163 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28164 return c
28165 }
28166
28167
28168
28169
28170 func (c *ProjectsLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsLinksListCall {
28171 c.ifNoneMatch_ = entityTag
28172 return c
28173 }
28174
28175
28176 func (c *ProjectsLocationsBucketsLinksListCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksListCall {
28177 c.ctx_ = ctx
28178 return c
28179 }
28180
28181
28182
28183 func (c *ProjectsLocationsBucketsLinksListCall) Header() http.Header {
28184 if c.header_ == nil {
28185 c.header_ = make(http.Header)
28186 }
28187 return c.header_
28188 }
28189
28190 func (c *ProjectsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) {
28191 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28192 if c.ifNoneMatch_ != "" {
28193 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28194 }
28195 var body io.Reader = nil
28196 c.urlParams_.Set("alt", alt)
28197 c.urlParams_.Set("prettyPrint", "false")
28198 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
28199 urls += "?" + c.urlParams_.Encode()
28200 req, err := http.NewRequest("GET", urls, body)
28201 if err != nil {
28202 return nil, err
28203 }
28204 req.Header = reqHeaders
28205 googleapi.Expand(req.URL, map[string]string{
28206 "parent": c.parent,
28207 })
28208 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28209 }
28210
28211
28212
28213
28214
28215
28216
28217 func (c *ProjectsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) {
28218 gensupport.SetOptions(c.urlParams_, opts...)
28219 res, err := c.doRequest("json")
28220 if res != nil && res.StatusCode == http.StatusNotModified {
28221 if res.Body != nil {
28222 res.Body.Close()
28223 }
28224 return nil, gensupport.WrapError(&googleapi.Error{
28225 Code: res.StatusCode,
28226 Header: res.Header,
28227 })
28228 }
28229 if err != nil {
28230 return nil, err
28231 }
28232 defer googleapi.CloseBody(res)
28233 if err := googleapi.CheckResponse(res); err != nil {
28234 return nil, gensupport.WrapError(err)
28235 }
28236 ret := &ListLinksResponse{
28237 ServerResponse: googleapi.ServerResponse{
28238 Header: res.Header,
28239 HTTPStatusCode: res.StatusCode,
28240 },
28241 }
28242 target := &ret
28243 if err := gensupport.DecodeResponse(target, res); err != nil {
28244 return nil, err
28245 }
28246 return ret, nil
28247 }
28248
28249
28250
28251
28252 func (c *ProjectsLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error {
28253 c.ctx_ = ctx
28254 defer c.PageToken(c.urlParams_.Get("pageToken"))
28255 for {
28256 x, err := c.Do()
28257 if err != nil {
28258 return err
28259 }
28260 if err := f(x); err != nil {
28261 return err
28262 }
28263 if x.NextPageToken == "" {
28264 return nil
28265 }
28266 c.PageToken(x.NextPageToken)
28267 }
28268 }
28269
28270 type ProjectsLocationsBucketsViewsCreateCall struct {
28271 s *Service
28272 parent string
28273 logview *LogView
28274 urlParams_ gensupport.URLParams
28275 ctx_ context.Context
28276 header_ http.Header
28277 }
28278
28279
28280
28281
28282
28283
28284
28285 func (r *ProjectsLocationsBucketsViewsService) Create(parent string, logview *LogView) *ProjectsLocationsBucketsViewsCreateCall {
28286 c := &ProjectsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28287 c.parent = parent
28288 c.logview = logview
28289 return c
28290 }
28291
28292
28293
28294
28295 func (c *ProjectsLocationsBucketsViewsCreateCall) ViewId(viewId string) *ProjectsLocationsBucketsViewsCreateCall {
28296 c.urlParams_.Set("viewId", viewId)
28297 return c
28298 }
28299
28300
28301
28302
28303 func (c *ProjectsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsCreateCall {
28304 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28305 return c
28306 }
28307
28308
28309 func (c *ProjectsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsCreateCall {
28310 c.ctx_ = ctx
28311 return c
28312 }
28313
28314
28315
28316 func (c *ProjectsLocationsBucketsViewsCreateCall) Header() http.Header {
28317 if c.header_ == nil {
28318 c.header_ = make(http.Header)
28319 }
28320 return c.header_
28321 }
28322
28323 func (c *ProjectsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
28324 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
28325 var body io.Reader = nil
28326 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
28327 if err != nil {
28328 return nil, err
28329 }
28330 c.urlParams_.Set("alt", alt)
28331 c.urlParams_.Set("prettyPrint", "false")
28332 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
28333 urls += "?" + c.urlParams_.Encode()
28334 req, err := http.NewRequest("POST", urls, body)
28335 if err != nil {
28336 return nil, err
28337 }
28338 req.Header = reqHeaders
28339 googleapi.Expand(req.URL, map[string]string{
28340 "parent": c.parent,
28341 })
28342 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28343 }
28344
28345
28346
28347
28348
28349
28350 func (c *ProjectsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
28351 gensupport.SetOptions(c.urlParams_, opts...)
28352 res, err := c.doRequest("json")
28353 if res != nil && res.StatusCode == http.StatusNotModified {
28354 if res.Body != nil {
28355 res.Body.Close()
28356 }
28357 return nil, gensupport.WrapError(&googleapi.Error{
28358 Code: res.StatusCode,
28359 Header: res.Header,
28360 })
28361 }
28362 if err != nil {
28363 return nil, err
28364 }
28365 defer googleapi.CloseBody(res)
28366 if err := googleapi.CheckResponse(res); err != nil {
28367 return nil, gensupport.WrapError(err)
28368 }
28369 ret := &LogView{
28370 ServerResponse: googleapi.ServerResponse{
28371 Header: res.Header,
28372 HTTPStatusCode: res.StatusCode,
28373 },
28374 }
28375 target := &ret
28376 if err := gensupport.DecodeResponse(target, res); err != nil {
28377 return nil, err
28378 }
28379 return ret, nil
28380 }
28381
28382 type ProjectsLocationsBucketsViewsDeleteCall struct {
28383 s *Service
28384 name string
28385 urlParams_ gensupport.URLParams
28386 ctx_ context.Context
28387 header_ http.Header
28388 }
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399 func (r *ProjectsLocationsBucketsViewsService) Delete(name string) *ProjectsLocationsBucketsViewsDeleteCall {
28400 c := &ProjectsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28401 c.name = name
28402 return c
28403 }
28404
28405
28406
28407
28408 func (c *ProjectsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsDeleteCall {
28409 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28410 return c
28411 }
28412
28413
28414 func (c *ProjectsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsDeleteCall {
28415 c.ctx_ = ctx
28416 return c
28417 }
28418
28419
28420
28421 func (c *ProjectsLocationsBucketsViewsDeleteCall) Header() http.Header {
28422 if c.header_ == nil {
28423 c.header_ = make(http.Header)
28424 }
28425 return c.header_
28426 }
28427
28428 func (c *ProjectsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
28429 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28430 var body io.Reader = nil
28431 c.urlParams_.Set("alt", alt)
28432 c.urlParams_.Set("prettyPrint", "false")
28433 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
28434 urls += "?" + c.urlParams_.Encode()
28435 req, err := http.NewRequest("DELETE", urls, body)
28436 if err != nil {
28437 return nil, err
28438 }
28439 req.Header = reqHeaders
28440 googleapi.Expand(req.URL, map[string]string{
28441 "name": c.name,
28442 })
28443 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28444 }
28445
28446
28447
28448
28449
28450
28451 func (c *ProjectsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
28452 gensupport.SetOptions(c.urlParams_, opts...)
28453 res, err := c.doRequest("json")
28454 if res != nil && res.StatusCode == http.StatusNotModified {
28455 if res.Body != nil {
28456 res.Body.Close()
28457 }
28458 return nil, gensupport.WrapError(&googleapi.Error{
28459 Code: res.StatusCode,
28460 Header: res.Header,
28461 })
28462 }
28463 if err != nil {
28464 return nil, err
28465 }
28466 defer googleapi.CloseBody(res)
28467 if err := googleapi.CheckResponse(res); err != nil {
28468 return nil, gensupport.WrapError(err)
28469 }
28470 ret := &Empty{
28471 ServerResponse: googleapi.ServerResponse{
28472 Header: res.Header,
28473 HTTPStatusCode: res.StatusCode,
28474 },
28475 }
28476 target := &ret
28477 if err := gensupport.DecodeResponse(target, res); err != nil {
28478 return nil, err
28479 }
28480 return ret, nil
28481 }
28482
28483 type ProjectsLocationsBucketsViewsGetCall struct {
28484 s *Service
28485 name string
28486 urlParams_ gensupport.URLParams
28487 ifNoneMatch_ string
28488 ctx_ context.Context
28489 header_ http.Header
28490 }
28491
28492
28493
28494
28495
28496
28497
28498
28499 func (r *ProjectsLocationsBucketsViewsService) Get(name string) *ProjectsLocationsBucketsViewsGetCall {
28500 c := &ProjectsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28501 c.name = name
28502 return c
28503 }
28504
28505
28506
28507
28508 func (c *ProjectsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsGetCall {
28509 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28510 return c
28511 }
28512
28513
28514
28515
28516 func (c *ProjectsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsGetCall {
28517 c.ifNoneMatch_ = entityTag
28518 return c
28519 }
28520
28521
28522 func (c *ProjectsLocationsBucketsViewsGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsGetCall {
28523 c.ctx_ = ctx
28524 return c
28525 }
28526
28527
28528
28529 func (c *ProjectsLocationsBucketsViewsGetCall) Header() http.Header {
28530 if c.header_ == nil {
28531 c.header_ = make(http.Header)
28532 }
28533 return c.header_
28534 }
28535
28536 func (c *ProjectsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
28537 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28538 if c.ifNoneMatch_ != "" {
28539 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28540 }
28541 var body io.Reader = nil
28542 c.urlParams_.Set("alt", alt)
28543 c.urlParams_.Set("prettyPrint", "false")
28544 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
28545 urls += "?" + c.urlParams_.Encode()
28546 req, err := http.NewRequest("GET", urls, body)
28547 if err != nil {
28548 return nil, err
28549 }
28550 req.Header = reqHeaders
28551 googleapi.Expand(req.URL, map[string]string{
28552 "name": c.name,
28553 })
28554 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28555 }
28556
28557
28558
28559
28560
28561
28562 func (c *ProjectsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
28563 gensupport.SetOptions(c.urlParams_, opts...)
28564 res, err := c.doRequest("json")
28565 if res != nil && res.StatusCode == http.StatusNotModified {
28566 if res.Body != nil {
28567 res.Body.Close()
28568 }
28569 return nil, gensupport.WrapError(&googleapi.Error{
28570 Code: res.StatusCode,
28571 Header: res.Header,
28572 })
28573 }
28574 if err != nil {
28575 return nil, err
28576 }
28577 defer googleapi.CloseBody(res)
28578 if err := googleapi.CheckResponse(res); err != nil {
28579 return nil, gensupport.WrapError(err)
28580 }
28581 ret := &LogView{
28582 ServerResponse: googleapi.ServerResponse{
28583 Header: res.Header,
28584 HTTPStatusCode: res.StatusCode,
28585 },
28586 }
28587 target := &ret
28588 if err := gensupport.DecodeResponse(target, res); err != nil {
28589 return nil, err
28590 }
28591 return ret, nil
28592 }
28593
28594 type ProjectsLocationsBucketsViewsGetIamPolicyCall struct {
28595 s *Service
28596 resource string
28597 getiampolicyrequest *GetIamPolicyRequest
28598 urlParams_ gensupport.URLParams
28599 ctx_ context.Context
28600 header_ http.Header
28601 }
28602
28603
28604
28605
28606
28607
28608
28609 func (r *ProjectsLocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsBucketsViewsGetIamPolicyCall {
28610 c := &ProjectsLocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28611 c.resource = resource
28612 c.getiampolicyrequest = getiampolicyrequest
28613 return c
28614 }
28615
28616
28617
28618
28619 func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsGetIamPolicyCall {
28620 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28621 return c
28622 }
28623
28624
28625 func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsGetIamPolicyCall {
28626 c.ctx_ = ctx
28627 return c
28628 }
28629
28630
28631
28632 func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Header() http.Header {
28633 if c.header_ == nil {
28634 c.header_ = make(http.Header)
28635 }
28636 return c.header_
28637 }
28638
28639 func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
28640 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
28641 var body io.Reader = nil
28642 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
28643 if err != nil {
28644 return nil, err
28645 }
28646 c.urlParams_.Set("alt", alt)
28647 c.urlParams_.Set("prettyPrint", "false")
28648 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
28649 urls += "?" + c.urlParams_.Encode()
28650 req, err := http.NewRequest("POST", urls, body)
28651 if err != nil {
28652 return nil, err
28653 }
28654 req.Header = reqHeaders
28655 googleapi.Expand(req.URL, map[string]string{
28656 "resource": c.resource,
28657 })
28658 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28659 }
28660
28661
28662
28663
28664
28665
28666 func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
28667 gensupport.SetOptions(c.urlParams_, opts...)
28668 res, err := c.doRequest("json")
28669 if res != nil && res.StatusCode == http.StatusNotModified {
28670 if res.Body != nil {
28671 res.Body.Close()
28672 }
28673 return nil, gensupport.WrapError(&googleapi.Error{
28674 Code: res.StatusCode,
28675 Header: res.Header,
28676 })
28677 }
28678 if err != nil {
28679 return nil, err
28680 }
28681 defer googleapi.CloseBody(res)
28682 if err := googleapi.CheckResponse(res); err != nil {
28683 return nil, gensupport.WrapError(err)
28684 }
28685 ret := &Policy{
28686 ServerResponse: googleapi.ServerResponse{
28687 Header: res.Header,
28688 HTTPStatusCode: res.StatusCode,
28689 },
28690 }
28691 target := &ret
28692 if err := gensupport.DecodeResponse(target, res); err != nil {
28693 return nil, err
28694 }
28695 return ret, nil
28696 }
28697
28698 type ProjectsLocationsBucketsViewsListCall struct {
28699 s *Service
28700 parent string
28701 urlParams_ gensupport.URLParams
28702 ifNoneMatch_ string
28703 ctx_ context.Context
28704 header_ http.Header
28705 }
28706
28707
28708
28709
28710
28711 func (r *ProjectsLocationsBucketsViewsService) List(parent string) *ProjectsLocationsBucketsViewsListCall {
28712 c := &ProjectsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28713 c.parent = parent
28714 return c
28715 }
28716
28717
28718
28719
28720
28721 func (c *ProjectsLocationsBucketsViewsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsViewsListCall {
28722 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28723 return c
28724 }
28725
28726
28727
28728
28729
28730 func (c *ProjectsLocationsBucketsViewsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsViewsListCall {
28731 c.urlParams_.Set("pageToken", pageToken)
28732 return c
28733 }
28734
28735
28736
28737
28738 func (c *ProjectsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsListCall {
28739 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28740 return c
28741 }
28742
28743
28744
28745
28746 func (c *ProjectsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsListCall {
28747 c.ifNoneMatch_ = entityTag
28748 return c
28749 }
28750
28751
28752 func (c *ProjectsLocationsBucketsViewsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsListCall {
28753 c.ctx_ = ctx
28754 return c
28755 }
28756
28757
28758
28759 func (c *ProjectsLocationsBucketsViewsListCall) Header() http.Header {
28760 if c.header_ == nil {
28761 c.header_ = make(http.Header)
28762 }
28763 return c.header_
28764 }
28765
28766 func (c *ProjectsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
28767 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28768 if c.ifNoneMatch_ != "" {
28769 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28770 }
28771 var body io.Reader = nil
28772 c.urlParams_.Set("alt", alt)
28773 c.urlParams_.Set("prettyPrint", "false")
28774 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
28775 urls += "?" + c.urlParams_.Encode()
28776 req, err := http.NewRequest("GET", urls, body)
28777 if err != nil {
28778 return nil, err
28779 }
28780 req.Header = reqHeaders
28781 googleapi.Expand(req.URL, map[string]string{
28782 "parent": c.parent,
28783 })
28784 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28785 }
28786
28787
28788
28789
28790
28791
28792
28793 func (c *ProjectsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
28794 gensupport.SetOptions(c.urlParams_, opts...)
28795 res, err := c.doRequest("json")
28796 if res != nil && res.StatusCode == http.StatusNotModified {
28797 if res.Body != nil {
28798 res.Body.Close()
28799 }
28800 return nil, gensupport.WrapError(&googleapi.Error{
28801 Code: res.StatusCode,
28802 Header: res.Header,
28803 })
28804 }
28805 if err != nil {
28806 return nil, err
28807 }
28808 defer googleapi.CloseBody(res)
28809 if err := googleapi.CheckResponse(res); err != nil {
28810 return nil, gensupport.WrapError(err)
28811 }
28812 ret := &ListViewsResponse{
28813 ServerResponse: googleapi.ServerResponse{
28814 Header: res.Header,
28815 HTTPStatusCode: res.StatusCode,
28816 },
28817 }
28818 target := &ret
28819 if err := gensupport.DecodeResponse(target, res); err != nil {
28820 return nil, err
28821 }
28822 return ret, nil
28823 }
28824
28825
28826
28827
28828 func (c *ProjectsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
28829 c.ctx_ = ctx
28830 defer c.PageToken(c.urlParams_.Get("pageToken"))
28831 for {
28832 x, err := c.Do()
28833 if err != nil {
28834 return err
28835 }
28836 if err := f(x); err != nil {
28837 return err
28838 }
28839 if x.NextPageToken == "" {
28840 return nil
28841 }
28842 c.PageToken(x.NextPageToken)
28843 }
28844 }
28845
28846 type ProjectsLocationsBucketsViewsPatchCall struct {
28847 s *Service
28848 name string
28849 logview *LogView
28850 urlParams_ gensupport.URLParams
28851 ctx_ context.Context
28852 header_ http.Header
28853 }
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866 func (r *ProjectsLocationsBucketsViewsService) Patch(name string, logview *LogView) *ProjectsLocationsBucketsViewsPatchCall {
28867 c := &ProjectsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28868 c.name = name
28869 c.logview = logview
28870 return c
28871 }
28872
28873
28874
28875
28876
28877
28878
28879 func (c *ProjectsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsViewsPatchCall {
28880 c.urlParams_.Set("updateMask", updateMask)
28881 return c
28882 }
28883
28884
28885
28886
28887 func (c *ProjectsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsPatchCall {
28888 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28889 return c
28890 }
28891
28892
28893 func (c *ProjectsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsPatchCall {
28894 c.ctx_ = ctx
28895 return c
28896 }
28897
28898
28899
28900 func (c *ProjectsLocationsBucketsViewsPatchCall) Header() http.Header {
28901 if c.header_ == nil {
28902 c.header_ = make(http.Header)
28903 }
28904 return c.header_
28905 }
28906
28907 func (c *ProjectsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
28908 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
28909 var body io.Reader = nil
28910 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
28911 if err != nil {
28912 return nil, err
28913 }
28914 c.urlParams_.Set("alt", alt)
28915 c.urlParams_.Set("prettyPrint", "false")
28916 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
28917 urls += "?" + c.urlParams_.Encode()
28918 req, err := http.NewRequest("PATCH", urls, body)
28919 if err != nil {
28920 return nil, err
28921 }
28922 req.Header = reqHeaders
28923 googleapi.Expand(req.URL, map[string]string{
28924 "name": c.name,
28925 })
28926 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28927 }
28928
28929
28930
28931
28932
28933
28934 func (c *ProjectsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
28935 gensupport.SetOptions(c.urlParams_, opts...)
28936 res, err := c.doRequest("json")
28937 if res != nil && res.StatusCode == http.StatusNotModified {
28938 if res.Body != nil {
28939 res.Body.Close()
28940 }
28941 return nil, gensupport.WrapError(&googleapi.Error{
28942 Code: res.StatusCode,
28943 Header: res.Header,
28944 })
28945 }
28946 if err != nil {
28947 return nil, err
28948 }
28949 defer googleapi.CloseBody(res)
28950 if err := googleapi.CheckResponse(res); err != nil {
28951 return nil, gensupport.WrapError(err)
28952 }
28953 ret := &LogView{
28954 ServerResponse: googleapi.ServerResponse{
28955 Header: res.Header,
28956 HTTPStatusCode: res.StatusCode,
28957 },
28958 }
28959 target := &ret
28960 if err := gensupport.DecodeResponse(target, res); err != nil {
28961 return nil, err
28962 }
28963 return ret, nil
28964 }
28965
28966 type ProjectsLocationsBucketsViewsSetIamPolicyCall struct {
28967 s *Service
28968 resource string
28969 setiampolicyrequest *SetIamPolicyRequest
28970 urlParams_ gensupport.URLParams
28971 ctx_ context.Context
28972 header_ http.Header
28973 }
28974
28975
28976
28977
28978
28979
28980
28981
28982 func (r *ProjectsLocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsBucketsViewsSetIamPolicyCall {
28983 c := &ProjectsLocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28984 c.resource = resource
28985 c.setiampolicyrequest = setiampolicyrequest
28986 return c
28987 }
28988
28989
28990
28991
28992 func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsSetIamPolicyCall {
28993 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28994 return c
28995 }
28996
28997
28998 func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsSetIamPolicyCall {
28999 c.ctx_ = ctx
29000 return c
29001 }
29002
29003
29004
29005 func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Header() http.Header {
29006 if c.header_ == nil {
29007 c.header_ = make(http.Header)
29008 }
29009 return c.header_
29010 }
29011
29012 func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
29013 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29014 var body io.Reader = nil
29015 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
29016 if err != nil {
29017 return nil, err
29018 }
29019 c.urlParams_.Set("alt", alt)
29020 c.urlParams_.Set("prettyPrint", "false")
29021 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
29022 urls += "?" + c.urlParams_.Encode()
29023 req, err := http.NewRequest("POST", urls, body)
29024 if err != nil {
29025 return nil, err
29026 }
29027 req.Header = reqHeaders
29028 googleapi.Expand(req.URL, map[string]string{
29029 "resource": c.resource,
29030 })
29031 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29032 }
29033
29034
29035
29036
29037
29038
29039 func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
29040 gensupport.SetOptions(c.urlParams_, opts...)
29041 res, err := c.doRequest("json")
29042 if res != nil && res.StatusCode == http.StatusNotModified {
29043 if res.Body != nil {
29044 res.Body.Close()
29045 }
29046 return nil, gensupport.WrapError(&googleapi.Error{
29047 Code: res.StatusCode,
29048 Header: res.Header,
29049 })
29050 }
29051 if err != nil {
29052 return nil, err
29053 }
29054 defer googleapi.CloseBody(res)
29055 if err := googleapi.CheckResponse(res); err != nil {
29056 return nil, gensupport.WrapError(err)
29057 }
29058 ret := &Policy{
29059 ServerResponse: googleapi.ServerResponse{
29060 Header: res.Header,
29061 HTTPStatusCode: res.StatusCode,
29062 },
29063 }
29064 target := &ret
29065 if err := gensupport.DecodeResponse(target, res); err != nil {
29066 return nil, err
29067 }
29068 return ret, nil
29069 }
29070
29071 type ProjectsLocationsBucketsViewsTestIamPermissionsCall struct {
29072 s *Service
29073 resource string
29074 testiampermissionsrequest *TestIamPermissionsRequest
29075 urlParams_ gensupport.URLParams
29076 ctx_ context.Context
29077 header_ http.Header
29078 }
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090 func (r *ProjectsLocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsBucketsViewsTestIamPermissionsCall {
29091 c := &ProjectsLocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29092 c.resource = resource
29093 c.testiampermissionsrequest = testiampermissionsrequest
29094 return c
29095 }
29096
29097
29098
29099
29100 func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsTestIamPermissionsCall {
29101 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29102 return c
29103 }
29104
29105
29106 func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsTestIamPermissionsCall {
29107 c.ctx_ = ctx
29108 return c
29109 }
29110
29111
29112
29113 func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Header() http.Header {
29114 if c.header_ == nil {
29115 c.header_ = make(http.Header)
29116 }
29117 return c.header_
29118 }
29119
29120 func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
29121 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29122 var body io.Reader = nil
29123 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
29124 if err != nil {
29125 return nil, err
29126 }
29127 c.urlParams_.Set("alt", alt)
29128 c.urlParams_.Set("prettyPrint", "false")
29129 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
29130 urls += "?" + c.urlParams_.Encode()
29131 req, err := http.NewRequest("POST", urls, body)
29132 if err != nil {
29133 return nil, err
29134 }
29135 req.Header = reqHeaders
29136 googleapi.Expand(req.URL, map[string]string{
29137 "resource": c.resource,
29138 })
29139 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29140 }
29141
29142
29143
29144
29145
29146
29147
29148 func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
29149 gensupport.SetOptions(c.urlParams_, opts...)
29150 res, err := c.doRequest("json")
29151 if res != nil && res.StatusCode == http.StatusNotModified {
29152 if res.Body != nil {
29153 res.Body.Close()
29154 }
29155 return nil, gensupport.WrapError(&googleapi.Error{
29156 Code: res.StatusCode,
29157 Header: res.Header,
29158 })
29159 }
29160 if err != nil {
29161 return nil, err
29162 }
29163 defer googleapi.CloseBody(res)
29164 if err := googleapi.CheckResponse(res); err != nil {
29165 return nil, gensupport.WrapError(err)
29166 }
29167 ret := &TestIamPermissionsResponse{
29168 ServerResponse: googleapi.ServerResponse{
29169 Header: res.Header,
29170 HTTPStatusCode: res.StatusCode,
29171 },
29172 }
29173 target := &ret
29174 if err := gensupport.DecodeResponse(target, res); err != nil {
29175 return nil, err
29176 }
29177 return ret, nil
29178 }
29179
29180 type ProjectsLocationsBucketsViewsLogsListCall struct {
29181 s *Service
29182 parent string
29183 urlParams_ gensupport.URLParams
29184 ifNoneMatch_ string
29185 ctx_ context.Context
29186 header_ http.Header
29187 }
29188
29189
29190
29191
29192
29193
29194
29195 func (r *ProjectsLocationsBucketsViewsLogsService) List(parent string) *ProjectsLocationsBucketsViewsLogsListCall {
29196 c := &ProjectsLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29197 c.parent = parent
29198 return c
29199 }
29200
29201
29202
29203
29204
29205 func (c *ProjectsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsViewsLogsListCall {
29206 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29207 return c
29208 }
29209
29210
29211
29212
29213
29214 func (c *ProjectsLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsViewsLogsListCall {
29215 c.urlParams_.Set("pageToken", pageToken)
29216 return c
29217 }
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232 func (c *ProjectsLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *ProjectsLocationsBucketsViewsLogsListCall {
29233 c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
29234 return c
29235 }
29236
29237
29238
29239
29240 func (c *ProjectsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsLogsListCall {
29241 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29242 return c
29243 }
29244
29245
29246
29247
29248 func (c *ProjectsLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsLogsListCall {
29249 c.ifNoneMatch_ = entityTag
29250 return c
29251 }
29252
29253
29254 func (c *ProjectsLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsLogsListCall {
29255 c.ctx_ = ctx
29256 return c
29257 }
29258
29259
29260
29261 func (c *ProjectsLocationsBucketsViewsLogsListCall) Header() http.Header {
29262 if c.header_ == nil {
29263 c.header_ = make(http.Header)
29264 }
29265 return c.header_
29266 }
29267
29268 func (c *ProjectsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) {
29269 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29270 if c.ifNoneMatch_ != "" {
29271 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29272 }
29273 var body io.Reader = nil
29274 c.urlParams_.Set("alt", alt)
29275 c.urlParams_.Set("prettyPrint", "false")
29276 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
29277 urls += "?" + c.urlParams_.Encode()
29278 req, err := http.NewRequest("GET", urls, body)
29279 if err != nil {
29280 return nil, err
29281 }
29282 req.Header = reqHeaders
29283 googleapi.Expand(req.URL, map[string]string{
29284 "parent": c.parent,
29285 })
29286 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29287 }
29288
29289
29290
29291
29292
29293
29294
29295 func (c *ProjectsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
29296 gensupport.SetOptions(c.urlParams_, opts...)
29297 res, err := c.doRequest("json")
29298 if res != nil && res.StatusCode == http.StatusNotModified {
29299 if res.Body != nil {
29300 res.Body.Close()
29301 }
29302 return nil, gensupport.WrapError(&googleapi.Error{
29303 Code: res.StatusCode,
29304 Header: res.Header,
29305 })
29306 }
29307 if err != nil {
29308 return nil, err
29309 }
29310 defer googleapi.CloseBody(res)
29311 if err := googleapi.CheckResponse(res); err != nil {
29312 return nil, gensupport.WrapError(err)
29313 }
29314 ret := &ListLogsResponse{
29315 ServerResponse: googleapi.ServerResponse{
29316 Header: res.Header,
29317 HTTPStatusCode: res.StatusCode,
29318 },
29319 }
29320 target := &ret
29321 if err := gensupport.DecodeResponse(target, res); err != nil {
29322 return nil, err
29323 }
29324 return ret, nil
29325 }
29326
29327
29328
29329
29330 func (c *ProjectsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
29331 c.ctx_ = ctx
29332 defer c.PageToken(c.urlParams_.Get("pageToken"))
29333 for {
29334 x, err := c.Do()
29335 if err != nil {
29336 return err
29337 }
29338 if err := f(x); err != nil {
29339 return err
29340 }
29341 if x.NextPageToken == "" {
29342 return nil
29343 }
29344 c.PageToken(x.NextPageToken)
29345 }
29346 }
29347
29348 type ProjectsLocationsOperationsCancelCall struct {
29349 s *Service
29350 name string
29351 canceloperationrequest *CancelOperationRequest
29352 urlParams_ gensupport.URLParams
29353 ctx_ context.Context
29354 header_ http.Header
29355 }
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
29369 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29370 c.name = name
29371 c.canceloperationrequest = canceloperationrequest
29372 return c
29373 }
29374
29375
29376
29377
29378 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
29379 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29380 return c
29381 }
29382
29383
29384 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
29385 c.ctx_ = ctx
29386 return c
29387 }
29388
29389
29390
29391 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
29392 if c.header_ == nil {
29393 c.header_ = make(http.Header)
29394 }
29395 return c.header_
29396 }
29397
29398 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
29399 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29400 var body io.Reader = nil
29401 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
29402 if err != nil {
29403 return nil, err
29404 }
29405 c.urlParams_.Set("alt", alt)
29406 c.urlParams_.Set("prettyPrint", "false")
29407 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
29408 urls += "?" + c.urlParams_.Encode()
29409 req, err := http.NewRequest("POST", urls, body)
29410 if err != nil {
29411 return nil, err
29412 }
29413 req.Header = reqHeaders
29414 googleapi.Expand(req.URL, map[string]string{
29415 "name": c.name,
29416 })
29417 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29418 }
29419
29420
29421
29422
29423
29424
29425 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
29426 gensupport.SetOptions(c.urlParams_, opts...)
29427 res, err := c.doRequest("json")
29428 if res != nil && res.StatusCode == http.StatusNotModified {
29429 if res.Body != nil {
29430 res.Body.Close()
29431 }
29432 return nil, gensupport.WrapError(&googleapi.Error{
29433 Code: res.StatusCode,
29434 Header: res.Header,
29435 })
29436 }
29437 if err != nil {
29438 return nil, err
29439 }
29440 defer googleapi.CloseBody(res)
29441 if err := googleapi.CheckResponse(res); err != nil {
29442 return nil, gensupport.WrapError(err)
29443 }
29444 ret := &Empty{
29445 ServerResponse: googleapi.ServerResponse{
29446 Header: res.Header,
29447 HTTPStatusCode: res.StatusCode,
29448 },
29449 }
29450 target := &ret
29451 if err := gensupport.DecodeResponse(target, res); err != nil {
29452 return nil, err
29453 }
29454 return ret, nil
29455 }
29456
29457 type ProjectsLocationsOperationsGetCall struct {
29458 s *Service
29459 name string
29460 urlParams_ gensupport.URLParams
29461 ifNoneMatch_ string
29462 ctx_ context.Context
29463 header_ http.Header
29464 }
29465
29466
29467
29468
29469
29470
29471 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
29472 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29473 c.name = name
29474 return c
29475 }
29476
29477
29478
29479
29480 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
29481 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29482 return c
29483 }
29484
29485
29486
29487
29488 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
29489 c.ifNoneMatch_ = entityTag
29490 return c
29491 }
29492
29493
29494 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
29495 c.ctx_ = ctx
29496 return c
29497 }
29498
29499
29500
29501 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
29502 if c.header_ == nil {
29503 c.header_ = make(http.Header)
29504 }
29505 return c.header_
29506 }
29507
29508 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
29509 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29510 if c.ifNoneMatch_ != "" {
29511 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29512 }
29513 var body io.Reader = nil
29514 c.urlParams_.Set("alt", alt)
29515 c.urlParams_.Set("prettyPrint", "false")
29516 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
29517 urls += "?" + c.urlParams_.Encode()
29518 req, err := http.NewRequest("GET", urls, body)
29519 if err != nil {
29520 return nil, err
29521 }
29522 req.Header = reqHeaders
29523 googleapi.Expand(req.URL, map[string]string{
29524 "name": c.name,
29525 })
29526 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29527 }
29528
29529
29530
29531
29532
29533
29534 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
29535 gensupport.SetOptions(c.urlParams_, opts...)
29536 res, err := c.doRequest("json")
29537 if res != nil && res.StatusCode == http.StatusNotModified {
29538 if res.Body != nil {
29539 res.Body.Close()
29540 }
29541 return nil, gensupport.WrapError(&googleapi.Error{
29542 Code: res.StatusCode,
29543 Header: res.Header,
29544 })
29545 }
29546 if err != nil {
29547 return nil, err
29548 }
29549 defer googleapi.CloseBody(res)
29550 if err := googleapi.CheckResponse(res); err != nil {
29551 return nil, gensupport.WrapError(err)
29552 }
29553 ret := &Operation{
29554 ServerResponse: googleapi.ServerResponse{
29555 Header: res.Header,
29556 HTTPStatusCode: res.StatusCode,
29557 },
29558 }
29559 target := &ret
29560 if err := gensupport.DecodeResponse(target, res); err != nil {
29561 return nil, err
29562 }
29563 return ret, nil
29564 }
29565
29566 type ProjectsLocationsOperationsListCall struct {
29567 s *Service
29568 name string
29569 urlParams_ gensupport.URLParams
29570 ifNoneMatch_ string
29571 ctx_ context.Context
29572 header_ http.Header
29573 }
29574
29575
29576
29577
29578
29579 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
29580 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29581 c.name = name
29582 return c
29583 }
29584
29585
29586 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
29587 c.urlParams_.Set("filter", filter)
29588 return c
29589 }
29590
29591
29592
29593 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
29594 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29595 return c
29596 }
29597
29598
29599
29600 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
29601 c.urlParams_.Set("pageToken", pageToken)
29602 return c
29603 }
29604
29605
29606
29607
29608 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
29609 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29610 return c
29611 }
29612
29613
29614
29615
29616 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
29617 c.ifNoneMatch_ = entityTag
29618 return c
29619 }
29620
29621
29622 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
29623 c.ctx_ = ctx
29624 return c
29625 }
29626
29627
29628
29629 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
29630 if c.header_ == nil {
29631 c.header_ = make(http.Header)
29632 }
29633 return c.header_
29634 }
29635
29636 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
29637 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29638 if c.ifNoneMatch_ != "" {
29639 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29640 }
29641 var body io.Reader = nil
29642 c.urlParams_.Set("alt", alt)
29643 c.urlParams_.Set("prettyPrint", "false")
29644 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
29645 urls += "?" + c.urlParams_.Encode()
29646 req, err := http.NewRequest("GET", urls, body)
29647 if err != nil {
29648 return nil, err
29649 }
29650 req.Header = reqHeaders
29651 googleapi.Expand(req.URL, map[string]string{
29652 "name": c.name,
29653 })
29654 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29655 }
29656
29657
29658
29659
29660
29661
29662
29663 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
29664 gensupport.SetOptions(c.urlParams_, opts...)
29665 res, err := c.doRequest("json")
29666 if res != nil && res.StatusCode == http.StatusNotModified {
29667 if res.Body != nil {
29668 res.Body.Close()
29669 }
29670 return nil, gensupport.WrapError(&googleapi.Error{
29671 Code: res.StatusCode,
29672 Header: res.Header,
29673 })
29674 }
29675 if err != nil {
29676 return nil, err
29677 }
29678 defer googleapi.CloseBody(res)
29679 if err := googleapi.CheckResponse(res); err != nil {
29680 return nil, gensupport.WrapError(err)
29681 }
29682 ret := &ListOperationsResponse{
29683 ServerResponse: googleapi.ServerResponse{
29684 Header: res.Header,
29685 HTTPStatusCode: res.StatusCode,
29686 },
29687 }
29688 target := &ret
29689 if err := gensupport.DecodeResponse(target, res); err != nil {
29690 return nil, err
29691 }
29692 return ret, nil
29693 }
29694
29695
29696
29697
29698 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
29699 c.ctx_ = ctx
29700 defer c.PageToken(c.urlParams_.Get("pageToken"))
29701 for {
29702 x, err := c.Do()
29703 if err != nil {
29704 return err
29705 }
29706 if err := f(x); err != nil {
29707 return err
29708 }
29709 if x.NextPageToken == "" {
29710 return nil
29711 }
29712 c.PageToken(x.NextPageToken)
29713 }
29714 }
29715
29716 type ProjectsLocationsRecentQueriesListCall struct {
29717 s *Service
29718 parent string
29719 urlParams_ gensupport.URLParams
29720 ifNoneMatch_ string
29721 ctx_ context.Context
29722 header_ http.Header
29723 }
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736 func (r *ProjectsLocationsRecentQueriesService) List(parent string) *ProjectsLocationsRecentQueriesListCall {
29737 c := &ProjectsLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29738 c.parent = parent
29739 return c
29740 }
29741
29742
29743
29744
29745
29746 func (c *ProjectsLocationsRecentQueriesListCall) PageSize(pageSize int64) *ProjectsLocationsRecentQueriesListCall {
29747 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29748 return c
29749 }
29750
29751
29752
29753
29754
29755 func (c *ProjectsLocationsRecentQueriesListCall) PageToken(pageToken string) *ProjectsLocationsRecentQueriesListCall {
29756 c.urlParams_.Set("pageToken", pageToken)
29757 return c
29758 }
29759
29760
29761
29762
29763 func (c *ProjectsLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRecentQueriesListCall {
29764 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29765 return c
29766 }
29767
29768
29769
29770
29771 func (c *ProjectsLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRecentQueriesListCall {
29772 c.ifNoneMatch_ = entityTag
29773 return c
29774 }
29775
29776
29777 func (c *ProjectsLocationsRecentQueriesListCall) Context(ctx context.Context) *ProjectsLocationsRecentQueriesListCall {
29778 c.ctx_ = ctx
29779 return c
29780 }
29781
29782
29783
29784 func (c *ProjectsLocationsRecentQueriesListCall) Header() http.Header {
29785 if c.header_ == nil {
29786 c.header_ = make(http.Header)
29787 }
29788 return c.header_
29789 }
29790
29791 func (c *ProjectsLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) {
29792 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29793 if c.ifNoneMatch_ != "" {
29794 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29795 }
29796 var body io.Reader = nil
29797 c.urlParams_.Set("alt", alt)
29798 c.urlParams_.Set("prettyPrint", "false")
29799 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries")
29800 urls += "?" + c.urlParams_.Encode()
29801 req, err := http.NewRequest("GET", urls, body)
29802 if err != nil {
29803 return nil, err
29804 }
29805 req.Header = reqHeaders
29806 googleapi.Expand(req.URL, map[string]string{
29807 "parent": c.parent,
29808 })
29809 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29810 }
29811
29812
29813
29814
29815
29816
29817
29818 func (c *ProjectsLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) {
29819 gensupport.SetOptions(c.urlParams_, opts...)
29820 res, err := c.doRequest("json")
29821 if res != nil && res.StatusCode == http.StatusNotModified {
29822 if res.Body != nil {
29823 res.Body.Close()
29824 }
29825 return nil, gensupport.WrapError(&googleapi.Error{
29826 Code: res.StatusCode,
29827 Header: res.Header,
29828 })
29829 }
29830 if err != nil {
29831 return nil, err
29832 }
29833 defer googleapi.CloseBody(res)
29834 if err := googleapi.CheckResponse(res); err != nil {
29835 return nil, gensupport.WrapError(err)
29836 }
29837 ret := &ListRecentQueriesResponse{
29838 ServerResponse: googleapi.ServerResponse{
29839 Header: res.Header,
29840 HTTPStatusCode: res.StatusCode,
29841 },
29842 }
29843 target := &ret
29844 if err := gensupport.DecodeResponse(target, res); err != nil {
29845 return nil, err
29846 }
29847 return ret, nil
29848 }
29849
29850
29851
29852
29853 func (c *ProjectsLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error {
29854 c.ctx_ = ctx
29855 defer c.PageToken(c.urlParams_.Get("pageToken"))
29856 for {
29857 x, err := c.Do()
29858 if err != nil {
29859 return err
29860 }
29861 if err := f(x); err != nil {
29862 return err
29863 }
29864 if x.NextPageToken == "" {
29865 return nil
29866 }
29867 c.PageToken(x.NextPageToken)
29868 }
29869 }
29870
29871 type ProjectsLocationsSavedQueriesCreateCall struct {
29872 s *Service
29873 parent string
29874 savedquery *SavedQuery
29875 urlParams_ gensupport.URLParams
29876 ctx_ context.Context
29877 header_ http.Header
29878 }
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889 func (r *ProjectsLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *ProjectsLocationsSavedQueriesCreateCall {
29890 c := &ProjectsLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29891 c.parent = parent
29892 c.savedquery = savedquery
29893 return c
29894 }
29895
29896
29897
29898
29899
29900
29901
29902
29903 func (c *ProjectsLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *ProjectsLocationsSavedQueriesCreateCall {
29904 c.urlParams_.Set("savedQueryId", savedQueryId)
29905 return c
29906 }
29907
29908
29909
29910
29911 func (c *ProjectsLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSavedQueriesCreateCall {
29912 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29913 return c
29914 }
29915
29916
29917 func (c *ProjectsLocationsSavedQueriesCreateCall) Context(ctx context.Context) *ProjectsLocationsSavedQueriesCreateCall {
29918 c.ctx_ = ctx
29919 return c
29920 }
29921
29922
29923
29924 func (c *ProjectsLocationsSavedQueriesCreateCall) Header() http.Header {
29925 if c.header_ == nil {
29926 c.header_ = make(http.Header)
29927 }
29928 return c.header_
29929 }
29930
29931 func (c *ProjectsLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) {
29932 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29933 var body io.Reader = nil
29934 body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery)
29935 if err != nil {
29936 return nil, err
29937 }
29938 c.urlParams_.Set("alt", alt)
29939 c.urlParams_.Set("prettyPrint", "false")
29940 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
29941 urls += "?" + c.urlParams_.Encode()
29942 req, err := http.NewRequest("POST", urls, body)
29943 if err != nil {
29944 return nil, err
29945 }
29946 req.Header = reqHeaders
29947 googleapi.Expand(req.URL, map[string]string{
29948 "parent": c.parent,
29949 })
29950 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29951 }
29952
29953
29954
29955
29956
29957
29958 func (c *ProjectsLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
29959 gensupport.SetOptions(c.urlParams_, opts...)
29960 res, err := c.doRequest("json")
29961 if res != nil && res.StatusCode == http.StatusNotModified {
29962 if res.Body != nil {
29963 res.Body.Close()
29964 }
29965 return nil, gensupport.WrapError(&googleapi.Error{
29966 Code: res.StatusCode,
29967 Header: res.Header,
29968 })
29969 }
29970 if err != nil {
29971 return nil, err
29972 }
29973 defer googleapi.CloseBody(res)
29974 if err := googleapi.CheckResponse(res); err != nil {
29975 return nil, gensupport.WrapError(err)
29976 }
29977 ret := &SavedQuery{
29978 ServerResponse: googleapi.ServerResponse{
29979 Header: res.Header,
29980 HTTPStatusCode: res.StatusCode,
29981 },
29982 }
29983 target := &ret
29984 if err := gensupport.DecodeResponse(target, res); err != nil {
29985 return nil, err
29986 }
29987 return ret, nil
29988 }
29989
29990 type ProjectsLocationsSavedQueriesDeleteCall struct {
29991 s *Service
29992 name string
29993 urlParams_ gensupport.URLParams
29994 ctx_ context.Context
29995 header_ http.Header
29996 }
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010 func (r *ProjectsLocationsSavedQueriesService) Delete(name string) *ProjectsLocationsSavedQueriesDeleteCall {
30011 c := &ProjectsLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30012 c.name = name
30013 return c
30014 }
30015
30016
30017
30018
30019 func (c *ProjectsLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSavedQueriesDeleteCall {
30020 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30021 return c
30022 }
30023
30024
30025 func (c *ProjectsLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSavedQueriesDeleteCall {
30026 c.ctx_ = ctx
30027 return c
30028 }
30029
30030
30031
30032 func (c *ProjectsLocationsSavedQueriesDeleteCall) Header() http.Header {
30033 if c.header_ == nil {
30034 c.header_ = make(http.Header)
30035 }
30036 return c.header_
30037 }
30038
30039 func (c *ProjectsLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) {
30040 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30041 var body io.Reader = nil
30042 c.urlParams_.Set("alt", alt)
30043 c.urlParams_.Set("prettyPrint", "false")
30044 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
30045 urls += "?" + c.urlParams_.Encode()
30046 req, err := http.NewRequest("DELETE", urls, body)
30047 if err != nil {
30048 return nil, err
30049 }
30050 req.Header = reqHeaders
30051 googleapi.Expand(req.URL, map[string]string{
30052 "name": c.name,
30053 })
30054 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30055 }
30056
30057
30058
30059
30060
30061
30062 func (c *ProjectsLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
30063 gensupport.SetOptions(c.urlParams_, opts...)
30064 res, err := c.doRequest("json")
30065 if res != nil && res.StatusCode == http.StatusNotModified {
30066 if res.Body != nil {
30067 res.Body.Close()
30068 }
30069 return nil, gensupport.WrapError(&googleapi.Error{
30070 Code: res.StatusCode,
30071 Header: res.Header,
30072 })
30073 }
30074 if err != nil {
30075 return nil, err
30076 }
30077 defer googleapi.CloseBody(res)
30078 if err := googleapi.CheckResponse(res); err != nil {
30079 return nil, gensupport.WrapError(err)
30080 }
30081 ret := &Empty{
30082 ServerResponse: googleapi.ServerResponse{
30083 Header: res.Header,
30084 HTTPStatusCode: res.StatusCode,
30085 },
30086 }
30087 target := &ret
30088 if err := gensupport.DecodeResponse(target, res); err != nil {
30089 return nil, err
30090 }
30091 return ret, nil
30092 }
30093
30094 type ProjectsLocationsSavedQueriesListCall struct {
30095 s *Service
30096 parent string
30097 urlParams_ gensupport.URLParams
30098 ifNoneMatch_ string
30099 ctx_ context.Context
30100 header_ http.Header
30101 }
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115 func (r *ProjectsLocationsSavedQueriesService) List(parent string) *ProjectsLocationsSavedQueriesListCall {
30116 c := &ProjectsLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30117 c.parent = parent
30118 return c
30119 }
30120
30121
30122
30123
30124
30125 func (c *ProjectsLocationsSavedQueriesListCall) PageSize(pageSize int64) *ProjectsLocationsSavedQueriesListCall {
30126 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
30127 return c
30128 }
30129
30130
30131
30132
30133
30134 func (c *ProjectsLocationsSavedQueriesListCall) PageToken(pageToken string) *ProjectsLocationsSavedQueriesListCall {
30135 c.urlParams_.Set("pageToken", pageToken)
30136 return c
30137 }
30138
30139
30140
30141
30142 func (c *ProjectsLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSavedQueriesListCall {
30143 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30144 return c
30145 }
30146
30147
30148
30149
30150 func (c *ProjectsLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSavedQueriesListCall {
30151 c.ifNoneMatch_ = entityTag
30152 return c
30153 }
30154
30155
30156 func (c *ProjectsLocationsSavedQueriesListCall) Context(ctx context.Context) *ProjectsLocationsSavedQueriesListCall {
30157 c.ctx_ = ctx
30158 return c
30159 }
30160
30161
30162
30163 func (c *ProjectsLocationsSavedQueriesListCall) Header() http.Header {
30164 if c.header_ == nil {
30165 c.header_ = make(http.Header)
30166 }
30167 return c.header_
30168 }
30169
30170 func (c *ProjectsLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) {
30171 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30172 if c.ifNoneMatch_ != "" {
30173 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30174 }
30175 var body io.Reader = nil
30176 c.urlParams_.Set("alt", alt)
30177 c.urlParams_.Set("prettyPrint", "false")
30178 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
30179 urls += "?" + c.urlParams_.Encode()
30180 req, err := http.NewRequest("GET", urls, body)
30181 if err != nil {
30182 return nil, err
30183 }
30184 req.Header = reqHeaders
30185 googleapi.Expand(req.URL, map[string]string{
30186 "parent": c.parent,
30187 })
30188 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30189 }
30190
30191
30192
30193
30194
30195
30196
30197 func (c *ProjectsLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) {
30198 gensupport.SetOptions(c.urlParams_, opts...)
30199 res, err := c.doRequest("json")
30200 if res != nil && res.StatusCode == http.StatusNotModified {
30201 if res.Body != nil {
30202 res.Body.Close()
30203 }
30204 return nil, gensupport.WrapError(&googleapi.Error{
30205 Code: res.StatusCode,
30206 Header: res.Header,
30207 })
30208 }
30209 if err != nil {
30210 return nil, err
30211 }
30212 defer googleapi.CloseBody(res)
30213 if err := googleapi.CheckResponse(res); err != nil {
30214 return nil, gensupport.WrapError(err)
30215 }
30216 ret := &ListSavedQueriesResponse{
30217 ServerResponse: googleapi.ServerResponse{
30218 Header: res.Header,
30219 HTTPStatusCode: res.StatusCode,
30220 },
30221 }
30222 target := &ret
30223 if err := gensupport.DecodeResponse(target, res); err != nil {
30224 return nil, err
30225 }
30226 return ret, nil
30227 }
30228
30229
30230
30231
30232 func (c *ProjectsLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error {
30233 c.ctx_ = ctx
30234 defer c.PageToken(c.urlParams_.Get("pageToken"))
30235 for {
30236 x, err := c.Do()
30237 if err != nil {
30238 return err
30239 }
30240 if err := f(x); err != nil {
30241 return err
30242 }
30243 if x.NextPageToken == "" {
30244 return nil
30245 }
30246 c.PageToken(x.NextPageToken)
30247 }
30248 }
30249
30250 type ProjectsLogsDeleteCall struct {
30251 s *Service
30252 logName string
30253 urlParams_ gensupport.URLParams
30254 ctx_ context.Context
30255 header_ http.Header
30256 }
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271 func (r *ProjectsLogsService) Delete(logName string) *ProjectsLogsDeleteCall {
30272 c := &ProjectsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30273 c.logName = logName
30274 return c
30275 }
30276
30277
30278
30279
30280 func (c *ProjectsLogsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLogsDeleteCall {
30281 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30282 return c
30283 }
30284
30285
30286 func (c *ProjectsLogsDeleteCall) Context(ctx context.Context) *ProjectsLogsDeleteCall {
30287 c.ctx_ = ctx
30288 return c
30289 }
30290
30291
30292
30293 func (c *ProjectsLogsDeleteCall) Header() http.Header {
30294 if c.header_ == nil {
30295 c.header_ = make(http.Header)
30296 }
30297 return c.header_
30298 }
30299
30300 func (c *ProjectsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
30301 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30302 var body io.Reader = nil
30303 c.urlParams_.Set("alt", alt)
30304 c.urlParams_.Set("prettyPrint", "false")
30305 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
30306 urls += "?" + c.urlParams_.Encode()
30307 req, err := http.NewRequest("DELETE", urls, body)
30308 if err != nil {
30309 return nil, err
30310 }
30311 req.Header = reqHeaders
30312 googleapi.Expand(req.URL, map[string]string{
30313 "logName": c.logName,
30314 })
30315 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30316 }
30317
30318
30319
30320
30321
30322
30323 func (c *ProjectsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
30324 gensupport.SetOptions(c.urlParams_, opts...)
30325 res, err := c.doRequest("json")
30326 if res != nil && res.StatusCode == http.StatusNotModified {
30327 if res.Body != nil {
30328 res.Body.Close()
30329 }
30330 return nil, gensupport.WrapError(&googleapi.Error{
30331 Code: res.StatusCode,
30332 Header: res.Header,
30333 })
30334 }
30335 if err != nil {
30336 return nil, err
30337 }
30338 defer googleapi.CloseBody(res)
30339 if err := googleapi.CheckResponse(res); err != nil {
30340 return nil, gensupport.WrapError(err)
30341 }
30342 ret := &Empty{
30343 ServerResponse: googleapi.ServerResponse{
30344 Header: res.Header,
30345 HTTPStatusCode: res.StatusCode,
30346 },
30347 }
30348 target := &ret
30349 if err := gensupport.DecodeResponse(target, res); err != nil {
30350 return nil, err
30351 }
30352 return ret, nil
30353 }
30354
30355 type ProjectsLogsListCall struct {
30356 s *Service
30357 parent string
30358 urlParams_ gensupport.URLParams
30359 ifNoneMatch_ string
30360 ctx_ context.Context
30361 header_ http.Header
30362 }
30363
30364
30365
30366
30367
30368
30369
30370 func (r *ProjectsLogsService) List(parent string) *ProjectsLogsListCall {
30371 c := &ProjectsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30372 c.parent = parent
30373 return c
30374 }
30375
30376
30377
30378
30379
30380 func (c *ProjectsLogsListCall) PageSize(pageSize int64) *ProjectsLogsListCall {
30381 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
30382 return c
30383 }
30384
30385
30386
30387
30388
30389 func (c *ProjectsLogsListCall) PageToken(pageToken string) *ProjectsLogsListCall {
30390 c.urlParams_.Set("pageToken", pageToken)
30391 return c
30392 }
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407 func (c *ProjectsLogsListCall) ResourceNames(resourceNames ...string) *ProjectsLogsListCall {
30408 c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
30409 return c
30410 }
30411
30412
30413
30414
30415 func (c *ProjectsLogsListCall) Fields(s ...googleapi.Field) *ProjectsLogsListCall {
30416 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30417 return c
30418 }
30419
30420
30421
30422
30423 func (c *ProjectsLogsListCall) IfNoneMatch(entityTag string) *ProjectsLogsListCall {
30424 c.ifNoneMatch_ = entityTag
30425 return c
30426 }
30427
30428
30429 func (c *ProjectsLogsListCall) Context(ctx context.Context) *ProjectsLogsListCall {
30430 c.ctx_ = ctx
30431 return c
30432 }
30433
30434
30435
30436 func (c *ProjectsLogsListCall) Header() http.Header {
30437 if c.header_ == nil {
30438 c.header_ = make(http.Header)
30439 }
30440 return c.header_
30441 }
30442
30443 func (c *ProjectsLogsListCall) doRequest(alt string) (*http.Response, error) {
30444 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30445 if c.ifNoneMatch_ != "" {
30446 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30447 }
30448 var body io.Reader = nil
30449 c.urlParams_.Set("alt", alt)
30450 c.urlParams_.Set("prettyPrint", "false")
30451 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
30452 urls += "?" + c.urlParams_.Encode()
30453 req, err := http.NewRequest("GET", urls, body)
30454 if err != nil {
30455 return nil, err
30456 }
30457 req.Header = reqHeaders
30458 googleapi.Expand(req.URL, map[string]string{
30459 "parent": c.parent,
30460 })
30461 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30462 }
30463
30464
30465
30466
30467
30468
30469
30470 func (c *ProjectsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
30471 gensupport.SetOptions(c.urlParams_, opts...)
30472 res, err := c.doRequest("json")
30473 if res != nil && res.StatusCode == http.StatusNotModified {
30474 if res.Body != nil {
30475 res.Body.Close()
30476 }
30477 return nil, gensupport.WrapError(&googleapi.Error{
30478 Code: res.StatusCode,
30479 Header: res.Header,
30480 })
30481 }
30482 if err != nil {
30483 return nil, err
30484 }
30485 defer googleapi.CloseBody(res)
30486 if err := googleapi.CheckResponse(res); err != nil {
30487 return nil, gensupport.WrapError(err)
30488 }
30489 ret := &ListLogsResponse{
30490 ServerResponse: googleapi.ServerResponse{
30491 Header: res.Header,
30492 HTTPStatusCode: res.StatusCode,
30493 },
30494 }
30495 target := &ret
30496 if err := gensupport.DecodeResponse(target, res); err != nil {
30497 return nil, err
30498 }
30499 return ret, nil
30500 }
30501
30502
30503
30504
30505 func (c *ProjectsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
30506 c.ctx_ = ctx
30507 defer c.PageToken(c.urlParams_.Get("pageToken"))
30508 for {
30509 x, err := c.Do()
30510 if err != nil {
30511 return err
30512 }
30513 if err := f(x); err != nil {
30514 return err
30515 }
30516 if x.NextPageToken == "" {
30517 return nil
30518 }
30519 c.PageToken(x.NextPageToken)
30520 }
30521 }
30522
30523 type ProjectsMetricsCreateCall struct {
30524 s *Service
30525 parent string
30526 logmetric *LogMetric
30527 urlParams_ gensupport.URLParams
30528 ctx_ context.Context
30529 header_ http.Header
30530 }
30531
30532
30533
30534
30535
30536 func (r *ProjectsMetricsService) Create(parent string, logmetric *LogMetric) *ProjectsMetricsCreateCall {
30537 c := &ProjectsMetricsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30538 c.parent = parent
30539 c.logmetric = logmetric
30540 return c
30541 }
30542
30543
30544
30545
30546 func (c *ProjectsMetricsCreateCall) Fields(s ...googleapi.Field) *ProjectsMetricsCreateCall {
30547 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30548 return c
30549 }
30550
30551
30552 func (c *ProjectsMetricsCreateCall) Context(ctx context.Context) *ProjectsMetricsCreateCall {
30553 c.ctx_ = ctx
30554 return c
30555 }
30556
30557
30558
30559 func (c *ProjectsMetricsCreateCall) Header() http.Header {
30560 if c.header_ == nil {
30561 c.header_ = make(http.Header)
30562 }
30563 return c.header_
30564 }
30565
30566 func (c *ProjectsMetricsCreateCall) doRequest(alt string) (*http.Response, error) {
30567 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
30568 var body io.Reader = nil
30569 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logmetric)
30570 if err != nil {
30571 return nil, err
30572 }
30573 c.urlParams_.Set("alt", alt)
30574 c.urlParams_.Set("prettyPrint", "false")
30575 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/metrics")
30576 urls += "?" + c.urlParams_.Encode()
30577 req, err := http.NewRequest("POST", urls, body)
30578 if err != nil {
30579 return nil, err
30580 }
30581 req.Header = reqHeaders
30582 googleapi.Expand(req.URL, map[string]string{
30583 "parent": c.parent,
30584 })
30585 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30586 }
30587
30588
30589
30590
30591
30592
30593 func (c *ProjectsMetricsCreateCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
30594 gensupport.SetOptions(c.urlParams_, opts...)
30595 res, err := c.doRequest("json")
30596 if res != nil && res.StatusCode == http.StatusNotModified {
30597 if res.Body != nil {
30598 res.Body.Close()
30599 }
30600 return nil, gensupport.WrapError(&googleapi.Error{
30601 Code: res.StatusCode,
30602 Header: res.Header,
30603 })
30604 }
30605 if err != nil {
30606 return nil, err
30607 }
30608 defer googleapi.CloseBody(res)
30609 if err := googleapi.CheckResponse(res); err != nil {
30610 return nil, gensupport.WrapError(err)
30611 }
30612 ret := &LogMetric{
30613 ServerResponse: googleapi.ServerResponse{
30614 Header: res.Header,
30615 HTTPStatusCode: res.StatusCode,
30616 },
30617 }
30618 target := &ret
30619 if err := gensupport.DecodeResponse(target, res); err != nil {
30620 return nil, err
30621 }
30622 return ret, nil
30623 }
30624
30625 type ProjectsMetricsDeleteCall struct {
30626 s *Service
30627 metricName string
30628 urlParams_ gensupport.URLParams
30629 ctx_ context.Context
30630 header_ http.Header
30631 }
30632
30633
30634
30635
30636
30637 func (r *ProjectsMetricsService) Delete(metricName string) *ProjectsMetricsDeleteCall {
30638 c := &ProjectsMetricsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30639 c.metricName = metricName
30640 return c
30641 }
30642
30643
30644
30645
30646 func (c *ProjectsMetricsDeleteCall) Fields(s ...googleapi.Field) *ProjectsMetricsDeleteCall {
30647 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30648 return c
30649 }
30650
30651
30652 func (c *ProjectsMetricsDeleteCall) Context(ctx context.Context) *ProjectsMetricsDeleteCall {
30653 c.ctx_ = ctx
30654 return c
30655 }
30656
30657
30658
30659 func (c *ProjectsMetricsDeleteCall) Header() http.Header {
30660 if c.header_ == nil {
30661 c.header_ = make(http.Header)
30662 }
30663 return c.header_
30664 }
30665
30666 func (c *ProjectsMetricsDeleteCall) doRequest(alt string) (*http.Response, error) {
30667 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30668 var body io.Reader = nil
30669 c.urlParams_.Set("alt", alt)
30670 c.urlParams_.Set("prettyPrint", "false")
30671 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
30672 urls += "?" + c.urlParams_.Encode()
30673 req, err := http.NewRequest("DELETE", urls, body)
30674 if err != nil {
30675 return nil, err
30676 }
30677 req.Header = reqHeaders
30678 googleapi.Expand(req.URL, map[string]string{
30679 "metricName": c.metricName,
30680 })
30681 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30682 }
30683
30684
30685
30686
30687
30688
30689 func (c *ProjectsMetricsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
30690 gensupport.SetOptions(c.urlParams_, opts...)
30691 res, err := c.doRequest("json")
30692 if res != nil && res.StatusCode == http.StatusNotModified {
30693 if res.Body != nil {
30694 res.Body.Close()
30695 }
30696 return nil, gensupport.WrapError(&googleapi.Error{
30697 Code: res.StatusCode,
30698 Header: res.Header,
30699 })
30700 }
30701 if err != nil {
30702 return nil, err
30703 }
30704 defer googleapi.CloseBody(res)
30705 if err := googleapi.CheckResponse(res); err != nil {
30706 return nil, gensupport.WrapError(err)
30707 }
30708 ret := &Empty{
30709 ServerResponse: googleapi.ServerResponse{
30710 Header: res.Header,
30711 HTTPStatusCode: res.StatusCode,
30712 },
30713 }
30714 target := &ret
30715 if err := gensupport.DecodeResponse(target, res); err != nil {
30716 return nil, err
30717 }
30718 return ret, nil
30719 }
30720
30721 type ProjectsMetricsGetCall struct {
30722 s *Service
30723 metricName string
30724 urlParams_ gensupport.URLParams
30725 ifNoneMatch_ string
30726 ctx_ context.Context
30727 header_ http.Header
30728 }
30729
30730
30731
30732
30733
30734 func (r *ProjectsMetricsService) Get(metricName string) *ProjectsMetricsGetCall {
30735 c := &ProjectsMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30736 c.metricName = metricName
30737 return c
30738 }
30739
30740
30741
30742
30743 func (c *ProjectsMetricsGetCall) Fields(s ...googleapi.Field) *ProjectsMetricsGetCall {
30744 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30745 return c
30746 }
30747
30748
30749
30750
30751 func (c *ProjectsMetricsGetCall) IfNoneMatch(entityTag string) *ProjectsMetricsGetCall {
30752 c.ifNoneMatch_ = entityTag
30753 return c
30754 }
30755
30756
30757 func (c *ProjectsMetricsGetCall) Context(ctx context.Context) *ProjectsMetricsGetCall {
30758 c.ctx_ = ctx
30759 return c
30760 }
30761
30762
30763
30764 func (c *ProjectsMetricsGetCall) Header() http.Header {
30765 if c.header_ == nil {
30766 c.header_ = make(http.Header)
30767 }
30768 return c.header_
30769 }
30770
30771 func (c *ProjectsMetricsGetCall) doRequest(alt string) (*http.Response, error) {
30772 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30773 if c.ifNoneMatch_ != "" {
30774 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30775 }
30776 var body io.Reader = nil
30777 c.urlParams_.Set("alt", alt)
30778 c.urlParams_.Set("prettyPrint", "false")
30779 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
30780 urls += "?" + c.urlParams_.Encode()
30781 req, err := http.NewRequest("GET", urls, body)
30782 if err != nil {
30783 return nil, err
30784 }
30785 req.Header = reqHeaders
30786 googleapi.Expand(req.URL, map[string]string{
30787 "metricName": c.metricName,
30788 })
30789 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30790 }
30791
30792
30793
30794
30795
30796
30797 func (c *ProjectsMetricsGetCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
30798 gensupport.SetOptions(c.urlParams_, opts...)
30799 res, err := c.doRequest("json")
30800 if res != nil && res.StatusCode == http.StatusNotModified {
30801 if res.Body != nil {
30802 res.Body.Close()
30803 }
30804 return nil, gensupport.WrapError(&googleapi.Error{
30805 Code: res.StatusCode,
30806 Header: res.Header,
30807 })
30808 }
30809 if err != nil {
30810 return nil, err
30811 }
30812 defer googleapi.CloseBody(res)
30813 if err := googleapi.CheckResponse(res); err != nil {
30814 return nil, gensupport.WrapError(err)
30815 }
30816 ret := &LogMetric{
30817 ServerResponse: googleapi.ServerResponse{
30818 Header: res.Header,
30819 HTTPStatusCode: res.StatusCode,
30820 },
30821 }
30822 target := &ret
30823 if err := gensupport.DecodeResponse(target, res); err != nil {
30824 return nil, err
30825 }
30826 return ret, nil
30827 }
30828
30829 type ProjectsMetricsListCall struct {
30830 s *Service
30831 parent string
30832 urlParams_ gensupport.URLParams
30833 ifNoneMatch_ string
30834 ctx_ context.Context
30835 header_ http.Header
30836 }
30837
30838
30839
30840
30841
30842 func (r *ProjectsMetricsService) List(parent string) *ProjectsMetricsListCall {
30843 c := &ProjectsMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30844 c.parent = parent
30845 return c
30846 }
30847
30848
30849
30850
30851
30852 func (c *ProjectsMetricsListCall) PageSize(pageSize int64) *ProjectsMetricsListCall {
30853 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
30854 return c
30855 }
30856
30857
30858
30859
30860
30861 func (c *ProjectsMetricsListCall) PageToken(pageToken string) *ProjectsMetricsListCall {
30862 c.urlParams_.Set("pageToken", pageToken)
30863 return c
30864 }
30865
30866
30867
30868
30869 func (c *ProjectsMetricsListCall) Fields(s ...googleapi.Field) *ProjectsMetricsListCall {
30870 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30871 return c
30872 }
30873
30874
30875
30876
30877 func (c *ProjectsMetricsListCall) IfNoneMatch(entityTag string) *ProjectsMetricsListCall {
30878 c.ifNoneMatch_ = entityTag
30879 return c
30880 }
30881
30882
30883 func (c *ProjectsMetricsListCall) Context(ctx context.Context) *ProjectsMetricsListCall {
30884 c.ctx_ = ctx
30885 return c
30886 }
30887
30888
30889
30890 func (c *ProjectsMetricsListCall) Header() http.Header {
30891 if c.header_ == nil {
30892 c.header_ = make(http.Header)
30893 }
30894 return c.header_
30895 }
30896
30897 func (c *ProjectsMetricsListCall) doRequest(alt string) (*http.Response, error) {
30898 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30899 if c.ifNoneMatch_ != "" {
30900 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30901 }
30902 var body io.Reader = nil
30903 c.urlParams_.Set("alt", alt)
30904 c.urlParams_.Set("prettyPrint", "false")
30905 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/metrics")
30906 urls += "?" + c.urlParams_.Encode()
30907 req, err := http.NewRequest("GET", urls, body)
30908 if err != nil {
30909 return nil, err
30910 }
30911 req.Header = reqHeaders
30912 googleapi.Expand(req.URL, map[string]string{
30913 "parent": c.parent,
30914 })
30915 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30916 }
30917
30918
30919
30920
30921
30922
30923
30924 func (c *ProjectsMetricsListCall) Do(opts ...googleapi.CallOption) (*ListLogMetricsResponse, error) {
30925 gensupport.SetOptions(c.urlParams_, opts...)
30926 res, err := c.doRequest("json")
30927 if res != nil && res.StatusCode == http.StatusNotModified {
30928 if res.Body != nil {
30929 res.Body.Close()
30930 }
30931 return nil, gensupport.WrapError(&googleapi.Error{
30932 Code: res.StatusCode,
30933 Header: res.Header,
30934 })
30935 }
30936 if err != nil {
30937 return nil, err
30938 }
30939 defer googleapi.CloseBody(res)
30940 if err := googleapi.CheckResponse(res); err != nil {
30941 return nil, gensupport.WrapError(err)
30942 }
30943 ret := &ListLogMetricsResponse{
30944 ServerResponse: googleapi.ServerResponse{
30945 Header: res.Header,
30946 HTTPStatusCode: res.StatusCode,
30947 },
30948 }
30949 target := &ret
30950 if err := gensupport.DecodeResponse(target, res); err != nil {
30951 return nil, err
30952 }
30953 return ret, nil
30954 }
30955
30956
30957
30958
30959 func (c *ProjectsMetricsListCall) Pages(ctx context.Context, f func(*ListLogMetricsResponse) error) error {
30960 c.ctx_ = ctx
30961 defer c.PageToken(c.urlParams_.Get("pageToken"))
30962 for {
30963 x, err := c.Do()
30964 if err != nil {
30965 return err
30966 }
30967 if err := f(x); err != nil {
30968 return err
30969 }
30970 if x.NextPageToken == "" {
30971 return nil
30972 }
30973 c.PageToken(x.NextPageToken)
30974 }
30975 }
30976
30977 type ProjectsMetricsUpdateCall struct {
30978 s *Service
30979 metricName string
30980 logmetric *LogMetric
30981 urlParams_ gensupport.URLParams
30982 ctx_ context.Context
30983 header_ http.Header
30984 }
30985
30986
30987
30988
30989
30990
30991
30992
30993 func (r *ProjectsMetricsService) Update(metricName string, logmetric *LogMetric) *ProjectsMetricsUpdateCall {
30994 c := &ProjectsMetricsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30995 c.metricName = metricName
30996 c.logmetric = logmetric
30997 return c
30998 }
30999
31000
31001
31002
31003 func (c *ProjectsMetricsUpdateCall) Fields(s ...googleapi.Field) *ProjectsMetricsUpdateCall {
31004 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31005 return c
31006 }
31007
31008
31009 func (c *ProjectsMetricsUpdateCall) Context(ctx context.Context) *ProjectsMetricsUpdateCall {
31010 c.ctx_ = ctx
31011 return c
31012 }
31013
31014
31015
31016 func (c *ProjectsMetricsUpdateCall) Header() http.Header {
31017 if c.header_ == nil {
31018 c.header_ = make(http.Header)
31019 }
31020 return c.header_
31021 }
31022
31023 func (c *ProjectsMetricsUpdateCall) doRequest(alt string) (*http.Response, error) {
31024 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31025 var body io.Reader = nil
31026 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logmetric)
31027 if err != nil {
31028 return nil, err
31029 }
31030 c.urlParams_.Set("alt", alt)
31031 c.urlParams_.Set("prettyPrint", "false")
31032 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
31033 urls += "?" + c.urlParams_.Encode()
31034 req, err := http.NewRequest("PUT", urls, body)
31035 if err != nil {
31036 return nil, err
31037 }
31038 req.Header = reqHeaders
31039 googleapi.Expand(req.URL, map[string]string{
31040 "metricName": c.metricName,
31041 })
31042 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31043 }
31044
31045
31046
31047
31048
31049
31050 func (c *ProjectsMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
31051 gensupport.SetOptions(c.urlParams_, opts...)
31052 res, err := c.doRequest("json")
31053 if res != nil && res.StatusCode == http.StatusNotModified {
31054 if res.Body != nil {
31055 res.Body.Close()
31056 }
31057 return nil, gensupport.WrapError(&googleapi.Error{
31058 Code: res.StatusCode,
31059 Header: res.Header,
31060 })
31061 }
31062 if err != nil {
31063 return nil, err
31064 }
31065 defer googleapi.CloseBody(res)
31066 if err := googleapi.CheckResponse(res); err != nil {
31067 return nil, gensupport.WrapError(err)
31068 }
31069 ret := &LogMetric{
31070 ServerResponse: googleapi.ServerResponse{
31071 Header: res.Header,
31072 HTTPStatusCode: res.StatusCode,
31073 },
31074 }
31075 target := &ret
31076 if err := gensupport.DecodeResponse(target, res); err != nil {
31077 return nil, err
31078 }
31079 return ret, nil
31080 }
31081
31082 type ProjectsSinksCreateCall struct {
31083 s *Service
31084 parent string
31085 logsink *LogSink
31086 urlParams_ gensupport.URLParams
31087 ctx_ context.Context
31088 header_ http.Header
31089 }
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100 func (r *ProjectsSinksService) Create(parent string, logsink *LogSink) *ProjectsSinksCreateCall {
31101 c := &ProjectsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31102 c.parent = parent
31103 c.logsink = logsink
31104 return c
31105 }
31106
31107
31108
31109
31110
31111
31112
31113 func (c *ProjectsSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *ProjectsSinksCreateCall {
31114 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
31115 return c
31116 }
31117
31118
31119
31120
31121
31122
31123
31124
31125
31126
31127
31128
31129
31130 func (c *ProjectsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksCreateCall {
31131 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
31132 return c
31133 }
31134
31135
31136
31137
31138 func (c *ProjectsSinksCreateCall) Fields(s ...googleapi.Field) *ProjectsSinksCreateCall {
31139 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31140 return c
31141 }
31142
31143
31144 func (c *ProjectsSinksCreateCall) Context(ctx context.Context) *ProjectsSinksCreateCall {
31145 c.ctx_ = ctx
31146 return c
31147 }
31148
31149
31150
31151 func (c *ProjectsSinksCreateCall) Header() http.Header {
31152 if c.header_ == nil {
31153 c.header_ = make(http.Header)
31154 }
31155 return c.header_
31156 }
31157
31158 func (c *ProjectsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
31159 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31160 var body io.Reader = nil
31161 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
31162 if err != nil {
31163 return nil, err
31164 }
31165 c.urlParams_.Set("alt", alt)
31166 c.urlParams_.Set("prettyPrint", "false")
31167 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
31168 urls += "?" + c.urlParams_.Encode()
31169 req, err := http.NewRequest("POST", urls, body)
31170 if err != nil {
31171 return nil, err
31172 }
31173 req.Header = reqHeaders
31174 googleapi.Expand(req.URL, map[string]string{
31175 "parent": c.parent,
31176 })
31177 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31178 }
31179
31180
31181
31182
31183
31184
31185 func (c *ProjectsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
31186 gensupport.SetOptions(c.urlParams_, opts...)
31187 res, err := c.doRequest("json")
31188 if res != nil && res.StatusCode == http.StatusNotModified {
31189 if res.Body != nil {
31190 res.Body.Close()
31191 }
31192 return nil, gensupport.WrapError(&googleapi.Error{
31193 Code: res.StatusCode,
31194 Header: res.Header,
31195 })
31196 }
31197 if err != nil {
31198 return nil, err
31199 }
31200 defer googleapi.CloseBody(res)
31201 if err := googleapi.CheckResponse(res); err != nil {
31202 return nil, gensupport.WrapError(err)
31203 }
31204 ret := &LogSink{
31205 ServerResponse: googleapi.ServerResponse{
31206 Header: res.Header,
31207 HTTPStatusCode: res.StatusCode,
31208 },
31209 }
31210 target := &ret
31211 if err := gensupport.DecodeResponse(target, res); err != nil {
31212 return nil, err
31213 }
31214 return ret, nil
31215 }
31216
31217 type ProjectsSinksDeleteCall struct {
31218 s *Service
31219 sinkNameid string
31220 urlParams_ gensupport.URLParams
31221 ctx_ context.Context
31222 header_ http.Header
31223 }
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235 func (r *ProjectsSinksService) Delete(sinkNameid string) *ProjectsSinksDeleteCall {
31236 c := &ProjectsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31237 c.sinkNameid = sinkNameid
31238 return c
31239 }
31240
31241
31242
31243
31244 func (c *ProjectsSinksDeleteCall) Fields(s ...googleapi.Field) *ProjectsSinksDeleteCall {
31245 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31246 return c
31247 }
31248
31249
31250 func (c *ProjectsSinksDeleteCall) Context(ctx context.Context) *ProjectsSinksDeleteCall {
31251 c.ctx_ = ctx
31252 return c
31253 }
31254
31255
31256
31257 func (c *ProjectsSinksDeleteCall) Header() http.Header {
31258 if c.header_ == nil {
31259 c.header_ = make(http.Header)
31260 }
31261 return c.header_
31262 }
31263
31264 func (c *ProjectsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
31265 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31266 var body io.Reader = nil
31267 c.urlParams_.Set("alt", alt)
31268 c.urlParams_.Set("prettyPrint", "false")
31269 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
31270 urls += "?" + c.urlParams_.Encode()
31271 req, err := http.NewRequest("DELETE", urls, body)
31272 if err != nil {
31273 return nil, err
31274 }
31275 req.Header = reqHeaders
31276 googleapi.Expand(req.URL, map[string]string{
31277 "sinkName": c.sinkNameid,
31278 })
31279 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31280 }
31281
31282
31283
31284
31285
31286
31287 func (c *ProjectsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
31288 gensupport.SetOptions(c.urlParams_, opts...)
31289 res, err := c.doRequest("json")
31290 if res != nil && res.StatusCode == http.StatusNotModified {
31291 if res.Body != nil {
31292 res.Body.Close()
31293 }
31294 return nil, gensupport.WrapError(&googleapi.Error{
31295 Code: res.StatusCode,
31296 Header: res.Header,
31297 })
31298 }
31299 if err != nil {
31300 return nil, err
31301 }
31302 defer googleapi.CloseBody(res)
31303 if err := googleapi.CheckResponse(res); err != nil {
31304 return nil, gensupport.WrapError(err)
31305 }
31306 ret := &Empty{
31307 ServerResponse: googleapi.ServerResponse{
31308 Header: res.Header,
31309 HTTPStatusCode: res.StatusCode,
31310 },
31311 }
31312 target := &ret
31313 if err := gensupport.DecodeResponse(target, res); err != nil {
31314 return nil, err
31315 }
31316 return ret, nil
31317 }
31318
31319 type ProjectsSinksGetCall struct {
31320 s *Service
31321 sinkName string
31322 urlParams_ gensupport.URLParams
31323 ifNoneMatch_ string
31324 ctx_ context.Context
31325 header_ http.Header
31326 }
31327
31328
31329
31330
31331
31332
31333
31334
31335
31336 func (r *ProjectsSinksService) Get(sinkName string) *ProjectsSinksGetCall {
31337 c := &ProjectsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31338 c.sinkName = sinkName
31339 return c
31340 }
31341
31342
31343
31344
31345 func (c *ProjectsSinksGetCall) Fields(s ...googleapi.Field) *ProjectsSinksGetCall {
31346 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31347 return c
31348 }
31349
31350
31351
31352
31353 func (c *ProjectsSinksGetCall) IfNoneMatch(entityTag string) *ProjectsSinksGetCall {
31354 c.ifNoneMatch_ = entityTag
31355 return c
31356 }
31357
31358
31359 func (c *ProjectsSinksGetCall) Context(ctx context.Context) *ProjectsSinksGetCall {
31360 c.ctx_ = ctx
31361 return c
31362 }
31363
31364
31365
31366 func (c *ProjectsSinksGetCall) Header() http.Header {
31367 if c.header_ == nil {
31368 c.header_ = make(http.Header)
31369 }
31370 return c.header_
31371 }
31372
31373 func (c *ProjectsSinksGetCall) doRequest(alt string) (*http.Response, error) {
31374 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31375 if c.ifNoneMatch_ != "" {
31376 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31377 }
31378 var body io.Reader = nil
31379 c.urlParams_.Set("alt", alt)
31380 c.urlParams_.Set("prettyPrint", "false")
31381 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
31382 urls += "?" + c.urlParams_.Encode()
31383 req, err := http.NewRequest("GET", urls, body)
31384 if err != nil {
31385 return nil, err
31386 }
31387 req.Header = reqHeaders
31388 googleapi.Expand(req.URL, map[string]string{
31389 "sinkName": c.sinkName,
31390 })
31391 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31392 }
31393
31394
31395
31396
31397
31398
31399 func (c *ProjectsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
31400 gensupport.SetOptions(c.urlParams_, opts...)
31401 res, err := c.doRequest("json")
31402 if res != nil && res.StatusCode == http.StatusNotModified {
31403 if res.Body != nil {
31404 res.Body.Close()
31405 }
31406 return nil, gensupport.WrapError(&googleapi.Error{
31407 Code: res.StatusCode,
31408 Header: res.Header,
31409 })
31410 }
31411 if err != nil {
31412 return nil, err
31413 }
31414 defer googleapi.CloseBody(res)
31415 if err := googleapi.CheckResponse(res); err != nil {
31416 return nil, gensupport.WrapError(err)
31417 }
31418 ret := &LogSink{
31419 ServerResponse: googleapi.ServerResponse{
31420 Header: res.Header,
31421 HTTPStatusCode: res.StatusCode,
31422 },
31423 }
31424 target := &ret
31425 if err := gensupport.DecodeResponse(target, res); err != nil {
31426 return nil, err
31427 }
31428 return ret, nil
31429 }
31430
31431 type ProjectsSinksListCall struct {
31432 s *Service
31433 parent string
31434 urlParams_ gensupport.URLParams
31435 ifNoneMatch_ string
31436 ctx_ context.Context
31437 header_ http.Header
31438 }
31439
31440
31441
31442
31443
31444
31445 func (r *ProjectsSinksService) List(parent string) *ProjectsSinksListCall {
31446 c := &ProjectsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31447 c.parent = parent
31448 return c
31449 }
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459 func (c *ProjectsSinksListCall) Filter(filter string) *ProjectsSinksListCall {
31460 c.urlParams_.Set("filter", filter)
31461 return c
31462 }
31463
31464
31465
31466
31467
31468 func (c *ProjectsSinksListCall) PageSize(pageSize int64) *ProjectsSinksListCall {
31469 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
31470 return c
31471 }
31472
31473
31474
31475
31476
31477 func (c *ProjectsSinksListCall) PageToken(pageToken string) *ProjectsSinksListCall {
31478 c.urlParams_.Set("pageToken", pageToken)
31479 return c
31480 }
31481
31482
31483
31484
31485 func (c *ProjectsSinksListCall) Fields(s ...googleapi.Field) *ProjectsSinksListCall {
31486 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31487 return c
31488 }
31489
31490
31491
31492
31493 func (c *ProjectsSinksListCall) IfNoneMatch(entityTag string) *ProjectsSinksListCall {
31494 c.ifNoneMatch_ = entityTag
31495 return c
31496 }
31497
31498
31499 func (c *ProjectsSinksListCall) Context(ctx context.Context) *ProjectsSinksListCall {
31500 c.ctx_ = ctx
31501 return c
31502 }
31503
31504
31505
31506 func (c *ProjectsSinksListCall) Header() http.Header {
31507 if c.header_ == nil {
31508 c.header_ = make(http.Header)
31509 }
31510 return c.header_
31511 }
31512
31513 func (c *ProjectsSinksListCall) doRequest(alt string) (*http.Response, error) {
31514 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31515 if c.ifNoneMatch_ != "" {
31516 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31517 }
31518 var body io.Reader = nil
31519 c.urlParams_.Set("alt", alt)
31520 c.urlParams_.Set("prettyPrint", "false")
31521 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
31522 urls += "?" + c.urlParams_.Encode()
31523 req, err := http.NewRequest("GET", urls, body)
31524 if err != nil {
31525 return nil, err
31526 }
31527 req.Header = reqHeaders
31528 googleapi.Expand(req.URL, map[string]string{
31529 "parent": c.parent,
31530 })
31531 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31532 }
31533
31534
31535
31536
31537
31538
31539
31540 func (c *ProjectsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
31541 gensupport.SetOptions(c.urlParams_, opts...)
31542 res, err := c.doRequest("json")
31543 if res != nil && res.StatusCode == http.StatusNotModified {
31544 if res.Body != nil {
31545 res.Body.Close()
31546 }
31547 return nil, gensupport.WrapError(&googleapi.Error{
31548 Code: res.StatusCode,
31549 Header: res.Header,
31550 })
31551 }
31552 if err != nil {
31553 return nil, err
31554 }
31555 defer googleapi.CloseBody(res)
31556 if err := googleapi.CheckResponse(res); err != nil {
31557 return nil, gensupport.WrapError(err)
31558 }
31559 ret := &ListSinksResponse{
31560 ServerResponse: googleapi.ServerResponse{
31561 Header: res.Header,
31562 HTTPStatusCode: res.StatusCode,
31563 },
31564 }
31565 target := &ret
31566 if err := gensupport.DecodeResponse(target, res); err != nil {
31567 return nil, err
31568 }
31569 return ret, nil
31570 }
31571
31572
31573
31574
31575 func (c *ProjectsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
31576 c.ctx_ = ctx
31577 defer c.PageToken(c.urlParams_.Get("pageToken"))
31578 for {
31579 x, err := c.Do()
31580 if err != nil {
31581 return err
31582 }
31583 if err := f(x); err != nil {
31584 return err
31585 }
31586 if x.NextPageToken == "" {
31587 return nil
31588 }
31589 c.PageToken(x.NextPageToken)
31590 }
31591 }
31592
31593 type ProjectsSinksPatchCall struct {
31594 s *Service
31595 sinkNameid string
31596 logsink *LogSink
31597 urlParams_ gensupport.URLParams
31598 ctx_ context.Context
31599 header_ http.Header
31600 }
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614 func (r *ProjectsSinksService) Patch(sinkNameid string, logsink *LogSink) *ProjectsSinksPatchCall {
31615 c := &ProjectsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31616 c.sinkNameid = sinkNameid
31617 c.logsink = logsink
31618 return c
31619 }
31620
31621
31622
31623
31624
31625
31626
31627 func (c *ProjectsSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *ProjectsSinksPatchCall {
31628 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
31629 return c
31630 }
31631
31632
31633
31634
31635
31636
31637
31638
31639
31640
31641
31642 func (c *ProjectsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksPatchCall {
31643 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
31644 return c
31645 }
31646
31647
31648
31649
31650
31651
31652
31653
31654
31655
31656
31657 func (c *ProjectsSinksPatchCall) UpdateMask(updateMask string) *ProjectsSinksPatchCall {
31658 c.urlParams_.Set("updateMask", updateMask)
31659 return c
31660 }
31661
31662
31663
31664
31665 func (c *ProjectsSinksPatchCall) Fields(s ...googleapi.Field) *ProjectsSinksPatchCall {
31666 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31667 return c
31668 }
31669
31670
31671 func (c *ProjectsSinksPatchCall) Context(ctx context.Context) *ProjectsSinksPatchCall {
31672 c.ctx_ = ctx
31673 return c
31674 }
31675
31676
31677
31678 func (c *ProjectsSinksPatchCall) Header() http.Header {
31679 if c.header_ == nil {
31680 c.header_ = make(http.Header)
31681 }
31682 return c.header_
31683 }
31684
31685 func (c *ProjectsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
31686 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31687 var body io.Reader = nil
31688 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
31689 if err != nil {
31690 return nil, err
31691 }
31692 c.urlParams_.Set("alt", alt)
31693 c.urlParams_.Set("prettyPrint", "false")
31694 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
31695 urls += "?" + c.urlParams_.Encode()
31696 req, err := http.NewRequest("PATCH", urls, body)
31697 if err != nil {
31698 return nil, err
31699 }
31700 req.Header = reqHeaders
31701 googleapi.Expand(req.URL, map[string]string{
31702 "sinkName": c.sinkNameid,
31703 })
31704 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31705 }
31706
31707
31708
31709
31710
31711
31712 func (c *ProjectsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
31713 gensupport.SetOptions(c.urlParams_, opts...)
31714 res, err := c.doRequest("json")
31715 if res != nil && res.StatusCode == http.StatusNotModified {
31716 if res.Body != nil {
31717 res.Body.Close()
31718 }
31719 return nil, gensupport.WrapError(&googleapi.Error{
31720 Code: res.StatusCode,
31721 Header: res.Header,
31722 })
31723 }
31724 if err != nil {
31725 return nil, err
31726 }
31727 defer googleapi.CloseBody(res)
31728 if err := googleapi.CheckResponse(res); err != nil {
31729 return nil, gensupport.WrapError(err)
31730 }
31731 ret := &LogSink{
31732 ServerResponse: googleapi.ServerResponse{
31733 Header: res.Header,
31734 HTTPStatusCode: res.StatusCode,
31735 },
31736 }
31737 target := &ret
31738 if err := gensupport.DecodeResponse(target, res); err != nil {
31739 return nil, err
31740 }
31741 return ret, nil
31742 }
31743
31744 type ProjectsSinksUpdateCall struct {
31745 s *Service
31746 sinkNameid string
31747 logsink *LogSink
31748 urlParams_ gensupport.URLParams
31749 ctx_ context.Context
31750 header_ http.Header
31751 }
31752
31753
31754
31755
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765 func (r *ProjectsSinksService) Update(sinkNameid string, logsink *LogSink) *ProjectsSinksUpdateCall {
31766 c := &ProjectsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31767 c.sinkNameid = sinkNameid
31768 c.logsink = logsink
31769 return c
31770 }
31771
31772
31773
31774
31775
31776
31777
31778 func (c *ProjectsSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *ProjectsSinksUpdateCall {
31779 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
31780 return c
31781 }
31782
31783
31784
31785
31786
31787
31788
31789
31790
31791
31792
31793 func (c *ProjectsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksUpdateCall {
31794 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
31795 return c
31796 }
31797
31798
31799
31800
31801
31802
31803
31804
31805
31806
31807
31808 func (c *ProjectsSinksUpdateCall) UpdateMask(updateMask string) *ProjectsSinksUpdateCall {
31809 c.urlParams_.Set("updateMask", updateMask)
31810 return c
31811 }
31812
31813
31814
31815
31816 func (c *ProjectsSinksUpdateCall) Fields(s ...googleapi.Field) *ProjectsSinksUpdateCall {
31817 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31818 return c
31819 }
31820
31821
31822 func (c *ProjectsSinksUpdateCall) Context(ctx context.Context) *ProjectsSinksUpdateCall {
31823 c.ctx_ = ctx
31824 return c
31825 }
31826
31827
31828
31829 func (c *ProjectsSinksUpdateCall) Header() http.Header {
31830 if c.header_ == nil {
31831 c.header_ = make(http.Header)
31832 }
31833 return c.header_
31834 }
31835
31836 func (c *ProjectsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
31837 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31838 var body io.Reader = nil
31839 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
31840 if err != nil {
31841 return nil, err
31842 }
31843 c.urlParams_.Set("alt", alt)
31844 c.urlParams_.Set("prettyPrint", "false")
31845 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
31846 urls += "?" + c.urlParams_.Encode()
31847 req, err := http.NewRequest("PUT", urls, body)
31848 if err != nil {
31849 return nil, err
31850 }
31851 req.Header = reqHeaders
31852 googleapi.Expand(req.URL, map[string]string{
31853 "sinkName": c.sinkNameid,
31854 })
31855 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31856 }
31857
31858
31859
31860
31861
31862
31863 func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
31864 gensupport.SetOptions(c.urlParams_, opts...)
31865 res, err := c.doRequest("json")
31866 if res != nil && res.StatusCode == http.StatusNotModified {
31867 if res.Body != nil {
31868 res.Body.Close()
31869 }
31870 return nil, gensupport.WrapError(&googleapi.Error{
31871 Code: res.StatusCode,
31872 Header: res.Header,
31873 })
31874 }
31875 if err != nil {
31876 return nil, err
31877 }
31878 defer googleapi.CloseBody(res)
31879 if err := googleapi.CheckResponse(res); err != nil {
31880 return nil, gensupport.WrapError(err)
31881 }
31882 ret := &LogSink{
31883 ServerResponse: googleapi.ServerResponse{
31884 Header: res.Header,
31885 HTTPStatusCode: res.StatusCode,
31886 },
31887 }
31888 target := &ret
31889 if err := gensupport.DecodeResponse(target, res); err != nil {
31890 return nil, err
31891 }
31892 return ret, nil
31893 }
31894
31895 type SinksCreateCall struct {
31896 s *Service
31897 parent string
31898 logsink *LogSink
31899 urlParams_ gensupport.URLParams
31900 ctx_ context.Context
31901 header_ http.Header
31902 }
31903
31904
31905
31906
31907
31908
31909
31910
31911
31912
31913 func (r *SinksService) Create(parent string, logsink *LogSink) *SinksCreateCall {
31914 c := &SinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31915 c.parent = parent
31916 c.logsink = logsink
31917 return c
31918 }
31919
31920
31921
31922
31923
31924
31925
31926 func (c *SinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *SinksCreateCall {
31927 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
31928 return c
31929 }
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943 func (c *SinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *SinksCreateCall {
31944 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
31945 return c
31946 }
31947
31948
31949
31950
31951 func (c *SinksCreateCall) Fields(s ...googleapi.Field) *SinksCreateCall {
31952 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31953 return c
31954 }
31955
31956
31957 func (c *SinksCreateCall) Context(ctx context.Context) *SinksCreateCall {
31958 c.ctx_ = ctx
31959 return c
31960 }
31961
31962
31963
31964 func (c *SinksCreateCall) Header() http.Header {
31965 if c.header_ == nil {
31966 c.header_ = make(http.Header)
31967 }
31968 return c.header_
31969 }
31970
31971 func (c *SinksCreateCall) doRequest(alt string) (*http.Response, error) {
31972 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31973 var body io.Reader = nil
31974 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
31975 if err != nil {
31976 return nil, err
31977 }
31978 c.urlParams_.Set("alt", alt)
31979 c.urlParams_.Set("prettyPrint", "false")
31980 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
31981 urls += "?" + c.urlParams_.Encode()
31982 req, err := http.NewRequest("POST", urls, body)
31983 if err != nil {
31984 return nil, err
31985 }
31986 req.Header = reqHeaders
31987 googleapi.Expand(req.URL, map[string]string{
31988 "parent": c.parent,
31989 })
31990 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31991 }
31992
31993
31994
31995
31996
31997
31998 func (c *SinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
31999 gensupport.SetOptions(c.urlParams_, opts...)
32000 res, err := c.doRequest("json")
32001 if res != nil && res.StatusCode == http.StatusNotModified {
32002 if res.Body != nil {
32003 res.Body.Close()
32004 }
32005 return nil, gensupport.WrapError(&googleapi.Error{
32006 Code: res.StatusCode,
32007 Header: res.Header,
32008 })
32009 }
32010 if err != nil {
32011 return nil, err
32012 }
32013 defer googleapi.CloseBody(res)
32014 if err := googleapi.CheckResponse(res); err != nil {
32015 return nil, gensupport.WrapError(err)
32016 }
32017 ret := &LogSink{
32018 ServerResponse: googleapi.ServerResponse{
32019 Header: res.Header,
32020 HTTPStatusCode: res.StatusCode,
32021 },
32022 }
32023 target := &ret
32024 if err := gensupport.DecodeResponse(target, res); err != nil {
32025 return nil, err
32026 }
32027 return ret, nil
32028 }
32029
32030 type SinksDeleteCall struct {
32031 s *Service
32032 sinkNameid string
32033 urlParams_ gensupport.URLParams
32034 ctx_ context.Context
32035 header_ http.Header
32036 }
32037
32038
32039
32040
32041
32042
32043
32044
32045
32046
32047
32048 func (r *SinksService) Delete(sinkNameid string) *SinksDeleteCall {
32049 c := &SinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32050 c.sinkNameid = sinkNameid
32051 return c
32052 }
32053
32054
32055
32056
32057 func (c *SinksDeleteCall) Fields(s ...googleapi.Field) *SinksDeleteCall {
32058 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32059 return c
32060 }
32061
32062
32063 func (c *SinksDeleteCall) Context(ctx context.Context) *SinksDeleteCall {
32064 c.ctx_ = ctx
32065 return c
32066 }
32067
32068
32069
32070 func (c *SinksDeleteCall) Header() http.Header {
32071 if c.header_ == nil {
32072 c.header_ = make(http.Header)
32073 }
32074 return c.header_
32075 }
32076
32077 func (c *SinksDeleteCall) doRequest(alt string) (*http.Response, error) {
32078 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32079 var body io.Reader = nil
32080 c.urlParams_.Set("alt", alt)
32081 c.urlParams_.Set("prettyPrint", "false")
32082 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
32083 urls += "?" + c.urlParams_.Encode()
32084 req, err := http.NewRequest("DELETE", urls, body)
32085 if err != nil {
32086 return nil, err
32087 }
32088 req.Header = reqHeaders
32089 googleapi.Expand(req.URL, map[string]string{
32090 "sinkName": c.sinkNameid,
32091 })
32092 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32093 }
32094
32095
32096
32097
32098
32099
32100 func (c *SinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
32101 gensupport.SetOptions(c.urlParams_, opts...)
32102 res, err := c.doRequest("json")
32103 if res != nil && res.StatusCode == http.StatusNotModified {
32104 if res.Body != nil {
32105 res.Body.Close()
32106 }
32107 return nil, gensupport.WrapError(&googleapi.Error{
32108 Code: res.StatusCode,
32109 Header: res.Header,
32110 })
32111 }
32112 if err != nil {
32113 return nil, err
32114 }
32115 defer googleapi.CloseBody(res)
32116 if err := googleapi.CheckResponse(res); err != nil {
32117 return nil, gensupport.WrapError(err)
32118 }
32119 ret := &Empty{
32120 ServerResponse: googleapi.ServerResponse{
32121 Header: res.Header,
32122 HTTPStatusCode: res.StatusCode,
32123 },
32124 }
32125 target := &ret
32126 if err := gensupport.DecodeResponse(target, res); err != nil {
32127 return nil, err
32128 }
32129 return ret, nil
32130 }
32131
32132 type SinksGetCall struct {
32133 s *Service
32134 sinkName string
32135 urlParams_ gensupport.URLParams
32136 ifNoneMatch_ string
32137 ctx_ context.Context
32138 header_ http.Header
32139 }
32140
32141
32142
32143
32144
32145
32146
32147
32148
32149 func (r *SinksService) Get(sinkName string) *SinksGetCall {
32150 c := &SinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32151 c.sinkName = sinkName
32152 return c
32153 }
32154
32155
32156
32157
32158 func (c *SinksGetCall) Fields(s ...googleapi.Field) *SinksGetCall {
32159 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32160 return c
32161 }
32162
32163
32164
32165
32166 func (c *SinksGetCall) IfNoneMatch(entityTag string) *SinksGetCall {
32167 c.ifNoneMatch_ = entityTag
32168 return c
32169 }
32170
32171
32172 func (c *SinksGetCall) Context(ctx context.Context) *SinksGetCall {
32173 c.ctx_ = ctx
32174 return c
32175 }
32176
32177
32178
32179 func (c *SinksGetCall) Header() http.Header {
32180 if c.header_ == nil {
32181 c.header_ = make(http.Header)
32182 }
32183 return c.header_
32184 }
32185
32186 func (c *SinksGetCall) doRequest(alt string) (*http.Response, error) {
32187 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32188 if c.ifNoneMatch_ != "" {
32189 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32190 }
32191 var body io.Reader = nil
32192 c.urlParams_.Set("alt", alt)
32193 c.urlParams_.Set("prettyPrint", "false")
32194 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
32195 urls += "?" + c.urlParams_.Encode()
32196 req, err := http.NewRequest("GET", urls, body)
32197 if err != nil {
32198 return nil, err
32199 }
32200 req.Header = reqHeaders
32201 googleapi.Expand(req.URL, map[string]string{
32202 "sinkName": c.sinkName,
32203 })
32204 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32205 }
32206
32207
32208
32209
32210
32211
32212 func (c *SinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
32213 gensupport.SetOptions(c.urlParams_, opts...)
32214 res, err := c.doRequest("json")
32215 if res != nil && res.StatusCode == http.StatusNotModified {
32216 if res.Body != nil {
32217 res.Body.Close()
32218 }
32219 return nil, gensupport.WrapError(&googleapi.Error{
32220 Code: res.StatusCode,
32221 Header: res.Header,
32222 })
32223 }
32224 if err != nil {
32225 return nil, err
32226 }
32227 defer googleapi.CloseBody(res)
32228 if err := googleapi.CheckResponse(res); err != nil {
32229 return nil, gensupport.WrapError(err)
32230 }
32231 ret := &LogSink{
32232 ServerResponse: googleapi.ServerResponse{
32233 Header: res.Header,
32234 HTTPStatusCode: res.StatusCode,
32235 },
32236 }
32237 target := &ret
32238 if err := gensupport.DecodeResponse(target, res); err != nil {
32239 return nil, err
32240 }
32241 return ret, nil
32242 }
32243
32244 type SinksListCall struct {
32245 s *Service
32246 parent string
32247 urlParams_ gensupport.URLParams
32248 ifNoneMatch_ string
32249 ctx_ context.Context
32250 header_ http.Header
32251 }
32252
32253
32254
32255
32256
32257
32258 func (r *SinksService) List(parent string) *SinksListCall {
32259 c := &SinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32260 c.parent = parent
32261 return c
32262 }
32263
32264
32265
32266
32267
32268
32269
32270
32271
32272 func (c *SinksListCall) Filter(filter string) *SinksListCall {
32273 c.urlParams_.Set("filter", filter)
32274 return c
32275 }
32276
32277
32278
32279
32280
32281 func (c *SinksListCall) PageSize(pageSize int64) *SinksListCall {
32282 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
32283 return c
32284 }
32285
32286
32287
32288
32289
32290 func (c *SinksListCall) PageToken(pageToken string) *SinksListCall {
32291 c.urlParams_.Set("pageToken", pageToken)
32292 return c
32293 }
32294
32295
32296
32297
32298 func (c *SinksListCall) Fields(s ...googleapi.Field) *SinksListCall {
32299 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32300 return c
32301 }
32302
32303
32304
32305
32306 func (c *SinksListCall) IfNoneMatch(entityTag string) *SinksListCall {
32307 c.ifNoneMatch_ = entityTag
32308 return c
32309 }
32310
32311
32312 func (c *SinksListCall) Context(ctx context.Context) *SinksListCall {
32313 c.ctx_ = ctx
32314 return c
32315 }
32316
32317
32318
32319 func (c *SinksListCall) Header() http.Header {
32320 if c.header_ == nil {
32321 c.header_ = make(http.Header)
32322 }
32323 return c.header_
32324 }
32325
32326 func (c *SinksListCall) doRequest(alt string) (*http.Response, error) {
32327 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32328 if c.ifNoneMatch_ != "" {
32329 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32330 }
32331 var body io.Reader = nil
32332 c.urlParams_.Set("alt", alt)
32333 c.urlParams_.Set("prettyPrint", "false")
32334 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
32335 urls += "?" + c.urlParams_.Encode()
32336 req, err := http.NewRequest("GET", urls, body)
32337 if err != nil {
32338 return nil, err
32339 }
32340 req.Header = reqHeaders
32341 googleapi.Expand(req.URL, map[string]string{
32342 "parent": c.parent,
32343 })
32344 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32345 }
32346
32347
32348
32349
32350
32351
32352
32353 func (c *SinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
32354 gensupport.SetOptions(c.urlParams_, opts...)
32355 res, err := c.doRequest("json")
32356 if res != nil && res.StatusCode == http.StatusNotModified {
32357 if res.Body != nil {
32358 res.Body.Close()
32359 }
32360 return nil, gensupport.WrapError(&googleapi.Error{
32361 Code: res.StatusCode,
32362 Header: res.Header,
32363 })
32364 }
32365 if err != nil {
32366 return nil, err
32367 }
32368 defer googleapi.CloseBody(res)
32369 if err := googleapi.CheckResponse(res); err != nil {
32370 return nil, gensupport.WrapError(err)
32371 }
32372 ret := &ListSinksResponse{
32373 ServerResponse: googleapi.ServerResponse{
32374 Header: res.Header,
32375 HTTPStatusCode: res.StatusCode,
32376 },
32377 }
32378 target := &ret
32379 if err := gensupport.DecodeResponse(target, res); err != nil {
32380 return nil, err
32381 }
32382 return ret, nil
32383 }
32384
32385
32386
32387
32388 func (c *SinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
32389 c.ctx_ = ctx
32390 defer c.PageToken(c.urlParams_.Get("pageToken"))
32391 for {
32392 x, err := c.Do()
32393 if err != nil {
32394 return err
32395 }
32396 if err := f(x); err != nil {
32397 return err
32398 }
32399 if x.NextPageToken == "" {
32400 return nil
32401 }
32402 c.PageToken(x.NextPageToken)
32403 }
32404 }
32405
32406 type SinksUpdateCall struct {
32407 s *Service
32408 sinkNameid string
32409 logsink *LogSink
32410 urlParams_ gensupport.URLParams
32411 ctx_ context.Context
32412 header_ http.Header
32413 }
32414
32415
32416
32417
32418
32419
32420
32421
32422
32423
32424
32425
32426
32427 func (r *SinksService) Update(sinkNameid string, logsink *LogSink) *SinksUpdateCall {
32428 c := &SinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32429 c.sinkNameid = sinkNameid
32430 c.logsink = logsink
32431 return c
32432 }
32433
32434
32435
32436
32437
32438
32439
32440 func (c *SinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *SinksUpdateCall {
32441 c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
32442 return c
32443 }
32444
32445
32446
32447
32448
32449
32450
32451
32452
32453
32454
32455 func (c *SinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *SinksUpdateCall {
32456 c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
32457 return c
32458 }
32459
32460
32461
32462
32463
32464
32465
32466
32467
32468
32469
32470 func (c *SinksUpdateCall) UpdateMask(updateMask string) *SinksUpdateCall {
32471 c.urlParams_.Set("updateMask", updateMask)
32472 return c
32473 }
32474
32475
32476
32477
32478 func (c *SinksUpdateCall) Fields(s ...googleapi.Field) *SinksUpdateCall {
32479 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32480 return c
32481 }
32482
32483
32484 func (c *SinksUpdateCall) Context(ctx context.Context) *SinksUpdateCall {
32485 c.ctx_ = ctx
32486 return c
32487 }
32488
32489
32490
32491 func (c *SinksUpdateCall) Header() http.Header {
32492 if c.header_ == nil {
32493 c.header_ = make(http.Header)
32494 }
32495 return c.header_
32496 }
32497
32498 func (c *SinksUpdateCall) doRequest(alt string) (*http.Response, error) {
32499 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32500 var body io.Reader = nil
32501 body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
32502 if err != nil {
32503 return nil, err
32504 }
32505 c.urlParams_.Set("alt", alt)
32506 c.urlParams_.Set("prettyPrint", "false")
32507 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
32508 urls += "?" + c.urlParams_.Encode()
32509 req, err := http.NewRequest("PUT", urls, body)
32510 if err != nil {
32511 return nil, err
32512 }
32513 req.Header = reqHeaders
32514 googleapi.Expand(req.URL, map[string]string{
32515 "sinkName": c.sinkNameid,
32516 })
32517 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32518 }
32519
32520
32521
32522
32523
32524
32525 func (c *SinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
32526 gensupport.SetOptions(c.urlParams_, opts...)
32527 res, err := c.doRequest("json")
32528 if res != nil && res.StatusCode == http.StatusNotModified {
32529 if res.Body != nil {
32530 res.Body.Close()
32531 }
32532 return nil, gensupport.WrapError(&googleapi.Error{
32533 Code: res.StatusCode,
32534 Header: res.Header,
32535 })
32536 }
32537 if err != nil {
32538 return nil, err
32539 }
32540 defer googleapi.CloseBody(res)
32541 if err := googleapi.CheckResponse(res); err != nil {
32542 return nil, gensupport.WrapError(err)
32543 }
32544 ret := &LogSink{
32545 ServerResponse: googleapi.ServerResponse{
32546 Header: res.Header,
32547 HTTPStatusCode: res.StatusCode,
32548 },
32549 }
32550 target := &ret
32551 if err := gensupport.DecodeResponse(target, res); err != nil {
32552 return nil, err
32553 }
32554 return ret, nil
32555 }
32556
32557 type V2GetCmekSettingsCall struct {
32558 s *Service
32559 name string
32560 urlParams_ gensupport.URLParams
32561 ifNoneMatch_ string
32562 ctx_ context.Context
32563 header_ http.Header
32564 }
32565
32566
32567
32568
32569
32570
32571
32572
32573
32574
32575
32576
32577
32578
32579
32580
32581
32582
32583 func (r *V2Service) GetCmekSettings(name string) *V2GetCmekSettingsCall {
32584 c := &V2GetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32585 c.name = name
32586 return c
32587 }
32588
32589
32590
32591
32592 func (c *V2GetCmekSettingsCall) Fields(s ...googleapi.Field) *V2GetCmekSettingsCall {
32593 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32594 return c
32595 }
32596
32597
32598
32599
32600 func (c *V2GetCmekSettingsCall) IfNoneMatch(entityTag string) *V2GetCmekSettingsCall {
32601 c.ifNoneMatch_ = entityTag
32602 return c
32603 }
32604
32605
32606 func (c *V2GetCmekSettingsCall) Context(ctx context.Context) *V2GetCmekSettingsCall {
32607 c.ctx_ = ctx
32608 return c
32609 }
32610
32611
32612
32613 func (c *V2GetCmekSettingsCall) Header() http.Header {
32614 if c.header_ == nil {
32615 c.header_ = make(http.Header)
32616 }
32617 return c.header_
32618 }
32619
32620 func (c *V2GetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
32621 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32622 if c.ifNoneMatch_ != "" {
32623 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32624 }
32625 var body io.Reader = nil
32626 c.urlParams_.Set("alt", alt)
32627 c.urlParams_.Set("prettyPrint", "false")
32628 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
32629 urls += "?" + c.urlParams_.Encode()
32630 req, err := http.NewRequest("GET", urls, body)
32631 if err != nil {
32632 return nil, err
32633 }
32634 req.Header = reqHeaders
32635 googleapi.Expand(req.URL, map[string]string{
32636 "name": c.name,
32637 })
32638 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32639 }
32640
32641
32642
32643
32644
32645
32646 func (c *V2GetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
32647 gensupport.SetOptions(c.urlParams_, opts...)
32648 res, err := c.doRequest("json")
32649 if res != nil && res.StatusCode == http.StatusNotModified {
32650 if res.Body != nil {
32651 res.Body.Close()
32652 }
32653 return nil, gensupport.WrapError(&googleapi.Error{
32654 Code: res.StatusCode,
32655 Header: res.Header,
32656 })
32657 }
32658 if err != nil {
32659 return nil, err
32660 }
32661 defer googleapi.CloseBody(res)
32662 if err := googleapi.CheckResponse(res); err != nil {
32663 return nil, gensupport.WrapError(err)
32664 }
32665 ret := &CmekSettings{
32666 ServerResponse: googleapi.ServerResponse{
32667 Header: res.Header,
32668 HTTPStatusCode: res.StatusCode,
32669 },
32670 }
32671 target := &ret
32672 if err := gensupport.DecodeResponse(target, res); err != nil {
32673 return nil, err
32674 }
32675 return ret, nil
32676 }
32677
32678 type V2GetSettingsCall struct {
32679 s *Service
32680 name string
32681 urlParams_ gensupport.URLParams
32682 ifNoneMatch_ string
32683 ctx_ context.Context
32684 header_ http.Header
32685 }
32686
32687
32688
32689
32690
32691
32692
32693
32694
32695
32696
32697
32698
32699
32700 func (r *V2Service) GetSettings(name string) *V2GetSettingsCall {
32701 c := &V2GetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32702 c.name = name
32703 return c
32704 }
32705
32706
32707
32708
32709 func (c *V2GetSettingsCall) Fields(s ...googleapi.Field) *V2GetSettingsCall {
32710 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32711 return c
32712 }
32713
32714
32715
32716
32717 func (c *V2GetSettingsCall) IfNoneMatch(entityTag string) *V2GetSettingsCall {
32718 c.ifNoneMatch_ = entityTag
32719 return c
32720 }
32721
32722
32723 func (c *V2GetSettingsCall) Context(ctx context.Context) *V2GetSettingsCall {
32724 c.ctx_ = ctx
32725 return c
32726 }
32727
32728
32729
32730 func (c *V2GetSettingsCall) Header() http.Header {
32731 if c.header_ == nil {
32732 c.header_ = make(http.Header)
32733 }
32734 return c.header_
32735 }
32736
32737 func (c *V2GetSettingsCall) doRequest(alt string) (*http.Response, error) {
32738 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32739 if c.ifNoneMatch_ != "" {
32740 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32741 }
32742 var body io.Reader = nil
32743 c.urlParams_.Set("alt", alt)
32744 c.urlParams_.Set("prettyPrint", "false")
32745 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
32746 urls += "?" + c.urlParams_.Encode()
32747 req, err := http.NewRequest("GET", urls, body)
32748 if err != nil {
32749 return nil, err
32750 }
32751 req.Header = reqHeaders
32752 googleapi.Expand(req.URL, map[string]string{
32753 "name": c.name,
32754 })
32755 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32756 }
32757
32758
32759
32760
32761
32762
32763 func (c *V2GetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
32764 gensupport.SetOptions(c.urlParams_, opts...)
32765 res, err := c.doRequest("json")
32766 if res != nil && res.StatusCode == http.StatusNotModified {
32767 if res.Body != nil {
32768 res.Body.Close()
32769 }
32770 return nil, gensupport.WrapError(&googleapi.Error{
32771 Code: res.StatusCode,
32772 Header: res.Header,
32773 })
32774 }
32775 if err != nil {
32776 return nil, err
32777 }
32778 defer googleapi.CloseBody(res)
32779 if err := googleapi.CheckResponse(res); err != nil {
32780 return nil, gensupport.WrapError(err)
32781 }
32782 ret := &Settings{
32783 ServerResponse: googleapi.ServerResponse{
32784 Header: res.Header,
32785 HTTPStatusCode: res.StatusCode,
32786 },
32787 }
32788 target := &ret
32789 if err := gensupport.DecodeResponse(target, res); err != nil {
32790 return nil, err
32791 }
32792 return ret, nil
32793 }
32794
32795 type V2UpdateCmekSettingsCall struct {
32796 s *Service
32797 name string
32798 cmeksettings *CmekSettings
32799 urlParams_ gensupport.URLParams
32800 ctx_ context.Context
32801 header_ http.Header
32802 }
32803
32804
32805
32806
32807
32808
32809
32810
32811
32812
32813
32814
32815
32816
32817
32818
32819
32820
32821
32822
32823
32824 func (r *V2Service) UpdateCmekSettings(name string, cmeksettings *CmekSettings) *V2UpdateCmekSettingsCall {
32825 c := &V2UpdateCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32826 c.name = name
32827 c.cmeksettings = cmeksettings
32828 return c
32829 }
32830
32831
32832
32833
32834
32835
32836 func (c *V2UpdateCmekSettingsCall) UpdateMask(updateMask string) *V2UpdateCmekSettingsCall {
32837 c.urlParams_.Set("updateMask", updateMask)
32838 return c
32839 }
32840
32841
32842
32843
32844 func (c *V2UpdateCmekSettingsCall) Fields(s ...googleapi.Field) *V2UpdateCmekSettingsCall {
32845 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32846 return c
32847 }
32848
32849
32850 func (c *V2UpdateCmekSettingsCall) Context(ctx context.Context) *V2UpdateCmekSettingsCall {
32851 c.ctx_ = ctx
32852 return c
32853 }
32854
32855
32856
32857 func (c *V2UpdateCmekSettingsCall) Header() http.Header {
32858 if c.header_ == nil {
32859 c.header_ = make(http.Header)
32860 }
32861 return c.header_
32862 }
32863
32864 func (c *V2UpdateCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
32865 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32866 var body io.Reader = nil
32867 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cmeksettings)
32868 if err != nil {
32869 return nil, err
32870 }
32871 c.urlParams_.Set("alt", alt)
32872 c.urlParams_.Set("prettyPrint", "false")
32873 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
32874 urls += "?" + c.urlParams_.Encode()
32875 req, err := http.NewRequest("PATCH", urls, body)
32876 if err != nil {
32877 return nil, err
32878 }
32879 req.Header = reqHeaders
32880 googleapi.Expand(req.URL, map[string]string{
32881 "name": c.name,
32882 })
32883 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32884 }
32885
32886
32887
32888
32889
32890
32891 func (c *V2UpdateCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
32892 gensupport.SetOptions(c.urlParams_, opts...)
32893 res, err := c.doRequest("json")
32894 if res != nil && res.StatusCode == http.StatusNotModified {
32895 if res.Body != nil {
32896 res.Body.Close()
32897 }
32898 return nil, gensupport.WrapError(&googleapi.Error{
32899 Code: res.StatusCode,
32900 Header: res.Header,
32901 })
32902 }
32903 if err != nil {
32904 return nil, err
32905 }
32906 defer googleapi.CloseBody(res)
32907 if err := googleapi.CheckResponse(res); err != nil {
32908 return nil, gensupport.WrapError(err)
32909 }
32910 ret := &CmekSettings{
32911 ServerResponse: googleapi.ServerResponse{
32912 Header: res.Header,
32913 HTTPStatusCode: res.StatusCode,
32914 },
32915 }
32916 target := &ret
32917 if err := gensupport.DecodeResponse(target, res); err != nil {
32918 return nil, err
32919 }
32920 return ret, nil
32921 }
32922
32923 type V2UpdateSettingsCall struct {
32924 s *Service
32925 name string
32926 settings *Settings
32927 urlParams_ gensupport.URLParams
32928 ctx_ context.Context
32929 header_ http.Header
32930 }
32931
32932
32933
32934
32935
32936
32937
32938
32939
32940
32941
32942
32943
32944
32945
32946
32947 func (r *V2Service) UpdateSettings(name string, settings *Settings) *V2UpdateSettingsCall {
32948 c := &V2UpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32949 c.name = name
32950 c.settings = settings
32951 return c
32952 }
32953
32954
32955
32956
32957
32958
32959 func (c *V2UpdateSettingsCall) UpdateMask(updateMask string) *V2UpdateSettingsCall {
32960 c.urlParams_.Set("updateMask", updateMask)
32961 return c
32962 }
32963
32964
32965
32966
32967 func (c *V2UpdateSettingsCall) Fields(s ...googleapi.Field) *V2UpdateSettingsCall {
32968 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32969 return c
32970 }
32971
32972
32973 func (c *V2UpdateSettingsCall) Context(ctx context.Context) *V2UpdateSettingsCall {
32974 c.ctx_ = ctx
32975 return c
32976 }
32977
32978
32979
32980 func (c *V2UpdateSettingsCall) Header() http.Header {
32981 if c.header_ == nil {
32982 c.header_ = make(http.Header)
32983 }
32984 return c.header_
32985 }
32986
32987 func (c *V2UpdateSettingsCall) doRequest(alt string) (*http.Response, error) {
32988 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32989 var body io.Reader = nil
32990 body, err := googleapi.WithoutDataWrapper.JSONReader(c.settings)
32991 if err != nil {
32992 return nil, err
32993 }
32994 c.urlParams_.Set("alt", alt)
32995 c.urlParams_.Set("prettyPrint", "false")
32996 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
32997 urls += "?" + c.urlParams_.Encode()
32998 req, err := http.NewRequest("PATCH", urls, body)
32999 if err != nil {
33000 return nil, err
33001 }
33002 req.Header = reqHeaders
33003 googleapi.Expand(req.URL, map[string]string{
33004 "name": c.name,
33005 })
33006 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33007 }
33008
33009
33010
33011
33012
33013
33014 func (c *V2UpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
33015 gensupport.SetOptions(c.urlParams_, opts...)
33016 res, err := c.doRequest("json")
33017 if res != nil && res.StatusCode == http.StatusNotModified {
33018 if res.Body != nil {
33019 res.Body.Close()
33020 }
33021 return nil, gensupport.WrapError(&googleapi.Error{
33022 Code: res.StatusCode,
33023 Header: res.Header,
33024 })
33025 }
33026 if err != nil {
33027 return nil, err
33028 }
33029 defer googleapi.CloseBody(res)
33030 if err := googleapi.CheckResponse(res); err != nil {
33031 return nil, gensupport.WrapError(err)
33032 }
33033 ret := &Settings{
33034 ServerResponse: googleapi.ServerResponse{
33035 Header: res.Header,
33036 HTTPStatusCode: res.StatusCode,
33037 },
33038 }
33039 target := &ret
33040 if err := gensupport.DecodeResponse(target, res); err != nil {
33041 return nil, err
33042 }
33043 return ret, nil
33044 }
33045
View as plain text