1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package logging provides access to the Cloud Logging API.
8//
9// This package is DEPRECATED. Use package cloud.google.com/go/logging instead.
10//
11// For product documentation, see: https://cloud.google.com/logging/docs/
12//
13// Creating a client
14//
15// Usage example:
16//
17//   import "google.golang.org/api/logging/v2"
18//   ...
19//   ctx := context.Background()
20//   loggingService, err := logging.NewService(ctx)
21//
22// In this example, Google Application Default Credentials are used for authentication.
23//
24// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
25//
26// Other authentication options
27//
28// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
29//
30//   loggingService, err := logging.NewService(ctx, option.WithScopes(logging.LoggingWriteScope))
31//
32// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
33//
34//   loggingService, err := logging.NewService(ctx, option.WithAPIKey("AIza..."))
35//
36// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
37//
38//   config := &oauth2.Config{...}
39//   // ...
40//   token, err := config.Exchange(ctx, ...)
41//   loggingService, err := logging.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
42//
43// See https://godoc.org/google.golang.org/api/option/ for details on options.
44package logging // import "google.golang.org/api/logging/v2"
45
46import (
47	"bytes"
48	"context"
49	"encoding/json"
50	"errors"
51	"fmt"
52	"io"
53	"net/http"
54	"net/url"
55	"strconv"
56	"strings"
57
58	googleapi "google.golang.org/api/googleapi"
59	gensupport "google.golang.org/api/internal/gensupport"
60	option "google.golang.org/api/option"
61	internaloption "google.golang.org/api/option/internaloption"
62	htransport "google.golang.org/api/transport/http"
63)
64
65// Always reference these packages, just in case the auto-generated code
66// below doesn't.
67var _ = bytes.NewBuffer
68var _ = strconv.Itoa
69var _ = fmt.Sprintf
70var _ = json.NewDecoder
71var _ = io.Copy
72var _ = url.Parse
73var _ = gensupport.MarshalJSON
74var _ = googleapi.Version
75var _ = errors.New
76var _ = strings.Replace
77var _ = context.Canceled
78var _ = internaloption.WithDefaultEndpoint
79
80const apiId = "logging:v2"
81const apiName = "logging"
82const apiVersion = "v2"
83const basePath = "https://logging.googleapis.com/"
84const mtlsBasePath = "https://logging.mtls.googleapis.com/"
85
86// OAuth2 scopes used by this API.
87const (
88	// See, edit, configure, and delete your Google Cloud data and see the
89	// email address for your Google Account.
90	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
91
92	// View your data across Google Cloud services and see the email address
93	// of your Google Account
94	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
95
96	// Administrate log data for your projects
97	LoggingAdminScope = "https://www.googleapis.com/auth/logging.admin"
98
99	// View log data for your projects
100	LoggingReadScope = "https://www.googleapis.com/auth/logging.read"
101
102	// Submit log data for your projects
103	LoggingWriteScope = "https://www.googleapis.com/auth/logging.write"
104)
105
106// NewService creates a new Service.
107func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
108	scopesOption := option.WithScopes(
109		"https://www.googleapis.com/auth/cloud-platform",
110		"https://www.googleapis.com/auth/cloud-platform.read-only",
111		"https://www.googleapis.com/auth/logging.admin",
112		"https://www.googleapis.com/auth/logging.read",
113		"https://www.googleapis.com/auth/logging.write",
114	)
115	// NOTE: prepend, so we don't override user-specified scopes.
116	opts = append([]option.ClientOption{scopesOption}, opts...)
117	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
118	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
119	client, endpoint, err := htransport.NewClient(ctx, opts...)
120	if err != nil {
121		return nil, err
122	}
123	s, err := New(client)
124	if err != nil {
125		return nil, err
126	}
127	if endpoint != "" {
128		s.BasePath = endpoint
129	}
130	return s, nil
131}
132
133// New creates a new Service. It uses the provided http.Client for requests.
134//
135// Deprecated: please use NewService instead.
136// To provide a custom HTTP client, use option.WithHTTPClient.
137// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
138func New(client *http.Client) (*Service, error) {
139	if client == nil {
140		return nil, errors.New("client is nil")
141	}
142	s := &Service{client: client, BasePath: basePath}
143	s.BillingAccounts = NewBillingAccountsService(s)
144	s.Entries = NewEntriesService(s)
145	s.Exclusions = NewExclusionsService(s)
146	s.Folders = NewFoldersService(s)
147	s.Locations = NewLocationsService(s)
148	s.Logs = NewLogsService(s)
149	s.MonitoredResourceDescriptors = NewMonitoredResourceDescriptorsService(s)
150	s.Organizations = NewOrganizationsService(s)
151	s.Projects = NewProjectsService(s)
152	s.Sinks = NewSinksService(s)
153	s.V2 = NewV2Service(s)
154	return s, nil
155}
156
157type Service struct {
158	client    *http.Client
159	BasePath  string // API endpoint base URL
160	UserAgent string // optional additional User-Agent fragment
161
162	BillingAccounts *BillingAccountsService
163
164	Entries *EntriesService
165
166	Exclusions *ExclusionsService
167
168	Folders *FoldersService
169
170	Locations *LocationsService
171
172	Logs *LogsService
173
174	MonitoredResourceDescriptors *MonitoredResourceDescriptorsService
175
176	Organizations *OrganizationsService
177
178	Projects *ProjectsService
179
180	Sinks *SinksService
181
182	V2 *V2Service
183}
184
185func (s *Service) userAgent() string {
186	if s.UserAgent == "" {
187		return googleapi.UserAgent
188	}
189	return googleapi.UserAgent + " " + s.UserAgent
190}
191
192func NewBillingAccountsService(s *Service) *BillingAccountsService {
193	rs := &BillingAccountsService{s: s}
194	rs.Buckets = NewBillingAccountsBucketsService(s)
195	rs.Exclusions = NewBillingAccountsExclusionsService(s)
196	rs.Locations = NewBillingAccountsLocationsService(s)
197	rs.Logs = NewBillingAccountsLogsService(s)
198	rs.Operations = NewBillingAccountsOperationsService(s)
199	rs.Sinks = NewBillingAccountsSinksService(s)
200	return rs
201}
202
203type BillingAccountsService struct {
204	s *Service
205
206	Buckets *BillingAccountsBucketsService
207
208	Exclusions *BillingAccountsExclusionsService
209
210	Locations *BillingAccountsLocationsService
211
212	Logs *BillingAccountsLogsService
213
214	Operations *BillingAccountsOperationsService
215
216	Sinks *BillingAccountsSinksService
217}
218
219func NewBillingAccountsBucketsService(s *Service) *BillingAccountsBucketsService {
220	rs := &BillingAccountsBucketsService{s: s}
221	rs.Views = NewBillingAccountsBucketsViewsService(s)
222	return rs
223}
224
225type BillingAccountsBucketsService struct {
226	s *Service
227
228	Views *BillingAccountsBucketsViewsService
229}
230
231func NewBillingAccountsBucketsViewsService(s *Service) *BillingAccountsBucketsViewsService {
232	rs := &BillingAccountsBucketsViewsService{s: s}
233	return rs
234}
235
236type BillingAccountsBucketsViewsService struct {
237	s *Service
238}
239
240func NewBillingAccountsExclusionsService(s *Service) *BillingAccountsExclusionsService {
241	rs := &BillingAccountsExclusionsService{s: s}
242	return rs
243}
244
245type BillingAccountsExclusionsService struct {
246	s *Service
247}
248
249func NewBillingAccountsLocationsService(s *Service) *BillingAccountsLocationsService {
250	rs := &BillingAccountsLocationsService{s: s}
251	rs.Buckets = NewBillingAccountsLocationsBucketsService(s)
252	rs.Operations = NewBillingAccountsLocationsOperationsService(s)
253	return rs
254}
255
256type BillingAccountsLocationsService struct {
257	s *Service
258
259	Buckets *BillingAccountsLocationsBucketsService
260
261	Operations *BillingAccountsLocationsOperationsService
262}
263
264func NewBillingAccountsLocationsBucketsService(s *Service) *BillingAccountsLocationsBucketsService {
265	rs := &BillingAccountsLocationsBucketsService{s: s}
266	rs.Views = NewBillingAccountsLocationsBucketsViewsService(s)
267	return rs
268}
269
270type BillingAccountsLocationsBucketsService struct {
271	s *Service
272
273	Views *BillingAccountsLocationsBucketsViewsService
274}
275
276func NewBillingAccountsLocationsBucketsViewsService(s *Service) *BillingAccountsLocationsBucketsViewsService {
277	rs := &BillingAccountsLocationsBucketsViewsService{s: s}
278	return rs
279}
280
281type BillingAccountsLocationsBucketsViewsService struct {
282	s *Service
283}
284
285func NewBillingAccountsLocationsOperationsService(s *Service) *BillingAccountsLocationsOperationsService {
286	rs := &BillingAccountsLocationsOperationsService{s: s}
287	return rs
288}
289
290type BillingAccountsLocationsOperationsService struct {
291	s *Service
292}
293
294func NewBillingAccountsLogsService(s *Service) *BillingAccountsLogsService {
295	rs := &BillingAccountsLogsService{s: s}
296	return rs
297}
298
299type BillingAccountsLogsService struct {
300	s *Service
301}
302
303func NewBillingAccountsOperationsService(s *Service) *BillingAccountsOperationsService {
304	rs := &BillingAccountsOperationsService{s: s}
305	return rs
306}
307
308type BillingAccountsOperationsService struct {
309	s *Service
310}
311
312func NewBillingAccountsSinksService(s *Service) *BillingAccountsSinksService {
313	rs := &BillingAccountsSinksService{s: s}
314	return rs
315}
316
317type BillingAccountsSinksService struct {
318	s *Service
319}
320
321func NewEntriesService(s *Service) *EntriesService {
322	rs := &EntriesService{s: s}
323	return rs
324}
325
326type EntriesService struct {
327	s *Service
328}
329
330func NewExclusionsService(s *Service) *ExclusionsService {
331	rs := &ExclusionsService{s: s}
332	return rs
333}
334
335type ExclusionsService struct {
336	s *Service
337}
338
339func NewFoldersService(s *Service) *FoldersService {
340	rs := &FoldersService{s: s}
341	rs.Exclusions = NewFoldersExclusionsService(s)
342	rs.Locations = NewFoldersLocationsService(s)
343	rs.Logs = NewFoldersLogsService(s)
344	rs.Sinks = NewFoldersSinksService(s)
345	return rs
346}
347
348type FoldersService struct {
349	s *Service
350
351	Exclusions *FoldersExclusionsService
352
353	Locations *FoldersLocationsService
354
355	Logs *FoldersLogsService
356
357	Sinks *FoldersSinksService
358}
359
360func NewFoldersExclusionsService(s *Service) *FoldersExclusionsService {
361	rs := &FoldersExclusionsService{s: s}
362	return rs
363}
364
365type FoldersExclusionsService struct {
366	s *Service
367}
368
369func NewFoldersLocationsService(s *Service) *FoldersLocationsService {
370	rs := &FoldersLocationsService{s: s}
371	rs.Buckets = NewFoldersLocationsBucketsService(s)
372	rs.Operations = NewFoldersLocationsOperationsService(s)
373	return rs
374}
375
376type FoldersLocationsService struct {
377	s *Service
378
379	Buckets *FoldersLocationsBucketsService
380
381	Operations *FoldersLocationsOperationsService
382}
383
384func NewFoldersLocationsBucketsService(s *Service) *FoldersLocationsBucketsService {
385	rs := &FoldersLocationsBucketsService{s: s}
386	rs.Views = NewFoldersLocationsBucketsViewsService(s)
387	return rs
388}
389
390type FoldersLocationsBucketsService struct {
391	s *Service
392
393	Views *FoldersLocationsBucketsViewsService
394}
395
396func NewFoldersLocationsBucketsViewsService(s *Service) *FoldersLocationsBucketsViewsService {
397	rs := &FoldersLocationsBucketsViewsService{s: s}
398	return rs
399}
400
401type FoldersLocationsBucketsViewsService struct {
402	s *Service
403}
404
405func NewFoldersLocationsOperationsService(s *Service) *FoldersLocationsOperationsService {
406	rs := &FoldersLocationsOperationsService{s: s}
407	return rs
408}
409
410type FoldersLocationsOperationsService struct {
411	s *Service
412}
413
414func NewFoldersLogsService(s *Service) *FoldersLogsService {
415	rs := &FoldersLogsService{s: s}
416	return rs
417}
418
419type FoldersLogsService struct {
420	s *Service
421}
422
423func NewFoldersSinksService(s *Service) *FoldersSinksService {
424	rs := &FoldersSinksService{s: s}
425	return rs
426}
427
428type FoldersSinksService struct {
429	s *Service
430}
431
432func NewLocationsService(s *Service) *LocationsService {
433	rs := &LocationsService{s: s}
434	rs.Buckets = NewLocationsBucketsService(s)
435	rs.Operations = NewLocationsOperationsService(s)
436	return rs
437}
438
439type LocationsService struct {
440	s *Service
441
442	Buckets *LocationsBucketsService
443
444	Operations *LocationsOperationsService
445}
446
447func NewLocationsBucketsService(s *Service) *LocationsBucketsService {
448	rs := &LocationsBucketsService{s: s}
449	rs.Views = NewLocationsBucketsViewsService(s)
450	return rs
451}
452
453type LocationsBucketsService struct {
454	s *Service
455
456	Views *LocationsBucketsViewsService
457}
458
459func NewLocationsBucketsViewsService(s *Service) *LocationsBucketsViewsService {
460	rs := &LocationsBucketsViewsService{s: s}
461	return rs
462}
463
464type LocationsBucketsViewsService struct {
465	s *Service
466}
467
468func NewLocationsOperationsService(s *Service) *LocationsOperationsService {
469	rs := &LocationsOperationsService{s: s}
470	return rs
471}
472
473type LocationsOperationsService struct {
474	s *Service
475}
476
477func NewLogsService(s *Service) *LogsService {
478	rs := &LogsService{s: s}
479	return rs
480}
481
482type LogsService struct {
483	s *Service
484}
485
486func NewMonitoredResourceDescriptorsService(s *Service) *MonitoredResourceDescriptorsService {
487	rs := &MonitoredResourceDescriptorsService{s: s}
488	return rs
489}
490
491type MonitoredResourceDescriptorsService struct {
492	s *Service
493}
494
495func NewOrganizationsService(s *Service) *OrganizationsService {
496	rs := &OrganizationsService{s: s}
497	rs.Exclusions = NewOrganizationsExclusionsService(s)
498	rs.Locations = NewOrganizationsLocationsService(s)
499	rs.Logs = NewOrganizationsLogsService(s)
500	rs.Sinks = NewOrganizationsSinksService(s)
501	return rs
502}
503
504type OrganizationsService struct {
505	s *Service
506
507	Exclusions *OrganizationsExclusionsService
508
509	Locations *OrganizationsLocationsService
510
511	Logs *OrganizationsLogsService
512
513	Sinks *OrganizationsSinksService
514}
515
516func NewOrganizationsExclusionsService(s *Service) *OrganizationsExclusionsService {
517	rs := &OrganizationsExclusionsService{s: s}
518	return rs
519}
520
521type OrganizationsExclusionsService struct {
522	s *Service
523}
524
525func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService {
526	rs := &OrganizationsLocationsService{s: s}
527	rs.Buckets = NewOrganizationsLocationsBucketsService(s)
528	rs.Operations = NewOrganizationsLocationsOperationsService(s)
529	return rs
530}
531
532type OrganizationsLocationsService struct {
533	s *Service
534
535	Buckets *OrganizationsLocationsBucketsService
536
537	Operations *OrganizationsLocationsOperationsService
538}
539
540func NewOrganizationsLocationsBucketsService(s *Service) *OrganizationsLocationsBucketsService {
541	rs := &OrganizationsLocationsBucketsService{s: s}
542	rs.Views = NewOrganizationsLocationsBucketsViewsService(s)
543	return rs
544}
545
546type OrganizationsLocationsBucketsService struct {
547	s *Service
548
549	Views *OrganizationsLocationsBucketsViewsService
550}
551
552func NewOrganizationsLocationsBucketsViewsService(s *Service) *OrganizationsLocationsBucketsViewsService {
553	rs := &OrganizationsLocationsBucketsViewsService{s: s}
554	return rs
555}
556
557type OrganizationsLocationsBucketsViewsService struct {
558	s *Service
559}
560
561func NewOrganizationsLocationsOperationsService(s *Service) *OrganizationsLocationsOperationsService {
562	rs := &OrganizationsLocationsOperationsService{s: s}
563	return rs
564}
565
566type OrganizationsLocationsOperationsService struct {
567	s *Service
568}
569
570func NewOrganizationsLogsService(s *Service) *OrganizationsLogsService {
571	rs := &OrganizationsLogsService{s: s}
572	return rs
573}
574
575type OrganizationsLogsService struct {
576	s *Service
577}
578
579func NewOrganizationsSinksService(s *Service) *OrganizationsSinksService {
580	rs := &OrganizationsSinksService{s: s}
581	return rs
582}
583
584type OrganizationsSinksService struct {
585	s *Service
586}
587
588func NewProjectsService(s *Service) *ProjectsService {
589	rs := &ProjectsService{s: s}
590	rs.Exclusions = NewProjectsExclusionsService(s)
591	rs.Locations = NewProjectsLocationsService(s)
592	rs.Logs = NewProjectsLogsService(s)
593	rs.Metrics = NewProjectsMetricsService(s)
594	rs.Sinks = NewProjectsSinksService(s)
595	return rs
596}
597
598type ProjectsService struct {
599	s *Service
600
601	Exclusions *ProjectsExclusionsService
602
603	Locations *ProjectsLocationsService
604
605	Logs *ProjectsLogsService
606
607	Metrics *ProjectsMetricsService
608
609	Sinks *ProjectsSinksService
610}
611
612func NewProjectsExclusionsService(s *Service) *ProjectsExclusionsService {
613	rs := &ProjectsExclusionsService{s: s}
614	return rs
615}
616
617type ProjectsExclusionsService struct {
618	s *Service
619}
620
621func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
622	rs := &ProjectsLocationsService{s: s}
623	rs.Buckets = NewProjectsLocationsBucketsService(s)
624	rs.Operations = NewProjectsLocationsOperationsService(s)
625	return rs
626}
627
628type ProjectsLocationsService struct {
629	s *Service
630
631	Buckets *ProjectsLocationsBucketsService
632
633	Operations *ProjectsLocationsOperationsService
634}
635
636func NewProjectsLocationsBucketsService(s *Service) *ProjectsLocationsBucketsService {
637	rs := &ProjectsLocationsBucketsService{s: s}
638	rs.Views = NewProjectsLocationsBucketsViewsService(s)
639	return rs
640}
641
642type ProjectsLocationsBucketsService struct {
643	s *Service
644
645	Views *ProjectsLocationsBucketsViewsService
646}
647
648func NewProjectsLocationsBucketsViewsService(s *Service) *ProjectsLocationsBucketsViewsService {
649	rs := &ProjectsLocationsBucketsViewsService{s: s}
650	return rs
651}
652
653type ProjectsLocationsBucketsViewsService struct {
654	s *Service
655}
656
657func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
658	rs := &ProjectsLocationsOperationsService{s: s}
659	return rs
660}
661
662type ProjectsLocationsOperationsService struct {
663	s *Service
664}
665
666func NewProjectsLogsService(s *Service) *ProjectsLogsService {
667	rs := &ProjectsLogsService{s: s}
668	return rs
669}
670
671type ProjectsLogsService struct {
672	s *Service
673}
674
675func NewProjectsMetricsService(s *Service) *ProjectsMetricsService {
676	rs := &ProjectsMetricsService{s: s}
677	return rs
678}
679
680type ProjectsMetricsService struct {
681	s *Service
682}
683
684func NewProjectsSinksService(s *Service) *ProjectsSinksService {
685	rs := &ProjectsSinksService{s: s}
686	return rs
687}
688
689type ProjectsSinksService struct {
690	s *Service
691}
692
693func NewSinksService(s *Service) *SinksService {
694	rs := &SinksService{s: s}
695	return rs
696}
697
698type SinksService struct {
699	s *Service
700}
701
702func NewV2Service(s *Service) *V2Service {
703	rs := &V2Service{s: s}
704	return rs
705}
706
707type V2Service struct {
708	s *Service
709}
710
711// BigQueryOptions: Options that change functionality of a sink
712// exporting data to BigQuery.
713type BigQueryOptions struct {
714	// UsePartitionedTables: Optional. Whether to use BigQuery's partition
715	// tables (https://cloud.google.com/bigquery/docs/partitioned-tables).
716	// By default, Cloud Logging creates dated tables based on the log
717	// entries' timestamps, e.g. syslog_20170523. With partitioned tables
718	// the date suffix is no longer present and special query syntax
719	// (https://cloud.google.com/bigquery/docs/querying-partitioned-tables)
720	// has to be used instead. In both cases, tables are sharded based on
721	// UTC timezone.
722	UsePartitionedTables bool `json:"usePartitionedTables,omitempty"`
723
724	// UsesTimestampColumnPartitioning: Output only. True if new timestamp
725	// column based partitioning is in use, false if legacy ingestion-time
726	// partitioning is in use.All new sinks will have this field set true
727	// and will use timestamp column based partitioning. If
728	// use_partitioned_tables is false, this value has no meaning and will
729	// be false. Legacy sinks using partitioned tables will have this field
730	// set to false.
731	UsesTimestampColumnPartitioning bool `json:"usesTimestampColumnPartitioning,omitempty"`
732
733	// ForceSendFields is a list of field names (e.g.
734	// "UsePartitionedTables") to unconditionally include in API requests.
735	// By default, fields with empty or default values are omitted from API
736	// requests. However, any non-pointer, non-interface field appearing in
737	// ForceSendFields will be sent to the server regardless of whether the
738	// field is empty or not. This may be used to include empty fields in
739	// Patch requests.
740	ForceSendFields []string `json:"-"`
741
742	// NullFields is a list of field names (e.g. "UsePartitionedTables") to
743	// include in API requests with the JSON null value. By default, fields
744	// with empty values are omitted from API requests. However, any field
745	// with an empty value appearing in NullFields will be sent to the
746	// server as null. It is an error if a field in this list has a
747	// non-empty value. This may be used to include null fields in Patch
748	// requests.
749	NullFields []string `json:"-"`
750}
751
752func (s *BigQueryOptions) MarshalJSON() ([]byte, error) {
753	type NoMethod BigQueryOptions
754	raw := NoMethod(*s)
755	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
756}
757
758// BucketOptions: BucketOptions describes the bucket boundaries used to
759// create a histogram for the distribution. The buckets can be in a
760// linear sequence, an exponential sequence, or each bucket can be
761// specified explicitly. BucketOptions does not include the number of
762// values in each bucket.A bucket has an inclusive lower bound and
763// exclusive upper bound for the values that are counted for that
764// bucket. The upper bound of a bucket must be strictly greater than the
765// lower bound. The sequence of N buckets for a distribution consists of
766// an underflow bucket (number 0), zero or more finite buckets (number 1
767// through N - 2) and an overflow bucket (number N - 1). The buckets are
768// contiguous: the lower bound of bucket i (i > 0) is the same as the
769// upper bound of bucket i - 1. The buckets span the whole range of
770// finite values: lower bound of the underflow bucket is -infinity and
771// the upper bound of the overflow bucket is +infinity. The finite
772// buckets are so-called because both bounds are finite.
773type BucketOptions struct {
774	// ExplicitBuckets: The explicit buckets.
775	ExplicitBuckets *Explicit `json:"explicitBuckets,omitempty"`
776
777	// ExponentialBuckets: The exponential buckets.
778	ExponentialBuckets *Exponential `json:"exponentialBuckets,omitempty"`
779
780	// LinearBuckets: The linear bucket.
781	LinearBuckets *Linear `json:"linearBuckets,omitempty"`
782
783	// ForceSendFields is a list of field names (e.g. "ExplicitBuckets") to
784	// unconditionally include in API requests. By default, fields with
785	// empty or default values are omitted from API requests. However, any
786	// non-pointer, non-interface field appearing in ForceSendFields will be
787	// sent to the server regardless of whether the field is empty or not.
788	// This may be used to include empty fields in Patch requests.
789	ForceSendFields []string `json:"-"`
790
791	// NullFields is a list of field names (e.g. "ExplicitBuckets") to
792	// include in API requests with the JSON null value. By default, fields
793	// with empty values are omitted from API requests. However, any field
794	// with an empty value appearing in NullFields will be sent to the
795	// server as null. It is an error if a field in this list has a
796	// non-empty value. This may be used to include null fields in Patch
797	// requests.
798	NullFields []string `json:"-"`
799}
800
801func (s *BucketOptions) MarshalJSON() ([]byte, error) {
802	type NoMethod BucketOptions
803	raw := NoMethod(*s)
804	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
805}
806
807// CancelOperationRequest: The request message for
808// Operations.CancelOperation.
809type CancelOperationRequest struct {
810}
811
812// CmekSettings: Describes the customer-managed encryption key (CMEK)
813// settings associated with a project, folder, organization, billing
814// account, or flexible resource.Note: CMEK for the Logs Router can
815// currently only be configured for GCP organizations. Once configured,
816// it applies to all projects and folders in the GCP organization.See
817// Enabling CMEK for Logs Router
818// (https://cloud.google.com/logging/docs/routing/managed-encryption)
819// for more information.
820type CmekSettings struct {
821	// KmsKeyName: The resource name for the configured Cloud KMS key.KMS
822	// key name format:
823	// "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoK
824	// eys/[KEY]" For
825	// example:"projects/my-project/locations/us-central1/keyRings/my-ring/cr
826	// yptoKeys/my-key"To enable CMEK for the Logs Router, set this field to
827	// a valid kms_key_name for which the associated service account has the
828	// required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for
829	// the key.The Cloud KMS key used by the Log Router can be updated by
830	// changing the kms_key_name to a new valid key name. Encryption
831	// operations that are in progress will be completed with the key that
832	// was in use when they started. Decryption operations will be completed
833	// using the key that was used at the time of encryption unless access
834	// to that key has been revoked.To disable CMEK for the Logs Router, set
835	// this field to an empty string.See Enabling CMEK for Logs Router
836	// (https://cloud.google.com/logging/docs/routing/managed-encryption)
837	// for more information.
838	KmsKeyName string `json:"kmsKeyName,omitempty"`
839
840	// Name: Output only. The resource name of the CMEK settings.
841	Name string `json:"name,omitempty"`
842
843	// ServiceAccountId: Output only. The service account that will be used
844	// by the Logs Router to access your Cloud KMS key.Before enabling CMEK
845	// for Logs Router, you must first assign the role
846	// roles/cloudkms.cryptoKeyEncrypterDecrypter to the service account
847	// that the Logs Router will use to access your Cloud KMS key. Use
848	// GetCmekSettings to obtain the service account ID.See Enabling CMEK
849	// for Logs Router
850	// (https://cloud.google.com/logging/docs/routing/managed-encryption)
851	// for more information.
852	ServiceAccountId string `json:"serviceAccountId,omitempty"`
853
854	// ServerResponse contains the HTTP response code and headers from the
855	// server.
856	googleapi.ServerResponse `json:"-"`
857
858	// ForceSendFields is a list of field names (e.g. "KmsKeyName") to
859	// unconditionally include in API requests. By default, fields with
860	// empty or default values are omitted from API requests. However, any
861	// non-pointer, non-interface field appearing in ForceSendFields will be
862	// sent to the server regardless of whether the field is empty or not.
863	// This may be used to include empty fields in Patch requests.
864	ForceSendFields []string `json:"-"`
865
866	// NullFields is a list of field names (e.g. "KmsKeyName") to include in
867	// API requests with the JSON null value. By default, fields with empty
868	// values are omitted from API requests. However, any field with an
869	// empty value appearing in NullFields will be sent to the server as
870	// null. It is an error if a field in this list has a non-empty value.
871	// This may be used to include null fields in Patch requests.
872	NullFields []string `json:"-"`
873}
874
875func (s *CmekSettings) MarshalJSON() ([]byte, error) {
876	type NoMethod CmekSettings
877	raw := NoMethod(*s)
878	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
879}
880
881// CopyLogEntriesMetadata: Metadata for CopyLogEntries long running
882// operations.
883type CopyLogEntriesMetadata struct {
884	// CancellationRequested: Identifies whether the user has requested
885	// cancellation of the operation.
886	CancellationRequested bool `json:"cancellationRequested,omitempty"`
887
888	// EndTime: The end time of an operation.
889	EndTime string `json:"endTime,omitempty"`
890
891	// Progress: Estimated progress of the operation (0 - 100%).
892	Progress int64 `json:"progress,omitempty"`
893
894	// Request: CopyLogEntries RPC request.
895	Request *CopyLogEntriesRequest `json:"request,omitempty"`
896
897	// StartTime: The create time of an operation.
898	StartTime string `json:"startTime,omitempty"`
899
900	// State: State of an operation.
901	//
902	// Possible values:
903	//   "OPERATION_STATE_UNSPECIFIED" - Should not be used.
904	//   "OPERATION_STATE_SCHEDULED" - The operation is scheduled.
905	//   "OPERATION_STATE_WAITING_FOR_PERMISSIONS" - Waiting for necessary
906	// permissions.
907	//   "OPERATION_STATE_RUNNING" - The operation is running.
908	//   "OPERATION_STATE_SUCCEEDED" - The operation was completed
909	// successfully.
910	//   "OPERATION_STATE_FAILED" - The operation failed.
911	//   "OPERATION_STATE_CANCELLED" - The operation was cancelled by the
912	// user.
913	State string `json:"state,omitempty"`
914
915	// WriterIdentity: The IAM identity of a service account that must be
916	// granted access to the destination.If the service account is not
917	// granted permission to the destination within an hour, the operation
918	// will be cancelled.For example: "serviceAccount:foo@bar.com"
919	WriterIdentity string `json:"writerIdentity,omitempty"`
920
921	// ForceSendFields is a list of field names (e.g.
922	// "CancellationRequested") to unconditionally include in API requests.
923	// By default, fields with empty or default values are omitted from API
924	// requests. However, any non-pointer, non-interface field appearing in
925	// ForceSendFields will be sent to the server regardless of whether the
926	// field is empty or not. This may be used to include empty fields in
927	// Patch requests.
928	ForceSendFields []string `json:"-"`
929
930	// NullFields is a list of field names (e.g. "CancellationRequested") to
931	// include in API requests with the JSON null value. By default, fields
932	// with empty values are omitted from API requests. However, any field
933	// with an empty value appearing in NullFields will be sent to the
934	// server as null. It is an error if a field in this list has a
935	// non-empty value. This may be used to include null fields in Patch
936	// requests.
937	NullFields []string `json:"-"`
938}
939
940func (s *CopyLogEntriesMetadata) MarshalJSON() ([]byte, error) {
941	type NoMethod CopyLogEntriesMetadata
942	raw := NoMethod(*s)
943	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
944}
945
946// CopyLogEntriesRequest: The parameters to CopyLogEntries.
947type CopyLogEntriesRequest struct {
948	// Destination: Required. Destination to which to copy log entries.
949	Destination string `json:"destination,omitempty"`
950
951	// Filter: Optional. A filter specifying which log entries to copy. The
952	// filter must be no more than 20k characters. An empty filter matches
953	// all log entries.
954	Filter string `json:"filter,omitempty"`
955
956	// Name: Required. Log bucket from which to copy log entries.For
957	// example:"projects/my-project/locations/global/buckets/my-source-bucket
958	// "
959	Name string `json:"name,omitempty"`
960
961	// ForceSendFields is a list of field names (e.g. "Destination") to
962	// unconditionally include in API requests. By default, fields with
963	// empty or default values are omitted from API requests. However, any
964	// non-pointer, non-interface field appearing in ForceSendFields will be
965	// sent to the server regardless of whether the field is empty or not.
966	// This may be used to include empty fields in Patch requests.
967	ForceSendFields []string `json:"-"`
968
969	// NullFields is a list of field names (e.g. "Destination") to include
970	// in API requests with the JSON null value. By default, fields with
971	// empty values are omitted from API requests. However, any field with
972	// an empty value appearing in NullFields will be sent to the server as
973	// null. It is an error if a field in this list has a non-empty value.
974	// This may be used to include null fields in Patch requests.
975	NullFields []string `json:"-"`
976}
977
978func (s *CopyLogEntriesRequest) MarshalJSON() ([]byte, error) {
979	type NoMethod CopyLogEntriesRequest
980	raw := NoMethod(*s)
981	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
982}
983
984// CopyLogEntriesResponse: Response type for CopyLogEntries long running
985// operations.
986type CopyLogEntriesResponse struct {
987	// LogEntriesCopiedCount: Number of log entries copied.
988	LogEntriesCopiedCount int64 `json:"logEntriesCopiedCount,omitempty,string"`
989
990	// ForceSendFields is a list of field names (e.g.
991	// "LogEntriesCopiedCount") to unconditionally include in API requests.
992	// By default, fields with empty or default values are omitted from API
993	// requests. However, any non-pointer, non-interface field appearing in
994	// ForceSendFields will be sent to the server regardless of whether the
995	// field is empty or not. This may be used to include empty fields in
996	// Patch requests.
997	ForceSendFields []string `json:"-"`
998
999	// NullFields is a list of field names (e.g. "LogEntriesCopiedCount") to
1000	// include in API requests with the JSON null value. By default, fields
1001	// with empty values are omitted from API requests. However, any field
1002	// with an empty value appearing in NullFields will be sent to the
1003	// server as null. It is an error if a field in this list has a
1004	// non-empty value. This may be used to include null fields in Patch
1005	// requests.
1006	NullFields []string `json:"-"`
1007}
1008
1009func (s *CopyLogEntriesResponse) MarshalJSON() ([]byte, error) {
1010	type NoMethod CopyLogEntriesResponse
1011	raw := NoMethod(*s)
1012	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1013}
1014
1015// Empty: A generic empty message that you can re-use to avoid defining
1016// duplicated empty messages in your APIs. A typical example is to use
1017// it as the request or the response type of an API method. For
1018// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
1019// (google.protobuf.Empty); } The JSON representation for Empty is empty
1020// JSON object {}.
1021type Empty struct {
1022	// ServerResponse contains the HTTP response code and headers from the
1023	// server.
1024	googleapi.ServerResponse `json:"-"`
1025}
1026
1027// Explicit: Specifies a set of buckets with arbitrary widths.There are
1028// size(bounds) + 1 (= N) buckets. Bucket i has the following
1029// boundaries:Upper bound (0 <= i < N-1): boundsi Lower bound (1 <= i <
1030// N); boundsi - 1The bounds field must contain at least one element. If
1031// bounds has only one element, then there are no finite buckets, and
1032// that single element is the common boundary of the overflow and
1033// underflow buckets.
1034type Explicit struct {
1035	// Bounds: The values must be monotonically increasing.
1036	Bounds []float64 `json:"bounds,omitempty"`
1037
1038	// ForceSendFields is a list of field names (e.g. "Bounds") to
1039	// unconditionally include in API requests. By default, fields with
1040	// empty or default values are omitted from API requests. However, any
1041	// non-pointer, non-interface field appearing in ForceSendFields will be
1042	// sent to the server regardless of whether the field is empty or not.
1043	// This may be used to include empty fields in Patch requests.
1044	ForceSendFields []string `json:"-"`
1045
1046	// NullFields is a list of field names (e.g. "Bounds") to include in API
1047	// requests with the JSON null value. By default, fields with empty
1048	// values are omitted from API requests. However, any field with an
1049	// empty value appearing in NullFields will be sent to the server as
1050	// null. It is an error if a field in this list has a non-empty value.
1051	// This may be used to include null fields in Patch requests.
1052	NullFields []string `json:"-"`
1053}
1054
1055func (s *Explicit) MarshalJSON() ([]byte, error) {
1056	type NoMethod Explicit
1057	raw := NoMethod(*s)
1058	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1059}
1060
1061// Exponential: Specifies an exponential sequence of buckets that have a
1062// width that is proportional to the value of the lower bound. Each
1063// bucket represents a constant relative uncertainty on a specific value
1064// in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket
1065// i has the following boundaries:Upper bound (0 <= i < N-1): scale *
1066// (growth_factor ^ i). Lower bound (1 <= i < N): scale * (growth_factor
1067// ^ (i - 1)).
1068type Exponential struct {
1069	// GrowthFactor: Must be greater than 1.
1070	GrowthFactor float64 `json:"growthFactor,omitempty"`
1071
1072	// NumFiniteBuckets: Must be greater than 0.
1073	NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
1074
1075	// Scale: Must be greater than 0.
1076	Scale float64 `json:"scale,omitempty"`
1077
1078	// ForceSendFields is a list of field names (e.g. "GrowthFactor") to
1079	// unconditionally include in API requests. By default, fields with
1080	// empty or default values are omitted from API requests. However, any
1081	// non-pointer, non-interface field appearing in ForceSendFields will be
1082	// sent to the server regardless of whether the field is empty or not.
1083	// This may be used to include empty fields in Patch requests.
1084	ForceSendFields []string `json:"-"`
1085
1086	// NullFields is a list of field names (e.g. "GrowthFactor") to include
1087	// in API requests with the JSON null value. By default, fields with
1088	// empty values are omitted from API requests. However, any field with
1089	// an empty value appearing in NullFields will be sent to the server as
1090	// null. It is an error if a field in this list has a non-empty value.
1091	// This may be used to include null fields in Patch requests.
1092	NullFields []string `json:"-"`
1093}
1094
1095func (s *Exponential) MarshalJSON() ([]byte, error) {
1096	type NoMethod Exponential
1097	raw := NoMethod(*s)
1098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1099}
1100
1101func (s *Exponential) UnmarshalJSON(data []byte) error {
1102	type NoMethod Exponential
1103	var s1 struct {
1104		GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"`
1105		Scale        gensupport.JSONFloat64 `json:"scale"`
1106		*NoMethod
1107	}
1108	s1.NoMethod = (*NoMethod)(s)
1109	if err := json.Unmarshal(data, &s1); err != nil {
1110		return err
1111	}
1112	s.GrowthFactor = float64(s1.GrowthFactor)
1113	s.Scale = float64(s1.Scale)
1114	return nil
1115}
1116
1117// HttpRequest: A common proto for logging HTTP requests. Only contains
1118// semantics defined by the HTTP specification. Product-specific logging
1119// information MUST be defined in a separate message.
1120type HttpRequest struct {
1121	// CacheFillBytes: The number of HTTP response bytes inserted into
1122	// cache. Set only when a cache fill was attempted.
1123	CacheFillBytes int64 `json:"cacheFillBytes,omitempty,string"`
1124
1125	// CacheHit: Whether or not an entity was served from cache (with or
1126	// without validation).
1127	CacheHit bool `json:"cacheHit,omitempty"`
1128
1129	// CacheLookup: Whether or not a cache lookup was attempted.
1130	CacheLookup bool `json:"cacheLookup,omitempty"`
1131
1132	// CacheValidatedWithOriginServer: Whether or not the response was
1133	// validated with the origin server before being served from cache. This
1134	// field is only meaningful if cache_hit is True.
1135	CacheValidatedWithOriginServer bool `json:"cacheValidatedWithOriginServer,omitempty"`
1136
1137	// Latency: The request processing latency on the server, from the time
1138	// the request was received until the response was sent.
1139	Latency string `json:"latency,omitempty"`
1140
1141	// Protocol: Protocol used for the request. Examples: "HTTP/1.1",
1142	// "HTTP/2", "websocket"
1143	Protocol string `json:"protocol,omitempty"`
1144
1145	// Referer: The referer URL of the request, as defined in HTTP/1.1
1146	// Header Field Definitions
1147	// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
1148	Referer string `json:"referer,omitempty"`
1149
1150	// RemoteIp: The IP address (IPv4 or IPv6) of the client that issued the
1151	// HTTP request. This field can include port information. Examples:
1152	// "192.168.1.1", "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329".
1153	RemoteIp string `json:"remoteIp,omitempty"`
1154
1155	// RequestMethod: The request method. Examples: "GET", "HEAD", "PUT",
1156	// "POST".
1157	RequestMethod string `json:"requestMethod,omitempty"`
1158
1159	// RequestSize: The size of the HTTP request message in bytes, including
1160	// the request headers and the request body.
1161	RequestSize int64 `json:"requestSize,omitempty,string"`
1162
1163	// RequestUrl: The scheme (http, https), the host name, the path and the
1164	// query portion of the URL that was requested. Example:
1165	// "http://example.com/some/info?color=red".
1166	RequestUrl string `json:"requestUrl,omitempty"`
1167
1168	// ResponseSize: The size of the HTTP response message sent back to the
1169	// client, in bytes, including the response headers and the response
1170	// body.
1171	ResponseSize int64 `json:"responseSize,omitempty,string"`
1172
1173	// ServerIp: The IP address (IPv4 or IPv6) of the origin server that the
1174	// request was sent to. This field can include port information.
1175	// Examples: "192.168.1.1", "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329".
1176	ServerIp string `json:"serverIp,omitempty"`
1177
1178	// Status: The response code indicating the status of response.
1179	// Examples: 200, 404.
1180	Status int64 `json:"status,omitempty"`
1181
1182	// UserAgent: The user agent sent by the client. Example: "Mozilla/4.0
1183	// (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".
1184	UserAgent string `json:"userAgent,omitempty"`
1185
1186	// ForceSendFields is a list of field names (e.g. "CacheFillBytes") to
1187	// unconditionally include in API requests. By default, fields with
1188	// empty or default values are omitted from API requests. However, any
1189	// non-pointer, non-interface field appearing in ForceSendFields will be
1190	// sent to the server regardless of whether the field is empty or not.
1191	// This may be used to include empty fields in Patch requests.
1192	ForceSendFields []string `json:"-"`
1193
1194	// NullFields is a list of field names (e.g. "CacheFillBytes") to
1195	// include in API requests with the JSON null value. By default, fields
1196	// with empty values are omitted from API requests. However, any field
1197	// with an empty value appearing in NullFields will be sent to the
1198	// server as null. It is an error if a field in this list has a
1199	// non-empty value. This may be used to include null fields in Patch
1200	// requests.
1201	NullFields []string `json:"-"`
1202}
1203
1204func (s *HttpRequest) MarshalJSON() ([]byte, error) {
1205	type NoMethod HttpRequest
1206	raw := NoMethod(*s)
1207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1208}
1209
1210// LabelDescriptor: A description of a label.
1211type LabelDescriptor struct {
1212	// Description: A human-readable description for the label.
1213	Description string `json:"description,omitempty"`
1214
1215	// Key: The label key.
1216	Key string `json:"key,omitempty"`
1217
1218	// ValueType: The type of data that can be assigned to the label.
1219	//
1220	// Possible values:
1221	//   "STRING" - A variable-length string. This is the default.
1222	//   "BOOL" - Boolean; true or false.
1223	//   "INT64" - A 64-bit signed integer.
1224	ValueType string `json:"valueType,omitempty"`
1225
1226	// ForceSendFields is a list of field names (e.g. "Description") to
1227	// unconditionally include in API requests. By default, fields with
1228	// empty or default values are omitted from API requests. However, any
1229	// non-pointer, non-interface field appearing in ForceSendFields will be
1230	// sent to the server regardless of whether the field is empty or not.
1231	// This may be used to include empty fields in Patch requests.
1232	ForceSendFields []string `json:"-"`
1233
1234	// NullFields is a list of field names (e.g. "Description") to include
1235	// in API requests with the JSON null value. By default, fields with
1236	// empty values are omitted from API requests. However, any field with
1237	// an empty value appearing in NullFields will be sent to the server as
1238	// null. It is an error if a field in this list has a non-empty value.
1239	// This may be used to include null fields in Patch requests.
1240	NullFields []string `json:"-"`
1241}
1242
1243func (s *LabelDescriptor) MarshalJSON() ([]byte, error) {
1244	type NoMethod LabelDescriptor
1245	raw := NoMethod(*s)
1246	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1247}
1248
1249// Linear: Specifies a linear sequence of buckets that all have the same
1250// width (except overflow and underflow). Each bucket represents a
1251// constant absolute uncertainty on the specific value in the
1252// bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has
1253// the following boundaries:Upper bound (0 <= i < N-1): offset + (width
1254// * i). Lower bound (1 <= i < N): offset + (width * (i - 1)).
1255type Linear struct {
1256	// NumFiniteBuckets: Must be greater than 0.
1257	NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
1258
1259	// Offset: Lower bound of the first bucket.
1260	Offset float64 `json:"offset,omitempty"`
1261
1262	// Width: Must be greater than 0.
1263	Width float64 `json:"width,omitempty"`
1264
1265	// ForceSendFields is a list of field names (e.g. "NumFiniteBuckets") to
1266	// unconditionally include in API requests. By default, fields with
1267	// empty or default values are omitted from API requests. However, any
1268	// non-pointer, non-interface field appearing in ForceSendFields will be
1269	// sent to the server regardless of whether the field is empty or not.
1270	// This may be used to include empty fields in Patch requests.
1271	ForceSendFields []string `json:"-"`
1272
1273	// NullFields is a list of field names (e.g. "NumFiniteBuckets") to
1274	// include in API requests with the JSON null value. By default, fields
1275	// with empty values are omitted from API requests. However, any field
1276	// with an empty value appearing in NullFields will be sent to the
1277	// server as null. It is an error if a field in this list has a
1278	// non-empty value. This may be used to include null fields in Patch
1279	// requests.
1280	NullFields []string `json:"-"`
1281}
1282
1283func (s *Linear) MarshalJSON() ([]byte, error) {
1284	type NoMethod Linear
1285	raw := NoMethod(*s)
1286	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1287}
1288
1289func (s *Linear) UnmarshalJSON(data []byte) error {
1290	type NoMethod Linear
1291	var s1 struct {
1292		Offset gensupport.JSONFloat64 `json:"offset"`
1293		Width  gensupport.JSONFloat64 `json:"width"`
1294		*NoMethod
1295	}
1296	s1.NoMethod = (*NoMethod)(s)
1297	if err := json.Unmarshal(data, &s1); err != nil {
1298		return err
1299	}
1300	s.Offset = float64(s1.Offset)
1301	s.Width = float64(s1.Width)
1302	return nil
1303}
1304
1305// ListBucketsResponse: The response from ListBuckets.
1306type ListBucketsResponse struct {
1307	// Buckets: A list of buckets.
1308	Buckets []*LogBucket `json:"buckets,omitempty"`
1309
1310	// NextPageToken: If there might be more results than appear in this
1311	// response, then nextPageToken is included. To get the next set of
1312	// results, call the same method again using the value of nextPageToken
1313	// as pageToken.
1314	NextPageToken string `json:"nextPageToken,omitempty"`
1315
1316	// ServerResponse contains the HTTP response code and headers from the
1317	// server.
1318	googleapi.ServerResponse `json:"-"`
1319
1320	// ForceSendFields is a list of field names (e.g. "Buckets") to
1321	// unconditionally include in API requests. By default, fields with
1322	// empty or default values are omitted from API requests. However, any
1323	// non-pointer, non-interface field appearing in ForceSendFields will be
1324	// sent to the server regardless of whether the field is empty or not.
1325	// This may be used to include empty fields in Patch requests.
1326	ForceSendFields []string `json:"-"`
1327
1328	// NullFields is a list of field names (e.g. "Buckets") to include in
1329	// API requests with the JSON null value. By default, fields with empty
1330	// values are omitted from API requests. However, any field with an
1331	// empty value appearing in NullFields will be sent to the server as
1332	// null. It is an error if a field in this list has a non-empty value.
1333	// This may be used to include null fields in Patch requests.
1334	NullFields []string `json:"-"`
1335}
1336
1337func (s *ListBucketsResponse) MarshalJSON() ([]byte, error) {
1338	type NoMethod ListBucketsResponse
1339	raw := NoMethod(*s)
1340	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1341}
1342
1343// ListExclusionsResponse: Result returned from ListExclusions.
1344type ListExclusionsResponse struct {
1345	// Exclusions: A list of exclusions.
1346	Exclusions []*LogExclusion `json:"exclusions,omitempty"`
1347
1348	// NextPageToken: If there might be more results than appear in this
1349	// response, then nextPageToken is included. To get the next set of
1350	// results, call the same method again using the value of nextPageToken
1351	// as pageToken.
1352	NextPageToken string `json:"nextPageToken,omitempty"`
1353
1354	// ServerResponse contains the HTTP response code and headers from the
1355	// server.
1356	googleapi.ServerResponse `json:"-"`
1357
1358	// ForceSendFields is a list of field names (e.g. "Exclusions") to
1359	// unconditionally include in API requests. By default, fields with
1360	// empty or default values are omitted from API requests. However, any
1361	// non-pointer, non-interface field appearing in ForceSendFields will be
1362	// sent to the server regardless of whether the field is empty or not.
1363	// This may be used to include empty fields in Patch requests.
1364	ForceSendFields []string `json:"-"`
1365
1366	// NullFields is a list of field names (e.g. "Exclusions") to include in
1367	// API requests with the JSON null value. By default, fields with empty
1368	// values are omitted from API requests. However, any field with an
1369	// empty value appearing in NullFields will be sent to the server as
1370	// null. It is an error if a field in this list has a non-empty value.
1371	// This may be used to include null fields in Patch requests.
1372	NullFields []string `json:"-"`
1373}
1374
1375func (s *ListExclusionsResponse) MarshalJSON() ([]byte, error) {
1376	type NoMethod ListExclusionsResponse
1377	raw := NoMethod(*s)
1378	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1379}
1380
1381// ListLocationsResponse: The response message for
1382// Locations.ListLocations.
1383type ListLocationsResponse struct {
1384	// Locations: A list of locations that matches the specified filter in
1385	// the request.
1386	Locations []*Location `json:"locations,omitempty"`
1387
1388	// NextPageToken: The standard List next-page token.
1389	NextPageToken string `json:"nextPageToken,omitempty"`
1390
1391	// ServerResponse contains the HTTP response code and headers from the
1392	// server.
1393	googleapi.ServerResponse `json:"-"`
1394
1395	// ForceSendFields is a list of field names (e.g. "Locations") to
1396	// unconditionally include in API requests. By default, fields with
1397	// empty or default values are omitted from API requests. However, any
1398	// non-pointer, non-interface field appearing in ForceSendFields will be
1399	// sent to the server regardless of whether the field is empty or not.
1400	// This may be used to include empty fields in Patch requests.
1401	ForceSendFields []string `json:"-"`
1402
1403	// NullFields is a list of field names (e.g. "Locations") to include in
1404	// API requests with the JSON null value. By default, fields with empty
1405	// values are omitted from API requests. However, any field with an
1406	// empty value appearing in NullFields will be sent to the server as
1407	// null. It is an error if a field in this list has a non-empty value.
1408	// This may be used to include null fields in Patch requests.
1409	NullFields []string `json:"-"`
1410}
1411
1412func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
1413	type NoMethod ListLocationsResponse
1414	raw := NoMethod(*s)
1415	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1416}
1417
1418// ListLogEntriesRequest: The parameters to ListLogEntries.
1419type ListLogEntriesRequest struct {
1420	// Filter: Optional. A filter that chooses which log entries to return.
1421	// See Advanced Logs Queries
1422	// (https://cloud.google.com/logging/docs/view/advanced-queries). Only
1423	// log entries that match the filter are returned. An empty filter
1424	// matches all log entries in the resources listed in resource_names.
1425	// Referencing a parent resource that is not listed in resource_names
1426	// will cause the filter to return no results. The maximum length of the
1427	// filter is 20000 characters.
1428	Filter string `json:"filter,omitempty"`
1429
1430	// OrderBy: Optional. How the results should be sorted. Presently, the
1431	// only permitted values are "timestamp asc" (default) and "timestamp
1432	// desc". The first option returns entries in order of increasing values
1433	// of LogEntry.timestamp (oldest first), and the second option returns
1434	// entries in order of decreasing timestamps (newest first). Entries
1435	// with equal timestamps are returned in order of their insert_id
1436	// values.
1437	OrderBy string `json:"orderBy,omitempty"`
1438
1439	// PageSize: Optional. The maximum number of results to return from this
1440	// request. Default is 50. If the value is negative or exceeds 1000, the
1441	// request is rejected. The presence of next_page_token in the response
1442	// indicates that more results might be available.
1443	PageSize int64 `json:"pageSize,omitempty"`
1444
1445	// PageToken: Optional. If present, then retrieve the next batch of
1446	// results from the preceding call to this method. page_token must be
1447	// the value of next_page_token from the previous response. The values
1448	// of other method parameters should be identical to those in the
1449	// previous call.
1450	PageToken string `json:"pageToken,omitempty"`
1451
1452	// ProjectIds: Optional. Deprecated. Use resource_names instead. One or
1453	// more project identifiers or project numbers from which to retrieve
1454	// log entries. Example: "my-project-1A".
1455	ProjectIds []string `json:"projectIds,omitempty"`
1456
1457	// ResourceNames: Required. Names of one or more parent resources from
1458	// which to retrieve log entries: projects/[PROJECT_ID]
1459	// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
1460	// folders/[FOLDER_ID]May alternatively be one or more views:
1461	// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/view
1462	// s/[VIEW_ID]
1463	// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKE
1464	// T_ID]/views/[VIEW_ID]
1465	// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[
1466	// BUCKET_ID]/views/[VIEW_ID]
1467	// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/
1468	// [VIEW_ID]Projects listed in the project_ids field are added to this
1469	// list.
1470	ResourceNames []string `json:"resourceNames,omitempty"`
1471
1472	// ForceSendFields is a list of field names (e.g. "Filter") to
1473	// unconditionally include in API requests. By default, fields with
1474	// empty or default values are omitted from API requests. However, any
1475	// non-pointer, non-interface field appearing in ForceSendFields will be
1476	// sent to the server regardless of whether the field is empty or not.
1477	// This may be used to include empty fields in Patch requests.
1478	ForceSendFields []string `json:"-"`
1479
1480	// NullFields is a list of field names (e.g. "Filter") to include in API
1481	// requests with the JSON null value. By default, fields with empty
1482	// values are omitted from API requests. However, any field with an
1483	// empty value appearing in NullFields will be sent to the server as
1484	// null. It is an error if a field in this list has a non-empty value.
1485	// This may be used to include null fields in Patch requests.
1486	NullFields []string `json:"-"`
1487}
1488
1489func (s *ListLogEntriesRequest) MarshalJSON() ([]byte, error) {
1490	type NoMethod ListLogEntriesRequest
1491	raw := NoMethod(*s)
1492	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1493}
1494
1495// ListLogEntriesResponse: Result returned from ListLogEntries.
1496type ListLogEntriesResponse struct {
1497	// Entries: A list of log entries. If entries is empty, nextPageToken
1498	// may still be returned, indicating that more entries may exist. See
1499	// nextPageToken for more information.
1500	Entries []*LogEntry `json:"entries,omitempty"`
1501
1502	// NextPageToken: If there might be more results than those appearing in
1503	// this response, then nextPageToken is included. To get the next set of
1504	// results, call this method again using the value of nextPageToken as
1505	// pageToken.If a value for next_page_token appears and the entries
1506	// field is empty, it means that the search found no log entries so far
1507	// but it did not have time to search all the possible log entries.
1508	// Retry the method with this value for page_token to continue the
1509	// search. Alternatively, consider speeding up the search by changing
1510	// your filter to specify a single log name or resource type, or to
1511	// narrow the time range of the search.
1512	NextPageToken string `json:"nextPageToken,omitempty"`
1513
1514	// ServerResponse contains the HTTP response code and headers from the
1515	// server.
1516	googleapi.ServerResponse `json:"-"`
1517
1518	// ForceSendFields is a list of field names (e.g. "Entries") to
1519	// unconditionally include in API requests. By default, fields with
1520	// empty or default values are omitted from API requests. However, any
1521	// non-pointer, non-interface field appearing in ForceSendFields will be
1522	// sent to the server regardless of whether the field is empty or not.
1523	// This may be used to include empty fields in Patch requests.
1524	ForceSendFields []string `json:"-"`
1525
1526	// NullFields is a list of field names (e.g. "Entries") to include in
1527	// API requests with the JSON null value. By default, fields with empty
1528	// values are omitted from API requests. However, any field with an
1529	// empty value appearing in NullFields will be sent to the server as
1530	// null. It is an error if a field in this list has a non-empty value.
1531	// This may be used to include null fields in Patch requests.
1532	NullFields []string `json:"-"`
1533}
1534
1535func (s *ListLogEntriesResponse) MarshalJSON() ([]byte, error) {
1536	type NoMethod ListLogEntriesResponse
1537	raw := NoMethod(*s)
1538	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1539}
1540
1541// ListLogMetricsResponse: Result returned from ListLogMetrics.
1542type ListLogMetricsResponse struct {
1543	// Metrics: A list of logs-based metrics.
1544	Metrics []*LogMetric `json:"metrics,omitempty"`
1545
1546	// NextPageToken: If there might be more results than appear in this
1547	// response, then nextPageToken is included. To get the next set of
1548	// results, call this method again using the value of nextPageToken as
1549	// pageToken.
1550	NextPageToken string `json:"nextPageToken,omitempty"`
1551
1552	// ServerResponse contains the HTTP response code and headers from the
1553	// server.
1554	googleapi.ServerResponse `json:"-"`
1555
1556	// ForceSendFields is a list of field names (e.g. "Metrics") to
1557	// unconditionally include in API requests. By default, fields with
1558	// empty or default values are omitted from API requests. However, any
1559	// non-pointer, non-interface field appearing in ForceSendFields will be
1560	// sent to the server regardless of whether the field is empty or not.
1561	// This may be used to include empty fields in Patch requests.
1562	ForceSendFields []string `json:"-"`
1563
1564	// NullFields is a list of field names (e.g. "Metrics") to include in
1565	// API requests with the JSON null value. By default, fields with empty
1566	// values are omitted from API requests. However, any field with an
1567	// empty value appearing in NullFields will be sent to the server as
1568	// null. It is an error if a field in this list has a non-empty value.
1569	// This may be used to include null fields in Patch requests.
1570	NullFields []string `json:"-"`
1571}
1572
1573func (s *ListLogMetricsResponse) MarshalJSON() ([]byte, error) {
1574	type NoMethod ListLogMetricsResponse
1575	raw := NoMethod(*s)
1576	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1577}
1578
1579// ListLogsResponse: Result returned from ListLogs.
1580type ListLogsResponse struct {
1581	// LogNames: A list of log names. For example,
1582	// "projects/my-project/logs/syslog" or
1583	// "organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity
1584	// ".
1585	LogNames []string `json:"logNames,omitempty"`
1586
1587	// NextPageToken: If there might be more results than those appearing in
1588	// this response, then nextPageToken is included. To get the next set of
1589	// results, call this method again using the value of nextPageToken as
1590	// pageToken.
1591	NextPageToken string `json:"nextPageToken,omitempty"`
1592
1593	// ServerResponse contains the HTTP response code and headers from the
1594	// server.
1595	googleapi.ServerResponse `json:"-"`
1596
1597	// ForceSendFields is a list of field names (e.g. "LogNames") to
1598	// unconditionally include in API requests. By default, fields with
1599	// empty or default values are omitted from API requests. However, any
1600	// non-pointer, non-interface field appearing in ForceSendFields will be
1601	// sent to the server regardless of whether the field is empty or not.
1602	// This may be used to include empty fields in Patch requests.
1603	ForceSendFields []string `json:"-"`
1604
1605	// NullFields is a list of field names (e.g. "LogNames") to include in
1606	// API requests with the JSON null value. By default, fields with empty
1607	// values are omitted from API requests. However, any field with an
1608	// empty value appearing in NullFields will be sent to the server as
1609	// null. It is an error if a field in this list has a non-empty value.
1610	// This may be used to include null fields in Patch requests.
1611	NullFields []string `json:"-"`
1612}
1613
1614func (s *ListLogsResponse) MarshalJSON() ([]byte, error) {
1615	type NoMethod ListLogsResponse
1616	raw := NoMethod(*s)
1617	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1618}
1619
1620// ListMonitoredResourceDescriptorsResponse: Result returned from
1621// ListMonitoredResourceDescriptors.
1622type ListMonitoredResourceDescriptorsResponse struct {
1623	// NextPageToken: If there might be more results than those appearing in
1624	// this response, then nextPageToken is included. To get the next set of
1625	// results, call this method again using the value of nextPageToken as
1626	// pageToken.
1627	NextPageToken string `json:"nextPageToken,omitempty"`
1628
1629	// ResourceDescriptors: A list of resource descriptors.
1630	ResourceDescriptors []*MonitoredResourceDescriptor `json:"resourceDescriptors,omitempty"`
1631
1632	// ServerResponse contains the HTTP response code and headers from the
1633	// server.
1634	googleapi.ServerResponse `json:"-"`
1635
1636	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1637	// unconditionally include in API requests. By default, fields with
1638	// empty or default values are omitted from API requests. However, any
1639	// non-pointer, non-interface field appearing in ForceSendFields will be
1640	// sent to the server regardless of whether the field is empty or not.
1641	// This may be used to include empty fields in Patch requests.
1642	ForceSendFields []string `json:"-"`
1643
1644	// NullFields is a list of field names (e.g. "NextPageToken") to include
1645	// in API requests with the JSON null value. By default, fields with
1646	// empty values are omitted from API requests. However, any field with
1647	// an empty value appearing in NullFields will be sent to the server as
1648	// null. It is an error if a field in this list has a non-empty value.
1649	// This may be used to include null fields in Patch requests.
1650	NullFields []string `json:"-"`
1651}
1652
1653func (s *ListMonitoredResourceDescriptorsResponse) MarshalJSON() ([]byte, error) {
1654	type NoMethod ListMonitoredResourceDescriptorsResponse
1655	raw := NoMethod(*s)
1656	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1657}
1658
1659// ListOperationsResponse: The response message for
1660// Operations.ListOperations.
1661type ListOperationsResponse struct {
1662	// NextPageToken: The standard List next-page token.
1663	NextPageToken string `json:"nextPageToken,omitempty"`
1664
1665	// Operations: A list of operations that matches the specified filter in
1666	// the request.
1667	Operations []*Operation `json:"operations,omitempty"`
1668
1669	// ServerResponse contains the HTTP response code and headers from the
1670	// server.
1671	googleapi.ServerResponse `json:"-"`
1672
1673	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1674	// unconditionally include in API requests. By default, fields with
1675	// empty or default values are omitted from API requests. However, any
1676	// non-pointer, non-interface field appearing in ForceSendFields will be
1677	// sent to the server regardless of whether the field is empty or not.
1678	// This may be used to include empty fields in Patch requests.
1679	ForceSendFields []string `json:"-"`
1680
1681	// NullFields is a list of field names (e.g. "NextPageToken") to include
1682	// in API requests with the JSON null value. By default, fields with
1683	// empty values are omitted from API requests. However, any field with
1684	// an empty value appearing in NullFields will be sent to the server as
1685	// null. It is an error if a field in this list has a non-empty value.
1686	// This may be used to include null fields in Patch requests.
1687	NullFields []string `json:"-"`
1688}
1689
1690func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
1691	type NoMethod ListOperationsResponse
1692	raw := NoMethod(*s)
1693	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1694}
1695
1696// ListSinksResponse: Result returned from ListSinks.
1697type ListSinksResponse struct {
1698	// NextPageToken: If there might be more results than appear in this
1699	// response, then nextPageToken is included. To get the next set of
1700	// results, call the same method again using the value of nextPageToken
1701	// as pageToken.
1702	NextPageToken string `json:"nextPageToken,omitempty"`
1703
1704	// Sinks: A list of sinks.
1705	Sinks []*LogSink `json:"sinks,omitempty"`
1706
1707	// ServerResponse contains the HTTP response code and headers from the
1708	// server.
1709	googleapi.ServerResponse `json:"-"`
1710
1711	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1712	// unconditionally include in API requests. By default, fields with
1713	// empty or default values are omitted from API requests. However, any
1714	// non-pointer, non-interface field appearing in ForceSendFields will be
1715	// sent to the server regardless of whether the field is empty or not.
1716	// This may be used to include empty fields in Patch requests.
1717	ForceSendFields []string `json:"-"`
1718
1719	// NullFields is a list of field names (e.g. "NextPageToken") to include
1720	// in API requests with the JSON null value. By default, fields with
1721	// empty values are omitted from API requests. However, any field with
1722	// an empty value appearing in NullFields will be sent to the server as
1723	// null. It is an error if a field in this list has a non-empty value.
1724	// This may be used to include null fields in Patch requests.
1725	NullFields []string `json:"-"`
1726}
1727
1728func (s *ListSinksResponse) MarshalJSON() ([]byte, error) {
1729	type NoMethod ListSinksResponse
1730	raw := NoMethod(*s)
1731	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1732}
1733
1734// ListViewsResponse: The response from ListViews.
1735type ListViewsResponse struct {
1736	// NextPageToken: If there might be more results than appear in this
1737	// response, then nextPageToken is included. To get the next set of
1738	// results, call the same method again using the value of nextPageToken
1739	// as pageToken.
1740	NextPageToken string `json:"nextPageToken,omitempty"`
1741
1742	// Views: A list of views.
1743	Views []*LogView `json:"views,omitempty"`
1744
1745	// ServerResponse contains the HTTP response code and headers from the
1746	// server.
1747	googleapi.ServerResponse `json:"-"`
1748
1749	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1750	// unconditionally include in API requests. By default, fields with
1751	// empty or default values are omitted from API requests. However, any
1752	// non-pointer, non-interface field appearing in ForceSendFields will be
1753	// sent to the server regardless of whether the field is empty or not.
1754	// This may be used to include empty fields in Patch requests.
1755	ForceSendFields []string `json:"-"`
1756
1757	// NullFields is a list of field names (e.g. "NextPageToken") to include
1758	// in API requests with the JSON null value. By default, fields with
1759	// empty values are omitted from API requests. However, any field with
1760	// an empty value appearing in NullFields will be sent to the server as
1761	// null. It is an error if a field in this list has a non-empty value.
1762	// This may be used to include null fields in Patch requests.
1763	NullFields []string `json:"-"`
1764}
1765
1766func (s *ListViewsResponse) MarshalJSON() ([]byte, error) {
1767	type NoMethod ListViewsResponse
1768	raw := NoMethod(*s)
1769	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1770}
1771
1772// Location: A resource that represents Google Cloud Platform location.
1773type Location struct {
1774	// DisplayName: The friendly name for this location, typically a nearby
1775	// city name. For example, "Tokyo".
1776	DisplayName string `json:"displayName,omitempty"`
1777
1778	// Labels: Cross-service attributes for the location. For example
1779	// {"cloud.googleapis.com/region": "us-east1"}
1780	Labels map[string]string `json:"labels,omitempty"`
1781
1782	// LocationId: The canonical id for this location. For example:
1783	// "us-east1".
1784	LocationId string `json:"locationId,omitempty"`
1785
1786	// Metadata: Service-specific metadata. For example the available
1787	// capacity at the given location.
1788	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1789
1790	// Name: Resource name for the location, which may vary between
1791	// implementations. For example:
1792	// "projects/example-project/locations/us-east1"
1793	Name string `json:"name,omitempty"`
1794
1795	// ServerResponse contains the HTTP response code and headers from the
1796	// server.
1797	googleapi.ServerResponse `json:"-"`
1798
1799	// ForceSendFields is a list of field names (e.g. "DisplayName") to
1800	// unconditionally include in API requests. By default, fields with
1801	// empty or default values are omitted from API requests. However, any
1802	// non-pointer, non-interface field appearing in ForceSendFields will be
1803	// sent to the server regardless of whether the field is empty or not.
1804	// This may be used to include empty fields in Patch requests.
1805	ForceSendFields []string `json:"-"`
1806
1807	// NullFields is a list of field names (e.g. "DisplayName") to include
1808	// in API requests with the JSON null value. By default, fields with
1809	// empty values are omitted from API requests. However, any field with
1810	// an empty value appearing in NullFields will be sent to the server as
1811	// null. It is an error if a field in this list has a non-empty value.
1812	// This may be used to include null fields in Patch requests.
1813	NullFields []string `json:"-"`
1814}
1815
1816func (s *Location) MarshalJSON() ([]byte, error) {
1817	type NoMethod Location
1818	raw := NoMethod(*s)
1819	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1820}
1821
1822// LogBucket: Describes a repository in which log entries are stored.
1823type LogBucket struct {
1824	// CreateTime: Output only. The creation timestamp of the bucket. This
1825	// is not set for any of the default buckets.
1826	CreateTime string `json:"createTime,omitempty"`
1827
1828	// Description: Describes this bucket.
1829	Description string `json:"description,omitempty"`
1830
1831	// LifecycleState: Output only. The bucket lifecycle state.
1832	//
1833	// Possible values:
1834	//   "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified state. This is only
1835	// used/useful for distinguishing unset values.
1836	//   "ACTIVE" - The normal and active state.
1837	//   "DELETE_REQUESTED" - The bucket has been marked for deletion by the
1838	// user.
1839	LifecycleState string `json:"lifecycleState,omitempty"`
1840
1841	// Locked: Whether the bucket is locked.The retention period on a locked
1842	// bucket cannot be changed. Locked buckets may only be deleted if they
1843	// are empty.
1844	Locked bool `json:"locked,omitempty"`
1845
1846	// Name: Output only. The resource name of the bucket.For
1847	// example:projects/my-project/locations/global/buckets/my-bucketFor a
1848	// list of supported locations, see Supported Regions
1849	// (https://cloud.google.com/logging/docs/region-support)For the
1850	// location of global it is unspecified where log entries are actually
1851	// stored.After a bucket has been created, the location cannot be
1852	// changed.
1853	Name string `json:"name,omitempty"`
1854
1855	// RestrictedFields: Log entry field paths that are denied access in
1856	// this bucket.The following fields and their children are eligible:
1857	// textPayload, jsonPayload, protoPayload, httpRequest, labels,
1858	// sourceLocation.Restricting a repeated field will restrict all values.
1859	// Adding a parent will block all child fields. (e.g. foo.bar will block
1860	// foo.bar.baz)
1861	RestrictedFields []string `json:"restrictedFields,omitempty"`
1862
1863	// RetentionDays: Logs will be retained by default for this amount of
1864	// time, after which they will automatically be deleted. The minimum
1865	// retention period is 1 day. If this value is set to zero at bucket
1866	// creation time, the default time of 30 days will be used.
1867	RetentionDays int64 `json:"retentionDays,omitempty"`
1868
1869	// UpdateTime: Output only. The last update timestamp of the bucket.
1870	UpdateTime string `json:"updateTime,omitempty"`
1871
1872	// ServerResponse contains the HTTP response code and headers from the
1873	// server.
1874	googleapi.ServerResponse `json:"-"`
1875
1876	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1877	// unconditionally include in API requests. By default, fields with
1878	// empty or default values are omitted from API requests. However, any
1879	// non-pointer, non-interface field appearing in ForceSendFields will be
1880	// sent to the server regardless of whether the field is empty or not.
1881	// This may be used to include empty fields in Patch requests.
1882	ForceSendFields []string `json:"-"`
1883
1884	// NullFields is a list of field names (e.g. "CreateTime") to include in
1885	// API requests with the JSON null value. By default, fields with empty
1886	// values are omitted from API requests. However, any field with an
1887	// empty value appearing in NullFields will be sent to the server as
1888	// null. It is an error if a field in this list has a non-empty value.
1889	// This may be used to include null fields in Patch requests.
1890	NullFields []string `json:"-"`
1891}
1892
1893func (s *LogBucket) MarshalJSON() ([]byte, error) {
1894	type NoMethod LogBucket
1895	raw := NoMethod(*s)
1896	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1897}
1898
1899// LogEntry: An individual entry in a log.
1900type LogEntry struct {
1901	// HttpRequest: Optional. Information about the HTTP request associated
1902	// with this log entry, if applicable.
1903	HttpRequest *HttpRequest `json:"httpRequest,omitempty"`
1904
1905	// InsertId: Optional. A unique identifier for the log entry. If you
1906	// provide a value, then Logging considers other log entries in the same
1907	// project, with the same timestamp, and with the same insert_id to be
1908	// duplicates which are removed in a single query result. However, there
1909	// are no guarantees of de-duplication in the export of logs.If the
1910	// insert_id is omitted when writing a log entry, the Logging API
1911	// assigns its own unique identifier in this field.In queries, the
1912	// insert_id is also used to order log entries that have the same
1913	// log_name and timestamp values.
1914	InsertId string `json:"insertId,omitempty"`
1915
1916	// JsonPayload: The log entry payload, represented as a structure that
1917	// is expressed as a JSON object.
1918	JsonPayload googleapi.RawMessage `json:"jsonPayload,omitempty"`
1919
1920	// Labels: Optional. A map of key, value pairs that provides additional
1921	// information about the log entry. The labels can be user-defined or
1922	// system-defined.User-defined labels are arbitrary key, value pairs
1923	// that you can use to classify logs.System-defined labels are defined
1924	// by GCP services for platform logs. They have two components - a
1925	// service namespace component and the attribute name. For example:
1926	// compute.googleapis.com/resource_name.Cloud Logging truncates label
1927	// keys that exceed 512 B and label values that exceed 64 KB upon their
1928	// associated log entry being written. The truncation is indicated by an
1929	// ellipsis at the end of the character string.
1930	Labels map[string]string `json:"labels,omitempty"`
1931
1932	// LogName: Required. The resource name of the log to which this log
1933	// entry belongs: "projects/[PROJECT_ID]/logs/[LOG_ID]"
1934	// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
1935	// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
1936	// "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may be used in
1937	// place of PROJECT_ID. The project number is translated to its
1938	// corresponding PROJECT_ID internally and the log_name field will
1939	// contain PROJECT_ID in queries and exports.[LOG_ID] must be
1940	// URL-encoded within log_name. Example:
1941	// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Fa
1942	// ctivity".[LOG_ID] must be less than 512 characters long and can only
1943	// include the following characters: upper and lower case alphanumeric
1944	// characters, forward-slash, underscore, hyphen, and period.For
1945	// backward compatibility, if log_name begins with a forward-slash, such
1946	// as /projects/..., then the log entry is ingested as usual, but the
1947	// forward-slash is removed. Listing the log entry will not show the
1948	// leading slash and filtering for a log name with a leading slash will
1949	// never return any results.
1950	LogName string `json:"logName,omitempty"`
1951
1952	// Metadata: Output only. Deprecated. This field is not used by Logging.
1953	// Any value written to it is cleared.
1954	Metadata *MonitoredResourceMetadata `json:"metadata,omitempty"`
1955
1956	// Operation: Optional. Information about an operation associated with
1957	// the log entry, if applicable.
1958	Operation *LogEntryOperation `json:"operation,omitempty"`
1959
1960	// ProtoPayload: The log entry payload, represented as a protocol
1961	// buffer. Some Google Cloud Platform services use this field for their
1962	// log entry payloads.The following protocol buffer types are supported;
1963	// user-defined types are not
1964	// supported:"type.googleapis.com/google.cloud.audit.AuditLog"
1965	// "type.googleapis.com/google.appengine.logging.v1.RequestLog"
1966	ProtoPayload googleapi.RawMessage `json:"protoPayload,omitempty"`
1967
1968	// ReceiveTimestamp: Output only. The time the log entry was received by
1969	// Logging.
1970	ReceiveTimestamp string `json:"receiveTimestamp,omitempty"`
1971
1972	// Resource: Required. The monitored resource that produced this log
1973	// entry.Example: a log entry that reports a database error would be
1974	// associated with the monitored resource designating the particular
1975	// database that reported the error.
1976	Resource *MonitoredResource `json:"resource,omitempty"`
1977
1978	// Severity: Optional. The severity of the log entry. The default value
1979	// is LogSeverity.DEFAULT.
1980	//
1981	// Possible values:
1982	//   "DEFAULT" - (0) The log entry has no assigned severity level.
1983	//   "DEBUG" - (100) Debug or trace information.
1984	//   "INFO" - (200) Routine information, such as ongoing status or
1985	// performance.
1986	//   "NOTICE" - (300) Normal but significant events, such as start up,
1987	// shut down, or a configuration change.
1988	//   "WARNING" - (400) Warning events might cause problems.
1989	//   "ERROR" - (500) Error events are likely to cause problems.
1990	//   "CRITICAL" - (600) Critical events cause more severe problems or
1991	// outages.
1992	//   "ALERT" - (700) A person must take an action immediately.
1993	//   "EMERGENCY" - (800) One or more systems are unusable.
1994	Severity string `json:"severity,omitempty"`
1995
1996	// SourceLocation: Optional. Source code location information associated
1997	// with the log entry, if any.
1998	SourceLocation *LogEntrySourceLocation `json:"sourceLocation,omitempty"`
1999
2000	// SpanId: Optional. The span ID within the trace associated with the
2001	// log entry.For Trace spans, this is the same format that the Trace API
2002	// v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
2003	// as 000000000000004a.
2004	SpanId string `json:"spanId,omitempty"`
2005
2006	// TextPayload: The log entry payload, represented as a Unicode string
2007	// (UTF-8).
2008	TextPayload string `json:"textPayload,omitempty"`
2009
2010	// Timestamp: Optional. The time the event described by the log entry
2011	// occurred. This time is used to compute the log entry's age and to
2012	// enforce the logs retention period. If this field is omitted in a new
2013	// log entry, then Logging assigns it the current time. Timestamps have
2014	// nanosecond accuracy, but trailing zeros in the fractional seconds
2015	// might be omitted when the timestamp is displayed.Incoming log entries
2016	// must have timestamps that don't exceed the logs retention period
2017	// (https://cloud.google.com/logging/quotas#logs_retention_periods) in
2018	// the past, and that don't exceed 24 hours in the future. Log entries
2019	// outside those time boundaries aren't ingested by Logging.
2020	Timestamp string `json:"timestamp,omitempty"`
2021
2022	// Trace: Optional. Resource name of the trace associated with the log
2023	// entry, if any. If it contains a relative resource name, the name is
2024	// assumed to be relative to //tracing.googleapis.com. Example:
2025	// projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824
2026	Trace string `json:"trace,omitempty"`
2027
2028	// TraceSampled: Optional. The sampling decision of the trace associated
2029	// with the log entry.True means that the trace resource name in the
2030	// trace field was sampled for storage in a trace backend. False means
2031	// that the trace was not sampled for storage when this log entry was
2032	// written, or the sampling decision was unknown at the time. A
2033	// non-sampled trace value is still useful as a request correlation
2034	// identifier. The default is False.
2035	TraceSampled bool `json:"traceSampled,omitempty"`
2036
2037	// ForceSendFields is a list of field names (e.g. "HttpRequest") to
2038	// unconditionally include in API requests. By default, fields with
2039	// empty or default values are omitted from API requests. However, any
2040	// non-pointer, non-interface field appearing in ForceSendFields will be
2041	// sent to the server regardless of whether the field is empty or not.
2042	// This may be used to include empty fields in Patch requests.
2043	ForceSendFields []string `json:"-"`
2044
2045	// NullFields is a list of field names (e.g. "HttpRequest") to include
2046	// in API requests with the JSON null value. By default, fields with
2047	// empty values are omitted from API requests. However, any field with
2048	// an empty value appearing in NullFields will be sent to the server as
2049	// null. It is an error if a field in this list has a non-empty value.
2050	// This may be used to include null fields in Patch requests.
2051	NullFields []string `json:"-"`
2052}
2053
2054func (s *LogEntry) MarshalJSON() ([]byte, error) {
2055	type NoMethod LogEntry
2056	raw := NoMethod(*s)
2057	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2058}
2059
2060// LogEntryOperation: Additional information about a potentially
2061// long-running operation with which a log entry is associated.
2062type LogEntryOperation struct {
2063	// First: Optional. Set this to True if this is the first log entry in
2064	// the operation.
2065	First bool `json:"first,omitempty"`
2066
2067	// Id: Optional. An arbitrary operation identifier. Log entries with the
2068	// same identifier are assumed to be part of the same operation.
2069	Id string `json:"id,omitempty"`
2070
2071	// Last: Optional. Set this to True if this is the last log entry in the
2072	// operation.
2073	Last bool `json:"last,omitempty"`
2074
2075	// Producer: Optional. An arbitrary producer identifier. The combination
2076	// of id and producer must be globally unique. Examples for producer:
2077	// "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication".
2078	Producer string `json:"producer,omitempty"`
2079
2080	// ForceSendFields is a list of field names (e.g. "First") to
2081	// unconditionally include in API requests. By default, fields with
2082	// empty or default values are omitted from API requests. However, any
2083	// non-pointer, non-interface field appearing in ForceSendFields will be
2084	// sent to the server regardless of whether the field is empty or not.
2085	// This may be used to include empty fields in Patch requests.
2086	ForceSendFields []string `json:"-"`
2087
2088	// NullFields is a list of field names (e.g. "First") to include in API
2089	// requests with the JSON null value. By default, fields with empty
2090	// values are omitted from API requests. However, any field with an
2091	// empty value appearing in NullFields will be sent to the server as
2092	// null. It is an error if a field in this list has a non-empty value.
2093	// This may be used to include null fields in Patch requests.
2094	NullFields []string `json:"-"`
2095}
2096
2097func (s *LogEntryOperation) MarshalJSON() ([]byte, error) {
2098	type NoMethod LogEntryOperation
2099	raw := NoMethod(*s)
2100	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2101}
2102
2103// LogEntrySourceLocation: Additional information about the source code
2104// location that produced the log entry.
2105type LogEntrySourceLocation struct {
2106	// File: Optional. Source file name. Depending on the runtime
2107	// environment, this might be a simple name or a fully-qualified name.
2108	File string `json:"file,omitempty"`
2109
2110	// Function: Optional. Human-readable name of the function or method
2111	// being invoked, with optional context such as the class or package
2112	// name. This information may be used in contexts such as the logs
2113	// viewer, where a file and line number are less meaningful. The format
2114	// can vary by language. For example: qual.if.ied.Class.method (Java),
2115	// dir/package.func (Go), function (Python).
2116	Function string `json:"function,omitempty"`
2117
2118	// Line: Optional. Line within the source file. 1-based; 0 indicates no
2119	// line number available.
2120	Line int64 `json:"line,omitempty,string"`
2121
2122	// ForceSendFields is a list of field names (e.g. "File") to
2123	// unconditionally include in API requests. By default, fields with
2124	// empty or default values are omitted from API requests. However, any
2125	// non-pointer, non-interface field appearing in ForceSendFields will be
2126	// sent to the server regardless of whether the field is empty or not.
2127	// This may be used to include empty fields in Patch requests.
2128	ForceSendFields []string `json:"-"`
2129
2130	// NullFields is a list of field names (e.g. "File") to include in API
2131	// requests with the JSON null value. By default, fields with empty
2132	// values are omitted from API requests. However, any field with an
2133	// empty value appearing in NullFields will be sent to the server as
2134	// null. It is an error if a field in this list has a non-empty value.
2135	// This may be used to include null fields in Patch requests.
2136	NullFields []string `json:"-"`
2137}
2138
2139func (s *LogEntrySourceLocation) MarshalJSON() ([]byte, error) {
2140	type NoMethod LogEntrySourceLocation
2141	raw := NoMethod(*s)
2142	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2143}
2144
2145// LogExclusion: Specifies a set of log entries that are not to be
2146// stored in Cloud Logging. If your GCP resource receives a large volume
2147// of log entries, you can use exclusions to reduce your chargeable
2148// logs. Exclusions are processed after log sinks, so you can export log
2149// entries before they are excluded. Note that organization-level and
2150// folder-level exclusions don't apply to child resources, and that you
2151// can't exclude audit log entries.
2152type LogExclusion struct {
2153	// CreateTime: Output only. The creation timestamp of the exclusion.This
2154	// field may not be present for older exclusions.
2155	CreateTime string `json:"createTime,omitempty"`
2156
2157	// Description: Optional. A description of this exclusion.
2158	Description string `json:"description,omitempty"`
2159
2160	// Disabled: Optional. If set to True, then this exclusion is disabled
2161	// and it does not exclude any log entries. You can update an exclusion
2162	// to change the value of this field.
2163	Disabled bool `json:"disabled,omitempty"`
2164
2165	// Filter: Required. An advanced logs filter
2166	// (https://cloud.google.com/logging/docs/view/advanced-queries) that
2167	// matches the log entries to be excluded. By using the sample function
2168	// (https://cloud.google.com/logging/docs/view/advanced-queries#sample),
2169	// you can exclude less than 100% of the matching log entries.For
2170	// example, the following query matches 99% of low-severity log entries
2171	// from Google Cloud Storage buckets:resource.type=gcs_bucket
2172	// severity<ERROR sample(insertId, 0.99)
2173	Filter string `json:"filter,omitempty"`
2174
2175	// Name: Required. A client-assigned identifier, such as
2176	// "load-balancer-exclusion". Identifiers are limited to 100 characters
2177	// and can include only letters, digits, underscores, hyphens, and
2178	// periods. First character has to be alphanumeric.
2179	Name string `json:"name,omitempty"`
2180
2181	// UpdateTime: Output only. The last update timestamp of the
2182	// exclusion.This field may not be present for older exclusions.
2183	UpdateTime string `json:"updateTime,omitempty"`
2184
2185	// ServerResponse contains the HTTP response code and headers from the
2186	// server.
2187	googleapi.ServerResponse `json:"-"`
2188
2189	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2190	// unconditionally include in API requests. By default, fields with
2191	// empty or default values are omitted from API requests. However, any
2192	// non-pointer, non-interface field appearing in ForceSendFields will be
2193	// sent to the server regardless of whether the field is empty or not.
2194	// This may be used to include empty fields in Patch requests.
2195	ForceSendFields []string `json:"-"`
2196
2197	// NullFields is a list of field names (e.g. "CreateTime") to include in
2198	// API requests with the JSON null value. By default, fields with empty
2199	// values are omitted from API requests. However, any field with an
2200	// empty value appearing in NullFields will be sent to the server as
2201	// null. It is an error if a field in this list has a non-empty value.
2202	// This may be used to include null fields in Patch requests.
2203	NullFields []string `json:"-"`
2204}
2205
2206func (s *LogExclusion) MarshalJSON() ([]byte, error) {
2207	type NoMethod LogExclusion
2208	raw := NoMethod(*s)
2209	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2210}
2211
2212// LogLine: Application log line emitted while processing a request.
2213type LogLine struct {
2214	// LogMessage: App-provided log message.
2215	LogMessage string `json:"logMessage,omitempty"`
2216
2217	// Severity: Severity of this log entry.
2218	//
2219	// Possible values:
2220	//   "DEFAULT" - (0) The log entry has no assigned severity level.
2221	//   "DEBUG" - (100) Debug or trace information.
2222	//   "INFO" - (200) Routine information, such as ongoing status or
2223	// performance.
2224	//   "NOTICE" - (300) Normal but significant events, such as start up,
2225	// shut down, or a configuration change.
2226	//   "WARNING" - (400) Warning events might cause problems.
2227	//   "ERROR" - (500) Error events are likely to cause problems.
2228	//   "CRITICAL" - (600) Critical events cause more severe problems or
2229	// outages.
2230	//   "ALERT" - (700) A person must take an action immediately.
2231	//   "EMERGENCY" - (800) One or more systems are unusable.
2232	Severity string `json:"severity,omitempty"`
2233
2234	// SourceLocation: Where in the source code this log message was
2235	// written.
2236	SourceLocation *SourceLocation `json:"sourceLocation,omitempty"`
2237
2238	// Time: Approximate time when this log entry was made.
2239	Time string `json:"time,omitempty"`
2240
2241	// ForceSendFields is a list of field names (e.g. "LogMessage") to
2242	// unconditionally include in API requests. By default, fields with
2243	// empty or default values are omitted from API requests. However, any
2244	// non-pointer, non-interface field appearing in ForceSendFields will be
2245	// sent to the server regardless of whether the field is empty or not.
2246	// This may be used to include empty fields in Patch requests.
2247	ForceSendFields []string `json:"-"`
2248
2249	// NullFields is a list of field names (e.g. "LogMessage") to include in
2250	// API requests with the JSON null value. By default, fields with empty
2251	// values are omitted from API requests. However, any field with an
2252	// empty value appearing in NullFields will be sent to the server as
2253	// null. It is an error if a field in this list has a non-empty value.
2254	// This may be used to include null fields in Patch requests.
2255	NullFields []string `json:"-"`
2256}
2257
2258func (s *LogLine) MarshalJSON() ([]byte, error) {
2259	type NoMethod LogLine
2260	raw := NoMethod(*s)
2261	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2262}
2263
2264// LogMetric: Describes a logs-based metric. The value of the metric is
2265// the number of log entries that match a logs filter in a given time
2266// interval.Logs-based metrics can also be used to extract values from
2267// logs and create a distribution of the values. The distribution
2268// records the statistics of the extracted values along with an optional
2269// histogram of the values as specified by the bucket options.
2270type LogMetric struct {
2271	// BucketOptions: Optional. The bucket_options are required when the
2272	// logs-based metric is using a DISTRIBUTION value type and it describes
2273	// the bucket boundaries used to create a histogram of the extracted
2274	// values.
2275	BucketOptions *BucketOptions `json:"bucketOptions,omitempty"`
2276
2277	// CreateTime: Output only. The creation timestamp of the metric.This
2278	// field may not be present for older metrics.
2279	CreateTime string `json:"createTime,omitempty"`
2280
2281	// Description: Optional. A description of this metric, which is used in
2282	// documentation. The maximum length of the description is 8000
2283	// characters.
2284	Description string `json:"description,omitempty"`
2285
2286	// Disabled: Optional. If set to True, then this metric is disabled and
2287	// it does not generate any points.
2288	Disabled bool `json:"disabled,omitempty"`
2289
2290	// Filter: Required. An advanced logs filter
2291	// (https://cloud.google.com/logging/docs/view/advanced_filters) which
2292	// is used to match log entries. Example: "resource.type=gae_app AND
2293	// severity>=ERROR" The maximum length of the filter is 20000
2294	// characters.
2295	Filter string `json:"filter,omitempty"`
2296
2297	// LabelExtractors: Optional. A map from a label key string to an
2298	// extractor expression which is used to extract data from a log entry
2299	// field and assign as the label value. Each label key specified in the
2300	// LabelDescriptor must have an associated extractor expression in this
2301	// map. The syntax of the extractor expression is the same as for the
2302	// value_extractor field.The extracted value is converted to the type
2303	// defined in the label descriptor. If the either the extraction or the
2304	// type conversion fails, the label will have a default value. The
2305	// default value for a string label is an empty string, for an integer
2306	// label its 0, and for a boolean label its false.Note that there are
2307	// upper bounds on the maximum number of labels and the number of active
2308	// time series that are allowed in a project.
2309	LabelExtractors map[string]string `json:"labelExtractors,omitempty"`
2310
2311	// MetricDescriptor: Optional. The metric descriptor associated with the
2312	// logs-based metric. If unspecified, it uses a default metric
2313	// descriptor with a DELTA metric kind, INT64 value type, with no labels
2314	// and a unit of "1". Such a metric counts the number of log entries
2315	// matching the filter expression.The name, type, and description fields
2316	// in the metric_descriptor are output only, and is constructed using
2317	// the name and description field in the LogMetric.To create a
2318	// logs-based metric that records a distribution of log values, a DELTA
2319	// metric kind with a DISTRIBUTION value type must be used along with a
2320	// value_extractor expression in the LogMetric.Each label in the metric
2321	// descriptor must have a matching label name as the key and an
2322	// extractor expression as the value in the label_extractors map.The
2323	// metric_kind and value_type fields in the metric_descriptor cannot be
2324	// updated once initially configured. New labels can be added in the
2325	// metric_descriptor, but existing labels cannot be modified except for
2326	// their description.
2327	MetricDescriptor *MetricDescriptor `json:"metricDescriptor,omitempty"`
2328
2329	// Name: Required. The client-assigned metric identifier. Examples:
2330	// "error_count", "nginx/requests".Metric identifiers are limited to 100
2331	// characters and can include only the following characters: A-Z, a-z,
2332	// 0-9, and the special characters _-.,+!*',()%/. The forward-slash
2333	// character (/) denotes a hierarchy of name pieces, and it cannot be
2334	// the first character of the name.The metric identifier in this field
2335	// must not be URL-encoded
2336	// (https://en.wikipedia.org/wiki/Percent-encoding). However, when the
2337	// metric identifier appears as the [METRIC_ID] part of a metric_name
2338	// API parameter, then the metric identifier must be URL-encoded.
2339	// Example: "projects/my-project/metrics/nginx%2Frequests".
2340	Name string `json:"name,omitempty"`
2341
2342	// UpdateTime: Output only. The last update timestamp of the metric.This
2343	// field may not be present for older metrics.
2344	UpdateTime string `json:"updateTime,omitempty"`
2345
2346	// ValueExtractor: Optional. A value_extractor is required when using a
2347	// distribution logs-based metric to extract the values to record from a
2348	// log entry. Two functions are supported for value extraction:
2349	// EXTRACT(field) or REGEXP_EXTRACT(field, regex). The argument are: 1.
2350	// field: The name of the log entry field from which the value is to be
2351	// extracted. 2. regex: A regular expression using the Google RE2 syntax
2352	// (https://github.com/google/re2/wiki/Syntax) with a single capture
2353	// group to extract data from the specified log entry field. The value
2354	// of the field is converted to a string before applying the regex. It
2355	// is an error to specify a regex that does not include exactly one
2356	// capture group.The result of the extraction must be convertible to a
2357	// double type, as the distribution always records double values. If
2358	// either the extraction or the conversion to double fails, then those
2359	// values are not recorded in the distribution.Example:
2360	// REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")
2361	ValueExtractor string `json:"valueExtractor,omitempty"`
2362
2363	// Version: Deprecated. The API version that created or updated this
2364	// metric. The v2 format is used by default and cannot be changed.
2365	//
2366	// Possible values:
2367	//   "V2" - Logging API v2.
2368	//   "V1" - Logging API v1.
2369	Version string `json:"version,omitempty"`
2370
2371	// ServerResponse contains the HTTP response code and headers from the
2372	// server.
2373	googleapi.ServerResponse `json:"-"`
2374
2375	// ForceSendFields is a list of field names (e.g. "BucketOptions") to
2376	// unconditionally include in API requests. By default, fields with
2377	// empty or default values are omitted from API requests. However, any
2378	// non-pointer, non-interface field appearing in ForceSendFields will be
2379	// sent to the server regardless of whether the field is empty or not.
2380	// This may be used to include empty fields in Patch requests.
2381	ForceSendFields []string `json:"-"`
2382
2383	// NullFields is a list of field names (e.g. "BucketOptions") to include
2384	// in API requests with the JSON null value. By default, fields with
2385	// empty values are omitted from API requests. However, any field with
2386	// an empty value appearing in NullFields will be sent to the server as
2387	// null. It is an error if a field in this list has a non-empty value.
2388	// This may be used to include null fields in Patch requests.
2389	NullFields []string `json:"-"`
2390}
2391
2392func (s *LogMetric) MarshalJSON() ([]byte, error) {
2393	type NoMethod LogMetric
2394	raw := NoMethod(*s)
2395	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2396}
2397
2398// LogSink: Describes a sink used to export log entries to one of the
2399// following destinations in any project: a Cloud Storage bucket, a
2400// BigQuery dataset, a Pub/Sub topic or a Cloud Logging log bucket. A
2401// logs filter controls which log entries are exported. The sink must be
2402// created within a project, organization, billing account, or folder.
2403type LogSink struct {
2404	// BigqueryOptions: Optional. Options that affect sinks exporting data
2405	// to BigQuery.
2406	BigqueryOptions *BigQueryOptions `json:"bigqueryOptions,omitempty"`
2407
2408	// CreateTime: Output only. The creation timestamp of the sink.This
2409	// field may not be present for older sinks.
2410	CreateTime string `json:"createTime,omitempty"`
2411
2412	// Description: Optional. A description of this sink.The maximum length
2413	// of the description is 8000 characters.
2414	Description string `json:"description,omitempty"`
2415
2416	// Destination: Required. The export destination:
2417	// "storage.googleapis.com/[GCS_BUCKET]"
2418	// "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
2419	// "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The
2420	// sink's writer_identity, set when the sink is created, must have
2421	// permission to write to the destination or else the log entries are
2422	// not exported. For more information, see Exporting Logs with Sinks
2423	// (https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
2424	Destination string `json:"destination,omitempty"`
2425
2426	// Disabled: Optional. If set to true, then this sink is disabled and it
2427	// does not export any log entries.
2428	Disabled bool `json:"disabled,omitempty"`
2429
2430	// Exclusions: Optional. Log entries that match any of these exclusion
2431	// filters will not be exported.If a log entry is matched by both filter
2432	// and one of exclusion_filters it will not be exported.
2433	Exclusions []*LogExclusion `json:"exclusions,omitempty"`
2434
2435	// Filter: Optional. An advanced logs filter
2436	// (https://cloud.google.com/logging/docs/view/advanced-queries). The
2437	// only exported log entries are those that are in the resource owning
2438	// the sink and that match the filter.For
2439	// example:logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND
2440	// severity>=ERROR
2441	Filter string `json:"filter,omitempty"`
2442
2443	// IncludeChildren: Optional. This field applies only to sinks owned by
2444	// organizations and folders. If the field is false, the default, only
2445	// the logs owned by the sink's parent resource are available for
2446	// export. If the field is true, then log entries from all the projects,
2447	// folders, and billing accounts contained in the sink's parent resource
2448	// are also available for export. Whether a particular log entry from
2449	// the children is exported depends on the sink's filter expression.For
2450	// example, if this field is true, then the filter
2451	// resource.type=gce_instance would export all Compute Engine VM
2452	// instance log entries from all projects in the sink's parent.To only
2453	// export entries from certain child projects, filter on the project
2454	// part of the log name:logName:("projects/test-project1/" OR
2455	// "projects/test-project2/") AND resource.type=gce_instance
2456	IncludeChildren bool `json:"includeChildren,omitempty"`
2457
2458	// Name: Required. The client-assigned sink identifier, unique within
2459	// the project.For example: "my-syslog-errors-to-pubsub". Sink
2460	// identifiers are limited to 100 characters and can include only the
2461	// following characters: upper and lower-case alphanumeric characters,
2462	// underscores, hyphens, and periods. First character has to be
2463	// alphanumeric.
2464	Name string `json:"name,omitempty"`
2465
2466	// OutputVersionFormat: Deprecated. This field is unused.
2467	//
2468	// Possible values:
2469	//   "VERSION_FORMAT_UNSPECIFIED" - An unspecified format version that
2470	// will default to V2.
2471	//   "V2" - LogEntry version 2 format.
2472	//   "V1" - LogEntry version 1 format.
2473	OutputVersionFormat string `json:"outputVersionFormat,omitempty"`
2474
2475	// UpdateTime: Output only. The last update timestamp of the sink.This
2476	// field may not be present for older sinks.
2477	UpdateTime string `json:"updateTime,omitempty"`
2478
2479	// WriterIdentity: Output only. An IAM identity—a service account or
2480	// group—under which Cloud Logging writes the exported log entries to
2481	// the sink's destination. This field is set by sinks.create and
2482	// sinks.update based on the value of unique_writer_identity in those
2483	// methods.Until you grant this identity write-access to the
2484	// destination, log entry exports from this sink will fail. For more
2485	// information, see Granting Access for a Resource
2486	// (https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
2487	// Consult the destination service's documentation to determine the
2488	// appropriate IAM roles to assign to the identity.
2489	WriterIdentity string `json:"writerIdentity,omitempty"`
2490
2491	// ServerResponse contains the HTTP response code and headers from the
2492	// server.
2493	googleapi.ServerResponse `json:"-"`
2494
2495	// ForceSendFields is a list of field names (e.g. "BigqueryOptions") to
2496	// unconditionally include in API requests. By default, fields with
2497	// empty or default values are omitted from API requests. However, any
2498	// non-pointer, non-interface field appearing in ForceSendFields will be
2499	// sent to the server regardless of whether the field is empty or not.
2500	// This may be used to include empty fields in Patch requests.
2501	ForceSendFields []string `json:"-"`
2502
2503	// NullFields is a list of field names (e.g. "BigqueryOptions") to
2504	// include in API requests with the JSON null value. By default, fields
2505	// with empty values are omitted from API requests. However, any field
2506	// with an empty value appearing in NullFields will be sent to the
2507	// server as null. It is an error if a field in this list has a
2508	// non-empty value. This may be used to include null fields in Patch
2509	// requests.
2510	NullFields []string `json:"-"`
2511}
2512
2513func (s *LogSink) MarshalJSON() ([]byte, error) {
2514	type NoMethod LogSink
2515	raw := NoMethod(*s)
2516	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2517}
2518
2519// LogView: Describes a view over log entries in a bucket.
2520type LogView struct {
2521	// CreateTime: Output only. The creation timestamp of the view.
2522	CreateTime string `json:"createTime,omitempty"`
2523
2524	// Description: Describes this view.
2525	Description string `json:"description,omitempty"`
2526
2527	// Filter: Filter that restricts which log entries in a bucket are
2528	// visible in this view.Filters are restricted to be a logical AND of
2529	// ==/!= of any of the following: originating
2530	// project/folder/organization/billing account. resource type log idFor
2531	// example:SOURCE("projects/myproject") AND resource.type =
2532	// "gce_instance" AND LOG_ID("stdout")
2533	Filter string `json:"filter,omitempty"`
2534
2535	// Name: The resource name of the view.For
2536	// example:projects/my-project/locations/global/buckets/my-bucket/views/m
2537	// y-view
2538	Name string `json:"name,omitempty"`
2539
2540	// Schema: Describes the schema of the logs stored in the bucket that
2541	// are accessible via this view.This field is only populated for views
2542	// in analytics-enabled buckets.
2543	Schema *TableSchema `json:"schema,omitempty"`
2544
2545	// UpdateTime: Output only. The last update timestamp of the view.
2546	UpdateTime string `json:"updateTime,omitempty"`
2547
2548	// ServerResponse contains the HTTP response code and headers from the
2549	// server.
2550	googleapi.ServerResponse `json:"-"`
2551
2552	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2553	// unconditionally include in API requests. By default, fields with
2554	// empty or default values are omitted from API requests. However, any
2555	// non-pointer, non-interface field appearing in ForceSendFields will be
2556	// sent to the server regardless of whether the field is empty or not.
2557	// This may be used to include empty fields in Patch requests.
2558	ForceSendFields []string `json:"-"`
2559
2560	// NullFields is a list of field names (e.g. "CreateTime") to include in
2561	// API requests with the JSON null value. By default, fields with empty
2562	// values are omitted from API requests. However, any field with an
2563	// empty value appearing in NullFields will be sent to the server as
2564	// null. It is an error if a field in this list has a non-empty value.
2565	// This may be used to include null fields in Patch requests.
2566	NullFields []string `json:"-"`
2567}
2568
2569func (s *LogView) MarshalJSON() ([]byte, error) {
2570	type NoMethod LogView
2571	raw := NoMethod(*s)
2572	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2573}
2574
2575// MetricDescriptor: Defines a metric type and its schema. Once a metric
2576// descriptor is created, deleting or altering it stops data collection
2577// and makes the metric type's existing data unusable.
2578type MetricDescriptor struct {
2579	// Description: A detailed description of the metric, which can be used
2580	// in documentation.
2581	Description string `json:"description,omitempty"`
2582
2583	// DisplayName: A concise name for the metric, which can be displayed in
2584	// user interfaces. Use sentence case without an ending period, for
2585	// example "Request count". This field is optional but it is recommended
2586	// to be set for any metrics associated with user-visible concepts, such
2587	// as Quota.
2588	DisplayName string `json:"displayName,omitempty"`
2589
2590	// Labels: The set of labels that can be used to describe a specific
2591	// instance of this metric type. For example, the
2592	// appengine.googleapis.com/http/server/response_latencies metric type
2593	// has a label for the HTTP response code, response_code, so you can
2594	// look at latencies for successful responses or just for responses that
2595	// failed.
2596	Labels []*LabelDescriptor `json:"labels,omitempty"`
2597
2598	// LaunchStage: Optional. The launch stage of the metric definition.
2599	//
2600	// Possible values:
2601	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2602	//   "UNIMPLEMENTED" - The feature is not yet implemented. Users can not
2603	// use it.
2604	//   "PRELAUNCH" - Prelaunch features are hidden from users and are only
2605	// visible internally.
2606	//   "EARLY_ACCESS" - Early Access features are limited to a closed
2607	// group of testers. To use these features, you must sign up in advance
2608	// and sign a Trusted Tester agreement (which includes confidentiality
2609	// provisions). These features may be unstable, changed in
2610	// backward-incompatible ways, and are not guaranteed to be released.
2611	//   "ALPHA" - Alpha is a limited availability test for releases before
2612	// they are cleared for widespread use. By Alpha, all significant design
2613	// issues are resolved and we are in the process of verifying
2614	// functionality. Alpha customers need to apply for access, agree to
2615	// applicable terms, and have their projects allowlisted. Alpha releases
2616	// don’t have to be feature complete, no SLAs are provided, and there
2617	// are no technical support obligations, but they will be far enough
2618	// along that customers can actually use them in test environments or
2619	// for limited-use tests -- just like they would in normal production
2620	// cases.
2621	//   "BETA" - Beta is the point at which we are ready to open a release
2622	// for any customer to use. There are no SLA or technical support
2623	// obligations in a Beta release. Products will be complete from a
2624	// feature perspective, but may have some open outstanding issues. Beta
2625	// releases are suitable for limited production use cases.
2626	//   "GA" - GA features are open to all developers and are considered
2627	// stable and fully qualified for production use.
2628	//   "DEPRECATED" - Deprecated features are scheduled to be shut down
2629	// and removed. For more information, see the “Deprecation Policy”
2630	// section of our Terms of Service (https://cloud.google.com/terms/) and
2631	// the Google Cloud Platform Subject to the Deprecation Policy
2632	// (https://cloud.google.com/terms/deprecation) documentation.
2633	LaunchStage string `json:"launchStage,omitempty"`
2634
2635	// Metadata: Optional. Metadata which can be used to guide usage of the
2636	// metric.
2637	Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"`
2638
2639	// MetricKind: Whether the metric records instantaneous values, changes
2640	// to a value, etc. Some combinations of metric_kind and value_type
2641	// might not be supported.
2642	//
2643	// Possible values:
2644	//   "METRIC_KIND_UNSPECIFIED" - Do not use this default value.
2645	//   "GAUGE" - An instantaneous measurement of a value.
2646	//   "DELTA" - The change in a value during a time interval.
2647	//   "CUMULATIVE" - A value accumulated over a time interval. Cumulative
2648	// measurements in a time series should have the same start time and
2649	// increasing end times, until an event resets the cumulative value to
2650	// zero and sets a new start time for the following points.
2651	MetricKind string `json:"metricKind,omitempty"`
2652
2653	// MonitoredResourceTypes: Read-only. If present, then a time series,
2654	// which is identified partially by a metric type and a
2655	// MonitoredResourceDescriptor, that is associated with this metric type
2656	// can only be associated with one of the monitored resource types
2657	// listed here.
2658	MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"`
2659
2660	// Name: The resource name of the metric descriptor.
2661	Name string `json:"name,omitempty"`
2662
2663	// Type: The metric type, including its DNS name prefix. The type is not
2664	// URL-encoded. All user-defined metric types have the DNS name
2665	// custom.googleapis.com or external.googleapis.com. Metric types should
2666	// use a natural hierarchical grouping. For example:
2667	// "custom.googleapis.com/invoice/paid/amount"
2668	// "external.googleapis.com/prometheus/up"
2669	// "appengine.googleapis.com/http/server/response_latencies"
2670	Type string `json:"type,omitempty"`
2671
2672	// Unit: The units in which the metric value is reported. It is only
2673	// applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The
2674	// unit defines the representation of the stored metric values.Different
2675	// systems might scale the values to be more easily displayed (so a
2676	// value of 0.02kBy might be displayed as 20By, and a value of 3523kBy
2677	// might be displayed as 3.5MBy). However, if the unit is kBy, then the
2678	// value of the metric is always in thousands of bytes, no matter how it
2679	// might be displayed.If you want a custom metric to record the exact
2680	// number of CPU-seconds used by a job, you can create an INT64
2681	// CUMULATIVE metric whose unit is s{CPU} (or equivalently 1s{CPU} or
2682	// just s). If the job uses 12,005 CPU-seconds, then the value is
2683	// written as 12005.Alternatively, if you want a custom metric to record
2684	// data in a more granular way, you can create a DOUBLE CUMULATIVE
2685	// metric whose unit is ks{CPU}, and then write the value 12.005 (which
2686	// is 12005/1000), or use Kis{CPU} and write 11.723 (which is
2687	// 12005/1024).The supported units are a subset of The Unified Code for
2688	// Units of Measure (https://unitsofmeasure.org/ucum.html)
2689	// standard:Basic units (UNIT) bit bit By byte s second min minute h
2690	// hour d day 1 dimensionlessPrefixes (PREFIX) k kilo (10^3) M mega
2691	// (10^6) G giga (10^9) T tera (10^12) P peta (10^15) E exa (10^18) Z
2692	// zetta (10^21) Y yotta (10^24) m milli (10^-3) u micro (10^-6) n nano
2693	// (10^-9) p pico (10^-12) f femto (10^-15) a atto (10^-18) z zepto
2694	// (10^-21) y yocto (10^-24) Ki kibi (2^10) Mi mebi (2^20) Gi gibi
2695	// (2^30) Ti tebi (2^40) Pi pebi (2^50)GrammarThe grammar also includes
2696	// these connectors: / division or ratio (as an infix operator). For
2697	// examples, kBy/{email} or MiBy/10ms (although you should almost never
2698	// have /s in a metric unit; rates should always be computed at query
2699	// time from the underlying cumulative or delta value). . multiplication
2700	// or composition (as an infix operator). For examples, GBy.d or
2701	// k{watt}.h.The grammar for a unit is as follows: Expression =
2702	// Component { "." Component } { "/" Component } ; Component = ( [
2703	// PREFIX ] UNIT | "%" ) [ Annotation ] | Annotation | "1" ; Annotation
2704	// = "{" NAME "}" ; Notes: Annotation is just a comment if it follows a
2705	// UNIT. If the annotation is used alone, then the unit is equivalent to
2706	// 1. For examples, {request}/s == 1/s, By{transmitted}/s == By/s. NAME
2707	// is a sequence of non-blank printable ASCII characters not containing
2708	// { or }. 1 represents a unitary dimensionless unit
2709	// (https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as
2710	// in 1/s. It is typically used when none of the basic units are
2711	// appropriate. For example, "new users per day" can be represented as
2712	// 1/d or {new-users}/d (and a metric value 5 would mean "5 new users).
2713	// Alternatively, "thousands of page views per day" would be represented
2714	// as 1000/d or k1/d or k{page_views}/d (and a metric value of 5.3 would
2715	// mean "5300 page views per day"). % represents dimensionless value of
2716	// 1/100, and annotates values giving a percentage (so the metric values
2717	// are typically in the range of 0..100, and a metric value 3 means "3
2718	// percent"). 10^2.% indicates a metric contains a ratio, typically in
2719	// the range 0..1, that will be multiplied by 100 and displayed as a
2720	// percentage (so a metric value 0.03 means "3 percent").
2721	Unit string `json:"unit,omitempty"`
2722
2723	// ValueType: Whether the measurement is an integer, a floating-point
2724	// number, etc. Some combinations of metric_kind and value_type might
2725	// not be supported.
2726	//
2727	// Possible values:
2728	//   "VALUE_TYPE_UNSPECIFIED" - Do not use this default value.
2729	//   "BOOL" - The value is a boolean. This value type can be used only
2730	// if the metric kind is GAUGE.
2731	//   "INT64" - The value is a signed 64-bit integer.
2732	//   "DOUBLE" - The value is a double precision floating point number.
2733	//   "STRING" - The value is a text string. This value type can be used
2734	// only if the metric kind is GAUGE.
2735	//   "DISTRIBUTION" - The value is a Distribution.
2736	//   "MONEY" - The value is money.
2737	ValueType string `json:"valueType,omitempty"`
2738
2739	// ForceSendFields is a list of field names (e.g. "Description") to
2740	// unconditionally include in API requests. By default, fields with
2741	// empty or default values are omitted from API requests. However, any
2742	// non-pointer, non-interface field appearing in ForceSendFields will be
2743	// sent to the server regardless of whether the field is empty or not.
2744	// This may be used to include empty fields in Patch requests.
2745	ForceSendFields []string `json:"-"`
2746
2747	// NullFields is a list of field names (e.g. "Description") to include
2748	// in API requests with the JSON null value. By default, fields with
2749	// empty values are omitted from API requests. However, any field with
2750	// an empty value appearing in NullFields will be sent to the server as
2751	// null. It is an error if a field in this list has a non-empty value.
2752	// This may be used to include null fields in Patch requests.
2753	NullFields []string `json:"-"`
2754}
2755
2756func (s *MetricDescriptor) MarshalJSON() ([]byte, error) {
2757	type NoMethod MetricDescriptor
2758	raw := NoMethod(*s)
2759	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2760}
2761
2762// MetricDescriptorMetadata: Additional annotations that can be used to
2763// guide the usage of a metric.
2764type MetricDescriptorMetadata struct {
2765	// IngestDelay: The delay of data points caused by ingestion. Data
2766	// points older than this age are guaranteed to be ingested and
2767	// available to be read, excluding data loss due to errors.
2768	IngestDelay string `json:"ingestDelay,omitempty"`
2769
2770	// LaunchStage: Deprecated. Must use the MetricDescriptor.launch_stage
2771	// instead.
2772	//
2773	// Possible values:
2774	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2775	//   "UNIMPLEMENTED" - The feature is not yet implemented. Users can not
2776	// use it.
2777	//   "PRELAUNCH" - Prelaunch features are hidden from users and are only
2778	// visible internally.
2779	//   "EARLY_ACCESS" - Early Access features are limited to a closed
2780	// group of testers. To use these features, you must sign up in advance
2781	// and sign a Trusted Tester agreement (which includes confidentiality
2782	// provisions). These features may be unstable, changed in
2783	// backward-incompatible ways, and are not guaranteed to be released.
2784	//   "ALPHA" - Alpha is a limited availability test for releases before
2785	// they are cleared for widespread use. By Alpha, all significant design
2786	// issues are resolved and we are in the process of verifying
2787	// functionality. Alpha customers need to apply for access, agree to
2788	// applicable terms, and have their projects allowlisted. Alpha releases
2789	// don’t have to be feature complete, no SLAs are provided, and there
2790	// are no technical support obligations, but they will be far enough
2791	// along that customers can actually use them in test environments or
2792	// for limited-use tests -- just like they would in normal production
2793	// cases.
2794	//   "BETA" - Beta is the point at which we are ready to open a release
2795	// for any customer to use. There are no SLA or technical support
2796	// obligations in a Beta release. Products will be complete from a
2797	// feature perspective, but may have some open outstanding issues. Beta
2798	// releases are suitable for limited production use cases.
2799	//   "GA" - GA features are open to all developers and are considered
2800	// stable and fully qualified for production use.
2801	//   "DEPRECATED" - Deprecated features are scheduled to be shut down
2802	// and removed. For more information, see the “Deprecation Policy”
2803	// section of our Terms of Service (https://cloud.google.com/terms/) and
2804	// the Google Cloud Platform Subject to the Deprecation Policy
2805	// (https://cloud.google.com/terms/deprecation) documentation.
2806	LaunchStage string `json:"launchStage,omitempty"`
2807
2808	// SamplePeriod: The sampling period of metric data points. For metrics
2809	// which are written periodically, consecutive data points are stored at
2810	// this time interval, excluding data loss due to errors. Metrics with a
2811	// higher granularity have a smaller sampling period.
2812	SamplePeriod string `json:"samplePeriod,omitempty"`
2813
2814	// ForceSendFields is a list of field names (e.g. "IngestDelay") to
2815	// unconditionally include in API requests. By default, fields with
2816	// empty or default values are omitted from API requests. However, any
2817	// non-pointer, non-interface field appearing in ForceSendFields will be
2818	// sent to the server regardless of whether the field is empty or not.
2819	// This may be used to include empty fields in Patch requests.
2820	ForceSendFields []string `json:"-"`
2821
2822	// NullFields is a list of field names (e.g. "IngestDelay") to include
2823	// in API requests with the JSON null value. By default, fields with
2824	// empty values are omitted from API requests. However, any field with
2825	// an empty value appearing in NullFields will be sent to the server as
2826	// null. It is an error if a field in this list has a non-empty value.
2827	// This may be used to include null fields in Patch requests.
2828	NullFields []string `json:"-"`
2829}
2830
2831func (s *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) {
2832	type NoMethod MetricDescriptorMetadata
2833	raw := NoMethod(*s)
2834	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2835}
2836
2837// MonitoredResource: An object representing a resource that can be used
2838// for monitoring, logging, billing, or other purposes. Examples include
2839// virtual machine instances, databases, and storage devices such as
2840// disks. The type field identifies a MonitoredResourceDescriptor object
2841// that describes the resource's schema. Information in the labels field
2842// identifies the actual resource and its attributes according to the
2843// schema. For example, a particular Compute Engine VM instance could be
2844// represented by the following object, because the
2845// MonitoredResourceDescriptor for "gce_instance" has labels
2846// "instance_id" and "zone": { "type": "gce_instance", "labels": {
2847// "instance_id": "12345678901234", "zone": "us-central1-a" }}
2848type MonitoredResource struct {
2849	// Labels: Required. Values for all of the labels listed in the
2850	// associated monitored resource descriptor. For example, Compute Engine
2851	// VM instances use the labels "project_id", "instance_id", and "zone".
2852	Labels map[string]string `json:"labels,omitempty"`
2853
2854	// Type: Required. The monitored resource type. This field must match
2855	// the type field of a MonitoredResourceDescriptor object. For example,
2856	// the type of a Compute Engine VM instance is gce_instance.
2857	Type string `json:"type,omitempty"`
2858
2859	// ForceSendFields is a list of field names (e.g. "Labels") to
2860	// unconditionally include in API requests. By default, fields with
2861	// empty or default values are omitted from API requests. However, any
2862	// non-pointer, non-interface field appearing in ForceSendFields will be
2863	// sent to the server regardless of whether the field is empty or not.
2864	// This may be used to include empty fields in Patch requests.
2865	ForceSendFields []string `json:"-"`
2866
2867	// NullFields is a list of field names (e.g. "Labels") to include in API
2868	// requests with the JSON null value. By default, fields with empty
2869	// values are omitted from API requests. However, any field with an
2870	// empty value appearing in NullFields will be sent to the server as
2871	// null. It is an error if a field in this list has a non-empty value.
2872	// This may be used to include null fields in Patch requests.
2873	NullFields []string `json:"-"`
2874}
2875
2876func (s *MonitoredResource) MarshalJSON() ([]byte, error) {
2877	type NoMethod MonitoredResource
2878	raw := NoMethod(*s)
2879	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2880}
2881
2882// MonitoredResourceDescriptor: An object that describes the schema of a
2883// MonitoredResource object using a type name and a set of labels. For
2884// example, the monitored resource descriptor for Google Compute Engine
2885// VM instances has a type of "gce_instance" and specifies the use of
2886// the labels "instance_id" and "zone" to identify particular VM
2887// instances.Different APIs can support different monitored resource
2888// types. APIs generally provide a list method that returns the
2889// monitored resource descriptors used by the API.
2890type MonitoredResourceDescriptor struct {
2891	// Description: Optional. A detailed description of the monitored
2892	// resource type that might be used in documentation.
2893	Description string `json:"description,omitempty"`
2894
2895	// DisplayName: Optional. A concise name for the monitored resource type
2896	// that might be displayed in user interfaces. It should be a Title
2897	// Cased Noun Phrase, without any article or other determiners. For
2898	// example, "Google Cloud SQL Database".
2899	DisplayName string `json:"displayName,omitempty"`
2900
2901	// Labels: Required. A set of labels used to describe instances of this
2902	// monitored resource type. For example, an individual Google Cloud SQL
2903	// database is identified by values for the labels "database_id" and
2904	// "zone".
2905	Labels []*LabelDescriptor `json:"labels,omitempty"`
2906
2907	// LaunchStage: Optional. The launch stage of the monitored resource
2908	// definition.
2909	//
2910	// Possible values:
2911	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2912	//   "UNIMPLEMENTED" - The feature is not yet implemented. Users can not
2913	// use it.
2914	//   "PRELAUNCH" - Prelaunch features are hidden from users and are only
2915	// visible internally.
2916	//   "EARLY_ACCESS" - Early Access features are limited to a closed
2917	// group of testers. To use these features, you must sign up in advance
2918	// and sign a Trusted Tester agreement (which includes confidentiality
2919	// provisions). These features may be unstable, changed in
2920	// backward-incompatible ways, and are not guaranteed to be released.
2921	//   "ALPHA" - Alpha is a limited availability test for releases before
2922	// they are cleared for widespread use. By Alpha, all significant design
2923	// issues are resolved and we are in the process of verifying
2924	// functionality. Alpha customers need to apply for access, agree to
2925	// applicable terms, and have their projects allowlisted. Alpha releases
2926	// don’t have to be feature complete, no SLAs are provided, and there
2927	// are no technical support obligations, but they will be far enough
2928	// along that customers can actually use them in test environments or
2929	// for limited-use tests -- just like they would in normal production
2930	// cases.
2931	//   "BETA" - Beta is the point at which we are ready to open a release
2932	// for any customer to use. There are no SLA or technical support
2933	// obligations in a Beta release. Products will be complete from a
2934	// feature perspective, but may have some open outstanding issues. Beta
2935	// releases are suitable for limited production use cases.
2936	//   "GA" - GA features are open to all developers and are considered
2937	// stable and fully qualified for production use.
2938	//   "DEPRECATED" - Deprecated features are scheduled to be shut down
2939	// and removed. For more information, see the “Deprecation Policy”
2940	// section of our Terms of Service (https://cloud.google.com/terms/) and
2941	// the Google Cloud Platform Subject to the Deprecation Policy
2942	// (https://cloud.google.com/terms/deprecation) documentation.
2943	LaunchStage string `json:"launchStage,omitempty"`
2944
2945	// Name: Optional. The resource name of the monitored resource
2946	// descriptor:
2947	// "projects/{project_id}/monitoredResourceDescriptors/{type}" where
2948	// {type} is the value of the type field in this object and {project_id}
2949	// is a project ID that provides API-specific context for accessing the
2950	// type. APIs that do not use project information can use the resource
2951	// name format "monitoredResourceDescriptors/{type}".
2952	Name string `json:"name,omitempty"`
2953
2954	// Type: Required. The monitored resource type. For example, the type
2955	// "cloudsql_database" represents databases in Google Cloud SQL. For a
2956	// list of types, see Monitoring resource types
2957	// (https://cloud.google.com/monitoring/api/resources) and Logging
2958	// resource types
2959	// (https://cloud.google.com/logging/docs/api/v2/resource-list).
2960	Type string `json:"type,omitempty"`
2961
2962	// ForceSendFields is a list of field names (e.g. "Description") to
2963	// unconditionally include in API requests. By default, fields with
2964	// empty or default values are omitted from API requests. However, any
2965	// non-pointer, non-interface field appearing in ForceSendFields will be
2966	// sent to the server regardless of whether the field is empty or not.
2967	// This may be used to include empty fields in Patch requests.
2968	ForceSendFields []string `json:"-"`
2969
2970	// NullFields is a list of field names (e.g. "Description") to include
2971	// in API requests with the JSON null value. By default, fields with
2972	// empty values are omitted from API requests. However, any field with
2973	// an empty value appearing in NullFields will be sent to the server as
2974	// null. It is an error if a field in this list has a non-empty value.
2975	// This may be used to include null fields in Patch requests.
2976	NullFields []string `json:"-"`
2977}
2978
2979func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
2980	type NoMethod MonitoredResourceDescriptor
2981	raw := NoMethod(*s)
2982	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2983}
2984
2985// MonitoredResourceMetadata: Auxiliary metadata for a MonitoredResource
2986// object. MonitoredResource objects contain the minimum set of
2987// information to uniquely identify a monitored resource instance. There
2988// is some other useful auxiliary metadata. Monitoring and Logging use
2989// an ingestion pipeline to extract metadata for cloud resources of all
2990// types, and store the metadata in this message.
2991type MonitoredResourceMetadata struct {
2992	// SystemLabels: Output only. Values for predefined system metadata
2993	// labels. System labels are a kind of metadata extracted by Google,
2994	// including "machine_image", "vpc", "subnet_id", "security_group",
2995	// "name", etc. System label values can be only strings, Boolean values,
2996	// or a list of strings. For example: { "name": "my-test-instance",
2997	// "security_group": ["a", "b", "c"], "spot_instance": false }
2998	SystemLabels googleapi.RawMessage `json:"systemLabels,omitempty"`
2999
3000	// UserLabels: Output only. A map of user-defined metadata labels.
3001	UserLabels map[string]string `json:"userLabels,omitempty"`
3002
3003	// ForceSendFields is a list of field names (e.g. "SystemLabels") to
3004	// unconditionally include in API requests. By default, fields with
3005	// empty or default values are omitted from API requests. However, any
3006	// non-pointer, non-interface field appearing in ForceSendFields will be
3007	// sent to the server regardless of whether the field is empty or not.
3008	// This may be used to include empty fields in Patch requests.
3009	ForceSendFields []string `json:"-"`
3010
3011	// NullFields is a list of field names (e.g. "SystemLabels") to include
3012	// in API requests with the JSON null value. By default, fields with
3013	// empty values are omitted from API requests. However, any field with
3014	// an empty value appearing in NullFields will be sent to the server as
3015	// null. It is an error if a field in this list has a non-empty value.
3016	// This may be used to include null fields in Patch requests.
3017	NullFields []string `json:"-"`
3018}
3019
3020func (s *MonitoredResourceMetadata) MarshalJSON() ([]byte, error) {
3021	type NoMethod MonitoredResourceMetadata
3022	raw := NoMethod(*s)
3023	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3024}
3025
3026// Operation: This resource represents a long-running operation that is
3027// the result of a network API call.
3028type Operation struct {
3029	// Done: If the value is false, it means the operation is still in
3030	// progress. If true, the operation is completed, and either error or
3031	// response is available.
3032	Done bool `json:"done,omitempty"`
3033
3034	// Error: The error result of the operation in case of failure or
3035	// cancellation.
3036	Error *Status `json:"error,omitempty"`
3037
3038	// Metadata: Service-specific metadata associated with the operation. It
3039	// typically contains progress information and common metadata such as
3040	// create time. Some services might not provide such metadata. Any
3041	// method that returns a long-running operation should document the
3042	// metadata type, if any.
3043	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3044
3045	// Name: The server-assigned name, which is only unique within the same
3046	// service that originally returns it. If you use the default HTTP
3047	// mapping, the name should be a resource name ending with
3048	// operations/{unique_id}.
3049	Name string `json:"name,omitempty"`
3050
3051	// Response: The normal response of the operation in case of success. If
3052	// the original method returns no data on success, such as Delete, the
3053	// response is google.protobuf.Empty. If the original method is standard
3054	// Get/Create/Update, the response should be the resource. For other
3055	// methods, the response should have the type XxxResponse, where Xxx is
3056	// the original method name. For example, if the original method name is
3057	// TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
3058	Response googleapi.RawMessage `json:"response,omitempty"`
3059
3060	// ServerResponse contains the HTTP response code and headers from the
3061	// server.
3062	googleapi.ServerResponse `json:"-"`
3063
3064	// ForceSendFields is a list of field names (e.g. "Done") to
3065	// unconditionally include in API requests. By default, fields with
3066	// empty or default values are omitted from API requests. However, any
3067	// non-pointer, non-interface field appearing in ForceSendFields will be
3068	// sent to the server regardless of whether the field is empty or not.
3069	// This may be used to include empty fields in Patch requests.
3070	ForceSendFields []string `json:"-"`
3071
3072	// NullFields is a list of field names (e.g. "Done") to include in API
3073	// requests with the JSON null value. By default, fields with empty
3074	// values are omitted from API requests. However, any field with an
3075	// empty value appearing in NullFields will be sent to the server as
3076	// null. It is an error if a field in this list has a non-empty value.
3077	// This may be used to include null fields in Patch requests.
3078	NullFields []string `json:"-"`
3079}
3080
3081func (s *Operation) MarshalJSON() ([]byte, error) {
3082	type NoMethod Operation
3083	raw := NoMethod(*s)
3084	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3085}
3086
3087// RequestLog: Complete log information about a single HTTP request to
3088// an App Engine application.
3089type RequestLog struct {
3090	// AppEngineRelease: App Engine release version.
3091	AppEngineRelease string `json:"appEngineRelease,omitempty"`
3092
3093	// AppId: Application that handled this request.
3094	AppId string `json:"appId,omitempty"`
3095
3096	// Cost: An indication of the relative cost of serving this request.
3097	Cost float64 `json:"cost,omitempty"`
3098
3099	// EndTime: Time when the request finished.
3100	EndTime string `json:"endTime,omitempty"`
3101
3102	// Finished: Whether this request is finished or active.
3103	Finished bool `json:"finished,omitempty"`
3104
3105	// First: Whether this is the first RequestLog entry for this request.
3106	// If an active request has several RequestLog entries written to
3107	// Stackdriver Logging, then this field will be set for one of them.
3108	First bool `json:"first,omitempty"`
3109
3110	// Host: Internet host and port number of the resource being requested.
3111	Host string `json:"host,omitempty"`
3112
3113	// HttpVersion: HTTP version of request. Example: "HTTP/1.1".
3114	HttpVersion string `json:"httpVersion,omitempty"`
3115
3116	// InstanceId: An identifier for the instance that handled the request.
3117	InstanceId string `json:"instanceId,omitempty"`
3118
3119	// InstanceIndex: If the instance processing this request belongs to a
3120	// manually scaled module, then this is the 0-based index of the
3121	// instance. Otherwise, this value is -1.
3122	InstanceIndex int64 `json:"instanceIndex,omitempty"`
3123
3124	// Ip: Origin IP address.
3125	Ip string `json:"ip,omitempty"`
3126
3127	// Latency: Latency of the request.
3128	Latency string `json:"latency,omitempty"`
3129
3130	// Line: A list of log lines emitted by the application while serving
3131	// this request.
3132	Line []*LogLine `json:"line,omitempty"`
3133
3134	// MegaCycles: Number of CPU megacycles used to process request.
3135	MegaCycles int64 `json:"megaCycles,omitempty,string"`
3136
3137	// Method: Request method. Example: "GET", "HEAD", "PUT", "POST",
3138	// "DELETE".
3139	Method string `json:"method,omitempty"`
3140
3141	// ModuleId: Module of the application that handled this request.
3142	ModuleId string `json:"moduleId,omitempty"`
3143
3144	// Nickname: The logged-in user who made the request.Most likely, this
3145	// is the part of the user's email before the @ sign. The field value is
3146	// the same for different requests from the same user, but different
3147	// users can have similar names. This information is also available to
3148	// the application via the App Engine Users API.This field will be
3149	// populated starting with App Engine 1.9.21.
3150	Nickname string `json:"nickname,omitempty"`
3151
3152	// PendingTime: Time this request spent in the pending request queue.
3153	PendingTime string `json:"pendingTime,omitempty"`
3154
3155	// Referrer: Referrer URL of request.
3156	Referrer string `json:"referrer,omitempty"`
3157
3158	// RequestId: Globally unique identifier for a request, which is based
3159	// on the request start time. Request IDs for requests which started
3160	// later will compare greater as strings than those for requests which
3161	// started earlier.
3162	RequestId string `json:"requestId,omitempty"`
3163
3164	// Resource: Contains the path and query portion of the URL that was
3165	// requested. For example, if the URL was
3166	// "http://example.com/app?name=val", the resource would be
3167	// "/app?name=val". The fragment identifier, which is identified by the
3168	// # character, is not included.
3169	Resource string `json:"resource,omitempty"`
3170
3171	// ResponseSize: Size in bytes sent back to client by request.
3172	ResponseSize int64 `json:"responseSize,omitempty,string"`
3173
3174	// SourceReference: Source code for the application that handled this
3175	// request. There can be more than one source reference per deployed
3176	// application if source code is distributed among multiple
3177	// repositories.
3178	SourceReference []*SourceReference `json:"sourceReference,omitempty"`
3179
3180	// StartTime: Time when the request started.
3181	StartTime string `json:"startTime,omitempty"`
3182
3183	// Status: HTTP response status code. Example: 200, 404.
3184	Status int64 `json:"status,omitempty"`
3185
3186	// TaskName: Task name of the request, in the case of an offline
3187	// request.
3188	TaskName string `json:"taskName,omitempty"`
3189
3190	// TaskQueueName: Queue name of the request, in the case of an offline
3191	// request.
3192	TaskQueueName string `json:"taskQueueName,omitempty"`
3193
3194	// TraceId: Stackdriver Trace identifier for this request.
3195	TraceId string `json:"traceId,omitempty"`
3196
3197	// TraceSampled: If true, the value in the 'trace_id' field was sampled
3198	// for storage in a trace backend.
3199	TraceSampled bool `json:"traceSampled,omitempty"`
3200
3201	// UrlMapEntry: File or class that handled the request.
3202	UrlMapEntry string `json:"urlMapEntry,omitempty"`
3203
3204	// UserAgent: User agent that made the request.
3205	UserAgent string `json:"userAgent,omitempty"`
3206
3207	// VersionId: Version of the application that handled this request.
3208	VersionId string `json:"versionId,omitempty"`
3209
3210	// WasLoadingRequest: Whether this was a loading request for the
3211	// instance.
3212	WasLoadingRequest bool `json:"wasLoadingRequest,omitempty"`
3213
3214	// ForceSendFields is a list of field names (e.g. "AppEngineRelease") to
3215	// unconditionally include in API requests. By default, fields with
3216	// empty or default values are omitted from API requests. However, any
3217	// non-pointer, non-interface field appearing in ForceSendFields will be
3218	// sent to the server regardless of whether the field is empty or not.
3219	// This may be used to include empty fields in Patch requests.
3220	ForceSendFields []string `json:"-"`
3221
3222	// NullFields is a list of field names (e.g. "AppEngineRelease") to
3223	// include in API requests with the JSON null value. By default, fields
3224	// with empty values are omitted from API requests. However, any field
3225	// with an empty value appearing in NullFields will be sent to the
3226	// server as null. It is an error if a field in this list has a
3227	// non-empty value. This may be used to include null fields in Patch
3228	// requests.
3229	NullFields []string `json:"-"`
3230}
3231
3232func (s *RequestLog) MarshalJSON() ([]byte, error) {
3233	type NoMethod RequestLog
3234	raw := NoMethod(*s)
3235	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3236}
3237
3238func (s *RequestLog) UnmarshalJSON(data []byte) error {
3239	type NoMethod RequestLog
3240	var s1 struct {
3241		Cost gensupport.JSONFloat64 `json:"cost"`
3242		*NoMethod
3243	}
3244	s1.NoMethod = (*NoMethod)(s)
3245	if err := json.Unmarshal(data, &s1); err != nil {
3246		return err
3247	}
3248	s.Cost = float64(s1.Cost)
3249	return nil
3250}
3251
3252// SourceLocation: Specifies a location in a source code file.
3253type SourceLocation struct {
3254	// File: Source file name. Depending on the runtime environment, this
3255	// might be a simple name or a fully-qualified name.
3256	File string `json:"file,omitempty"`
3257
3258	// FunctionName: Human-readable name of the function or method being
3259	// invoked, with optional context such as the class or package name.
3260	// This information is used in contexts such as the logs viewer, where a
3261	// file and line number are less meaningful. The format can vary by
3262	// language. For example: qual.if.ied.Class.method (Java),
3263	// dir/package.func (Go), function (Python).
3264	FunctionName string `json:"functionName,omitempty"`
3265
3266	// Line: Line within the source file.
3267	Line int64 `json:"line,omitempty,string"`
3268
3269	// ForceSendFields is a list of field names (e.g. "File") to
3270	// unconditionally include in API requests. By default, fields with
3271	// empty or default values are omitted from API requests. However, any
3272	// non-pointer, non-interface field appearing in ForceSendFields will be
3273	// sent to the server regardless of whether the field is empty or not.
3274	// This may be used to include empty fields in Patch requests.
3275	ForceSendFields []string `json:"-"`
3276
3277	// NullFields is a list of field names (e.g. "File") to include in API
3278	// requests with the JSON null value. By default, fields with empty
3279	// values are omitted from API requests. However, any field with an
3280	// empty value appearing in NullFields will be sent to the server as
3281	// null. It is an error if a field in this list has a non-empty value.
3282	// This may be used to include null fields in Patch requests.
3283	NullFields []string `json:"-"`
3284}
3285
3286func (s *SourceLocation) MarshalJSON() ([]byte, error) {
3287	type NoMethod SourceLocation
3288	raw := NoMethod(*s)
3289	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3290}
3291
3292// SourceReference: A reference to a particular snapshot of the source
3293// tree used to build and deploy an application.
3294type SourceReference struct {
3295	// Repository: Optional. A URI string identifying the repository.
3296	// Example: "https://github.com/GoogleCloudPlatform/kubernetes.git"
3297	Repository string `json:"repository,omitempty"`
3298
3299	// RevisionId: The canonical and persistent identifier of the deployed
3300	// revision. Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b"
3301	RevisionId string `json:"revisionId,omitempty"`
3302
3303	// ForceSendFields is a list of field names (e.g. "Repository") to
3304	// unconditionally include in API requests. By default, fields with
3305	// empty or default values are omitted from API requests. However, any
3306	// non-pointer, non-interface field appearing in ForceSendFields will be
3307	// sent to the server regardless of whether the field is empty or not.
3308	// This may be used to include empty fields in Patch requests.
3309	ForceSendFields []string `json:"-"`
3310
3311	// NullFields is a list of field names (e.g. "Repository") to include in
3312	// API requests with the JSON null value. By default, fields with empty
3313	// values are omitted from API requests. However, any field with an
3314	// empty value appearing in NullFields will be sent to the server as
3315	// null. It is an error if a field in this list has a non-empty value.
3316	// This may be used to include null fields in Patch requests.
3317	NullFields []string `json:"-"`
3318}
3319
3320func (s *SourceReference) MarshalJSON() ([]byte, error) {
3321	type NoMethod SourceReference
3322	raw := NoMethod(*s)
3323	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3324}
3325
3326// Status: The Status type defines a logical error model that is
3327// suitable for different programming environments, including REST APIs
3328// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
3329// Status message contains three pieces of data: error code, error
3330// message, and error details.You can find out more about this error
3331// model and how to work with it in the API Design Guide
3332// (https://cloud.google.com/apis/design/errors).
3333type Status struct {
3334	// Code: The status code, which should be an enum value of
3335	// google.rpc.Code.
3336	Code int64 `json:"code,omitempty"`
3337
3338	// Details: A list of messages that carry the error details. There is a
3339	// common set of message types for APIs to use.
3340	Details []googleapi.RawMessage `json:"details,omitempty"`
3341
3342	// Message: A developer-facing error message, which should be in
3343	// English. Any user-facing error message should be localized and sent
3344	// in the google.rpc.Status.details field, or localized by the client.
3345	Message string `json:"message,omitempty"`
3346
3347	// ForceSendFields is a list of field names (e.g. "Code") to
3348	// unconditionally include in API requests. By default, fields with
3349	// empty or default values are omitted from API requests. However, any
3350	// non-pointer, non-interface field appearing in ForceSendFields will be
3351	// sent to the server regardless of whether the field is empty or not.
3352	// This may be used to include empty fields in Patch requests.
3353	ForceSendFields []string `json:"-"`
3354
3355	// NullFields is a list of field names (e.g. "Code") to include in API
3356	// requests with the JSON null value. By default, fields with empty
3357	// values are omitted from API requests. However, any field with an
3358	// empty value appearing in NullFields will be sent to the server as
3359	// null. It is an error if a field in this list has a non-empty value.
3360	// This may be used to include null fields in Patch requests.
3361	NullFields []string `json:"-"`
3362}
3363
3364func (s *Status) MarshalJSON() ([]byte, error) {
3365	type NoMethod Status
3366	raw := NoMethod(*s)
3367	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3368}
3369
3370// SuppressionInfo: Information about entries that were omitted from the
3371// session.
3372type SuppressionInfo struct {
3373	// Reason: The reason that entries were omitted from the session.
3374	//
3375	// Possible values:
3376	//   "REASON_UNSPECIFIED" - Unexpected default.
3377	//   "RATE_LIMIT" - Indicates suppression occurred due to relevant
3378	// entries being received in excess of rate limits. For quotas and
3379	// limits, see Logging API quotas and limits
3380	// (https://cloud.google.com/logging/quotas#api-limits).
3381	//   "NOT_CONSUMED" - Indicates suppression occurred due to the client
3382	// not consuming responses quickly enough.
3383	Reason string `json:"reason,omitempty"`
3384
3385	// SuppressedCount: A lower bound on the count of entries omitted due to
3386	// reason.
3387	SuppressedCount int64 `json:"suppressedCount,omitempty"`
3388
3389	// ForceSendFields is a list of field names (e.g. "Reason") to
3390	// unconditionally include in API requests. By default, fields with
3391	// empty or default values are omitted from API requests. However, any
3392	// non-pointer, non-interface field appearing in ForceSendFields will be
3393	// sent to the server regardless of whether the field is empty or not.
3394	// This may be used to include empty fields in Patch requests.
3395	ForceSendFields []string `json:"-"`
3396
3397	// NullFields is a list of field names (e.g. "Reason") to include in API
3398	// requests with the JSON null value. By default, fields with empty
3399	// values are omitted from API requests. However, any field with an
3400	// empty value appearing in NullFields will be sent to the server as
3401	// null. It is an error if a field in this list has a non-empty value.
3402	// This may be used to include null fields in Patch requests.
3403	NullFields []string `json:"-"`
3404}
3405
3406func (s *SuppressionInfo) MarshalJSON() ([]byte, error) {
3407	type NoMethod SuppressionInfo
3408	raw := NoMethod(*s)
3409	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3410}
3411
3412// TableFieldSchema: A field in TableSchema. The fields describe the
3413// static fields in the LogEntry. Any dynamic fields generated by the
3414// customer in fields like labels and jsonPayload are not listed in the
3415// schema as they use a native JSON type field.
3416type TableFieldSchema struct {
3417	// Description: Optional. The field description.
3418	Description string `json:"description,omitempty"`
3419
3420	// Fields: Optional. Describes the nested schema fields if the type
3421	// property is set to RECORD.
3422	Fields []*TableFieldSchema `json:"fields,omitempty"`
3423
3424	// Mode: Optional. The field mode. Possible values include NULLABLE,
3425	// REQUIRED and REPEATED. The default value is NULLABLE.
3426	Mode string `json:"mode,omitempty"`
3427
3428	// Name: Required. The field name corresponding to fields in the
3429	// LogEntry.
3430	Name string `json:"name,omitempty"`
3431
3432	// Type: Required. The field data type. Possible values include: STRING
3433	// INTEGER (or INT64) FLOAT (or FLOAT64) BOOLEAN (or BOOL) TIMESTAMP
3434	// RECORD (or STRUCT)Use of RECORD/STRUT indicates that the field
3435	// contains a nested schema.
3436	Type string `json:"type,omitempty"`
3437
3438	// ForceSendFields is a list of field names (e.g. "Description") to
3439	// unconditionally include in API requests. By default, fields with
3440	// empty or default values are omitted from API requests. However, any
3441	// non-pointer, non-interface field appearing in ForceSendFields will be
3442	// sent to the server regardless of whether the field is empty or not.
3443	// This may be used to include empty fields in Patch requests.
3444	ForceSendFields []string `json:"-"`
3445
3446	// NullFields is a list of field names (e.g. "Description") to include
3447	// in API requests with the JSON null value. By default, fields with
3448	// empty values are omitted from API requests. However, any field with
3449	// an empty value appearing in NullFields will be sent to the server as
3450	// null. It is an error if a field in this list has a non-empty value.
3451	// This may be used to include null fields in Patch requests.
3452	NullFields []string `json:"-"`
3453}
3454
3455func (s *TableFieldSchema) MarshalJSON() ([]byte, error) {
3456	type NoMethod TableFieldSchema
3457	raw := NoMethod(*s)
3458	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3459}
3460
3461// TableSchema: Schema of a table containing logs.
3462type TableSchema struct {
3463	// Fields: Describes the fields in a table.
3464	Fields []*TableFieldSchema `json:"fields,omitempty"`
3465
3466	// ForceSendFields is a list of field names (e.g. "Fields") to
3467	// unconditionally include in API requests. By default, fields with
3468	// empty or default values are omitted from API requests. However, any
3469	// non-pointer, non-interface field appearing in ForceSendFields will be
3470	// sent to the server regardless of whether the field is empty or not.
3471	// This may be used to include empty fields in Patch requests.
3472	ForceSendFields []string `json:"-"`
3473
3474	// NullFields is a list of field names (e.g. "Fields") to include in API
3475	// requests with the JSON null value. By default, fields with empty
3476	// values are omitted from API requests. However, any field with an
3477	// empty value appearing in NullFields will be sent to the server as
3478	// null. It is an error if a field in this list has a non-empty value.
3479	// This may be used to include null fields in Patch requests.
3480	NullFields []string `json:"-"`
3481}
3482
3483func (s *TableSchema) MarshalJSON() ([]byte, error) {
3484	type NoMethod TableSchema
3485	raw := NoMethod(*s)
3486	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3487}
3488
3489// TailLogEntriesRequest: The parameters to TailLogEntries.
3490type TailLogEntriesRequest struct {
3491	// BufferWindow: Optional. The amount of time to buffer log entries at
3492	// the server before being returned to prevent out of order results due
3493	// to late arriving log entries. Valid values are between 0-60000
3494	// milliseconds. Defaults to 2000 milliseconds.
3495	BufferWindow string `json:"bufferWindow,omitempty"`
3496
3497	// Filter: Optional. A filter that chooses which log entries to return.
3498	// See Advanced Logs Filters
3499	// (https://cloud.google.com/logging/docs/view/advanced_filters). Only
3500	// log entries that match the filter are returned. An empty filter
3501	// matches all log entries in the resources listed in resource_names.
3502	// Referencing a parent resource that is not in resource_names will
3503	// cause the filter to return no results. The maximum length of the
3504	// filter is 20000 characters.
3505	Filter string `json:"filter,omitempty"`
3506
3507	// ResourceNames: Required. Name of a parent resource from which to
3508	// retrieve log entries: projects/[PROJECT_ID]
3509	// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
3510	// folders/[FOLDER_ID]May alternatively be one or more views:
3511	// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/view
3512	// s/[VIEW_ID]
3513	// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKE
3514	// T_ID]/views/[VIEW_ID]
3515	// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[
3516	// BUCKET_ID]/views/[VIEW_ID]
3517	// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/
3518	// [VIEW_ID]
3519	ResourceNames []string `json:"resourceNames,omitempty"`
3520
3521	// ForceSendFields is a list of field names (e.g. "BufferWindow") to
3522	// unconditionally include in API requests. By default, fields with
3523	// empty or default values are omitted from API requests. However, any
3524	// non-pointer, non-interface field appearing in ForceSendFields will be
3525	// sent to the server regardless of whether the field is empty or not.
3526	// This may be used to include empty fields in Patch requests.
3527	ForceSendFields []string `json:"-"`
3528
3529	// NullFields is a list of field names (e.g. "BufferWindow") to include
3530	// in API requests with the JSON null value. By default, fields with
3531	// empty values are omitted from API requests. However, any field with
3532	// an empty value appearing in NullFields will be sent to the server as
3533	// null. It is an error if a field in this list has a non-empty value.
3534	// This may be used to include null fields in Patch requests.
3535	NullFields []string `json:"-"`
3536}
3537
3538func (s *TailLogEntriesRequest) MarshalJSON() ([]byte, error) {
3539	type NoMethod TailLogEntriesRequest
3540	raw := NoMethod(*s)
3541	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3542}
3543
3544// TailLogEntriesResponse: Result returned from TailLogEntries.
3545type TailLogEntriesResponse struct {
3546	// Entries: A list of log entries. Each response in the stream will
3547	// order entries with increasing values of LogEntry.timestamp. Ordering
3548	// is not guaranteed between separate responses.
3549	Entries []*LogEntry `json:"entries,omitempty"`
3550
3551	// SuppressionInfo: If entries that otherwise would have been included
3552	// in the session were not sent back to the client, counts of relevant
3553	// entries omitted from the session with the reason that they were not
3554	// included. There will be at most one of each reason per response. The
3555	// counts represent the number of suppressed entries since the last
3556	// streamed response.
3557	SuppressionInfo []*SuppressionInfo `json:"suppressionInfo,omitempty"`
3558
3559	// ServerResponse contains the HTTP response code and headers from the
3560	// server.
3561	googleapi.ServerResponse `json:"-"`
3562
3563	// ForceSendFields is a list of field names (e.g. "Entries") to
3564	// unconditionally include in API requests. By default, fields with
3565	// empty or default values are omitted from API requests. However, any
3566	// non-pointer, non-interface field appearing in ForceSendFields will be
3567	// sent to the server regardless of whether the field is empty or not.
3568	// This may be used to include empty fields in Patch requests.
3569	ForceSendFields []string `json:"-"`
3570
3571	// NullFields is a list of field names (e.g. "Entries") to include in
3572	// API requests with the JSON null value. By default, fields with empty
3573	// values are omitted from API requests. However, any field with an
3574	// empty value appearing in NullFields will be sent to the server as
3575	// null. It is an error if a field in this list has a non-empty value.
3576	// This may be used to include null fields in Patch requests.
3577	NullFields []string `json:"-"`
3578}
3579
3580func (s *TailLogEntriesResponse) MarshalJSON() ([]byte, error) {
3581	type NoMethod TailLogEntriesResponse
3582	raw := NoMethod(*s)
3583	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3584}
3585
3586// UndeleteBucketRequest: The parameters to UndeleteBucket.
3587type UndeleteBucketRequest struct {
3588}
3589
3590// WriteLogEntriesRequest: The parameters to WriteLogEntries.
3591type WriteLogEntriesRequest struct {
3592	// DryRun: Optional. If true, the request should expect normal response,
3593	// but the entries won't be persisted nor exported. Useful for checking
3594	// whether the logging API endpoints are working properly before sending
3595	// valuable data.
3596	DryRun bool `json:"dryRun,omitempty"`
3597
3598	// Entries: Required. The log entries to send to Logging. The order of
3599	// log entries in this list does not matter. Values supplied in this
3600	// method's log_name, resource, and labels fields are copied into those
3601	// log entries in this list that do not include values for their
3602	// corresponding fields. For more information, see the LogEntry type.If
3603	// the timestamp or insert_id fields are missing in log entries, then
3604	// this method supplies the current time or a unique identifier,
3605	// respectively. The supplied values are chosen so that, among the log
3606	// entries that did not supply their own values, the entries earlier in
3607	// the list will sort before the entries later in the list. See the
3608	// entries.list method.Log entries with timestamps that are more than
3609	// the logs retention period (https://cloud.google.com/logging/quotas)
3610	// in the past or more than 24 hours in the future will not be available
3611	// when calling entries.list. However, those log entries can still be
3612	// exported with LogSinks
3613	// (https://cloud.google.com/logging/docs/api/tasks/exporting-logs).To
3614	// improve throughput and to avoid exceeding the quota limit
3615	// (https://cloud.google.com/logging/quotas) for calls to entries.write,
3616	// you should try to include several log entries in this list, rather
3617	// than calling this method for each individual log entry.
3618	Entries []*LogEntry `json:"entries,omitempty"`
3619
3620	// Labels: Optional. Default labels that are added to the labels field
3621	// of all log entries in entries. If a log entry already has a label
3622	// with the same key as a label in this parameter, then the log entry's
3623	// label is not changed. See LogEntry.
3624	Labels map[string]string `json:"labels,omitempty"`
3625
3626	// LogName: Optional. A default log resource name that is assigned to
3627	// all log entries in entries that do not specify a value for log_name:
3628	// projects/[PROJECT_ID]/logs/[LOG_ID]
3629	// organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
3630	// billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
3631	// folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
3632	// example: "projects/my-project-id/logs/syslog"
3633	// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" The
3634	// permission logging.logEntries.create is needed on each project,
3635	// organization, billing account, or folder that is receiving new log
3636	// entries, whether the resource is specified in logName or in an
3637	// individual log entry.
3638	LogName string `json:"logName,omitempty"`
3639
3640	// PartialSuccess: Optional. Whether valid entries should be written
3641	// even if some other entries fail due to INVALID_ARGUMENT or
3642	// PERMISSION_DENIED errors. If any entry is not written, then the
3643	// response status is the error associated with one of the failed
3644	// entries and the response includes error details keyed by the entries'
3645	// zero-based index in the entries.write method.
3646	PartialSuccess bool `json:"partialSuccess,omitempty"`
3647
3648	// Resource: Optional. A default monitored resource object that is
3649	// assigned to all log entries in entries that do not specify a value
3650	// for resource. Example: { "type": "gce_instance", "labels": { "zone":
3651	// "us-central1-a", "instance_id": "00000000000000000000" }} See
3652	// LogEntry.
3653	Resource *MonitoredResource `json:"resource,omitempty"`
3654
3655	// ForceSendFields is a list of field names (e.g. "DryRun") to
3656	// unconditionally include in API requests. By default, fields with
3657	// empty or default values are omitted from API requests. However, any
3658	// non-pointer, non-interface field appearing in ForceSendFields will be
3659	// sent to the server regardless of whether the field is empty or not.
3660	// This may be used to include empty fields in Patch requests.
3661	ForceSendFields []string `json:"-"`
3662
3663	// NullFields is a list of field names (e.g. "DryRun") to include in API
3664	// requests with the JSON null value. By default, fields with empty
3665	// values are omitted from API requests. However, any field with an
3666	// empty value appearing in NullFields will be sent to the server as
3667	// null. It is an error if a field in this list has a non-empty value.
3668	// This may be used to include null fields in Patch requests.
3669	NullFields []string `json:"-"`
3670}
3671
3672func (s *WriteLogEntriesRequest) MarshalJSON() ([]byte, error) {
3673	type NoMethod WriteLogEntriesRequest
3674	raw := NoMethod(*s)
3675	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3676}
3677
3678// WriteLogEntriesResponse: Result returned from WriteLogEntries.
3679type WriteLogEntriesResponse struct {
3680	// ServerResponse contains the HTTP response code and headers from the
3681	// server.
3682	googleapi.ServerResponse `json:"-"`
3683}
3684
3685// method id "logging.billingAccounts.buckets.get":
3686
3687type BillingAccountsBucketsGetCall struct {
3688	s            *Service
3689	name         string
3690	urlParams_   gensupport.URLParams
3691	ifNoneMatch_ string
3692	ctx_         context.Context
3693	header_      http.Header
3694}
3695
3696// Get: Gets a log bucket.
3697//
3698// - name: The resource name of the bucket:
3699//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
3700//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
3701//   CKET_ID]"
3702//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
3703//   s/[BUCKET_ID]"
3704//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
3705//   For
3706//   example:"projects/my-project/locations/global/buckets/my-bucket".
3707func (r *BillingAccountsBucketsService) Get(name string) *BillingAccountsBucketsGetCall {
3708	c := &BillingAccountsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3709	c.name = name
3710	return c
3711}
3712
3713// Fields allows partial responses to be retrieved. See
3714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3715// for more information.
3716func (c *BillingAccountsBucketsGetCall) Fields(s ...googleapi.Field) *BillingAccountsBucketsGetCall {
3717	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3718	return c
3719}
3720
3721// IfNoneMatch sets the optional parameter which makes the operation
3722// fail if the object's ETag matches the given value. This is useful for
3723// getting updates only after the object has changed since the last
3724// request. Use googleapi.IsNotModified to check whether the response
3725// error from Do is the result of In-None-Match.
3726func (c *BillingAccountsBucketsGetCall) IfNoneMatch(entityTag string) *BillingAccountsBucketsGetCall {
3727	c.ifNoneMatch_ = entityTag
3728	return c
3729}
3730
3731// Context sets the context to be used in this call's Do method. Any
3732// pending HTTP request will be aborted if the provided context is
3733// canceled.
3734func (c *BillingAccountsBucketsGetCall) Context(ctx context.Context) *BillingAccountsBucketsGetCall {
3735	c.ctx_ = ctx
3736	return c
3737}
3738
3739// Header returns an http.Header that can be modified by the caller to
3740// add HTTP headers to the request.
3741func (c *BillingAccountsBucketsGetCall) Header() http.Header {
3742	if c.header_ == nil {
3743		c.header_ = make(http.Header)
3744	}
3745	return c.header_
3746}
3747
3748func (c *BillingAccountsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
3749	reqHeaders := make(http.Header)
3750	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
3751	for k, v := range c.header_ {
3752		reqHeaders[k] = v
3753	}
3754	reqHeaders.Set("User-Agent", c.s.userAgent())
3755	if c.ifNoneMatch_ != "" {
3756		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3757	}
3758	var body io.Reader = nil
3759	c.urlParams_.Set("alt", alt)
3760	c.urlParams_.Set("prettyPrint", "false")
3761	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
3762	urls += "?" + c.urlParams_.Encode()
3763	req, err := http.NewRequest("GET", urls, body)
3764	if err != nil {
3765		return nil, err
3766	}
3767	req.Header = reqHeaders
3768	googleapi.Expand(req.URL, map[string]string{
3769		"name": c.name,
3770	})
3771	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3772}
3773
3774// Do executes the "logging.billingAccounts.buckets.get" call.
3775// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
3776// status code is an error. Response headers are in either
3777// *LogBucket.ServerResponse.Header or (if a response was returned at
3778// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3779// to check whether the returned error was because
3780// http.StatusNotModified was returned.
3781func (c *BillingAccountsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
3782	gensupport.SetOptions(c.urlParams_, opts...)
3783	res, err := c.doRequest("json")
3784	if res != nil && res.StatusCode == http.StatusNotModified {
3785		if res.Body != nil {
3786			res.Body.Close()
3787		}
3788		return nil, &googleapi.Error{
3789			Code:   res.StatusCode,
3790			Header: res.Header,
3791		}
3792	}
3793	if err != nil {
3794		return nil, err
3795	}
3796	defer googleapi.CloseBody(res)
3797	if err := googleapi.CheckResponse(res); err != nil {
3798		return nil, err
3799	}
3800	ret := &LogBucket{
3801		ServerResponse: googleapi.ServerResponse{
3802			Header:         res.Header,
3803			HTTPStatusCode: res.StatusCode,
3804		},
3805	}
3806	target := &ret
3807	if err := gensupport.DecodeResponse(target, res); err != nil {
3808		return nil, err
3809	}
3810	return ret, nil
3811	// {
3812	//   "description": "Gets a log bucket.",
3813	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/buckets/{bucketsId}",
3814	//   "httpMethod": "GET",
3815	//   "id": "logging.billingAccounts.buckets.get",
3816	//   "parameterOrder": [
3817	//     "name"
3818	//   ],
3819	//   "parameters": {
3820	//     "name": {
3821	//       "description": "Required. The resource name of the bucket: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
3822	//       "location": "path",
3823	//       "pattern": "^billingAccounts/[^/]+/buckets/[^/]+$",
3824	//       "required": true,
3825	//       "type": "string"
3826	//     }
3827	//   },
3828	//   "path": "v2/{+name}",
3829	//   "response": {
3830	//     "$ref": "LogBucket"
3831	//   },
3832	//   "scopes": [
3833	//     "https://www.googleapis.com/auth/cloud-platform",
3834	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
3835	//     "https://www.googleapis.com/auth/logging.admin",
3836	//     "https://www.googleapis.com/auth/logging.read"
3837	//   ]
3838	// }
3839
3840}
3841
3842// method id "logging.billingAccounts.buckets.views.get":
3843
3844type BillingAccountsBucketsViewsGetCall struct {
3845	s            *Service
3846	name         string
3847	urlParams_   gensupport.URLParams
3848	ifNoneMatch_ string
3849	ctx_         context.Context
3850	header_      http.Header
3851}
3852
3853// Get: Gets a view on a log bucket..
3854//
3855// - name: The resource name of the policy:
3856//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
3857//   iews/[VIEW_ID]" For
3858//   example:"projects/my-project/locations/global/buckets/my-bucket/view
3859//   s/my-view".
3860func (r *BillingAccountsBucketsViewsService) Get(name string) *BillingAccountsBucketsViewsGetCall {
3861	c := &BillingAccountsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3862	c.name = name
3863	return c
3864}
3865
3866// Fields allows partial responses to be retrieved. See
3867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3868// for more information.
3869func (c *BillingAccountsBucketsViewsGetCall) Fields(s ...googleapi.Field) *BillingAccountsBucketsViewsGetCall {
3870	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3871	return c
3872}
3873
3874// IfNoneMatch sets the optional parameter which makes the operation
3875// fail if the object's ETag matches the given value. This is useful for
3876// getting updates only after the object has changed since the last
3877// request. Use googleapi.IsNotModified to check whether the response
3878// error from Do is the result of In-None-Match.
3879func (c *BillingAccountsBucketsViewsGetCall) IfNoneMatch(entityTag string) *BillingAccountsBucketsViewsGetCall {
3880	c.ifNoneMatch_ = entityTag
3881	return c
3882}
3883
3884// Context sets the context to be used in this call's Do method. Any
3885// pending HTTP request will be aborted if the provided context is
3886// canceled.
3887func (c *BillingAccountsBucketsViewsGetCall) Context(ctx context.Context) *BillingAccountsBucketsViewsGetCall {
3888	c.ctx_ = ctx
3889	return c
3890}
3891
3892// Header returns an http.Header that can be modified by the caller to
3893// add HTTP headers to the request.
3894func (c *BillingAccountsBucketsViewsGetCall) Header() http.Header {
3895	if c.header_ == nil {
3896		c.header_ = make(http.Header)
3897	}
3898	return c.header_
3899}
3900
3901func (c *BillingAccountsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
3902	reqHeaders := make(http.Header)
3903	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
3904	for k, v := range c.header_ {
3905		reqHeaders[k] = v
3906	}
3907	reqHeaders.Set("User-Agent", c.s.userAgent())
3908	if c.ifNoneMatch_ != "" {
3909		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3910	}
3911	var body io.Reader = nil
3912	c.urlParams_.Set("alt", alt)
3913	c.urlParams_.Set("prettyPrint", "false")
3914	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
3915	urls += "?" + c.urlParams_.Encode()
3916	req, err := http.NewRequest("GET", urls, body)
3917	if err != nil {
3918		return nil, err
3919	}
3920	req.Header = reqHeaders
3921	googleapi.Expand(req.URL, map[string]string{
3922		"name": c.name,
3923	})
3924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3925}
3926
3927// Do executes the "logging.billingAccounts.buckets.views.get" call.
3928// Exactly one of *LogView or error will be non-nil. Any non-2xx status
3929// code is an error. Response headers are in either
3930// *LogView.ServerResponse.Header or (if a response was returned at all)
3931// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3932// check whether the returned error was because http.StatusNotModified
3933// was returned.
3934func (c *BillingAccountsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
3935	gensupport.SetOptions(c.urlParams_, opts...)
3936	res, err := c.doRequest("json")
3937	if res != nil && res.StatusCode == http.StatusNotModified {
3938		if res.Body != nil {
3939			res.Body.Close()
3940		}
3941		return nil, &googleapi.Error{
3942			Code:   res.StatusCode,
3943			Header: res.Header,
3944		}
3945	}
3946	if err != nil {
3947		return nil, err
3948	}
3949	defer googleapi.CloseBody(res)
3950	if err := googleapi.CheckResponse(res); err != nil {
3951		return nil, err
3952	}
3953	ret := &LogView{
3954		ServerResponse: googleapi.ServerResponse{
3955			Header:         res.Header,
3956			HTTPStatusCode: res.StatusCode,
3957		},
3958	}
3959	target := &ret
3960	if err := gensupport.DecodeResponse(target, res); err != nil {
3961		return nil, err
3962	}
3963	return ret, nil
3964	// {
3965	//   "description": "Gets a view on a log bucket..",
3966	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/buckets/{bucketsId}/views/{viewsId}",
3967	//   "httpMethod": "GET",
3968	//   "id": "logging.billingAccounts.buckets.views.get",
3969	//   "parameterOrder": [
3970	//     "name"
3971	//   ],
3972	//   "parameters": {
3973	//     "name": {
3974	//       "description": "Required. The resource name of the policy: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
3975	//       "location": "path",
3976	//       "pattern": "^billingAccounts/[^/]+/buckets/[^/]+/views/[^/]+$",
3977	//       "required": true,
3978	//       "type": "string"
3979	//     }
3980	//   },
3981	//   "path": "v2/{+name}",
3982	//   "response": {
3983	//     "$ref": "LogView"
3984	//   },
3985	//   "scopes": [
3986	//     "https://www.googleapis.com/auth/cloud-platform",
3987	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
3988	//     "https://www.googleapis.com/auth/logging.admin",
3989	//     "https://www.googleapis.com/auth/logging.read"
3990	//   ]
3991	// }
3992
3993}
3994
3995// method id "logging.billingAccounts.exclusions.create":
3996
3997type BillingAccountsExclusionsCreateCall struct {
3998	s            *Service
3999	parent       string
4000	logexclusion *LogExclusion
4001	urlParams_   gensupport.URLParams
4002	ctx_         context.Context
4003	header_      http.Header
4004}
4005
4006// Create: Creates a new exclusion in a specified parent resource. Only
4007// log entries belonging to that resource can be excluded. You can have
4008// up to 10 exclusions in a resource.
4009//
4010// - parent: The parent resource in which to create the exclusion:
4011//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
4012//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
4013//   examples:"projects/my-logging-project" "organizations/123456789".
4014func (r *BillingAccountsExclusionsService) Create(parent string, logexclusion *LogExclusion) *BillingAccountsExclusionsCreateCall {
4015	c := &BillingAccountsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4016	c.parent = parent
4017	c.logexclusion = logexclusion
4018	return c
4019}
4020
4021// Fields allows partial responses to be retrieved. See
4022// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4023// for more information.
4024func (c *BillingAccountsExclusionsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsCreateCall {
4025	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4026	return c
4027}
4028
4029// Context sets the context to be used in this call's Do method. Any
4030// pending HTTP request will be aborted if the provided context is
4031// canceled.
4032func (c *BillingAccountsExclusionsCreateCall) Context(ctx context.Context) *BillingAccountsExclusionsCreateCall {
4033	c.ctx_ = ctx
4034	return c
4035}
4036
4037// Header returns an http.Header that can be modified by the caller to
4038// add HTTP headers to the request.
4039func (c *BillingAccountsExclusionsCreateCall) Header() http.Header {
4040	if c.header_ == nil {
4041		c.header_ = make(http.Header)
4042	}
4043	return c.header_
4044}
4045
4046func (c *BillingAccountsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
4047	reqHeaders := make(http.Header)
4048	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4049	for k, v := range c.header_ {
4050		reqHeaders[k] = v
4051	}
4052	reqHeaders.Set("User-Agent", c.s.userAgent())
4053	var body io.Reader = nil
4054	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
4055	if err != nil {
4056		return nil, err
4057	}
4058	reqHeaders.Set("Content-Type", "application/json")
4059	c.urlParams_.Set("alt", alt)
4060	c.urlParams_.Set("prettyPrint", "false")
4061	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
4062	urls += "?" + c.urlParams_.Encode()
4063	req, err := http.NewRequest("POST", urls, body)
4064	if err != nil {
4065		return nil, err
4066	}
4067	req.Header = reqHeaders
4068	googleapi.Expand(req.URL, map[string]string{
4069		"parent": c.parent,
4070	})
4071	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4072}
4073
4074// Do executes the "logging.billingAccounts.exclusions.create" call.
4075// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
4076// status code is an error. Response headers are in either
4077// *LogExclusion.ServerResponse.Header or (if a response was returned at
4078// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4079// to check whether the returned error was because
4080// http.StatusNotModified was returned.
4081func (c *BillingAccountsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
4082	gensupport.SetOptions(c.urlParams_, opts...)
4083	res, err := c.doRequest("json")
4084	if res != nil && res.StatusCode == http.StatusNotModified {
4085		if res.Body != nil {
4086			res.Body.Close()
4087		}
4088		return nil, &googleapi.Error{
4089			Code:   res.StatusCode,
4090			Header: res.Header,
4091		}
4092	}
4093	if err != nil {
4094		return nil, err
4095	}
4096	defer googleapi.CloseBody(res)
4097	if err := googleapi.CheckResponse(res); err != nil {
4098		return nil, err
4099	}
4100	ret := &LogExclusion{
4101		ServerResponse: googleapi.ServerResponse{
4102			Header:         res.Header,
4103			HTTPStatusCode: res.StatusCode,
4104		},
4105	}
4106	target := &ret
4107	if err := gensupport.DecodeResponse(target, res); err != nil {
4108		return nil, err
4109	}
4110	return ret, nil
4111	// {
4112	//   "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.",
4113	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions",
4114	//   "httpMethod": "POST",
4115	//   "id": "logging.billingAccounts.exclusions.create",
4116	//   "parameterOrder": [
4117	//     "parent"
4118	//   ],
4119	//   "parameters": {
4120	//     "parent": {
4121	//       "description": "Required. The parent resource in which to create the exclusion: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" For examples:\"projects/my-logging-project\" \"organizations/123456789\"",
4122	//       "location": "path",
4123	//       "pattern": "^billingAccounts/[^/]+$",
4124	//       "required": true,
4125	//       "type": "string"
4126	//     }
4127	//   },
4128	//   "path": "v2/{+parent}/exclusions",
4129	//   "request": {
4130	//     "$ref": "LogExclusion"
4131	//   },
4132	//   "response": {
4133	//     "$ref": "LogExclusion"
4134	//   },
4135	//   "scopes": [
4136	//     "https://www.googleapis.com/auth/cloud-platform",
4137	//     "https://www.googleapis.com/auth/logging.admin"
4138	//   ]
4139	// }
4140
4141}
4142
4143// method id "logging.billingAccounts.exclusions.delete":
4144
4145type BillingAccountsExclusionsDeleteCall struct {
4146	s          *Service
4147	name       string
4148	urlParams_ gensupport.URLParams
4149	ctx_       context.Context
4150	header_    http.Header
4151}
4152
4153// Delete: Deletes an exclusion.
4154//
4155// - name: The resource name of an existing exclusion to delete:
4156//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
4157//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
4158//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
4159//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
4160//   example:"projects/my-project/exclusions/my-exclusion".
4161func (r *BillingAccountsExclusionsService) Delete(name string) *BillingAccountsExclusionsDeleteCall {
4162	c := &BillingAccountsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4163	c.name = name
4164	return c
4165}
4166
4167// Fields allows partial responses to be retrieved. See
4168// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4169// for more information.
4170func (c *BillingAccountsExclusionsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsDeleteCall {
4171	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4172	return c
4173}
4174
4175// Context sets the context to be used in this call's Do method. Any
4176// pending HTTP request will be aborted if the provided context is
4177// canceled.
4178func (c *BillingAccountsExclusionsDeleteCall) Context(ctx context.Context) *BillingAccountsExclusionsDeleteCall {
4179	c.ctx_ = ctx
4180	return c
4181}
4182
4183// Header returns an http.Header that can be modified by the caller to
4184// add HTTP headers to the request.
4185func (c *BillingAccountsExclusionsDeleteCall) Header() http.Header {
4186	if c.header_ == nil {
4187		c.header_ = make(http.Header)
4188	}
4189	return c.header_
4190}
4191
4192func (c *BillingAccountsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
4193	reqHeaders := make(http.Header)
4194	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4195	for k, v := range c.header_ {
4196		reqHeaders[k] = v
4197	}
4198	reqHeaders.Set("User-Agent", c.s.userAgent())
4199	var body io.Reader = nil
4200	c.urlParams_.Set("alt", alt)
4201	c.urlParams_.Set("prettyPrint", "false")
4202	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
4203	urls += "?" + c.urlParams_.Encode()
4204	req, err := http.NewRequest("DELETE", urls, body)
4205	if err != nil {
4206		return nil, err
4207	}
4208	req.Header = reqHeaders
4209	googleapi.Expand(req.URL, map[string]string{
4210		"name": c.name,
4211	})
4212	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4213}
4214
4215// Do executes the "logging.billingAccounts.exclusions.delete" call.
4216// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4217// code is an error. Response headers are in either
4218// *Empty.ServerResponse.Header or (if a response was returned at all)
4219// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4220// check whether the returned error was because http.StatusNotModified
4221// was returned.
4222func (c *BillingAccountsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4223	gensupport.SetOptions(c.urlParams_, opts...)
4224	res, err := c.doRequest("json")
4225	if res != nil && res.StatusCode == http.StatusNotModified {
4226		if res.Body != nil {
4227			res.Body.Close()
4228		}
4229		return nil, &googleapi.Error{
4230			Code:   res.StatusCode,
4231			Header: res.Header,
4232		}
4233	}
4234	if err != nil {
4235		return nil, err
4236	}
4237	defer googleapi.CloseBody(res)
4238	if err := googleapi.CheckResponse(res); err != nil {
4239		return nil, err
4240	}
4241	ret := &Empty{
4242		ServerResponse: googleapi.ServerResponse{
4243			Header:         res.Header,
4244			HTTPStatusCode: res.StatusCode,
4245		},
4246	}
4247	target := &ret
4248	if err := gensupport.DecodeResponse(target, res); err != nil {
4249		return nil, err
4250	}
4251	return ret, nil
4252	// {
4253	//   "description": "Deletes an exclusion.",
4254	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}",
4255	//   "httpMethod": "DELETE",
4256	//   "id": "logging.billingAccounts.exclusions.delete",
4257	//   "parameterOrder": [
4258	//     "name"
4259	//   ],
4260	//   "parameters": {
4261	//     "name": {
4262	//       "description": "Required. The resource name of an existing exclusion to delete: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
4263	//       "location": "path",
4264	//       "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$",
4265	//       "required": true,
4266	//       "type": "string"
4267	//     }
4268	//   },
4269	//   "path": "v2/{+name}",
4270	//   "response": {
4271	//     "$ref": "Empty"
4272	//   },
4273	//   "scopes": [
4274	//     "https://www.googleapis.com/auth/cloud-platform",
4275	//     "https://www.googleapis.com/auth/logging.admin"
4276	//   ]
4277	// }
4278
4279}
4280
4281// method id "logging.billingAccounts.exclusions.get":
4282
4283type BillingAccountsExclusionsGetCall struct {
4284	s            *Service
4285	name         string
4286	urlParams_   gensupport.URLParams
4287	ifNoneMatch_ string
4288	ctx_         context.Context
4289	header_      http.Header
4290}
4291
4292// Get: Gets the description of an exclusion.
4293//
4294// - name: The resource name of an existing exclusion:
4295//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
4296//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
4297//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
4298//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
4299//   example:"projects/my-project/exclusions/my-exclusion".
4300func (r *BillingAccountsExclusionsService) Get(name string) *BillingAccountsExclusionsGetCall {
4301	c := &BillingAccountsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4302	c.name = name
4303	return c
4304}
4305
4306// Fields allows partial responses to be retrieved. See
4307// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4308// for more information.
4309func (c *BillingAccountsExclusionsGetCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsGetCall {
4310	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4311	return c
4312}
4313
4314// IfNoneMatch sets the optional parameter which makes the operation
4315// fail if the object's ETag matches the given value. This is useful for
4316// getting updates only after the object has changed since the last
4317// request. Use googleapi.IsNotModified to check whether the response
4318// error from Do is the result of In-None-Match.
4319func (c *BillingAccountsExclusionsGetCall) IfNoneMatch(entityTag string) *BillingAccountsExclusionsGetCall {
4320	c.ifNoneMatch_ = entityTag
4321	return c
4322}
4323
4324// Context sets the context to be used in this call's Do method. Any
4325// pending HTTP request will be aborted if the provided context is
4326// canceled.
4327func (c *BillingAccountsExclusionsGetCall) Context(ctx context.Context) *BillingAccountsExclusionsGetCall {
4328	c.ctx_ = ctx
4329	return c
4330}
4331
4332// Header returns an http.Header that can be modified by the caller to
4333// add HTTP headers to the request.
4334func (c *BillingAccountsExclusionsGetCall) Header() http.Header {
4335	if c.header_ == nil {
4336		c.header_ = make(http.Header)
4337	}
4338	return c.header_
4339}
4340
4341func (c *BillingAccountsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
4342	reqHeaders := make(http.Header)
4343	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4344	for k, v := range c.header_ {
4345		reqHeaders[k] = v
4346	}
4347	reqHeaders.Set("User-Agent", c.s.userAgent())
4348	if c.ifNoneMatch_ != "" {
4349		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4350	}
4351	var body io.Reader = nil
4352	c.urlParams_.Set("alt", alt)
4353	c.urlParams_.Set("prettyPrint", "false")
4354	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
4355	urls += "?" + c.urlParams_.Encode()
4356	req, err := http.NewRequest("GET", urls, body)
4357	if err != nil {
4358		return nil, err
4359	}
4360	req.Header = reqHeaders
4361	googleapi.Expand(req.URL, map[string]string{
4362		"name": c.name,
4363	})
4364	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4365}
4366
4367// Do executes the "logging.billingAccounts.exclusions.get" call.
4368// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
4369// status code is an error. Response headers are in either
4370// *LogExclusion.ServerResponse.Header or (if a response was returned at
4371// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4372// to check whether the returned error was because
4373// http.StatusNotModified was returned.
4374func (c *BillingAccountsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
4375	gensupport.SetOptions(c.urlParams_, opts...)
4376	res, err := c.doRequest("json")
4377	if res != nil && res.StatusCode == http.StatusNotModified {
4378		if res.Body != nil {
4379			res.Body.Close()
4380		}
4381		return nil, &googleapi.Error{
4382			Code:   res.StatusCode,
4383			Header: res.Header,
4384		}
4385	}
4386	if err != nil {
4387		return nil, err
4388	}
4389	defer googleapi.CloseBody(res)
4390	if err := googleapi.CheckResponse(res); err != nil {
4391		return nil, err
4392	}
4393	ret := &LogExclusion{
4394		ServerResponse: googleapi.ServerResponse{
4395			Header:         res.Header,
4396			HTTPStatusCode: res.StatusCode,
4397		},
4398	}
4399	target := &ret
4400	if err := gensupport.DecodeResponse(target, res); err != nil {
4401		return nil, err
4402	}
4403	return ret, nil
4404	// {
4405	//   "description": "Gets the description of an exclusion.",
4406	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}",
4407	//   "httpMethod": "GET",
4408	//   "id": "logging.billingAccounts.exclusions.get",
4409	//   "parameterOrder": [
4410	//     "name"
4411	//   ],
4412	//   "parameters": {
4413	//     "name": {
4414	//       "description": "Required. The resource name of an existing exclusion: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
4415	//       "location": "path",
4416	//       "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$",
4417	//       "required": true,
4418	//       "type": "string"
4419	//     }
4420	//   },
4421	//   "path": "v2/{+name}",
4422	//   "response": {
4423	//     "$ref": "LogExclusion"
4424	//   },
4425	//   "scopes": [
4426	//     "https://www.googleapis.com/auth/cloud-platform",
4427	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
4428	//     "https://www.googleapis.com/auth/logging.admin",
4429	//     "https://www.googleapis.com/auth/logging.read"
4430	//   ]
4431	// }
4432
4433}
4434
4435// method id "logging.billingAccounts.exclusions.list":
4436
4437type BillingAccountsExclusionsListCall struct {
4438	s            *Service
4439	parent       string
4440	urlParams_   gensupport.URLParams
4441	ifNoneMatch_ string
4442	ctx_         context.Context
4443	header_      http.Header
4444}
4445
4446// List: Lists all the exclusions in a parent resource.
4447//
4448// - parent: The parent resource whose exclusions are to be listed.
4449//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
4450//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
4451func (r *BillingAccountsExclusionsService) List(parent string) *BillingAccountsExclusionsListCall {
4452	c := &BillingAccountsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4453	c.parent = parent
4454	return c
4455}
4456
4457// PageSize sets the optional parameter "pageSize": The maximum number
4458// of results to return from this request. Non-positive values are
4459// ignored. The presence of nextPageToken in the response indicates that
4460// more results might be available.
4461func (c *BillingAccountsExclusionsListCall) PageSize(pageSize int64) *BillingAccountsExclusionsListCall {
4462	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4463	return c
4464}
4465
4466// PageToken sets the optional parameter "pageToken": If present, then
4467// retrieve the next batch of results from the preceding call to this
4468// method. pageToken must be the value of nextPageToken from the
4469// previous response. The values of other method parameters should be
4470// identical to those in the previous call.
4471func (c *BillingAccountsExclusionsListCall) PageToken(pageToken string) *BillingAccountsExclusionsListCall {
4472	c.urlParams_.Set("pageToken", pageToken)
4473	return c
4474}
4475
4476// Fields allows partial responses to be retrieved. See
4477// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4478// for more information.
4479func (c *BillingAccountsExclusionsListCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsListCall {
4480	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4481	return c
4482}
4483
4484// IfNoneMatch sets the optional parameter which makes the operation
4485// fail if the object's ETag matches the given value. This is useful for
4486// getting updates only after the object has changed since the last
4487// request. Use googleapi.IsNotModified to check whether the response
4488// error from Do is the result of In-None-Match.
4489func (c *BillingAccountsExclusionsListCall) IfNoneMatch(entityTag string) *BillingAccountsExclusionsListCall {
4490	c.ifNoneMatch_ = entityTag
4491	return c
4492}
4493
4494// Context sets the context to be used in this call's Do method. Any
4495// pending HTTP request will be aborted if the provided context is
4496// canceled.
4497func (c *BillingAccountsExclusionsListCall) Context(ctx context.Context) *BillingAccountsExclusionsListCall {
4498	c.ctx_ = ctx
4499	return c
4500}
4501
4502// Header returns an http.Header that can be modified by the caller to
4503// add HTTP headers to the request.
4504func (c *BillingAccountsExclusionsListCall) Header() http.Header {
4505	if c.header_ == nil {
4506		c.header_ = make(http.Header)
4507	}
4508	return c.header_
4509}
4510
4511func (c *BillingAccountsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
4512	reqHeaders := make(http.Header)
4513	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4514	for k, v := range c.header_ {
4515		reqHeaders[k] = v
4516	}
4517	reqHeaders.Set("User-Agent", c.s.userAgent())
4518	if c.ifNoneMatch_ != "" {
4519		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4520	}
4521	var body io.Reader = nil
4522	c.urlParams_.Set("alt", alt)
4523	c.urlParams_.Set("prettyPrint", "false")
4524	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
4525	urls += "?" + c.urlParams_.Encode()
4526	req, err := http.NewRequest("GET", urls, body)
4527	if err != nil {
4528		return nil, err
4529	}
4530	req.Header = reqHeaders
4531	googleapi.Expand(req.URL, map[string]string{
4532		"parent": c.parent,
4533	})
4534	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4535}
4536
4537// Do executes the "logging.billingAccounts.exclusions.list" call.
4538// Exactly one of *ListExclusionsResponse or error will be non-nil. Any
4539// non-2xx status code is an error. Response headers are in either
4540// *ListExclusionsResponse.ServerResponse.Header or (if a response was
4541// returned at all) in error.(*googleapi.Error).Header. Use
4542// googleapi.IsNotModified to check whether the returned error was
4543// because http.StatusNotModified was returned.
4544func (c *BillingAccountsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
4545	gensupport.SetOptions(c.urlParams_, opts...)
4546	res, err := c.doRequest("json")
4547	if res != nil && res.StatusCode == http.StatusNotModified {
4548		if res.Body != nil {
4549			res.Body.Close()
4550		}
4551		return nil, &googleapi.Error{
4552			Code:   res.StatusCode,
4553			Header: res.Header,
4554		}
4555	}
4556	if err != nil {
4557		return nil, err
4558	}
4559	defer googleapi.CloseBody(res)
4560	if err := googleapi.CheckResponse(res); err != nil {
4561		return nil, err
4562	}
4563	ret := &ListExclusionsResponse{
4564		ServerResponse: googleapi.ServerResponse{
4565			Header:         res.Header,
4566			HTTPStatusCode: res.StatusCode,
4567		},
4568	}
4569	target := &ret
4570	if err := gensupport.DecodeResponse(target, res); err != nil {
4571		return nil, err
4572	}
4573	return ret, nil
4574	// {
4575	//   "description": "Lists all the exclusions in a parent resource.",
4576	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions",
4577	//   "httpMethod": "GET",
4578	//   "id": "logging.billingAccounts.exclusions.list",
4579	//   "parameterOrder": [
4580	//     "parent"
4581	//   ],
4582	//   "parameters": {
4583	//     "pageSize": {
4584	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
4585	//       "format": "int32",
4586	//       "location": "query",
4587	//       "type": "integer"
4588	//     },
4589	//     "pageToken": {
4590	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
4591	//       "location": "query",
4592	//       "type": "string"
4593	//     },
4594	//     "parent": {
4595	//       "description": "Required. The parent resource whose exclusions are to be listed. \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" ",
4596	//       "location": "path",
4597	//       "pattern": "^billingAccounts/[^/]+$",
4598	//       "required": true,
4599	//       "type": "string"
4600	//     }
4601	//   },
4602	//   "path": "v2/{+parent}/exclusions",
4603	//   "response": {
4604	//     "$ref": "ListExclusionsResponse"
4605	//   },
4606	//   "scopes": [
4607	//     "https://www.googleapis.com/auth/cloud-platform",
4608	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
4609	//     "https://www.googleapis.com/auth/logging.admin",
4610	//     "https://www.googleapis.com/auth/logging.read"
4611	//   ]
4612	// }
4613
4614}
4615
4616// Pages invokes f for each page of results.
4617// A non-nil error returned from f will halt the iteration.
4618// The provided context supersedes any context provided to the Context method.
4619func (c *BillingAccountsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
4620	c.ctx_ = ctx
4621	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4622	for {
4623		x, err := c.Do()
4624		if err != nil {
4625			return err
4626		}
4627		if err := f(x); err != nil {
4628			return err
4629		}
4630		if x.NextPageToken == "" {
4631			return nil
4632		}
4633		c.PageToken(x.NextPageToken)
4634	}
4635}
4636
4637// method id "logging.billingAccounts.exclusions.patch":
4638
4639type BillingAccountsExclusionsPatchCall struct {
4640	s            *Service
4641	name         string
4642	logexclusion *LogExclusion
4643	urlParams_   gensupport.URLParams
4644	ctx_         context.Context
4645	header_      http.Header
4646}
4647
4648// Patch: Changes one or more properties of an existing exclusion.
4649//
4650// - name: The resource name of the exclusion to update:
4651//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
4652//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
4653//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
4654//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
4655//   example:"projects/my-project/exclusions/my-exclusion".
4656func (r *BillingAccountsExclusionsService) Patch(name string, logexclusion *LogExclusion) *BillingAccountsExclusionsPatchCall {
4657	c := &BillingAccountsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4658	c.name = name
4659	c.logexclusion = logexclusion
4660	return c
4661}
4662
4663// UpdateMask sets the optional parameter "updateMask": Required. A
4664// non-empty list of fields to change in the existing exclusion. New
4665// values for the fields are taken from the corresponding fields in the
4666// LogExclusion included in this request. Fields not mentioned in
4667// update_mask are not changed and are ignored in the request.For
4668// example, to change the filter and description of an exclusion,
4669// specify an update_mask of "filter,description".
4670func (c *BillingAccountsExclusionsPatchCall) UpdateMask(updateMask string) *BillingAccountsExclusionsPatchCall {
4671	c.urlParams_.Set("updateMask", updateMask)
4672	return c
4673}
4674
4675// Fields allows partial responses to be retrieved. See
4676// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4677// for more information.
4678func (c *BillingAccountsExclusionsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsPatchCall {
4679	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4680	return c
4681}
4682
4683// Context sets the context to be used in this call's Do method. Any
4684// pending HTTP request will be aborted if the provided context is
4685// canceled.
4686func (c *BillingAccountsExclusionsPatchCall) Context(ctx context.Context) *BillingAccountsExclusionsPatchCall {
4687	c.ctx_ = ctx
4688	return c
4689}
4690
4691// Header returns an http.Header that can be modified by the caller to
4692// add HTTP headers to the request.
4693func (c *BillingAccountsExclusionsPatchCall) Header() http.Header {
4694	if c.header_ == nil {
4695		c.header_ = make(http.Header)
4696	}
4697	return c.header_
4698}
4699
4700func (c *BillingAccountsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
4701	reqHeaders := make(http.Header)
4702	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4703	for k, v := range c.header_ {
4704		reqHeaders[k] = v
4705	}
4706	reqHeaders.Set("User-Agent", c.s.userAgent())
4707	var body io.Reader = nil
4708	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
4709	if err != nil {
4710		return nil, err
4711	}
4712	reqHeaders.Set("Content-Type", "application/json")
4713	c.urlParams_.Set("alt", alt)
4714	c.urlParams_.Set("prettyPrint", "false")
4715	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
4716	urls += "?" + c.urlParams_.Encode()
4717	req, err := http.NewRequest("PATCH", urls, body)
4718	if err != nil {
4719		return nil, err
4720	}
4721	req.Header = reqHeaders
4722	googleapi.Expand(req.URL, map[string]string{
4723		"name": c.name,
4724	})
4725	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4726}
4727
4728// Do executes the "logging.billingAccounts.exclusions.patch" call.
4729// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
4730// status code is an error. Response headers are in either
4731// *LogExclusion.ServerResponse.Header or (if a response was returned at
4732// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4733// to check whether the returned error was because
4734// http.StatusNotModified was returned.
4735func (c *BillingAccountsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
4736	gensupport.SetOptions(c.urlParams_, opts...)
4737	res, err := c.doRequest("json")
4738	if res != nil && res.StatusCode == http.StatusNotModified {
4739		if res.Body != nil {
4740			res.Body.Close()
4741		}
4742		return nil, &googleapi.Error{
4743			Code:   res.StatusCode,
4744			Header: res.Header,
4745		}
4746	}
4747	if err != nil {
4748		return nil, err
4749	}
4750	defer googleapi.CloseBody(res)
4751	if err := googleapi.CheckResponse(res); err != nil {
4752		return nil, err
4753	}
4754	ret := &LogExclusion{
4755		ServerResponse: googleapi.ServerResponse{
4756			Header:         res.Header,
4757			HTTPStatusCode: res.StatusCode,
4758		},
4759	}
4760	target := &ret
4761	if err := gensupport.DecodeResponse(target, res); err != nil {
4762		return nil, err
4763	}
4764	return ret, nil
4765	// {
4766	//   "description": "Changes one or more properties of an existing exclusion.",
4767	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}",
4768	//   "httpMethod": "PATCH",
4769	//   "id": "logging.billingAccounts.exclusions.patch",
4770	//   "parameterOrder": [
4771	//     "name"
4772	//   ],
4773	//   "parameters": {
4774	//     "name": {
4775	//       "description": "Required. The resource name of the exclusion to update: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
4776	//       "location": "path",
4777	//       "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$",
4778	//       "required": true,
4779	//       "type": "string"
4780	//     },
4781	//     "updateMask": {
4782	//       "description": "Required. A non-empty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".",
4783	//       "format": "google-fieldmask",
4784	//       "location": "query",
4785	//       "type": "string"
4786	//     }
4787	//   },
4788	//   "path": "v2/{+name}",
4789	//   "request": {
4790	//     "$ref": "LogExclusion"
4791	//   },
4792	//   "response": {
4793	//     "$ref": "LogExclusion"
4794	//   },
4795	//   "scopes": [
4796	//     "https://www.googleapis.com/auth/cloud-platform",
4797	//     "https://www.googleapis.com/auth/logging.admin"
4798	//   ]
4799	// }
4800
4801}
4802
4803// method id "logging.billingAccounts.locations.get":
4804
4805type BillingAccountsLocationsGetCall struct {
4806	s            *Service
4807	name         string
4808	urlParams_   gensupport.URLParams
4809	ifNoneMatch_ string
4810	ctx_         context.Context
4811	header_      http.Header
4812}
4813
4814// Get: Gets information about a location.
4815//
4816// - name: Resource name for the location.
4817func (r *BillingAccountsLocationsService) Get(name string) *BillingAccountsLocationsGetCall {
4818	c := &BillingAccountsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4819	c.name = name
4820	return c
4821}
4822
4823// Fields allows partial responses to be retrieved. See
4824// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4825// for more information.
4826func (c *BillingAccountsLocationsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsGetCall {
4827	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4828	return c
4829}
4830
4831// IfNoneMatch sets the optional parameter which makes the operation
4832// fail if the object's ETag matches the given value. This is useful for
4833// getting updates only after the object has changed since the last
4834// request. Use googleapi.IsNotModified to check whether the response
4835// error from Do is the result of In-None-Match.
4836func (c *BillingAccountsLocationsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsGetCall {
4837	c.ifNoneMatch_ = entityTag
4838	return c
4839}
4840
4841// Context sets the context to be used in this call's Do method. Any
4842// pending HTTP request will be aborted if the provided context is
4843// canceled.
4844func (c *BillingAccountsLocationsGetCall) Context(ctx context.Context) *BillingAccountsLocationsGetCall {
4845	c.ctx_ = ctx
4846	return c
4847}
4848
4849// Header returns an http.Header that can be modified by the caller to
4850// add HTTP headers to the request.
4851func (c *BillingAccountsLocationsGetCall) Header() http.Header {
4852	if c.header_ == nil {
4853		c.header_ = make(http.Header)
4854	}
4855	return c.header_
4856}
4857
4858func (c *BillingAccountsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
4859	reqHeaders := make(http.Header)
4860	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4861	for k, v := range c.header_ {
4862		reqHeaders[k] = v
4863	}
4864	reqHeaders.Set("User-Agent", c.s.userAgent())
4865	if c.ifNoneMatch_ != "" {
4866		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4867	}
4868	var body io.Reader = nil
4869	c.urlParams_.Set("alt", alt)
4870	c.urlParams_.Set("prettyPrint", "false")
4871	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
4872	urls += "?" + c.urlParams_.Encode()
4873	req, err := http.NewRequest("GET", urls, body)
4874	if err != nil {
4875		return nil, err
4876	}
4877	req.Header = reqHeaders
4878	googleapi.Expand(req.URL, map[string]string{
4879		"name": c.name,
4880	})
4881	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4882}
4883
4884// Do executes the "logging.billingAccounts.locations.get" call.
4885// Exactly one of *Location or error will be non-nil. Any non-2xx status
4886// code is an error. Response headers are in either
4887// *Location.ServerResponse.Header or (if a response was returned at
4888// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4889// to check whether the returned error was because
4890// http.StatusNotModified was returned.
4891func (c *BillingAccountsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
4892	gensupport.SetOptions(c.urlParams_, opts...)
4893	res, err := c.doRequest("json")
4894	if res != nil && res.StatusCode == http.StatusNotModified {
4895		if res.Body != nil {
4896			res.Body.Close()
4897		}
4898		return nil, &googleapi.Error{
4899			Code:   res.StatusCode,
4900			Header: res.Header,
4901		}
4902	}
4903	if err != nil {
4904		return nil, err
4905	}
4906	defer googleapi.CloseBody(res)
4907	if err := googleapi.CheckResponse(res); err != nil {
4908		return nil, err
4909	}
4910	ret := &Location{
4911		ServerResponse: googleapi.ServerResponse{
4912			Header:         res.Header,
4913			HTTPStatusCode: res.StatusCode,
4914		},
4915	}
4916	target := &ret
4917	if err := gensupport.DecodeResponse(target, res); err != nil {
4918		return nil, err
4919	}
4920	return ret, nil
4921	// {
4922	//   "description": "Gets information about a location.",
4923	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}",
4924	//   "httpMethod": "GET",
4925	//   "id": "logging.billingAccounts.locations.get",
4926	//   "parameterOrder": [
4927	//     "name"
4928	//   ],
4929	//   "parameters": {
4930	//     "name": {
4931	//       "description": "Resource name for the location.",
4932	//       "location": "path",
4933	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+$",
4934	//       "required": true,
4935	//       "type": "string"
4936	//     }
4937	//   },
4938	//   "path": "v2/{+name}",
4939	//   "response": {
4940	//     "$ref": "Location"
4941	//   },
4942	//   "scopes": [
4943	//     "https://www.googleapis.com/auth/cloud-platform",
4944	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
4945	//     "https://www.googleapis.com/auth/logging.admin",
4946	//     "https://www.googleapis.com/auth/logging.read"
4947	//   ]
4948	// }
4949
4950}
4951
4952// method id "logging.billingAccounts.locations.list":
4953
4954type BillingAccountsLocationsListCall struct {
4955	s            *Service
4956	name         string
4957	urlParams_   gensupport.URLParams
4958	ifNoneMatch_ string
4959	ctx_         context.Context
4960	header_      http.Header
4961}
4962
4963// List: Lists information about the supported locations for this
4964// service.
4965//
4966// - name: The resource that owns the locations collection, if
4967//   applicable.
4968func (r *BillingAccountsLocationsService) List(name string) *BillingAccountsLocationsListCall {
4969	c := &BillingAccountsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4970	c.name = name
4971	return c
4972}
4973
4974// Filter sets the optional parameter "filter": A filter to narrow down
4975// results to a preferred subset. The filtering language accepts strings
4976// like "displayName=tokyo", and is documented in more detail in AIP-160
4977// (https://google.aip.dev/160).
4978func (c *BillingAccountsLocationsListCall) Filter(filter string) *BillingAccountsLocationsListCall {
4979	c.urlParams_.Set("filter", filter)
4980	return c
4981}
4982
4983// PageSize sets the optional parameter "pageSize": The maximum number
4984// of results to return. If not set, the service selects a default.
4985func (c *BillingAccountsLocationsListCall) PageSize(pageSize int64) *BillingAccountsLocationsListCall {
4986	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4987	return c
4988}
4989
4990// PageToken sets the optional parameter "pageToken": A page token
4991// received from the next_page_token field in the response. Send that
4992// page token to receive the subsequent page.
4993func (c *BillingAccountsLocationsListCall) PageToken(pageToken string) *BillingAccountsLocationsListCall {
4994	c.urlParams_.Set("pageToken", pageToken)
4995	return c
4996}
4997
4998// Fields allows partial responses to be retrieved. See
4999// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5000// for more information.
5001func (c *BillingAccountsLocationsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsListCall {
5002	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5003	return c
5004}
5005
5006// IfNoneMatch sets the optional parameter which makes the operation
5007// fail if the object's ETag matches the given value. This is useful for
5008// getting updates only after the object has changed since the last
5009// request. Use googleapi.IsNotModified to check whether the response
5010// error from Do is the result of In-None-Match.
5011func (c *BillingAccountsLocationsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsListCall {
5012	c.ifNoneMatch_ = entityTag
5013	return c
5014}
5015
5016// Context sets the context to be used in this call's Do method. Any
5017// pending HTTP request will be aborted if the provided context is
5018// canceled.
5019func (c *BillingAccountsLocationsListCall) Context(ctx context.Context) *BillingAccountsLocationsListCall {
5020	c.ctx_ = ctx
5021	return c
5022}
5023
5024// Header returns an http.Header that can be modified by the caller to
5025// add HTTP headers to the request.
5026func (c *BillingAccountsLocationsListCall) Header() http.Header {
5027	if c.header_ == nil {
5028		c.header_ = make(http.Header)
5029	}
5030	return c.header_
5031}
5032
5033func (c *BillingAccountsLocationsListCall) doRequest(alt string) (*http.Response, error) {
5034	reqHeaders := make(http.Header)
5035	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5036	for k, v := range c.header_ {
5037		reqHeaders[k] = v
5038	}
5039	reqHeaders.Set("User-Agent", c.s.userAgent())
5040	if c.ifNoneMatch_ != "" {
5041		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5042	}
5043	var body io.Reader = nil
5044	c.urlParams_.Set("alt", alt)
5045	c.urlParams_.Set("prettyPrint", "false")
5046	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
5047	urls += "?" + c.urlParams_.Encode()
5048	req, err := http.NewRequest("GET", urls, body)
5049	if err != nil {
5050		return nil, err
5051	}
5052	req.Header = reqHeaders
5053	googleapi.Expand(req.URL, map[string]string{
5054		"name": c.name,
5055	})
5056	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5057}
5058
5059// Do executes the "logging.billingAccounts.locations.list" call.
5060// Exactly one of *ListLocationsResponse or error will be non-nil. Any
5061// non-2xx status code is an error. Response headers are in either
5062// *ListLocationsResponse.ServerResponse.Header or (if a response was
5063// returned at all) in error.(*googleapi.Error).Header. Use
5064// googleapi.IsNotModified to check whether the returned error was
5065// because http.StatusNotModified was returned.
5066func (c *BillingAccountsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
5067	gensupport.SetOptions(c.urlParams_, opts...)
5068	res, err := c.doRequest("json")
5069	if res != nil && res.StatusCode == http.StatusNotModified {
5070		if res.Body != nil {
5071			res.Body.Close()
5072		}
5073		return nil, &googleapi.Error{
5074			Code:   res.StatusCode,
5075			Header: res.Header,
5076		}
5077	}
5078	if err != nil {
5079		return nil, err
5080	}
5081	defer googleapi.CloseBody(res)
5082	if err := googleapi.CheckResponse(res); err != nil {
5083		return nil, err
5084	}
5085	ret := &ListLocationsResponse{
5086		ServerResponse: googleapi.ServerResponse{
5087			Header:         res.Header,
5088			HTTPStatusCode: res.StatusCode,
5089		},
5090	}
5091	target := &ret
5092	if err := gensupport.DecodeResponse(target, res); err != nil {
5093		return nil, err
5094	}
5095	return ret, nil
5096	// {
5097	//   "description": "Lists information about the supported locations for this service.",
5098	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations",
5099	//   "httpMethod": "GET",
5100	//   "id": "logging.billingAccounts.locations.list",
5101	//   "parameterOrder": [
5102	//     "name"
5103	//   ],
5104	//   "parameters": {
5105	//     "filter": {
5106	//       "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in AIP-160 (https://google.aip.dev/160).",
5107	//       "location": "query",
5108	//       "type": "string"
5109	//     },
5110	//     "name": {
5111	//       "description": "The resource that owns the locations collection, if applicable.",
5112	//       "location": "path",
5113	//       "pattern": "^billingAccounts/[^/]+$",
5114	//       "required": true,
5115	//       "type": "string"
5116	//     },
5117	//     "pageSize": {
5118	//       "description": "The maximum number of results to return. If not set, the service selects a default.",
5119	//       "format": "int32",
5120	//       "location": "query",
5121	//       "type": "integer"
5122	//     },
5123	//     "pageToken": {
5124	//       "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.",
5125	//       "location": "query",
5126	//       "type": "string"
5127	//     }
5128	//   },
5129	//   "path": "v2/{+name}/locations",
5130	//   "response": {
5131	//     "$ref": "ListLocationsResponse"
5132	//   },
5133	//   "scopes": [
5134	//     "https://www.googleapis.com/auth/cloud-platform",
5135	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
5136	//     "https://www.googleapis.com/auth/logging.admin",
5137	//     "https://www.googleapis.com/auth/logging.read"
5138	//   ]
5139	// }
5140
5141}
5142
5143// Pages invokes f for each page of results.
5144// A non-nil error returned from f will halt the iteration.
5145// The provided context supersedes any context provided to the Context method.
5146func (c *BillingAccountsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
5147	c.ctx_ = ctx
5148	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5149	for {
5150		x, err := c.Do()
5151		if err != nil {
5152			return err
5153		}
5154		if err := f(x); err != nil {
5155			return err
5156		}
5157		if x.NextPageToken == "" {
5158			return nil
5159		}
5160		c.PageToken(x.NextPageToken)
5161	}
5162}
5163
5164// method id "logging.billingAccounts.locations.buckets.create":
5165
5166type BillingAccountsLocationsBucketsCreateCall struct {
5167	s          *Service
5168	parent     string
5169	logbucket  *LogBucket
5170	urlParams_ gensupport.URLParams
5171	ctx_       context.Context
5172	header_    http.Header
5173}
5174
5175// Create: Creates a log bucket that can be used to store log entries.
5176// After a bucket has been created, the bucket's location cannot be
5177// changed.
5178//
5179// - parent: The resource in which to create the log bucket:
5180//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
5181//   example:"projects/my-project/locations/global".
5182func (r *BillingAccountsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *BillingAccountsLocationsBucketsCreateCall {
5183	c := &BillingAccountsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5184	c.parent = parent
5185	c.logbucket = logbucket
5186	return c
5187}
5188
5189// BucketId sets the optional parameter "bucketId": Required. A
5190// client-assigned identifier such as "my-bucket". Identifiers are
5191// limited to 100 characters and can include only letters, digits,
5192// underscores, hyphens, and periods.
5193func (c *BillingAccountsLocationsBucketsCreateCall) BucketId(bucketId string) *BillingAccountsLocationsBucketsCreateCall {
5194	c.urlParams_.Set("bucketId", bucketId)
5195	return c
5196}
5197
5198// Fields allows partial responses to be retrieved. See
5199// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5200// for more information.
5201func (c *BillingAccountsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsCreateCall {
5202	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5203	return c
5204}
5205
5206// Context sets the context to be used in this call's Do method. Any
5207// pending HTTP request will be aborted if the provided context is
5208// canceled.
5209func (c *BillingAccountsLocationsBucketsCreateCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsCreateCall {
5210	c.ctx_ = ctx
5211	return c
5212}
5213
5214// Header returns an http.Header that can be modified by the caller to
5215// add HTTP headers to the request.
5216func (c *BillingAccountsLocationsBucketsCreateCall) Header() http.Header {
5217	if c.header_ == nil {
5218		c.header_ = make(http.Header)
5219	}
5220	return c.header_
5221}
5222
5223func (c *BillingAccountsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
5224	reqHeaders := make(http.Header)
5225	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5226	for k, v := range c.header_ {
5227		reqHeaders[k] = v
5228	}
5229	reqHeaders.Set("User-Agent", c.s.userAgent())
5230	var body io.Reader = nil
5231	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
5232	if err != nil {
5233		return nil, err
5234	}
5235	reqHeaders.Set("Content-Type", "application/json")
5236	c.urlParams_.Set("alt", alt)
5237	c.urlParams_.Set("prettyPrint", "false")
5238	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
5239	urls += "?" + c.urlParams_.Encode()
5240	req, err := http.NewRequest("POST", urls, body)
5241	if err != nil {
5242		return nil, err
5243	}
5244	req.Header = reqHeaders
5245	googleapi.Expand(req.URL, map[string]string{
5246		"parent": c.parent,
5247	})
5248	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5249}
5250
5251// Do executes the "logging.billingAccounts.locations.buckets.create" call.
5252// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
5253// status code is an error. Response headers are in either
5254// *LogBucket.ServerResponse.Header or (if a response was returned at
5255// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5256// to check whether the returned error was because
5257// http.StatusNotModified was returned.
5258func (c *BillingAccountsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
5259	gensupport.SetOptions(c.urlParams_, opts...)
5260	res, err := c.doRequest("json")
5261	if res != nil && res.StatusCode == http.StatusNotModified {
5262		if res.Body != nil {
5263			res.Body.Close()
5264		}
5265		return nil, &googleapi.Error{
5266			Code:   res.StatusCode,
5267			Header: res.Header,
5268		}
5269	}
5270	if err != nil {
5271		return nil, err
5272	}
5273	defer googleapi.CloseBody(res)
5274	if err := googleapi.CheckResponse(res); err != nil {
5275		return nil, err
5276	}
5277	ret := &LogBucket{
5278		ServerResponse: googleapi.ServerResponse{
5279			Header:         res.Header,
5280			HTTPStatusCode: res.StatusCode,
5281		},
5282	}
5283	target := &ret
5284	if err := gensupport.DecodeResponse(target, res); err != nil {
5285		return nil, err
5286	}
5287	return ret, nil
5288	// {
5289	//   "description": "Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.",
5290	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets",
5291	//   "httpMethod": "POST",
5292	//   "id": "logging.billingAccounts.locations.buckets.create",
5293	//   "parameterOrder": [
5294	//     "parent"
5295	//   ],
5296	//   "parameters": {
5297	//     "bucketId": {
5298	//       "description": "Required. A client-assigned identifier such as \"my-bucket\". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.",
5299	//       "location": "query",
5300	//       "type": "string"
5301	//     },
5302	//     "parent": {
5303	//       "description": "Required. The resource in which to create the log bucket: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" For example:\"projects/my-project/locations/global\"",
5304	//       "location": "path",
5305	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+$",
5306	//       "required": true,
5307	//       "type": "string"
5308	//     }
5309	//   },
5310	//   "path": "v2/{+parent}/buckets",
5311	//   "request": {
5312	//     "$ref": "LogBucket"
5313	//   },
5314	//   "response": {
5315	//     "$ref": "LogBucket"
5316	//   },
5317	//   "scopes": [
5318	//     "https://www.googleapis.com/auth/cloud-platform",
5319	//     "https://www.googleapis.com/auth/logging.admin"
5320	//   ]
5321	// }
5322
5323}
5324
5325// method id "logging.billingAccounts.locations.buckets.delete":
5326
5327type BillingAccountsLocationsBucketsDeleteCall struct {
5328	s          *Service
5329	name       string
5330	urlParams_ gensupport.URLParams
5331	ctx_       context.Context
5332	header_    http.Header
5333}
5334
5335// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to
5336// the DELETE_REQUESTED state. After 7 days, the bucket will be purged
5337// and all log entries in the bucket will be permanently deleted.
5338//
5339// - name: The full resource name of the bucket to delete.
5340//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
5341//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
5342//   CKET_ID]"
5343//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
5344//   s/[BUCKET_ID]"
5345//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
5346//   For
5347//   example:"projects/my-project/locations/global/buckets/my-bucket".
5348func (r *BillingAccountsLocationsBucketsService) Delete(name string) *BillingAccountsLocationsBucketsDeleteCall {
5349	c := &BillingAccountsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5350	c.name = name
5351	return c
5352}
5353
5354// Fields allows partial responses to be retrieved. See
5355// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5356// for more information.
5357func (c *BillingAccountsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsDeleteCall {
5358	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5359	return c
5360}
5361
5362// Context sets the context to be used in this call's Do method. Any
5363// pending HTTP request will be aborted if the provided context is
5364// canceled.
5365func (c *BillingAccountsLocationsBucketsDeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsDeleteCall {
5366	c.ctx_ = ctx
5367	return c
5368}
5369
5370// Header returns an http.Header that can be modified by the caller to
5371// add HTTP headers to the request.
5372func (c *BillingAccountsLocationsBucketsDeleteCall) Header() http.Header {
5373	if c.header_ == nil {
5374		c.header_ = make(http.Header)
5375	}
5376	return c.header_
5377}
5378
5379func (c *BillingAccountsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
5380	reqHeaders := make(http.Header)
5381	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5382	for k, v := range c.header_ {
5383		reqHeaders[k] = v
5384	}
5385	reqHeaders.Set("User-Agent", c.s.userAgent())
5386	var body io.Reader = nil
5387	c.urlParams_.Set("alt", alt)
5388	c.urlParams_.Set("prettyPrint", "false")
5389	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5390	urls += "?" + c.urlParams_.Encode()
5391	req, err := http.NewRequest("DELETE", urls, body)
5392	if err != nil {
5393		return nil, err
5394	}
5395	req.Header = reqHeaders
5396	googleapi.Expand(req.URL, map[string]string{
5397		"name": c.name,
5398	})
5399	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5400}
5401
5402// Do executes the "logging.billingAccounts.locations.buckets.delete" call.
5403// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5404// code is an error. Response headers are in either
5405// *Empty.ServerResponse.Header or (if a response was returned at all)
5406// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5407// check whether the returned error was because http.StatusNotModified
5408// was returned.
5409func (c *BillingAccountsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5410	gensupport.SetOptions(c.urlParams_, opts...)
5411	res, err := c.doRequest("json")
5412	if res != nil && res.StatusCode == http.StatusNotModified {
5413		if res.Body != nil {
5414			res.Body.Close()
5415		}
5416		return nil, &googleapi.Error{
5417			Code:   res.StatusCode,
5418			Header: res.Header,
5419		}
5420	}
5421	if err != nil {
5422		return nil, err
5423	}
5424	defer googleapi.CloseBody(res)
5425	if err := googleapi.CheckResponse(res); err != nil {
5426		return nil, err
5427	}
5428	ret := &Empty{
5429		ServerResponse: googleapi.ServerResponse{
5430			Header:         res.Header,
5431			HTTPStatusCode: res.StatusCode,
5432		},
5433	}
5434	target := &ret
5435	if err := gensupport.DecodeResponse(target, res); err != nil {
5436		return nil, err
5437	}
5438	return ret, nil
5439	// {
5440	//   "description": "Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.",
5441	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}",
5442	//   "httpMethod": "DELETE",
5443	//   "id": "logging.billingAccounts.locations.buckets.delete",
5444	//   "parameterOrder": [
5445	//     "name"
5446	//   ],
5447	//   "parameters": {
5448	//     "name": {
5449	//       "description": "Required. The full resource name of the bucket to delete. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
5450	//       "location": "path",
5451	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+/buckets/[^/]+$",
5452	//       "required": true,
5453	//       "type": "string"
5454	//     }
5455	//   },
5456	//   "path": "v2/{+name}",
5457	//   "response": {
5458	//     "$ref": "Empty"
5459	//   },
5460	//   "scopes": [
5461	//     "https://www.googleapis.com/auth/cloud-platform",
5462	//     "https://www.googleapis.com/auth/logging.admin"
5463	//   ]
5464	// }
5465
5466}
5467
5468// method id "logging.billingAccounts.locations.buckets.list":
5469
5470type BillingAccountsLocationsBucketsListCall struct {
5471	s            *Service
5472	parent       string
5473	urlParams_   gensupport.URLParams
5474	ifNoneMatch_ string
5475	ctx_         context.Context
5476	header_      http.Header
5477}
5478
5479// List: Lists log buckets.
5480//
5481// - parent: The parent resource whose buckets are to be listed:
5482//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
5483//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
5484//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
5485//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations
5486//   portion of the resource must be specified, but supplying the
5487//   character - in place of LOCATION_ID will return all buckets.
5488func (r *BillingAccountsLocationsBucketsService) List(parent string) *BillingAccountsLocationsBucketsListCall {
5489	c := &BillingAccountsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5490	c.parent = parent
5491	return c
5492}
5493
5494// PageSize sets the optional parameter "pageSize": The maximum number
5495// of results to return from this request. Non-positive values are
5496// ignored. The presence of nextPageToken in the response indicates that
5497// more results might be available.
5498func (c *BillingAccountsLocationsBucketsListCall) PageSize(pageSize int64) *BillingAccountsLocationsBucketsListCall {
5499	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5500	return c
5501}
5502
5503// PageToken sets the optional parameter "pageToken": If present, then
5504// retrieve the next batch of results from the preceding call to this
5505// method. pageToken must be the value of nextPageToken from the
5506// previous response. The values of other method parameters should be
5507// identical to those in the previous call.
5508func (c *BillingAccountsLocationsBucketsListCall) PageToken(pageToken string) *BillingAccountsLocationsBucketsListCall {
5509	c.urlParams_.Set("pageToken", pageToken)
5510	return c
5511}
5512
5513// Fields allows partial responses to be retrieved. See
5514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5515// for more information.
5516func (c *BillingAccountsLocationsBucketsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsListCall {
5517	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5518	return c
5519}
5520
5521// IfNoneMatch sets the optional parameter which makes the operation
5522// fail if the object's ETag matches the given value. This is useful for
5523// getting updates only after the object has changed since the last
5524// request. Use googleapi.IsNotModified to check whether the response
5525// error from Do is the result of In-None-Match.
5526func (c *BillingAccountsLocationsBucketsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsListCall {
5527	c.ifNoneMatch_ = entityTag
5528	return c
5529}
5530
5531// Context sets the context to be used in this call's Do method. Any
5532// pending HTTP request will be aborted if the provided context is
5533// canceled.
5534func (c *BillingAccountsLocationsBucketsListCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsListCall {
5535	c.ctx_ = ctx
5536	return c
5537}
5538
5539// Header returns an http.Header that can be modified by the caller to
5540// add HTTP headers to the request.
5541func (c *BillingAccountsLocationsBucketsListCall) Header() http.Header {
5542	if c.header_ == nil {
5543		c.header_ = make(http.Header)
5544	}
5545	return c.header_
5546}
5547
5548func (c *BillingAccountsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
5549	reqHeaders := make(http.Header)
5550	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5551	for k, v := range c.header_ {
5552		reqHeaders[k] = v
5553	}
5554	reqHeaders.Set("User-Agent", c.s.userAgent())
5555	if c.ifNoneMatch_ != "" {
5556		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5557	}
5558	var body io.Reader = nil
5559	c.urlParams_.Set("alt", alt)
5560	c.urlParams_.Set("prettyPrint", "false")
5561	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
5562	urls += "?" + c.urlParams_.Encode()
5563	req, err := http.NewRequest("GET", urls, body)
5564	if err != nil {
5565		return nil, err
5566	}
5567	req.Header = reqHeaders
5568	googleapi.Expand(req.URL, map[string]string{
5569		"parent": c.parent,
5570	})
5571	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5572}
5573
5574// Do executes the "logging.billingAccounts.locations.buckets.list" call.
5575// Exactly one of *ListBucketsResponse or error will be non-nil. Any
5576// non-2xx status code is an error. Response headers are in either
5577// *ListBucketsResponse.ServerResponse.Header or (if a response was
5578// returned at all) in error.(*googleapi.Error).Header. Use
5579// googleapi.IsNotModified to check whether the returned error was
5580// because http.StatusNotModified was returned.
5581func (c *BillingAccountsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
5582	gensupport.SetOptions(c.urlParams_, opts...)
5583	res, err := c.doRequest("json")
5584	if res != nil && res.StatusCode == http.StatusNotModified {
5585		if res.Body != nil {
5586			res.Body.Close()
5587		}
5588		return nil, &googleapi.Error{
5589			Code:   res.StatusCode,
5590			Header: res.Header,
5591		}
5592	}
5593	if err != nil {
5594		return nil, err
5595	}
5596	defer googleapi.CloseBody(res)
5597	if err := googleapi.CheckResponse(res); err != nil {
5598		return nil, err
5599	}
5600	ret := &ListBucketsResponse{
5601		ServerResponse: googleapi.ServerResponse{
5602			Header:         res.Header,
5603			HTTPStatusCode: res.StatusCode,
5604		},
5605	}
5606	target := &ret
5607	if err := gensupport.DecodeResponse(target, res); err != nil {
5608		return nil, err
5609	}
5610	return ret, nil
5611	// {
5612	//   "description": "Lists log buckets.",
5613	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets",
5614	//   "httpMethod": "GET",
5615	//   "id": "logging.billingAccounts.locations.buckets.list",
5616	//   "parameterOrder": [
5617	//     "parent"
5618	//   ],
5619	//   "parameters": {
5620	//     "pageSize": {
5621	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
5622	//       "format": "int32",
5623	//       "location": "query",
5624	//       "type": "integer"
5625	//     },
5626	//     "pageToken": {
5627	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
5628	//       "location": "query",
5629	//       "type": "string"
5630	//     },
5631	//     "parent": {
5632	//       "description": "Required. The parent resource whose buckets are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]\" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets.",
5633	//       "location": "path",
5634	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+$",
5635	//       "required": true,
5636	//       "type": "string"
5637	//     }
5638	//   },
5639	//   "path": "v2/{+parent}/buckets",
5640	//   "response": {
5641	//     "$ref": "ListBucketsResponse"
5642	//   },
5643	//   "scopes": [
5644	//     "https://www.googleapis.com/auth/cloud-platform",
5645	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
5646	//     "https://www.googleapis.com/auth/logging.admin",
5647	//     "https://www.googleapis.com/auth/logging.read"
5648	//   ]
5649	// }
5650
5651}
5652
5653// Pages invokes f for each page of results.
5654// A non-nil error returned from f will halt the iteration.
5655// The provided context supersedes any context provided to the Context method.
5656func (c *BillingAccountsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
5657	c.ctx_ = ctx
5658	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5659	for {
5660		x, err := c.Do()
5661		if err != nil {
5662			return err
5663		}
5664		if err := f(x); err != nil {
5665			return err
5666		}
5667		if x.NextPageToken == "" {
5668			return nil
5669		}
5670		c.PageToken(x.NextPageToken)
5671	}
5672}
5673
5674// method id "logging.billingAccounts.locations.buckets.patch":
5675
5676type BillingAccountsLocationsBucketsPatchCall struct {
5677	s          *Service
5678	name       string
5679	logbucket  *LogBucket
5680	urlParams_ gensupport.URLParams
5681	ctx_       context.Context
5682	header_    http.Header
5683}
5684
5685// Patch: Updates a log bucket. This method replaces the following
5686// fields in the existing bucket with values from the new bucket:
5687// retention_periodIf the retention period is decreased and the bucket
5688// is locked, FAILED_PRECONDITION will be returned.If the bucket has a
5689// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be
5690// returned.After a bucket has been created, the bucket's location
5691// cannot be changed.
5692//
5693// - name: The full resource name of the bucket to update.
5694//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
5695//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
5696//   CKET_ID]"
5697//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
5698//   s/[BUCKET_ID]"
5699//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
5700//   For
5701//   example:"projects/my-project/locations/global/buckets/my-bucket".
5702func (r *BillingAccountsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *BillingAccountsLocationsBucketsPatchCall {
5703	c := &BillingAccountsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5704	c.name = name
5705	c.logbucket = logbucket
5706	return c
5707}
5708
5709// UpdateMask sets the optional parameter "updateMask": Required. Field
5710// mask that specifies the fields in bucket that need an update. A
5711// bucket field will be overwritten if, and only if, it is in the update
5712// mask. name and output only fields cannot be updated.For a detailed
5713// FieldMask definition, see:
5714// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
5715// example: updateMask=retention_days
5716func (c *BillingAccountsLocationsBucketsPatchCall) UpdateMask(updateMask string) *BillingAccountsLocationsBucketsPatchCall {
5717	c.urlParams_.Set("updateMask", updateMask)
5718	return c
5719}
5720
5721// Fields allows partial responses to be retrieved. See
5722// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5723// for more information.
5724func (c *BillingAccountsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsPatchCall {
5725	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5726	return c
5727}
5728
5729// Context sets the context to be used in this call's Do method. Any
5730// pending HTTP request will be aborted if the provided context is
5731// canceled.
5732func (c *BillingAccountsLocationsBucketsPatchCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsPatchCall {
5733	c.ctx_ = ctx
5734	return c
5735}
5736
5737// Header returns an http.Header that can be modified by the caller to
5738// add HTTP headers to the request.
5739func (c *BillingAccountsLocationsBucketsPatchCall) Header() http.Header {
5740	if c.header_ == nil {
5741		c.header_ = make(http.Header)
5742	}
5743	return c.header_
5744}
5745
5746func (c *BillingAccountsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
5747	reqHeaders := make(http.Header)
5748	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5749	for k, v := range c.header_ {
5750		reqHeaders[k] = v
5751	}
5752	reqHeaders.Set("User-Agent", c.s.userAgent())
5753	var body io.Reader = nil
5754	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
5755	if err != nil {
5756		return nil, err
5757	}
5758	reqHeaders.Set("Content-Type", "application/json")
5759	c.urlParams_.Set("alt", alt)
5760	c.urlParams_.Set("prettyPrint", "false")
5761	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5762	urls += "?" + c.urlParams_.Encode()
5763	req, err := http.NewRequest("PATCH", urls, body)
5764	if err != nil {
5765		return nil, err
5766	}
5767	req.Header = reqHeaders
5768	googleapi.Expand(req.URL, map[string]string{
5769		"name": c.name,
5770	})
5771	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5772}
5773
5774// Do executes the "logging.billingAccounts.locations.buckets.patch" call.
5775// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
5776// status code is an error. Response headers are in either
5777// *LogBucket.ServerResponse.Header or (if a response was returned at
5778// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5779// to check whether the returned error was because
5780// http.StatusNotModified was returned.
5781func (c *BillingAccountsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
5782	gensupport.SetOptions(c.urlParams_, opts...)
5783	res, err := c.doRequest("json")
5784	if res != nil && res.StatusCode == http.StatusNotModified {
5785		if res.Body != nil {
5786			res.Body.Close()
5787		}
5788		return nil, &googleapi.Error{
5789			Code:   res.StatusCode,
5790			Header: res.Header,
5791		}
5792	}
5793	if err != nil {
5794		return nil, err
5795	}
5796	defer googleapi.CloseBody(res)
5797	if err := googleapi.CheckResponse(res); err != nil {
5798		return nil, err
5799	}
5800	ret := &LogBucket{
5801		ServerResponse: googleapi.ServerResponse{
5802			Header:         res.Header,
5803			HTTPStatusCode: res.StatusCode,
5804		},
5805	}
5806	target := &ret
5807	if err := gensupport.DecodeResponse(target, res); err != nil {
5808		return nil, err
5809	}
5810	return ret, nil
5811	// {
5812	//   "description": "Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed.",
5813	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}",
5814	//   "httpMethod": "PATCH",
5815	//   "id": "logging.billingAccounts.locations.buckets.patch",
5816	//   "parameterOrder": [
5817	//     "name"
5818	//   ],
5819	//   "parameters": {
5820	//     "name": {
5821	//       "description": "Required. The full resource name of the bucket to update. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
5822	//       "location": "path",
5823	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+/buckets/[^/]+$",
5824	//       "required": true,
5825	//       "type": "string"
5826	//     },
5827	//     "updateMask": {
5828	//       "description": "Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days",
5829	//       "format": "google-fieldmask",
5830	//       "location": "query",
5831	//       "type": "string"
5832	//     }
5833	//   },
5834	//   "path": "v2/{+name}",
5835	//   "request": {
5836	//     "$ref": "LogBucket"
5837	//   },
5838	//   "response": {
5839	//     "$ref": "LogBucket"
5840	//   },
5841	//   "scopes": [
5842	//     "https://www.googleapis.com/auth/cloud-platform",
5843	//     "https://www.googleapis.com/auth/logging.admin"
5844	//   ]
5845	// }
5846
5847}
5848
5849// method id "logging.billingAccounts.locations.buckets.undelete":
5850
5851type BillingAccountsLocationsBucketsUndeleteCall struct {
5852	s                     *Service
5853	name                  string
5854	undeletebucketrequest *UndeleteBucketRequest
5855	urlParams_            gensupport.URLParams
5856	ctx_                  context.Context
5857	header_               http.Header
5858}
5859
5860// Undelete: Undeletes a log bucket. A bucket that has been deleted can
5861// be undeleted within the grace period of 7 days.
5862//
5863// - name: The full resource name of the bucket to undelete.
5864//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
5865//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
5866//   CKET_ID]"
5867//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
5868//   s/[BUCKET_ID]"
5869//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
5870//   For
5871//   example:"projects/my-project/locations/global/buckets/my-bucket".
5872func (r *BillingAccountsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *BillingAccountsLocationsBucketsUndeleteCall {
5873	c := &BillingAccountsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5874	c.name = name
5875	c.undeletebucketrequest = undeletebucketrequest
5876	return c
5877}
5878
5879// Fields allows partial responses to be retrieved. See
5880// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5881// for more information.
5882func (c *BillingAccountsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsUndeleteCall {
5883	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5884	return c
5885}
5886
5887// Context sets the context to be used in this call's Do method. Any
5888// pending HTTP request will be aborted if the provided context is
5889// canceled.
5890func (c *BillingAccountsLocationsBucketsUndeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsUndeleteCall {
5891	c.ctx_ = ctx
5892	return c
5893}
5894
5895// Header returns an http.Header that can be modified by the caller to
5896// add HTTP headers to the request.
5897func (c *BillingAccountsLocationsBucketsUndeleteCall) Header() http.Header {
5898	if c.header_ == nil {
5899		c.header_ = make(http.Header)
5900	}
5901	return c.header_
5902}
5903
5904func (c *BillingAccountsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
5905	reqHeaders := make(http.Header)
5906	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5907	for k, v := range c.header_ {
5908		reqHeaders[k] = v
5909	}
5910	reqHeaders.Set("User-Agent", c.s.userAgent())
5911	var body io.Reader = nil
5912	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
5913	if err != nil {
5914		return nil, err
5915	}
5916	reqHeaders.Set("Content-Type", "application/json")
5917	c.urlParams_.Set("alt", alt)
5918	c.urlParams_.Set("prettyPrint", "false")
5919	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
5920	urls += "?" + c.urlParams_.Encode()
5921	req, err := http.NewRequest("POST", urls, body)
5922	if err != nil {
5923		return nil, err
5924	}
5925	req.Header = reqHeaders
5926	googleapi.Expand(req.URL, map[string]string{
5927		"name": c.name,
5928	})
5929	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5930}
5931
5932// Do executes the "logging.billingAccounts.locations.buckets.undelete" call.
5933// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5934// code is an error. Response headers are in either
5935// *Empty.ServerResponse.Header or (if a response was returned at all)
5936// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5937// check whether the returned error was because http.StatusNotModified
5938// was returned.
5939func (c *BillingAccountsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5940	gensupport.SetOptions(c.urlParams_, opts...)
5941	res, err := c.doRequest("json")
5942	if res != nil && res.StatusCode == http.StatusNotModified {
5943		if res.Body != nil {
5944			res.Body.Close()
5945		}
5946		return nil, &googleapi.Error{
5947			Code:   res.StatusCode,
5948			Header: res.Header,
5949		}
5950	}
5951	if err != nil {
5952		return nil, err
5953	}
5954	defer googleapi.CloseBody(res)
5955	if err := googleapi.CheckResponse(res); err != nil {
5956		return nil, err
5957	}
5958	ret := &Empty{
5959		ServerResponse: googleapi.ServerResponse{
5960			Header:         res.Header,
5961			HTTPStatusCode: res.StatusCode,
5962		},
5963	}
5964	target := &ret
5965	if err := gensupport.DecodeResponse(target, res); err != nil {
5966		return nil, err
5967	}
5968	return ret, nil
5969	// {
5970	//   "description": "Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.",
5971	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}:undelete",
5972	//   "httpMethod": "POST",
5973	//   "id": "logging.billingAccounts.locations.buckets.undelete",
5974	//   "parameterOrder": [
5975	//     "name"
5976	//   ],
5977	//   "parameters": {
5978	//     "name": {
5979	//       "description": "Required. The full resource name of the bucket to undelete. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
5980	//       "location": "path",
5981	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+/buckets/[^/]+$",
5982	//       "required": true,
5983	//       "type": "string"
5984	//     }
5985	//   },
5986	//   "path": "v2/{+name}:undelete",
5987	//   "request": {
5988	//     "$ref": "UndeleteBucketRequest"
5989	//   },
5990	//   "response": {
5991	//     "$ref": "Empty"
5992	//   },
5993	//   "scopes": [
5994	//     "https://www.googleapis.com/auth/cloud-platform",
5995	//     "https://www.googleapis.com/auth/logging.admin"
5996	//   ]
5997	// }
5998
5999}
6000
6001// method id "logging.billingAccounts.locations.buckets.views.create":
6002
6003type BillingAccountsLocationsBucketsViewsCreateCall struct {
6004	s          *Service
6005	parent     string
6006	logview    *LogView
6007	urlParams_ gensupport.URLParams
6008	ctx_       context.Context
6009	header_    http.Header
6010}
6011
6012// Create: Creates a view over log entries in a log bucket. A bucket may
6013// contain a maximum of 30 views.
6014//
6015// - parent: The bucket in which to create the view
6016//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
6017//   ` For
6018//   example:"projects/my-project/locations/global/buckets/my-bucket".
6019func (r *BillingAccountsLocationsBucketsViewsService) Create(parent string, logview *LogView) *BillingAccountsLocationsBucketsViewsCreateCall {
6020	c := &BillingAccountsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6021	c.parent = parent
6022	c.logview = logview
6023	return c
6024}
6025
6026// ViewId sets the optional parameter "viewId": Required. The id to use
6027// for this view.
6028func (c *BillingAccountsLocationsBucketsViewsCreateCall) ViewId(viewId string) *BillingAccountsLocationsBucketsViewsCreateCall {
6029	c.urlParams_.Set("viewId", viewId)
6030	return c
6031}
6032
6033// Fields allows partial responses to be retrieved. See
6034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6035// for more information.
6036func (c *BillingAccountsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsCreateCall {
6037	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6038	return c
6039}
6040
6041// Context sets the context to be used in this call's Do method. Any
6042// pending HTTP request will be aborted if the provided context is
6043// canceled.
6044func (c *BillingAccountsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsCreateCall {
6045	c.ctx_ = ctx
6046	return c
6047}
6048
6049// Header returns an http.Header that can be modified by the caller to
6050// add HTTP headers to the request.
6051func (c *BillingAccountsLocationsBucketsViewsCreateCall) Header() http.Header {
6052	if c.header_ == nil {
6053		c.header_ = make(http.Header)
6054	}
6055	return c.header_
6056}
6057
6058func (c *BillingAccountsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
6059	reqHeaders := make(http.Header)
6060	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6061	for k, v := range c.header_ {
6062		reqHeaders[k] = v
6063	}
6064	reqHeaders.Set("User-Agent", c.s.userAgent())
6065	var body io.Reader = nil
6066	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
6067	if err != nil {
6068		return nil, err
6069	}
6070	reqHeaders.Set("Content-Type", "application/json")
6071	c.urlParams_.Set("alt", alt)
6072	c.urlParams_.Set("prettyPrint", "false")
6073	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
6074	urls += "?" + c.urlParams_.Encode()
6075	req, err := http.NewRequest("POST", urls, body)
6076	if err != nil {
6077		return nil, err
6078	}
6079	req.Header = reqHeaders
6080	googleapi.Expand(req.URL, map[string]string{
6081		"parent": c.parent,
6082	})
6083	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6084}
6085
6086// Do executes the "logging.billingAccounts.locations.buckets.views.create" call.
6087// Exactly one of *LogView or error will be non-nil. Any non-2xx status
6088// code is an error. Response headers are in either
6089// *LogView.ServerResponse.Header or (if a response was returned at all)
6090// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6091// check whether the returned error was because http.StatusNotModified
6092// was returned.
6093func (c *BillingAccountsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
6094	gensupport.SetOptions(c.urlParams_, opts...)
6095	res, err := c.doRequest("json")
6096	if res != nil && res.StatusCode == http.StatusNotModified {
6097		if res.Body != nil {
6098			res.Body.Close()
6099		}
6100		return nil, &googleapi.Error{
6101			Code:   res.StatusCode,
6102			Header: res.Header,
6103		}
6104	}
6105	if err != nil {
6106		return nil, err
6107	}
6108	defer googleapi.CloseBody(res)
6109	if err := googleapi.CheckResponse(res); err != nil {
6110		return nil, err
6111	}
6112	ret := &LogView{
6113		ServerResponse: googleapi.ServerResponse{
6114			Header:         res.Header,
6115			HTTPStatusCode: res.StatusCode,
6116		},
6117	}
6118	target := &ret
6119	if err := gensupport.DecodeResponse(target, res); err != nil {
6120		return nil, err
6121	}
6122	return ret, nil
6123	// {
6124	//   "description": "Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.",
6125	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views",
6126	//   "httpMethod": "POST",
6127	//   "id": "logging.billingAccounts.locations.buckets.views.create",
6128	//   "parameterOrder": [
6129	//     "parent"
6130	//   ],
6131	//   "parameters": {
6132	//     "parent": {
6133	//       "description": "Required. The bucket in which to create the view `\"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\"` For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
6134	//       "location": "path",
6135	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+/buckets/[^/]+$",
6136	//       "required": true,
6137	//       "type": "string"
6138	//     },
6139	//     "viewId": {
6140	//       "description": "Required. The id to use for this view.",
6141	//       "location": "query",
6142	//       "type": "string"
6143	//     }
6144	//   },
6145	//   "path": "v2/{+parent}/views",
6146	//   "request": {
6147	//     "$ref": "LogView"
6148	//   },
6149	//   "response": {
6150	//     "$ref": "LogView"
6151	//   },
6152	//   "scopes": [
6153	//     "https://www.googleapis.com/auth/cloud-platform",
6154	//     "https://www.googleapis.com/auth/logging.admin"
6155	//   ]
6156	// }
6157
6158}
6159
6160// method id "logging.billingAccounts.locations.buckets.views.delete":
6161
6162type BillingAccountsLocationsBucketsViewsDeleteCall struct {
6163	s          *Service
6164	name       string
6165	urlParams_ gensupport.URLParams
6166	ctx_       context.Context
6167	header_    http.Header
6168}
6169
6170// Delete: Deletes a view on a log bucket.
6171//
6172// - name: The full resource name of the view to delete:
6173//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
6174//   iews/[VIEW_ID]" For
6175//   example:"projects/my-project/locations/global/buckets/my-bucket/view
6176//   s/my-view".
6177func (r *BillingAccountsLocationsBucketsViewsService) Delete(name string) *BillingAccountsLocationsBucketsViewsDeleteCall {
6178	c := &BillingAccountsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6179	c.name = name
6180	return c
6181}
6182
6183// Fields allows partial responses to be retrieved. See
6184// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6185// for more information.
6186func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsDeleteCall {
6187	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6188	return c
6189}
6190
6191// Context sets the context to be used in this call's Do method. Any
6192// pending HTTP request will be aborted if the provided context is
6193// canceled.
6194func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsDeleteCall {
6195	c.ctx_ = ctx
6196	return c
6197}
6198
6199// Header returns an http.Header that can be modified by the caller to
6200// add HTTP headers to the request.
6201func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Header() http.Header {
6202	if c.header_ == nil {
6203		c.header_ = make(http.Header)
6204	}
6205	return c.header_
6206}
6207
6208func (c *BillingAccountsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
6209	reqHeaders := make(http.Header)
6210	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6211	for k, v := range c.header_ {
6212		reqHeaders[k] = v
6213	}
6214	reqHeaders.Set("User-Agent", c.s.userAgent())
6215	var body io.Reader = nil
6216	c.urlParams_.Set("alt", alt)
6217	c.urlParams_.Set("prettyPrint", "false")
6218	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6219	urls += "?" + c.urlParams_.Encode()
6220	req, err := http.NewRequest("DELETE", urls, body)
6221	if err != nil {
6222		return nil, err
6223	}
6224	req.Header = reqHeaders
6225	googleapi.Expand(req.URL, map[string]string{
6226		"name": c.name,
6227	})
6228	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6229}
6230
6231// Do executes the "logging.billingAccounts.locations.buckets.views.delete" call.
6232// Exactly one of *Empty or error will be non-nil. Any non-2xx status
6233// code is an error. Response headers are in either
6234// *Empty.ServerResponse.Header or (if a response was returned at all)
6235// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6236// check whether the returned error was because http.StatusNotModified
6237// was returned.
6238func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6239	gensupport.SetOptions(c.urlParams_, opts...)
6240	res, err := c.doRequest("json")
6241	if res != nil && res.StatusCode == http.StatusNotModified {
6242		if res.Body != nil {
6243			res.Body.Close()
6244		}
6245		return nil, &googleapi.Error{
6246			Code:   res.StatusCode,
6247			Header: res.Header,
6248		}
6249	}
6250	if err != nil {
6251		return nil, err
6252	}
6253	defer googleapi.CloseBody(res)
6254	if err := googleapi.CheckResponse(res); err != nil {
6255		return nil, err
6256	}
6257	ret := &Empty{
6258		ServerResponse: googleapi.ServerResponse{
6259			Header:         res.Header,
6260			HTTPStatusCode: res.StatusCode,
6261		},
6262	}
6263	target := &ret
6264	if err := gensupport.DecodeResponse(target, res); err != nil {
6265		return nil, err
6266	}
6267	return ret, nil
6268	// {
6269	//   "description": "Deletes a view on a log bucket.",
6270	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
6271	//   "httpMethod": "DELETE",
6272	//   "id": "logging.billingAccounts.locations.buckets.views.delete",
6273	//   "parameterOrder": [
6274	//     "name"
6275	//   ],
6276	//   "parameters": {
6277	//     "name": {
6278	//       "description": "Required. The full resource name of the view to delete: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
6279	//       "location": "path",
6280	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
6281	//       "required": true,
6282	//       "type": "string"
6283	//     }
6284	//   },
6285	//   "path": "v2/{+name}",
6286	//   "response": {
6287	//     "$ref": "Empty"
6288	//   },
6289	//   "scopes": [
6290	//     "https://www.googleapis.com/auth/cloud-platform",
6291	//     "https://www.googleapis.com/auth/logging.admin"
6292	//   ]
6293	// }
6294
6295}
6296
6297// method id "logging.billingAccounts.locations.buckets.views.list":
6298
6299type BillingAccountsLocationsBucketsViewsListCall struct {
6300	s            *Service
6301	parent       string
6302	urlParams_   gensupport.URLParams
6303	ifNoneMatch_ string
6304	ctx_         context.Context
6305	header_      http.Header
6306}
6307
6308// List: Lists views on a log bucket.
6309//
6310// - parent: The bucket whose views are to be listed:
6311//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
6312func (r *BillingAccountsLocationsBucketsViewsService) List(parent string) *BillingAccountsLocationsBucketsViewsListCall {
6313	c := &BillingAccountsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6314	c.parent = parent
6315	return c
6316}
6317
6318// PageSize sets the optional parameter "pageSize": The maximum number
6319// of results to return from this request.Non-positive values are
6320// ignored. The presence of nextPageToken in the response indicates that
6321// more results might be available.
6322func (c *BillingAccountsLocationsBucketsViewsListCall) PageSize(pageSize int64) *BillingAccountsLocationsBucketsViewsListCall {
6323	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6324	return c
6325}
6326
6327// PageToken sets the optional parameter "pageToken": If present, then
6328// retrieve the next batch of results from the preceding call to this
6329// method. pageToken must be the value of nextPageToken from the
6330// previous response. The values of other method parameters should be
6331// identical to those in the previous call.
6332func (c *BillingAccountsLocationsBucketsViewsListCall) PageToken(pageToken string) *BillingAccountsLocationsBucketsViewsListCall {
6333	c.urlParams_.Set("pageToken", pageToken)
6334	return c
6335}
6336
6337// Fields allows partial responses to be retrieved. See
6338// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6339// for more information.
6340func (c *BillingAccountsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsListCall {
6341	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6342	return c
6343}
6344
6345// IfNoneMatch sets the optional parameter which makes the operation
6346// fail if the object's ETag matches the given value. This is useful for
6347// getting updates only after the object has changed since the last
6348// request. Use googleapi.IsNotModified to check whether the response
6349// error from Do is the result of In-None-Match.
6350func (c *BillingAccountsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsViewsListCall {
6351	c.ifNoneMatch_ = entityTag
6352	return c
6353}
6354
6355// Context sets the context to be used in this call's Do method. Any
6356// pending HTTP request will be aborted if the provided context is
6357// canceled.
6358func (c *BillingAccountsLocationsBucketsViewsListCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsListCall {
6359	c.ctx_ = ctx
6360	return c
6361}
6362
6363// Header returns an http.Header that can be modified by the caller to
6364// add HTTP headers to the request.
6365func (c *BillingAccountsLocationsBucketsViewsListCall) Header() http.Header {
6366	if c.header_ == nil {
6367		c.header_ = make(http.Header)
6368	}
6369	return c.header_
6370}
6371
6372func (c *BillingAccountsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
6373	reqHeaders := make(http.Header)
6374	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6375	for k, v := range c.header_ {
6376		reqHeaders[k] = v
6377	}
6378	reqHeaders.Set("User-Agent", c.s.userAgent())
6379	if c.ifNoneMatch_ != "" {
6380		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6381	}
6382	var body io.Reader = nil
6383	c.urlParams_.Set("alt", alt)
6384	c.urlParams_.Set("prettyPrint", "false")
6385	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
6386	urls += "?" + c.urlParams_.Encode()
6387	req, err := http.NewRequest("GET", urls, body)
6388	if err != nil {
6389		return nil, err
6390	}
6391	req.Header = reqHeaders
6392	googleapi.Expand(req.URL, map[string]string{
6393		"parent": c.parent,
6394	})
6395	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6396}
6397
6398// Do executes the "logging.billingAccounts.locations.buckets.views.list" call.
6399// Exactly one of *ListViewsResponse or error will be non-nil. Any
6400// non-2xx status code is an error. Response headers are in either
6401// *ListViewsResponse.ServerResponse.Header or (if a response was
6402// returned at all) in error.(*googleapi.Error).Header. Use
6403// googleapi.IsNotModified to check whether the returned error was
6404// because http.StatusNotModified was returned.
6405func (c *BillingAccountsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
6406	gensupport.SetOptions(c.urlParams_, opts...)
6407	res, err := c.doRequest("json")
6408	if res != nil && res.StatusCode == http.StatusNotModified {
6409		if res.Body != nil {
6410			res.Body.Close()
6411		}
6412		return nil, &googleapi.Error{
6413			Code:   res.StatusCode,
6414			Header: res.Header,
6415		}
6416	}
6417	if err != nil {
6418		return nil, err
6419	}
6420	defer googleapi.CloseBody(res)
6421	if err := googleapi.CheckResponse(res); err != nil {
6422		return nil, err
6423	}
6424	ret := &ListViewsResponse{
6425		ServerResponse: googleapi.ServerResponse{
6426			Header:         res.Header,
6427			HTTPStatusCode: res.StatusCode,
6428		},
6429	}
6430	target := &ret
6431	if err := gensupport.DecodeResponse(target, res); err != nil {
6432		return nil, err
6433	}
6434	return ret, nil
6435	// {
6436	//   "description": "Lists views on a log bucket.",
6437	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views",
6438	//   "httpMethod": "GET",
6439	//   "id": "logging.billingAccounts.locations.buckets.views.list",
6440	//   "parameterOrder": [
6441	//     "parent"
6442	//   ],
6443	//   "parameters": {
6444	//     "pageSize": {
6445	//       "description": "Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
6446	//       "format": "int32",
6447	//       "location": "query",
6448	//       "type": "integer"
6449	//     },
6450	//     "pageToken": {
6451	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
6452	//       "location": "query",
6453	//       "type": "string"
6454	//     },
6455	//     "parent": {
6456	//       "description": "Required. The bucket whose views are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" ",
6457	//       "location": "path",
6458	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+/buckets/[^/]+$",
6459	//       "required": true,
6460	//       "type": "string"
6461	//     }
6462	//   },
6463	//   "path": "v2/{+parent}/views",
6464	//   "response": {
6465	//     "$ref": "ListViewsResponse"
6466	//   },
6467	//   "scopes": [
6468	//     "https://www.googleapis.com/auth/cloud-platform",
6469	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
6470	//     "https://www.googleapis.com/auth/logging.admin",
6471	//     "https://www.googleapis.com/auth/logging.read"
6472	//   ]
6473	// }
6474
6475}
6476
6477// Pages invokes f for each page of results.
6478// A non-nil error returned from f will halt the iteration.
6479// The provided context supersedes any context provided to the Context method.
6480func (c *BillingAccountsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
6481	c.ctx_ = ctx
6482	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6483	for {
6484		x, err := c.Do()
6485		if err != nil {
6486			return err
6487		}
6488		if err := f(x); err != nil {
6489			return err
6490		}
6491		if x.NextPageToken == "" {
6492			return nil
6493		}
6494		c.PageToken(x.NextPageToken)
6495	}
6496}
6497
6498// method id "logging.billingAccounts.locations.buckets.views.patch":
6499
6500type BillingAccountsLocationsBucketsViewsPatchCall struct {
6501	s          *Service
6502	name       string
6503	logview    *LogView
6504	urlParams_ gensupport.URLParams
6505	ctx_       context.Context
6506	header_    http.Header
6507}
6508
6509// Patch: Updates a view on a log bucket. This method replaces the
6510// following fields in the existing view with values from the new view:
6511// filter.
6512//
6513// - name: The full resource name of the view to update
6514//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
6515//   iews/[VIEW_ID]" For
6516//   example:"projects/my-project/locations/global/buckets/my-bucket/view
6517//   s/my-view".
6518func (r *BillingAccountsLocationsBucketsViewsService) Patch(name string, logview *LogView) *BillingAccountsLocationsBucketsViewsPatchCall {
6519	c := &BillingAccountsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6520	c.name = name
6521	c.logview = logview
6522	return c
6523}
6524
6525// UpdateMask sets the optional parameter "updateMask": Field mask that
6526// specifies the fields in view that need an update. A field will be
6527// overwritten if, and only if, it is in the update mask. name and
6528// output only fields cannot be updated.For a detailed FieldMask
6529// definition, see
6530// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
6531// example: updateMask=filter
6532func (c *BillingAccountsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *BillingAccountsLocationsBucketsViewsPatchCall {
6533	c.urlParams_.Set("updateMask", updateMask)
6534	return c
6535}
6536
6537// Fields allows partial responses to be retrieved. See
6538// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6539// for more information.
6540func (c *BillingAccountsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsPatchCall {
6541	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6542	return c
6543}
6544
6545// Context sets the context to be used in this call's Do method. Any
6546// pending HTTP request will be aborted if the provided context is
6547// canceled.
6548func (c *BillingAccountsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsPatchCall {
6549	c.ctx_ = ctx
6550	return c
6551}
6552
6553// Header returns an http.Header that can be modified by the caller to
6554// add HTTP headers to the request.
6555func (c *BillingAccountsLocationsBucketsViewsPatchCall) Header() http.Header {
6556	if c.header_ == nil {
6557		c.header_ = make(http.Header)
6558	}
6559	return c.header_
6560}
6561
6562func (c *BillingAccountsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
6563	reqHeaders := make(http.Header)
6564	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6565	for k, v := range c.header_ {
6566		reqHeaders[k] = v
6567	}
6568	reqHeaders.Set("User-Agent", c.s.userAgent())
6569	var body io.Reader = nil
6570	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
6571	if err != nil {
6572		return nil, err
6573	}
6574	reqHeaders.Set("Content-Type", "application/json")
6575	c.urlParams_.Set("alt", alt)
6576	c.urlParams_.Set("prettyPrint", "false")
6577	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6578	urls += "?" + c.urlParams_.Encode()
6579	req, err := http.NewRequest("PATCH", urls, body)
6580	if err != nil {
6581		return nil, err
6582	}
6583	req.Header = reqHeaders
6584	googleapi.Expand(req.URL, map[string]string{
6585		"name": c.name,
6586	})
6587	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6588}
6589
6590// Do executes the "logging.billingAccounts.locations.buckets.views.patch" call.
6591// Exactly one of *LogView or error will be non-nil. Any non-2xx status
6592// code is an error. Response headers are in either
6593// *LogView.ServerResponse.Header or (if a response was returned at all)
6594// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6595// check whether the returned error was because http.StatusNotModified
6596// was returned.
6597func (c *BillingAccountsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
6598	gensupport.SetOptions(c.urlParams_, opts...)
6599	res, err := c.doRequest("json")
6600	if res != nil && res.StatusCode == http.StatusNotModified {
6601		if res.Body != nil {
6602			res.Body.Close()
6603		}
6604		return nil, &googleapi.Error{
6605			Code:   res.StatusCode,
6606			Header: res.Header,
6607		}
6608	}
6609	if err != nil {
6610		return nil, err
6611	}
6612	defer googleapi.CloseBody(res)
6613	if err := googleapi.CheckResponse(res); err != nil {
6614		return nil, err
6615	}
6616	ret := &LogView{
6617		ServerResponse: googleapi.ServerResponse{
6618			Header:         res.Header,
6619			HTTPStatusCode: res.StatusCode,
6620		},
6621	}
6622	target := &ret
6623	if err := gensupport.DecodeResponse(target, res); err != nil {
6624		return nil, err
6625	}
6626	return ret, nil
6627	// {
6628	//   "description": "Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter.",
6629	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
6630	//   "httpMethod": "PATCH",
6631	//   "id": "logging.billingAccounts.locations.buckets.views.patch",
6632	//   "parameterOrder": [
6633	//     "name"
6634	//   ],
6635	//   "parameters": {
6636	//     "name": {
6637	//       "description": "Required. The full resource name of the view to update \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
6638	//       "location": "path",
6639	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
6640	//       "required": true,
6641	//       "type": "string"
6642	//     },
6643	//     "updateMask": {
6644	//       "description": "Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
6645	//       "format": "google-fieldmask",
6646	//       "location": "query",
6647	//       "type": "string"
6648	//     }
6649	//   },
6650	//   "path": "v2/{+name}",
6651	//   "request": {
6652	//     "$ref": "LogView"
6653	//   },
6654	//   "response": {
6655	//     "$ref": "LogView"
6656	//   },
6657	//   "scopes": [
6658	//     "https://www.googleapis.com/auth/cloud-platform",
6659	//     "https://www.googleapis.com/auth/logging.admin"
6660	//   ]
6661	// }
6662
6663}
6664
6665// method id "logging.billingAccounts.locations.operations.cancel":
6666
6667type BillingAccountsLocationsOperationsCancelCall struct {
6668	s                      *Service
6669	name                   string
6670	canceloperationrequest *CancelOperationRequest
6671	urlParams_             gensupport.URLParams
6672	ctx_                   context.Context
6673	header_                http.Header
6674}
6675
6676// Cancel: Starts asynchronous cancellation on a long-running operation.
6677// The server makes a best effort to cancel the operation, but success
6678// is not guaranteed. If the server doesn't support this method, it
6679// returns google.rpc.Code.UNIMPLEMENTED. Clients can use
6680// Operations.GetOperation or other methods to check whether the
6681// cancellation succeeded or whether the operation completed despite
6682// cancellation. On successful cancellation, the operation is not
6683// deleted; instead, it becomes an operation with an Operation.error
6684// value with a google.rpc.Status.code of 1, corresponding to
6685// Code.CANCELLED.
6686//
6687// - name: The name of the operation resource to be cancelled.
6688func (r *BillingAccountsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *BillingAccountsLocationsOperationsCancelCall {
6689	c := &BillingAccountsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6690	c.name = name
6691	c.canceloperationrequest = canceloperationrequest
6692	return c
6693}
6694
6695// Fields allows partial responses to be retrieved. See
6696// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6697// for more information.
6698func (c *BillingAccountsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsOperationsCancelCall {
6699	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6700	return c
6701}
6702
6703// Context sets the context to be used in this call's Do method. Any
6704// pending HTTP request will be aborted if the provided context is
6705// canceled.
6706func (c *BillingAccountsLocationsOperationsCancelCall) Context(ctx context.Context) *BillingAccountsLocationsOperationsCancelCall {
6707	c.ctx_ = ctx
6708	return c
6709}
6710
6711// Header returns an http.Header that can be modified by the caller to
6712// add HTTP headers to the request.
6713func (c *BillingAccountsLocationsOperationsCancelCall) Header() http.Header {
6714	if c.header_ == nil {
6715		c.header_ = make(http.Header)
6716	}
6717	return c.header_
6718}
6719
6720func (c *BillingAccountsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
6721	reqHeaders := make(http.Header)
6722	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6723	for k, v := range c.header_ {
6724		reqHeaders[k] = v
6725	}
6726	reqHeaders.Set("User-Agent", c.s.userAgent())
6727	var body io.Reader = nil
6728	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
6729	if err != nil {
6730		return nil, err
6731	}
6732	reqHeaders.Set("Content-Type", "application/json")
6733	c.urlParams_.Set("alt", alt)
6734	c.urlParams_.Set("prettyPrint", "false")
6735	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
6736	urls += "?" + c.urlParams_.Encode()
6737	req, err := http.NewRequest("POST", urls, body)
6738	if err != nil {
6739		return nil, err
6740	}
6741	req.Header = reqHeaders
6742	googleapi.Expand(req.URL, map[string]string{
6743		"name": c.name,
6744	})
6745	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6746}
6747
6748// Do executes the "logging.billingAccounts.locations.operations.cancel" call.
6749// Exactly one of *Empty or error will be non-nil. Any non-2xx status
6750// code is an error. Response headers are in either
6751// *Empty.ServerResponse.Header or (if a response was returned at all)
6752// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6753// check whether the returned error was because http.StatusNotModified
6754// was returned.
6755func (c *BillingAccountsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6756	gensupport.SetOptions(c.urlParams_, opts...)
6757	res, err := c.doRequest("json")
6758	if res != nil && res.StatusCode == http.StatusNotModified {
6759		if res.Body != nil {
6760			res.Body.Close()
6761		}
6762		return nil, &googleapi.Error{
6763			Code:   res.StatusCode,
6764			Header: res.Header,
6765		}
6766	}
6767	if err != nil {
6768		return nil, err
6769	}
6770	defer googleapi.CloseBody(res)
6771	if err := googleapi.CheckResponse(res); err != nil {
6772		return nil, err
6773	}
6774	ret := &Empty{
6775		ServerResponse: googleapi.ServerResponse{
6776			Header:         res.Header,
6777			HTTPStatusCode: res.StatusCode,
6778		},
6779	}
6780	target := &ret
6781	if err := gensupport.DecodeResponse(target, res); err != nil {
6782		return nil, err
6783	}
6784	return ret, nil
6785	// {
6786	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.",
6787	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/operations/{operationsId}:cancel",
6788	//   "httpMethod": "POST",
6789	//   "id": "logging.billingAccounts.locations.operations.cancel",
6790	//   "parameterOrder": [
6791	//     "name"
6792	//   ],
6793	//   "parameters": {
6794	//     "name": {
6795	//       "description": "The name of the operation resource to be cancelled.",
6796	//       "location": "path",
6797	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+/operations/[^/]+$",
6798	//       "required": true,
6799	//       "type": "string"
6800	//     }
6801	//   },
6802	//   "path": "v2/{+name}:cancel",
6803	//   "request": {
6804	//     "$ref": "CancelOperationRequest"
6805	//   },
6806	//   "response": {
6807	//     "$ref": "Empty"
6808	//   },
6809	//   "scopes": [
6810	//     "https://www.googleapis.com/auth/cloud-platform",
6811	//     "https://www.googleapis.com/auth/logging.admin"
6812	//   ]
6813	// }
6814
6815}
6816
6817// method id "logging.billingAccounts.locations.operations.list":
6818
6819type BillingAccountsLocationsOperationsListCall struct {
6820	s            *Service
6821	name         string
6822	urlParams_   gensupport.URLParams
6823	ifNoneMatch_ string
6824	ctx_         context.Context
6825	header_      http.Header
6826}
6827
6828// List: Lists operations that match the specified filter in the
6829// request. If the server doesn't support this method, it returns
6830// UNIMPLEMENTED.NOTE: the name binding allows API services to override
6831// the binding to use different resource name schemes, such as
6832// users/*/operations. To override the binding, API services can add a
6833// binding such as "/v1/{name=users/*}/operations" to their service
6834// configuration. For backwards compatibility, the default name includes
6835// the operations collection id, however overriding users must ensure
6836// the name binding is the parent resource, without the operations
6837// collection id.
6838//
6839// - name: The name of the operation's parent resource.
6840func (r *BillingAccountsLocationsOperationsService) List(name string) *BillingAccountsLocationsOperationsListCall {
6841	c := &BillingAccountsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6842	c.name = name
6843	return c
6844}
6845
6846// Filter sets the optional parameter "filter": The standard list
6847// filter.
6848func (c *BillingAccountsLocationsOperationsListCall) Filter(filter string) *BillingAccountsLocationsOperationsListCall {
6849	c.urlParams_.Set("filter", filter)
6850	return c
6851}
6852
6853// PageSize sets the optional parameter "pageSize": The standard list
6854// page size.
6855func (c *BillingAccountsLocationsOperationsListCall) PageSize(pageSize int64) *BillingAccountsLocationsOperationsListCall {
6856	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6857	return c
6858}
6859
6860// PageToken sets the optional parameter "pageToken": The standard list
6861// page token.
6862func (c *BillingAccountsLocationsOperationsListCall) PageToken(pageToken string) *BillingAccountsLocationsOperationsListCall {
6863	c.urlParams_.Set("pageToken", pageToken)
6864	return c
6865}
6866
6867// Fields allows partial responses to be retrieved. See
6868// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6869// for more information.
6870func (c *BillingAccountsLocationsOperationsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsOperationsListCall {
6871	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6872	return c
6873}
6874
6875// IfNoneMatch sets the optional parameter which makes the operation
6876// fail if the object's ETag matches the given value. This is useful for
6877// getting updates only after the object has changed since the last
6878// request. Use googleapi.IsNotModified to check whether the response
6879// error from Do is the result of In-None-Match.
6880func (c *BillingAccountsLocationsOperationsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsOperationsListCall {
6881	c.ifNoneMatch_ = entityTag
6882	return c
6883}
6884
6885// Context sets the context to be used in this call's Do method. Any
6886// pending HTTP request will be aborted if the provided context is
6887// canceled.
6888func (c *BillingAccountsLocationsOperationsListCall) Context(ctx context.Context) *BillingAccountsLocationsOperationsListCall {
6889	c.ctx_ = ctx
6890	return c
6891}
6892
6893// Header returns an http.Header that can be modified by the caller to
6894// add HTTP headers to the request.
6895func (c *BillingAccountsLocationsOperationsListCall) Header() http.Header {
6896	if c.header_ == nil {
6897		c.header_ = make(http.Header)
6898	}
6899	return c.header_
6900}
6901
6902func (c *BillingAccountsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
6903	reqHeaders := make(http.Header)
6904	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6905	for k, v := range c.header_ {
6906		reqHeaders[k] = v
6907	}
6908	reqHeaders.Set("User-Agent", c.s.userAgent())
6909	if c.ifNoneMatch_ != "" {
6910		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6911	}
6912	var body io.Reader = nil
6913	c.urlParams_.Set("alt", alt)
6914	c.urlParams_.Set("prettyPrint", "false")
6915	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
6916	urls += "?" + c.urlParams_.Encode()
6917	req, err := http.NewRequest("GET", urls, body)
6918	if err != nil {
6919		return nil, err
6920	}
6921	req.Header = reqHeaders
6922	googleapi.Expand(req.URL, map[string]string{
6923		"name": c.name,
6924	})
6925	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6926}
6927
6928// Do executes the "logging.billingAccounts.locations.operations.list" call.
6929// Exactly one of *ListOperationsResponse or error will be non-nil. Any
6930// non-2xx status code is an error. Response headers are in either
6931// *ListOperationsResponse.ServerResponse.Header or (if a response was
6932// returned at all) in error.(*googleapi.Error).Header. Use
6933// googleapi.IsNotModified to check whether the returned error was
6934// because http.StatusNotModified was returned.
6935func (c *BillingAccountsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
6936	gensupport.SetOptions(c.urlParams_, opts...)
6937	res, err := c.doRequest("json")
6938	if res != nil && res.StatusCode == http.StatusNotModified {
6939		if res.Body != nil {
6940			res.Body.Close()
6941		}
6942		return nil, &googleapi.Error{
6943			Code:   res.StatusCode,
6944			Header: res.Header,
6945		}
6946	}
6947	if err != nil {
6948		return nil, err
6949	}
6950	defer googleapi.CloseBody(res)
6951	if err := googleapi.CheckResponse(res); err != nil {
6952		return nil, err
6953	}
6954	ret := &ListOperationsResponse{
6955		ServerResponse: googleapi.ServerResponse{
6956			Header:         res.Header,
6957			HTTPStatusCode: res.StatusCode,
6958		},
6959	}
6960	target := &ret
6961	if err := gensupport.DecodeResponse(target, res); err != nil {
6962		return nil, err
6963	}
6964	return ret, nil
6965	// {
6966	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
6967	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/operations",
6968	//   "httpMethod": "GET",
6969	//   "id": "logging.billingAccounts.locations.operations.list",
6970	//   "parameterOrder": [
6971	//     "name"
6972	//   ],
6973	//   "parameters": {
6974	//     "filter": {
6975	//       "description": "The standard list filter.",
6976	//       "location": "query",
6977	//       "type": "string"
6978	//     },
6979	//     "name": {
6980	//       "description": "The name of the operation's parent resource.",
6981	//       "location": "path",
6982	//       "pattern": "^billingAccounts/[^/]+/locations/[^/]+$",
6983	//       "required": true,
6984	//       "type": "string"
6985	//     },
6986	//     "pageSize": {
6987	//       "description": "The standard list page size.",
6988	//       "format": "int32",
6989	//       "location": "query",
6990	//       "type": "integer"
6991	//     },
6992	//     "pageToken": {
6993	//       "description": "The standard list page token.",
6994	//       "location": "query",
6995	//       "type": "string"
6996	//     }
6997	//   },
6998	//   "path": "v2/{+name}/operations",
6999	//   "response": {
7000	//     "$ref": "ListOperationsResponse"
7001	//   },
7002	//   "scopes": [
7003	//     "https://www.googleapis.com/auth/cloud-platform",
7004	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
7005	//     "https://www.googleapis.com/auth/logging.admin",
7006	//     "https://www.googleapis.com/auth/logging.read"
7007	//   ]
7008	// }
7009
7010}
7011
7012// Pages invokes f for each page of results.
7013// A non-nil error returned from f will halt the iteration.
7014// The provided context supersedes any context provided to the Context method.
7015func (c *BillingAccountsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
7016	c.ctx_ = ctx
7017	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7018	for {
7019		x, err := c.Do()
7020		if err != nil {
7021			return err
7022		}
7023		if err := f(x); err != nil {
7024			return err
7025		}
7026		if x.NextPageToken == "" {
7027			return nil
7028		}
7029		c.PageToken(x.NextPageToken)
7030	}
7031}
7032
7033// method id "logging.billingAccounts.logs.delete":
7034
7035type BillingAccountsLogsDeleteCall struct {
7036	s          *Service
7037	logName    string
7038	urlParams_ gensupport.URLParams
7039	ctx_       context.Context
7040	header_    http.Header
7041}
7042
7043// Delete: Deletes all the log entries in a log for the _Default Log
7044// Bucket. The log reappears if it receives new entries. Log entries
7045// written shortly before the delete operation might not be deleted.
7046// Entries received after the delete operation with a timestamp before
7047// the operation will be deleted.
7048//
7049// - logName: The resource name of the log to delete:
7050//   projects/[PROJECT_ID]/logs/[LOG_ID]
7051//   organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
7052//   billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
7053//   folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
7054//   example, "projects/my-project-id/logs/syslog",
7055//   "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For
7056//   more information about log names, see LogEntry.
7057func (r *BillingAccountsLogsService) Delete(logName string) *BillingAccountsLogsDeleteCall {
7058	c := &BillingAccountsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7059	c.logName = logName
7060	return c
7061}
7062
7063// Fields allows partial responses to be retrieved. See
7064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7065// for more information.
7066func (c *BillingAccountsLogsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLogsDeleteCall {
7067	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7068	return c
7069}
7070
7071// Context sets the context to be used in this call's Do method. Any
7072// pending HTTP request will be aborted if the provided context is
7073// canceled.
7074func (c *BillingAccountsLogsDeleteCall) Context(ctx context.Context) *BillingAccountsLogsDeleteCall {
7075	c.ctx_ = ctx
7076	return c
7077}
7078
7079// Header returns an http.Header that can be modified by the caller to
7080// add HTTP headers to the request.
7081func (c *BillingAccountsLogsDeleteCall) Header() http.Header {
7082	if c.header_ == nil {
7083		c.header_ = make(http.Header)
7084	}
7085	return c.header_
7086}
7087
7088func (c *BillingAccountsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
7089	reqHeaders := make(http.Header)
7090	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7091	for k, v := range c.header_ {
7092		reqHeaders[k] = v
7093	}
7094	reqHeaders.Set("User-Agent", c.s.userAgent())
7095	var body io.Reader = nil
7096	c.urlParams_.Set("alt", alt)
7097	c.urlParams_.Set("prettyPrint", "false")
7098	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
7099	urls += "?" + c.urlParams_.Encode()
7100	req, err := http.NewRequest("DELETE", urls, body)
7101	if err != nil {
7102		return nil, err
7103	}
7104	req.Header = reqHeaders
7105	googleapi.Expand(req.URL, map[string]string{
7106		"logName": c.logName,
7107	})
7108	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7109}
7110
7111// Do executes the "logging.billingAccounts.logs.delete" call.
7112// Exactly one of *Empty or error will be non-nil. Any non-2xx status
7113// code is an error. Response headers are in either
7114// *Empty.ServerResponse.Header or (if a response was returned at all)
7115// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7116// check whether the returned error was because http.StatusNotModified
7117// was returned.
7118func (c *BillingAccountsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7119	gensupport.SetOptions(c.urlParams_, opts...)
7120	res, err := c.doRequest("json")
7121	if res != nil && res.StatusCode == http.StatusNotModified {
7122		if res.Body != nil {
7123			res.Body.Close()
7124		}
7125		return nil, &googleapi.Error{
7126			Code:   res.StatusCode,
7127			Header: res.Header,
7128		}
7129	}
7130	if err != nil {
7131		return nil, err
7132	}
7133	defer googleapi.CloseBody(res)
7134	if err := googleapi.CheckResponse(res); err != nil {
7135		return nil, err
7136	}
7137	ret := &Empty{
7138		ServerResponse: googleapi.ServerResponse{
7139			Header:         res.Header,
7140			HTTPStatusCode: res.StatusCode,
7141		},
7142	}
7143	target := &ret
7144	if err := gensupport.DecodeResponse(target, res); err != nil {
7145		return nil, err
7146	}
7147	return ret, nil
7148	// {
7149	//   "description": "Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.",
7150	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/logs/{logsId}",
7151	//   "httpMethod": "DELETE",
7152	//   "id": "logging.billingAccounts.logs.delete",
7153	//   "parameterOrder": [
7154	//     "logName"
7155	//   ],
7156	//   "parameters": {
7157	//     "logName": {
7158	//       "description": "Required. The resource name of the log to delete: projects/[PROJECT_ID]/logs/[LOG_ID] organizations/[ORGANIZATION_ID]/logs/[LOG_ID] billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/123/logs/cloudaudit.googleapis.com%2Factivity\".For more information about log names, see LogEntry.",
7159	//       "location": "path",
7160	//       "pattern": "^billingAccounts/[^/]+/logs/[^/]+$",
7161	//       "required": true,
7162	//       "type": "string"
7163	//     }
7164	//   },
7165	//   "path": "v2/{+logName}",
7166	//   "response": {
7167	//     "$ref": "Empty"
7168	//   },
7169	//   "scopes": [
7170	//     "https://www.googleapis.com/auth/cloud-platform",
7171	//     "https://www.googleapis.com/auth/logging.admin"
7172	//   ]
7173	// }
7174
7175}
7176
7177// method id "logging.billingAccounts.logs.list":
7178
7179type BillingAccountsLogsListCall struct {
7180	s            *Service
7181	parent       string
7182	urlParams_   gensupport.URLParams
7183	ifNoneMatch_ string
7184	ctx_         context.Context
7185	header_      http.Header
7186}
7187
7188// List: Lists the logs in projects, organizations, folders, or billing
7189// accounts. Only logs that have entries are listed.
7190//
7191// - parent: The resource name that owns the logs: projects/[PROJECT_ID]
7192//   organizations/[ORGANIZATION_ID]
7193//   billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID].
7194func (r *BillingAccountsLogsService) List(parent string) *BillingAccountsLogsListCall {
7195	c := &BillingAccountsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7196	c.parent = parent
7197	return c
7198}
7199
7200// PageSize sets the optional parameter "pageSize": The maximum number
7201// of results to return from this request. Non-positive values are
7202// ignored. The presence of nextPageToken in the response indicates that
7203// more results might be available.
7204func (c *BillingAccountsLogsListCall) PageSize(pageSize int64) *BillingAccountsLogsListCall {
7205	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7206	return c
7207}
7208
7209// PageToken sets the optional parameter "pageToken": If present, then
7210// retrieve the next batch of results from the preceding call to this
7211// method. pageToken must be the value of nextPageToken from the
7212// previous response. The values of other method parameters should be
7213// identical to those in the previous call.
7214func (c *BillingAccountsLogsListCall) PageToken(pageToken string) *BillingAccountsLogsListCall {
7215	c.urlParams_.Set("pageToken", pageToken)
7216	return c
7217}
7218
7219// ResourceNames sets the optional parameter "resourceNames": The
7220// resource name that owns the logs:
7221// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/view
7222// s/[VIEW_ID]
7223// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKE
7224// T_ID]/views/[VIEW_ID]
7225// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[
7226// BUCKET_ID]/views/[VIEW_ID]
7227// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/
7228// [VIEW_ID]To support legacy queries, it could also be:
7229// projects/[PROJECT_ID] organizations/[ORGANIZATION_ID]
7230// billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]
7231func (c *BillingAccountsLogsListCall) ResourceNames(resourceNames ...string) *BillingAccountsLogsListCall {
7232	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
7233	return c
7234}
7235
7236// Fields allows partial responses to be retrieved. See
7237// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7238// for more information.
7239func (c *BillingAccountsLogsListCall) Fields(s ...googleapi.Field) *BillingAccountsLogsListCall {
7240	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7241	return c
7242}
7243
7244// IfNoneMatch sets the optional parameter which makes the operation
7245// fail if the object's ETag matches the given value. This is useful for
7246// getting updates only after the object has changed since the last
7247// request. Use googleapi.IsNotModified to check whether the response
7248// error from Do is the result of In-None-Match.
7249func (c *BillingAccountsLogsListCall) IfNoneMatch(entityTag string) *BillingAccountsLogsListCall {
7250	c.ifNoneMatch_ = entityTag
7251	return c
7252}
7253
7254// Context sets the context to be used in this call's Do method. Any
7255// pending HTTP request will be aborted if the provided context is
7256// canceled.
7257func (c *BillingAccountsLogsListCall) Context(ctx context.Context) *BillingAccountsLogsListCall {
7258	c.ctx_ = ctx
7259	return c
7260}
7261
7262// Header returns an http.Header that can be modified by the caller to
7263// add HTTP headers to the request.
7264func (c *BillingAccountsLogsListCall) Header() http.Header {
7265	if c.header_ == nil {
7266		c.header_ = make(http.Header)
7267	}
7268	return c.header_
7269}
7270
7271func (c *BillingAccountsLogsListCall) doRequest(alt string) (*http.Response, error) {
7272	reqHeaders := make(http.Header)
7273	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7274	for k, v := range c.header_ {
7275		reqHeaders[k] = v
7276	}
7277	reqHeaders.Set("User-Agent", c.s.userAgent())
7278	if c.ifNoneMatch_ != "" {
7279		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7280	}
7281	var body io.Reader = nil
7282	c.urlParams_.Set("alt", alt)
7283	c.urlParams_.Set("prettyPrint", "false")
7284	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
7285	urls += "?" + c.urlParams_.Encode()
7286	req, err := http.NewRequest("GET", urls, body)
7287	if err != nil {
7288		return nil, err
7289	}
7290	req.Header = reqHeaders
7291	googleapi.Expand(req.URL, map[string]string{
7292		"parent": c.parent,
7293	})
7294	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7295}
7296
7297// Do executes the "logging.billingAccounts.logs.list" call.
7298// Exactly one of *ListLogsResponse or error will be non-nil. Any
7299// non-2xx status code is an error. Response headers are in either
7300// *ListLogsResponse.ServerResponse.Header or (if a response was
7301// returned at all) in error.(*googleapi.Error).Header. Use
7302// googleapi.IsNotModified to check whether the returned error was
7303// because http.StatusNotModified was returned.
7304func (c *BillingAccountsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
7305	gensupport.SetOptions(c.urlParams_, opts...)
7306	res, err := c.doRequest("json")
7307	if res != nil && res.StatusCode == http.StatusNotModified {
7308		if res.Body != nil {
7309			res.Body.Close()
7310		}
7311		return nil, &googleapi.Error{
7312			Code:   res.StatusCode,
7313			Header: res.Header,
7314		}
7315	}
7316	if err != nil {
7317		return nil, err
7318	}
7319	defer googleapi.CloseBody(res)
7320	if err := googleapi.CheckResponse(res); err != nil {
7321		return nil, err
7322	}
7323	ret := &ListLogsResponse{
7324		ServerResponse: googleapi.ServerResponse{
7325			Header:         res.Header,
7326			HTTPStatusCode: res.StatusCode,
7327		},
7328	}
7329	target := &ret
7330	if err := gensupport.DecodeResponse(target, res); err != nil {
7331		return nil, err
7332	}
7333	return ret, nil
7334	// {
7335	//   "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.",
7336	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/logs",
7337	//   "httpMethod": "GET",
7338	//   "id": "logging.billingAccounts.logs.list",
7339	//   "parameterOrder": [
7340	//     "parent"
7341	//   ],
7342	//   "parameters": {
7343	//     "pageSize": {
7344	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
7345	//       "format": "int32",
7346	//       "location": "query",
7347	//       "type": "integer"
7348	//     },
7349	//     "pageToken": {
7350	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
7351	//       "location": "query",
7352	//       "type": "string"
7353	//     },
7354	//     "parent": {
7355	//       "description": "Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]",
7356	//       "location": "path",
7357	//       "pattern": "^billingAccounts/[^/]+$",
7358	//       "required": true,
7359	//       "type": "string"
7360	//     },
7361	//     "resourceNames": {
7362	//       "description": "Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]",
7363	//       "location": "query",
7364	//       "repeated": true,
7365	//       "type": "string"
7366	//     }
7367	//   },
7368	//   "path": "v2/{+parent}/logs",
7369	//   "response": {
7370	//     "$ref": "ListLogsResponse"
7371	//   },
7372	//   "scopes": [
7373	//     "https://www.googleapis.com/auth/cloud-platform",
7374	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
7375	//     "https://www.googleapis.com/auth/logging.admin",
7376	//     "https://www.googleapis.com/auth/logging.read"
7377	//   ]
7378	// }
7379
7380}
7381
7382// Pages invokes f for each page of results.
7383// A non-nil error returned from f will halt the iteration.
7384// The provided context supersedes any context provided to the Context method.
7385func (c *BillingAccountsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
7386	c.ctx_ = ctx
7387	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7388	for {
7389		x, err := c.Do()
7390		if err != nil {
7391			return err
7392		}
7393		if err := f(x); err != nil {
7394			return err
7395		}
7396		if x.NextPageToken == "" {
7397			return nil
7398		}
7399		c.PageToken(x.NextPageToken)
7400	}
7401}
7402
7403// method id "logging.billingAccounts.operations.get":
7404
7405type BillingAccountsOperationsGetCall struct {
7406	s            *Service
7407	name         string
7408	urlParams_   gensupport.URLParams
7409	ifNoneMatch_ string
7410	ctx_         context.Context
7411	header_      http.Header
7412}
7413
7414// Get: Gets the latest state of a long-running operation. Clients can
7415// use this method to poll the operation result at intervals as
7416// recommended by the API service.
7417//
7418// - name: The name of the operation resource.
7419func (r *BillingAccountsOperationsService) Get(name string) *BillingAccountsOperationsGetCall {
7420	c := &BillingAccountsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7421	c.name = name
7422	return c
7423}
7424
7425// Fields allows partial responses to be retrieved. See
7426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7427// for more information.
7428func (c *BillingAccountsOperationsGetCall) Fields(s ...googleapi.Field) *BillingAccountsOperationsGetCall {
7429	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7430	return c
7431}
7432
7433// IfNoneMatch sets the optional parameter which makes the operation
7434// fail if the object's ETag matches the given value. This is useful for
7435// getting updates only after the object has changed since the last
7436// request. Use googleapi.IsNotModified to check whether the response
7437// error from Do is the result of In-None-Match.
7438func (c *BillingAccountsOperationsGetCall) IfNoneMatch(entityTag string) *BillingAccountsOperationsGetCall {
7439	c.ifNoneMatch_ = entityTag
7440	return c
7441}
7442
7443// Context sets the context to be used in this call's Do method. Any
7444// pending HTTP request will be aborted if the provided context is
7445// canceled.
7446func (c *BillingAccountsOperationsGetCall) Context(ctx context.Context) *BillingAccountsOperationsGetCall {
7447	c.ctx_ = ctx
7448	return c
7449}
7450
7451// Header returns an http.Header that can be modified by the caller to
7452// add HTTP headers to the request.
7453func (c *BillingAccountsOperationsGetCall) Header() http.Header {
7454	if c.header_ == nil {
7455		c.header_ = make(http.Header)
7456	}
7457	return c.header_
7458}
7459
7460func (c *BillingAccountsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
7461	reqHeaders := make(http.Header)
7462	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7463	for k, v := range c.header_ {
7464		reqHeaders[k] = v
7465	}
7466	reqHeaders.Set("User-Agent", c.s.userAgent())
7467	if c.ifNoneMatch_ != "" {
7468		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7469	}
7470	var body io.Reader = nil
7471	c.urlParams_.Set("alt", alt)
7472	c.urlParams_.Set("prettyPrint", "false")
7473	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
7474	urls += "?" + c.urlParams_.Encode()
7475	req, err := http.NewRequest("GET", urls, body)
7476	if err != nil {
7477		return nil, err
7478	}
7479	req.Header = reqHeaders
7480	googleapi.Expand(req.URL, map[string]string{
7481		"name": c.name,
7482	})
7483	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7484}
7485
7486// Do executes the "logging.billingAccounts.operations.get" call.
7487// Exactly one of *Operation or error will be non-nil. Any non-2xx
7488// status code is an error. Response headers are in either
7489// *Operation.ServerResponse.Header or (if a response was returned at
7490// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7491// to check whether the returned error was because
7492// http.StatusNotModified was returned.
7493func (c *BillingAccountsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7494	gensupport.SetOptions(c.urlParams_, opts...)
7495	res, err := c.doRequest("json")
7496	if res != nil && res.StatusCode == http.StatusNotModified {
7497		if res.Body != nil {
7498			res.Body.Close()
7499		}
7500		return nil, &googleapi.Error{
7501			Code:   res.StatusCode,
7502			Header: res.Header,
7503		}
7504	}
7505	if err != nil {
7506		return nil, err
7507	}
7508	defer googleapi.CloseBody(res)
7509	if err := googleapi.CheckResponse(res); err != nil {
7510		return nil, err
7511	}
7512	ret := &Operation{
7513		ServerResponse: googleapi.ServerResponse{
7514			Header:         res.Header,
7515			HTTPStatusCode: res.StatusCode,
7516		},
7517	}
7518	target := &ret
7519	if err := gensupport.DecodeResponse(target, res); err != nil {
7520		return nil, err
7521	}
7522	return ret, nil
7523	// {
7524	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
7525	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/operations/{operationsId}",
7526	//   "httpMethod": "GET",
7527	//   "id": "logging.billingAccounts.operations.get",
7528	//   "parameterOrder": [
7529	//     "name"
7530	//   ],
7531	//   "parameters": {
7532	//     "name": {
7533	//       "description": "The name of the operation resource.",
7534	//       "location": "path",
7535	//       "pattern": "^billingAccounts/[^/]+/operations/[^/]+$",
7536	//       "required": true,
7537	//       "type": "string"
7538	//     }
7539	//   },
7540	//   "path": "v2/{+name}",
7541	//   "response": {
7542	//     "$ref": "Operation"
7543	//   },
7544	//   "scopes": [
7545	//     "https://www.googleapis.com/auth/cloud-platform",
7546	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
7547	//     "https://www.googleapis.com/auth/logging.admin",
7548	//     "https://www.googleapis.com/auth/logging.read"
7549	//   ]
7550	// }
7551
7552}
7553
7554// method id "logging.billingAccounts.sinks.create":
7555
7556type BillingAccountsSinksCreateCall struct {
7557	s          *Service
7558	parent     string
7559	logsink    *LogSink
7560	urlParams_ gensupport.URLParams
7561	ctx_       context.Context
7562	header_    http.Header
7563}
7564
7565// Create: Creates a sink that exports specified log entries to a
7566// destination. The export of newly-ingested log entries begins
7567// immediately, unless the sink's writer_identity is not permitted to
7568// write to the destination. A sink can export log entries only from the
7569// resource owning the sink.
7570//
7571// - parent: The resource in which to create the sink:
7572//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
7573//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
7574//   examples:"projects/my-project" "organizations/123456789".
7575func (r *BillingAccountsSinksService) Create(parent string, logsink *LogSink) *BillingAccountsSinksCreateCall {
7576	c := &BillingAccountsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7577	c.parent = parent
7578	c.logsink = logsink
7579	return c
7580}
7581
7582// UniqueWriterIdentity sets the optional parameter
7583// "uniqueWriterIdentity": Determines the kind of IAM identity returned
7584// as writer_identity in the new sink. If this value is omitted or set
7585// to false, and if the sink's parent is a project, then the value
7586// returned as writer_identity is the same group or service account used
7587// by Cloud Logging before the addition of writer identities to this
7588// API. The sink's destination must be in the same project as the sink
7589// itself.If this field is set to true, or if the sink is owned by a
7590// non-project resource such as an organization, then the value of
7591// writer_identity will be a unique service account used only for
7592// exports from the new sink. For more information, see writer_identity
7593// in LogSink.
7594func (c *BillingAccountsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksCreateCall {
7595	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
7596	return c
7597}
7598
7599// Fields allows partial responses to be retrieved. See
7600// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7601// for more information.
7602func (c *BillingAccountsSinksCreateCall) Fields(s ...googleapi.Field) *BillingAccountsSinksCreateCall {
7603	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7604	return c
7605}
7606
7607// Context sets the context to be used in this call's Do method. Any
7608// pending HTTP request will be aborted if the provided context is
7609// canceled.
7610func (c *BillingAccountsSinksCreateCall) Context(ctx context.Context) *BillingAccountsSinksCreateCall {
7611	c.ctx_ = ctx
7612	return c
7613}
7614
7615// Header returns an http.Header that can be modified by the caller to
7616// add HTTP headers to the request.
7617func (c *BillingAccountsSinksCreateCall) Header() http.Header {
7618	if c.header_ == nil {
7619		c.header_ = make(http.Header)
7620	}
7621	return c.header_
7622}
7623
7624func (c *BillingAccountsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
7625	reqHeaders := make(http.Header)
7626	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7627	for k, v := range c.header_ {
7628		reqHeaders[k] = v
7629	}
7630	reqHeaders.Set("User-Agent", c.s.userAgent())
7631	var body io.Reader = nil
7632	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
7633	if err != nil {
7634		return nil, err
7635	}
7636	reqHeaders.Set("Content-Type", "application/json")
7637	c.urlParams_.Set("alt", alt)
7638	c.urlParams_.Set("prettyPrint", "false")
7639	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
7640	urls += "?" + c.urlParams_.Encode()
7641	req, err := http.NewRequest("POST", urls, body)
7642	if err != nil {
7643		return nil, err
7644	}
7645	req.Header = reqHeaders
7646	googleapi.Expand(req.URL, map[string]string{
7647		"parent": c.parent,
7648	})
7649	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7650}
7651
7652// Do executes the "logging.billingAccounts.sinks.create" call.
7653// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
7654// code is an error. Response headers are in either
7655// *LogSink.ServerResponse.Header or (if a response was returned at all)
7656// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7657// check whether the returned error was because http.StatusNotModified
7658// was returned.
7659func (c *BillingAccountsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
7660	gensupport.SetOptions(c.urlParams_, opts...)
7661	res, err := c.doRequest("json")
7662	if res != nil && res.StatusCode == http.StatusNotModified {
7663		if res.Body != nil {
7664			res.Body.Close()
7665		}
7666		return nil, &googleapi.Error{
7667			Code:   res.StatusCode,
7668			Header: res.Header,
7669		}
7670	}
7671	if err != nil {
7672		return nil, err
7673	}
7674	defer googleapi.CloseBody(res)
7675	if err := googleapi.CheckResponse(res); err != nil {
7676		return nil, err
7677	}
7678	ret := &LogSink{
7679		ServerResponse: googleapi.ServerResponse{
7680			Header:         res.Header,
7681			HTTPStatusCode: res.StatusCode,
7682		},
7683	}
7684	target := &ret
7685	if err := gensupport.DecodeResponse(target, res); err != nil {
7686		return nil, err
7687	}
7688	return ret, nil
7689	// {
7690	//   "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.",
7691	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks",
7692	//   "httpMethod": "POST",
7693	//   "id": "logging.billingAccounts.sinks.create",
7694	//   "parameterOrder": [
7695	//     "parent"
7696	//   ],
7697	//   "parameters": {
7698	//     "parent": {
7699	//       "description": "Required. The resource in which to create the sink: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" For examples:\"projects/my-project\" \"organizations/123456789\"",
7700	//       "location": "path",
7701	//       "pattern": "^billingAccounts/[^/]+$",
7702	//       "required": true,
7703	//       "type": "string"
7704	//     },
7705	//     "uniqueWriterIdentity": {
7706	//       "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.",
7707	//       "location": "query",
7708	//       "type": "boolean"
7709	//     }
7710	//   },
7711	//   "path": "v2/{+parent}/sinks",
7712	//   "request": {
7713	//     "$ref": "LogSink"
7714	//   },
7715	//   "response": {
7716	//     "$ref": "LogSink"
7717	//   },
7718	//   "scopes": [
7719	//     "https://www.googleapis.com/auth/cloud-platform",
7720	//     "https://www.googleapis.com/auth/logging.admin"
7721	//   ]
7722	// }
7723
7724}
7725
7726// method id "logging.billingAccounts.sinks.delete":
7727
7728type BillingAccountsSinksDeleteCall struct {
7729	s          *Service
7730	sinkNameid string
7731	urlParams_ gensupport.URLParams
7732	ctx_       context.Context
7733	header_    http.Header
7734}
7735
7736// Delete: Deletes a sink. If the sink has a unique writer_identity,
7737// then that service account is also deleted.
7738//
7739// - sinkName: The full resource name of the sink to delete, including
7740//   the parent resource and the sink identifier:
7741//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
7742//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
7743//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
7744//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
7745//   example:"projects/my-project/sinks/my-sink".
7746func (r *BillingAccountsSinksService) Delete(sinkNameid string) *BillingAccountsSinksDeleteCall {
7747	c := &BillingAccountsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7748	c.sinkNameid = sinkNameid
7749	return c
7750}
7751
7752// Fields allows partial responses to be retrieved. See
7753// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7754// for more information.
7755func (c *BillingAccountsSinksDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsSinksDeleteCall {
7756	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7757	return c
7758}
7759
7760// Context sets the context to be used in this call's Do method. Any
7761// pending HTTP request will be aborted if the provided context is
7762// canceled.
7763func (c *BillingAccountsSinksDeleteCall) Context(ctx context.Context) *BillingAccountsSinksDeleteCall {
7764	c.ctx_ = ctx
7765	return c
7766}
7767
7768// Header returns an http.Header that can be modified by the caller to
7769// add HTTP headers to the request.
7770func (c *BillingAccountsSinksDeleteCall) Header() http.Header {
7771	if c.header_ == nil {
7772		c.header_ = make(http.Header)
7773	}
7774	return c.header_
7775}
7776
7777func (c *BillingAccountsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
7778	reqHeaders := make(http.Header)
7779	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7780	for k, v := range c.header_ {
7781		reqHeaders[k] = v
7782	}
7783	reqHeaders.Set("User-Agent", c.s.userAgent())
7784	var body io.Reader = nil
7785	c.urlParams_.Set("alt", alt)
7786	c.urlParams_.Set("prettyPrint", "false")
7787	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
7788	urls += "?" + c.urlParams_.Encode()
7789	req, err := http.NewRequest("DELETE", urls, body)
7790	if err != nil {
7791		return nil, err
7792	}
7793	req.Header = reqHeaders
7794	googleapi.Expand(req.URL, map[string]string{
7795		"sinkName": c.sinkNameid,
7796	})
7797	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7798}
7799
7800// Do executes the "logging.billingAccounts.sinks.delete" call.
7801// Exactly one of *Empty or error will be non-nil. Any non-2xx status
7802// code is an error. Response headers are in either
7803// *Empty.ServerResponse.Header or (if a response was returned at all)
7804// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7805// check whether the returned error was because http.StatusNotModified
7806// was returned.
7807func (c *BillingAccountsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7808	gensupport.SetOptions(c.urlParams_, opts...)
7809	res, err := c.doRequest("json")
7810	if res != nil && res.StatusCode == http.StatusNotModified {
7811		if res.Body != nil {
7812			res.Body.Close()
7813		}
7814		return nil, &googleapi.Error{
7815			Code:   res.StatusCode,
7816			Header: res.Header,
7817		}
7818	}
7819	if err != nil {
7820		return nil, err
7821	}
7822	defer googleapi.CloseBody(res)
7823	if err := googleapi.CheckResponse(res); err != nil {
7824		return nil, err
7825	}
7826	ret := &Empty{
7827		ServerResponse: googleapi.ServerResponse{
7828			Header:         res.Header,
7829			HTTPStatusCode: res.StatusCode,
7830		},
7831	}
7832	target := &ret
7833	if err := gensupport.DecodeResponse(target, res); err != nil {
7834		return nil, err
7835	}
7836	return ret, nil
7837	// {
7838	//   "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.",
7839	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}",
7840	//   "httpMethod": "DELETE",
7841	//   "id": "logging.billingAccounts.sinks.delete",
7842	//   "parameterOrder": [
7843	//     "sinkName"
7844	//   ],
7845	//   "parameters": {
7846	//     "sinkName": {
7847	//       "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
7848	//       "location": "path",
7849	//       "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$",
7850	//       "required": true,
7851	//       "type": "string"
7852	//     }
7853	//   },
7854	//   "path": "v2/{+sinkName}",
7855	//   "response": {
7856	//     "$ref": "Empty"
7857	//   },
7858	//   "scopes": [
7859	//     "https://www.googleapis.com/auth/cloud-platform",
7860	//     "https://www.googleapis.com/auth/logging.admin"
7861	//   ]
7862	// }
7863
7864}
7865
7866// method id "logging.billingAccounts.sinks.get":
7867
7868type BillingAccountsSinksGetCall struct {
7869	s            *Service
7870	sinkName     string
7871	urlParams_   gensupport.URLParams
7872	ifNoneMatch_ string
7873	ctx_         context.Context
7874	header_      http.Header
7875}
7876
7877// Get: Gets a sink.
7878//
7879// - sinkName: The resource name of the sink:
7880//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
7881//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
7882//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
7883//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
7884//   example:"projects/my-project/sinks/my-sink".
7885func (r *BillingAccountsSinksService) Get(sinkName string) *BillingAccountsSinksGetCall {
7886	c := &BillingAccountsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7887	c.sinkName = sinkName
7888	return c
7889}
7890
7891// Fields allows partial responses to be retrieved. See
7892// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7893// for more information.
7894func (c *BillingAccountsSinksGetCall) Fields(s ...googleapi.Field) *BillingAccountsSinksGetCall {
7895	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7896	return c
7897}
7898
7899// IfNoneMatch sets the optional parameter which makes the operation
7900// fail if the object's ETag matches the given value. This is useful for
7901// getting updates only after the object has changed since the last
7902// request. Use googleapi.IsNotModified to check whether the response
7903// error from Do is the result of In-None-Match.
7904func (c *BillingAccountsSinksGetCall) IfNoneMatch(entityTag string) *BillingAccountsSinksGetCall {
7905	c.ifNoneMatch_ = entityTag
7906	return c
7907}
7908
7909// Context sets the context to be used in this call's Do method. Any
7910// pending HTTP request will be aborted if the provided context is
7911// canceled.
7912func (c *BillingAccountsSinksGetCall) Context(ctx context.Context) *BillingAccountsSinksGetCall {
7913	c.ctx_ = ctx
7914	return c
7915}
7916
7917// Header returns an http.Header that can be modified by the caller to
7918// add HTTP headers to the request.
7919func (c *BillingAccountsSinksGetCall) Header() http.Header {
7920	if c.header_ == nil {
7921		c.header_ = make(http.Header)
7922	}
7923	return c.header_
7924}
7925
7926func (c *BillingAccountsSinksGetCall) doRequest(alt string) (*http.Response, error) {
7927	reqHeaders := make(http.Header)
7928	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7929	for k, v := range c.header_ {
7930		reqHeaders[k] = v
7931	}
7932	reqHeaders.Set("User-Agent", c.s.userAgent())
7933	if c.ifNoneMatch_ != "" {
7934		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7935	}
7936	var body io.Reader = nil
7937	c.urlParams_.Set("alt", alt)
7938	c.urlParams_.Set("prettyPrint", "false")
7939	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
7940	urls += "?" + c.urlParams_.Encode()
7941	req, err := http.NewRequest("GET", urls, body)
7942	if err != nil {
7943		return nil, err
7944	}
7945	req.Header = reqHeaders
7946	googleapi.Expand(req.URL, map[string]string{
7947		"sinkName": c.sinkName,
7948	})
7949	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7950}
7951
7952// Do executes the "logging.billingAccounts.sinks.get" call.
7953// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
7954// code is an error. Response headers are in either
7955// *LogSink.ServerResponse.Header or (if a response was returned at all)
7956// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7957// check whether the returned error was because http.StatusNotModified
7958// was returned.
7959func (c *BillingAccountsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
7960	gensupport.SetOptions(c.urlParams_, opts...)
7961	res, err := c.doRequest("json")
7962	if res != nil && res.StatusCode == http.StatusNotModified {
7963		if res.Body != nil {
7964			res.Body.Close()
7965		}
7966		return nil, &googleapi.Error{
7967			Code:   res.StatusCode,
7968			Header: res.Header,
7969		}
7970	}
7971	if err != nil {
7972		return nil, err
7973	}
7974	defer googleapi.CloseBody(res)
7975	if err := googleapi.CheckResponse(res); err != nil {
7976		return nil, err
7977	}
7978	ret := &LogSink{
7979		ServerResponse: googleapi.ServerResponse{
7980			Header:         res.Header,
7981			HTTPStatusCode: res.StatusCode,
7982		},
7983	}
7984	target := &ret
7985	if err := gensupport.DecodeResponse(target, res); err != nil {
7986		return nil, err
7987	}
7988	return ret, nil
7989	// {
7990	//   "description": "Gets a sink.",
7991	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}",
7992	//   "httpMethod": "GET",
7993	//   "id": "logging.billingAccounts.sinks.get",
7994	//   "parameterOrder": [
7995	//     "sinkName"
7996	//   ],
7997	//   "parameters": {
7998	//     "sinkName": {
7999	//       "description": "Required. The resource name of the sink: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
8000	//       "location": "path",
8001	//       "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$",
8002	//       "required": true,
8003	//       "type": "string"
8004	//     }
8005	//   },
8006	//   "path": "v2/{+sinkName}",
8007	//   "response": {
8008	//     "$ref": "LogSink"
8009	//   },
8010	//   "scopes": [
8011	//     "https://www.googleapis.com/auth/cloud-platform",
8012	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
8013	//     "https://www.googleapis.com/auth/logging.admin",
8014	//     "https://www.googleapis.com/auth/logging.read"
8015	//   ]
8016	// }
8017
8018}
8019
8020// method id "logging.billingAccounts.sinks.list":
8021
8022type BillingAccountsSinksListCall struct {
8023	s            *Service
8024	parent       string
8025	urlParams_   gensupport.URLParams
8026	ifNoneMatch_ string
8027	ctx_         context.Context
8028	header_      http.Header
8029}
8030
8031// List: Lists sinks.
8032//
8033// - parent: The parent resource whose sinks are to be listed:
8034//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
8035//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
8036func (r *BillingAccountsSinksService) List(parent string) *BillingAccountsSinksListCall {
8037	c := &BillingAccountsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8038	c.parent = parent
8039	return c
8040}
8041
8042// PageSize sets the optional parameter "pageSize": The maximum number
8043// of results to return from this request. Non-positive values are
8044// ignored. The presence of nextPageToken in the response indicates that
8045// more results might be available.
8046func (c *BillingAccountsSinksListCall) PageSize(pageSize int64) *BillingAccountsSinksListCall {
8047	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8048	return c
8049}
8050
8051// PageToken sets the optional parameter "pageToken": If present, then
8052// retrieve the next batch of results from the preceding call to this
8053// method. pageToken must be the value of nextPageToken from the
8054// previous response. The values of other method parameters should be
8055// identical to those in the previous call.
8056func (c *BillingAccountsSinksListCall) PageToken(pageToken string) *BillingAccountsSinksListCall {
8057	c.urlParams_.Set("pageToken", pageToken)
8058	return c
8059}
8060
8061// Fields allows partial responses to be retrieved. See
8062// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8063// for more information.
8064func (c *BillingAccountsSinksListCall) Fields(s ...googleapi.Field) *BillingAccountsSinksListCall {
8065	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8066	return c
8067}
8068
8069// IfNoneMatch sets the optional parameter which makes the operation
8070// fail if the object's ETag matches the given value. This is useful for
8071// getting updates only after the object has changed since the last
8072// request. Use googleapi.IsNotModified to check whether the response
8073// error from Do is the result of In-None-Match.
8074func (c *BillingAccountsSinksListCall) IfNoneMatch(entityTag string) *BillingAccountsSinksListCall {
8075	c.ifNoneMatch_ = entityTag
8076	return c
8077}
8078
8079// Context sets the context to be used in this call's Do method. Any
8080// pending HTTP request will be aborted if the provided context is
8081// canceled.
8082func (c *BillingAccountsSinksListCall) Context(ctx context.Context) *BillingAccountsSinksListCall {
8083	c.ctx_ = ctx
8084	return c
8085}
8086
8087// Header returns an http.Header that can be modified by the caller to
8088// add HTTP headers to the request.
8089func (c *BillingAccountsSinksListCall) Header() http.Header {
8090	if c.header_ == nil {
8091		c.header_ = make(http.Header)
8092	}
8093	return c.header_
8094}
8095
8096func (c *BillingAccountsSinksListCall) doRequest(alt string) (*http.Response, error) {
8097	reqHeaders := make(http.Header)
8098	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8099	for k, v := range c.header_ {
8100		reqHeaders[k] = v
8101	}
8102	reqHeaders.Set("User-Agent", c.s.userAgent())
8103	if c.ifNoneMatch_ != "" {
8104		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8105	}
8106	var body io.Reader = nil
8107	c.urlParams_.Set("alt", alt)
8108	c.urlParams_.Set("prettyPrint", "false")
8109	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
8110	urls += "?" + c.urlParams_.Encode()
8111	req, err := http.NewRequest("GET", urls, body)
8112	if err != nil {
8113		return nil, err
8114	}
8115	req.Header = reqHeaders
8116	googleapi.Expand(req.URL, map[string]string{
8117		"parent": c.parent,
8118	})
8119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8120}
8121
8122// Do executes the "logging.billingAccounts.sinks.list" call.
8123// Exactly one of *ListSinksResponse or error will be non-nil. Any
8124// non-2xx status code is an error. Response headers are in either
8125// *ListSinksResponse.ServerResponse.Header or (if a response was
8126// returned at all) in error.(*googleapi.Error).Header. Use
8127// googleapi.IsNotModified to check whether the returned error was
8128// because http.StatusNotModified was returned.
8129func (c *BillingAccountsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
8130	gensupport.SetOptions(c.urlParams_, opts...)
8131	res, err := c.doRequest("json")
8132	if res != nil && res.StatusCode == http.StatusNotModified {
8133		if res.Body != nil {
8134			res.Body.Close()
8135		}
8136		return nil, &googleapi.Error{
8137			Code:   res.StatusCode,
8138			Header: res.Header,
8139		}
8140	}
8141	if err != nil {
8142		return nil, err
8143	}
8144	defer googleapi.CloseBody(res)
8145	if err := googleapi.CheckResponse(res); err != nil {
8146		return nil, err
8147	}
8148	ret := &ListSinksResponse{
8149		ServerResponse: googleapi.ServerResponse{
8150			Header:         res.Header,
8151			HTTPStatusCode: res.StatusCode,
8152		},
8153	}
8154	target := &ret
8155	if err := gensupport.DecodeResponse(target, res); err != nil {
8156		return nil, err
8157	}
8158	return ret, nil
8159	// {
8160	//   "description": "Lists sinks.",
8161	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks",
8162	//   "httpMethod": "GET",
8163	//   "id": "logging.billingAccounts.sinks.list",
8164	//   "parameterOrder": [
8165	//     "parent"
8166	//   ],
8167	//   "parameters": {
8168	//     "pageSize": {
8169	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
8170	//       "format": "int32",
8171	//       "location": "query",
8172	//       "type": "integer"
8173	//     },
8174	//     "pageToken": {
8175	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
8176	//       "location": "query",
8177	//       "type": "string"
8178	//     },
8179	//     "parent": {
8180	//       "description": "Required. The parent resource whose sinks are to be listed: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" ",
8181	//       "location": "path",
8182	//       "pattern": "^billingAccounts/[^/]+$",
8183	//       "required": true,
8184	//       "type": "string"
8185	//     }
8186	//   },
8187	//   "path": "v2/{+parent}/sinks",
8188	//   "response": {
8189	//     "$ref": "ListSinksResponse"
8190	//   },
8191	//   "scopes": [
8192	//     "https://www.googleapis.com/auth/cloud-platform",
8193	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
8194	//     "https://www.googleapis.com/auth/logging.admin",
8195	//     "https://www.googleapis.com/auth/logging.read"
8196	//   ]
8197	// }
8198
8199}
8200
8201// Pages invokes f for each page of results.
8202// A non-nil error returned from f will halt the iteration.
8203// The provided context supersedes any context provided to the Context method.
8204func (c *BillingAccountsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
8205	c.ctx_ = ctx
8206	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8207	for {
8208		x, err := c.Do()
8209		if err != nil {
8210			return err
8211		}
8212		if err := f(x); err != nil {
8213			return err
8214		}
8215		if x.NextPageToken == "" {
8216			return nil
8217		}
8218		c.PageToken(x.NextPageToken)
8219	}
8220}
8221
8222// method id "logging.billingAccounts.sinks.patch":
8223
8224type BillingAccountsSinksPatchCall struct {
8225	s          *Service
8226	sinkNameid string
8227	logsink    *LogSink
8228	urlParams_ gensupport.URLParams
8229	ctx_       context.Context
8230	header_    http.Header
8231}
8232
8233// Patch: Updates a sink. This method replaces the following fields in
8234// the existing sink with values from the new sink: destination, and
8235// filter.The updated sink might also have a new writer_identity; see
8236// the unique_writer_identity field.
8237//
8238// - sinkName: The full resource name of the sink to update, including
8239//   the parent resource and the sink identifier:
8240//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
8241//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
8242//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
8243//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
8244//   example:"projects/my-project/sinks/my-sink".
8245func (r *BillingAccountsSinksService) Patch(sinkNameid string, logsink *LogSink) *BillingAccountsSinksPatchCall {
8246	c := &BillingAccountsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8247	c.sinkNameid = sinkNameid
8248	c.logsink = logsink
8249	return c
8250}
8251
8252// UniqueWriterIdentity sets the optional parameter
8253// "uniqueWriterIdentity": See sinks.create for a description of this
8254// field. When updating a sink, the effect of this field on the value of
8255// writer_identity in the updated sink depends on both the old and new
8256// values of this field: If the old and new values of this field are
8257// both false or both true, then there is no change to the sink's
8258// writer_identity. If the old value is false and the new value is true,
8259// then writer_identity is changed to a unique service account. It is an
8260// error if the old value is true and the new value is set to false or
8261// defaulted to false.
8262func (c *BillingAccountsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksPatchCall {
8263	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
8264	return c
8265}
8266
8267// UpdateMask sets the optional parameter "updateMask": Field mask that
8268// specifies the fields in sink that need an update. A sink field will
8269// be overwritten if, and only if, it is in the update mask. name and
8270// output only fields cannot be updated.An empty updateMask is
8271// temporarily treated as using the following mask for backwards
8272// compatibility purposes:destination,filter,includeChildrenAt some
8273// point in the future, behavior will be removed and specifying an empty
8274// updateMask will be an error.For a detailed FieldMask definition, see
8275// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
8276// example: updateMask=filter
8277func (c *BillingAccountsSinksPatchCall) UpdateMask(updateMask string) *BillingAccountsSinksPatchCall {
8278	c.urlParams_.Set("updateMask", updateMask)
8279	return c
8280}
8281
8282// Fields allows partial responses to be retrieved. See
8283// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8284// for more information.
8285func (c *BillingAccountsSinksPatchCall) Fields(s ...googleapi.Field) *BillingAccountsSinksPatchCall {
8286	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8287	return c
8288}
8289
8290// Context sets the context to be used in this call's Do method. Any
8291// pending HTTP request will be aborted if the provided context is
8292// canceled.
8293func (c *BillingAccountsSinksPatchCall) Context(ctx context.Context) *BillingAccountsSinksPatchCall {
8294	c.ctx_ = ctx
8295	return c
8296}
8297
8298// Header returns an http.Header that can be modified by the caller to
8299// add HTTP headers to the request.
8300func (c *BillingAccountsSinksPatchCall) Header() http.Header {
8301	if c.header_ == nil {
8302		c.header_ = make(http.Header)
8303	}
8304	return c.header_
8305}
8306
8307func (c *BillingAccountsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
8308	reqHeaders := make(http.Header)
8309	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8310	for k, v := range c.header_ {
8311		reqHeaders[k] = v
8312	}
8313	reqHeaders.Set("User-Agent", c.s.userAgent())
8314	var body io.Reader = nil
8315	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
8316	if err != nil {
8317		return nil, err
8318	}
8319	reqHeaders.Set("Content-Type", "application/json")
8320	c.urlParams_.Set("alt", alt)
8321	c.urlParams_.Set("prettyPrint", "false")
8322	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
8323	urls += "?" + c.urlParams_.Encode()
8324	req, err := http.NewRequest("PATCH", urls, body)
8325	if err != nil {
8326		return nil, err
8327	}
8328	req.Header = reqHeaders
8329	googleapi.Expand(req.URL, map[string]string{
8330		"sinkName": c.sinkNameid,
8331	})
8332	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8333}
8334
8335// Do executes the "logging.billingAccounts.sinks.patch" call.
8336// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
8337// code is an error. Response headers are in either
8338// *LogSink.ServerResponse.Header or (if a response was returned at all)
8339// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8340// check whether the returned error was because http.StatusNotModified
8341// was returned.
8342func (c *BillingAccountsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
8343	gensupport.SetOptions(c.urlParams_, opts...)
8344	res, err := c.doRequest("json")
8345	if res != nil && res.StatusCode == http.StatusNotModified {
8346		if res.Body != nil {
8347			res.Body.Close()
8348		}
8349		return nil, &googleapi.Error{
8350			Code:   res.StatusCode,
8351			Header: res.Header,
8352		}
8353	}
8354	if err != nil {
8355		return nil, err
8356	}
8357	defer googleapi.CloseBody(res)
8358	if err := googleapi.CheckResponse(res); err != nil {
8359		return nil, err
8360	}
8361	ret := &LogSink{
8362		ServerResponse: googleapi.ServerResponse{
8363			Header:         res.Header,
8364			HTTPStatusCode: res.StatusCode,
8365		},
8366	}
8367	target := &ret
8368	if err := gensupport.DecodeResponse(target, res); err != nil {
8369		return nil, err
8370	}
8371	return ret, nil
8372	// {
8373	//   "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
8374	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}",
8375	//   "httpMethod": "PATCH",
8376	//   "id": "logging.billingAccounts.sinks.patch",
8377	//   "parameterOrder": [
8378	//     "sinkName"
8379	//   ],
8380	//   "parameters": {
8381	//     "sinkName": {
8382	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
8383	//       "location": "path",
8384	//       "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$",
8385	//       "required": true,
8386	//       "type": "string"
8387	//     },
8388	//     "uniqueWriterIdentity": {
8389	//       "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false.",
8390	//       "location": "query",
8391	//       "type": "boolean"
8392	//     },
8393	//     "updateMask": {
8394	//       "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
8395	//       "format": "google-fieldmask",
8396	//       "location": "query",
8397	//       "type": "string"
8398	//     }
8399	//   },
8400	//   "path": "v2/{+sinkName}",
8401	//   "request": {
8402	//     "$ref": "LogSink"
8403	//   },
8404	//   "response": {
8405	//     "$ref": "LogSink"
8406	//   },
8407	//   "scopes": [
8408	//     "https://www.googleapis.com/auth/cloud-platform",
8409	//     "https://www.googleapis.com/auth/logging.admin"
8410	//   ]
8411	// }
8412
8413}
8414
8415// method id "logging.billingAccounts.sinks.update":
8416
8417type BillingAccountsSinksUpdateCall struct {
8418	s          *Service
8419	sinkNameid string
8420	logsink    *LogSink
8421	urlParams_ gensupport.URLParams
8422	ctx_       context.Context
8423	header_    http.Header
8424}
8425
8426// Update: Updates a sink. This method replaces the following fields in
8427// the existing sink with values from the new sink: destination, and
8428// filter.The updated sink might also have a new writer_identity; see
8429// the unique_writer_identity field.
8430//
8431// - sinkName: The full resource name of the sink to update, including
8432//   the parent resource and the sink identifier:
8433//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
8434//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
8435//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
8436//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
8437//   example:"projects/my-project/sinks/my-sink".
8438func (r *BillingAccountsSinksService) Update(sinkNameid string, logsink *LogSink) *BillingAccountsSinksUpdateCall {
8439	c := &BillingAccountsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8440	c.sinkNameid = sinkNameid
8441	c.logsink = logsink
8442	return c
8443}
8444
8445// UniqueWriterIdentity sets the optional parameter
8446// "uniqueWriterIdentity": See sinks.create for a description of this
8447// field. When updating a sink, the effect of this field on the value of
8448// writer_identity in the updated sink depends on both the old and new
8449// values of this field: If the old and new values of this field are
8450// both false or both true, then there is no change to the sink's
8451// writer_identity. If the old value is false and the new value is true,
8452// then writer_identity is changed to a unique service account. It is an
8453// error if the old value is true and the new value is set to false or
8454// defaulted to false.
8455func (c *BillingAccountsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksUpdateCall {
8456	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
8457	return c
8458}
8459
8460// UpdateMask sets the optional parameter "updateMask": Field mask that
8461// specifies the fields in sink that need an update. A sink field will
8462// be overwritten if, and only if, it is in the update mask. name and
8463// output only fields cannot be updated.An empty updateMask is
8464// temporarily treated as using the following mask for backwards
8465// compatibility purposes:destination,filter,includeChildrenAt some
8466// point in the future, behavior will be removed and specifying an empty
8467// updateMask will be an error.For a detailed FieldMask definition, see
8468// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
8469// example: updateMask=filter
8470func (c *BillingAccountsSinksUpdateCall) UpdateMask(updateMask string) *BillingAccountsSinksUpdateCall {
8471	c.urlParams_.Set("updateMask", updateMask)
8472	return c
8473}
8474
8475// Fields allows partial responses to be retrieved. See
8476// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8477// for more information.
8478func (c *BillingAccountsSinksUpdateCall) Fields(s ...googleapi.Field) *BillingAccountsSinksUpdateCall {
8479	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8480	return c
8481}
8482
8483// Context sets the context to be used in this call's Do method. Any
8484// pending HTTP request will be aborted if the provided context is
8485// canceled.
8486func (c *BillingAccountsSinksUpdateCall) Context(ctx context.Context) *BillingAccountsSinksUpdateCall {
8487	c.ctx_ = ctx
8488	return c
8489}
8490
8491// Header returns an http.Header that can be modified by the caller to
8492// add HTTP headers to the request.
8493func (c *BillingAccountsSinksUpdateCall) Header() http.Header {
8494	if c.header_ == nil {
8495		c.header_ = make(http.Header)
8496	}
8497	return c.header_
8498}
8499
8500func (c *BillingAccountsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
8501	reqHeaders := make(http.Header)
8502	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8503	for k, v := range c.header_ {
8504		reqHeaders[k] = v
8505	}
8506	reqHeaders.Set("User-Agent", c.s.userAgent())
8507	var body io.Reader = nil
8508	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
8509	if err != nil {
8510		return nil, err
8511	}
8512	reqHeaders.Set("Content-Type", "application/json")
8513	c.urlParams_.Set("alt", alt)
8514	c.urlParams_.Set("prettyPrint", "false")
8515	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
8516	urls += "?" + c.urlParams_.Encode()
8517	req, err := http.NewRequest("PUT", urls, body)
8518	if err != nil {
8519		return nil, err
8520	}
8521	req.Header = reqHeaders
8522	googleapi.Expand(req.URL, map[string]string{
8523		"sinkName": c.sinkNameid,
8524	})
8525	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8526}
8527
8528// Do executes the "logging.billingAccounts.sinks.update" call.
8529// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
8530// code is an error. Response headers are in either
8531// *LogSink.ServerResponse.Header or (if a response was returned at all)
8532// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8533// check whether the returned error was because http.StatusNotModified
8534// was returned.
8535func (c *BillingAccountsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
8536	gensupport.SetOptions(c.urlParams_, opts...)
8537	res, err := c.doRequest("json")
8538	if res != nil && res.StatusCode == http.StatusNotModified {
8539		if res.Body != nil {
8540			res.Body.Close()
8541		}
8542		return nil, &googleapi.Error{
8543			Code:   res.StatusCode,
8544			Header: res.Header,
8545		}
8546	}
8547	if err != nil {
8548		return nil, err
8549	}
8550	defer googleapi.CloseBody(res)
8551	if err := googleapi.CheckResponse(res); err != nil {
8552		return nil, err
8553	}
8554	ret := &LogSink{
8555		ServerResponse: googleapi.ServerResponse{
8556			Header:         res.Header,
8557			HTTPStatusCode: res.StatusCode,
8558		},
8559	}
8560	target := &ret
8561	if err := gensupport.DecodeResponse(target, res); err != nil {
8562		return nil, err
8563	}
8564	return ret, nil
8565	// {
8566	//   "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
8567	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}",
8568	//   "httpMethod": "PUT",
8569	//   "id": "logging.billingAccounts.sinks.update",
8570	//   "parameterOrder": [
8571	//     "sinkName"
8572	//   ],
8573	//   "parameters": {
8574	//     "sinkName": {
8575	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
8576	//       "location": "path",
8577	//       "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$",
8578	//       "required": true,
8579	//       "type": "string"
8580	//     },
8581	//     "uniqueWriterIdentity": {
8582	//       "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false.",
8583	//       "location": "query",
8584	//       "type": "boolean"
8585	//     },
8586	//     "updateMask": {
8587	//       "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
8588	//       "format": "google-fieldmask",
8589	//       "location": "query",
8590	//       "type": "string"
8591	//     }
8592	//   },
8593	//   "path": "v2/{+sinkName}",
8594	//   "request": {
8595	//     "$ref": "LogSink"
8596	//   },
8597	//   "response": {
8598	//     "$ref": "LogSink"
8599	//   },
8600	//   "scopes": [
8601	//     "https://www.googleapis.com/auth/cloud-platform",
8602	//     "https://www.googleapis.com/auth/logging.admin"
8603	//   ]
8604	// }
8605
8606}
8607
8608// method id "logging.entries.copy":
8609
8610type EntriesCopyCall struct {
8611	s                     *Service
8612	copylogentriesrequest *CopyLogEntriesRequest
8613	urlParams_            gensupport.URLParams
8614	ctx_                  context.Context
8615	header_               http.Header
8616}
8617
8618// Copy: Copies a set of log entries from a log bucket to a Cloud
8619// Storage bucket.
8620func (r *EntriesService) Copy(copylogentriesrequest *CopyLogEntriesRequest) *EntriesCopyCall {
8621	c := &EntriesCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8622	c.copylogentriesrequest = copylogentriesrequest
8623	return c
8624}
8625
8626// Fields allows partial responses to be retrieved. See
8627// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8628// for more information.
8629func (c *EntriesCopyCall) Fields(s ...googleapi.Field) *EntriesCopyCall {
8630	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8631	return c
8632}
8633
8634// Context sets the context to be used in this call's Do method. Any
8635// pending HTTP request will be aborted if the provided context is
8636// canceled.
8637func (c *EntriesCopyCall) Context(ctx context.Context) *EntriesCopyCall {
8638	c.ctx_ = ctx
8639	return c
8640}
8641
8642// Header returns an http.Header that can be modified by the caller to
8643// add HTTP headers to the request.
8644func (c *EntriesCopyCall) Header() http.Header {
8645	if c.header_ == nil {
8646		c.header_ = make(http.Header)
8647	}
8648	return c.header_
8649}
8650
8651func (c *EntriesCopyCall) doRequest(alt string) (*http.Response, error) {
8652	reqHeaders := make(http.Header)
8653	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8654	for k, v := range c.header_ {
8655		reqHeaders[k] = v
8656	}
8657	reqHeaders.Set("User-Agent", c.s.userAgent())
8658	var body io.Reader = nil
8659	body, err := googleapi.WithoutDataWrapper.JSONReader(c.copylogentriesrequest)
8660	if err != nil {
8661		return nil, err
8662	}
8663	reqHeaders.Set("Content-Type", "application/json")
8664	c.urlParams_.Set("alt", alt)
8665	c.urlParams_.Set("prettyPrint", "false")
8666	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:copy")
8667	urls += "?" + c.urlParams_.Encode()
8668	req, err := http.NewRequest("POST", urls, body)
8669	if err != nil {
8670		return nil, err
8671	}
8672	req.Header = reqHeaders
8673	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8674}
8675
8676// Do executes the "logging.entries.copy" call.
8677// Exactly one of *Operation or error will be non-nil. Any non-2xx
8678// status code is an error. Response headers are in either
8679// *Operation.ServerResponse.Header or (if a response was returned at
8680// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8681// to check whether the returned error was because
8682// http.StatusNotModified was returned.
8683func (c *EntriesCopyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8684	gensupport.SetOptions(c.urlParams_, opts...)
8685	res, err := c.doRequest("json")
8686	if res != nil && res.StatusCode == http.StatusNotModified {
8687		if res.Body != nil {
8688			res.Body.Close()
8689		}
8690		return nil, &googleapi.Error{
8691			Code:   res.StatusCode,
8692			Header: res.Header,
8693		}
8694	}
8695	if err != nil {
8696		return nil, err
8697	}
8698	defer googleapi.CloseBody(res)
8699	if err := googleapi.CheckResponse(res); err != nil {
8700		return nil, err
8701	}
8702	ret := &Operation{
8703		ServerResponse: googleapi.ServerResponse{
8704			Header:         res.Header,
8705			HTTPStatusCode: res.StatusCode,
8706		},
8707	}
8708	target := &ret
8709	if err := gensupport.DecodeResponse(target, res); err != nil {
8710		return nil, err
8711	}
8712	return ret, nil
8713	// {
8714	//   "description": "Copies a set of log entries from a log bucket to a Cloud Storage bucket.",
8715	//   "flatPath": "v2/entries:copy",
8716	//   "httpMethod": "POST",
8717	//   "id": "logging.entries.copy",
8718	//   "parameterOrder": [],
8719	//   "parameters": {},
8720	//   "path": "v2/entries:copy",
8721	//   "request": {
8722	//     "$ref": "CopyLogEntriesRequest"
8723	//   },
8724	//   "response": {
8725	//     "$ref": "Operation"
8726	//   },
8727	//   "scopes": [
8728	//     "https://www.googleapis.com/auth/cloud-platform",
8729	//     "https://www.googleapis.com/auth/logging.admin"
8730	//   ]
8731	// }
8732
8733}
8734
8735// method id "logging.entries.list":
8736
8737type EntriesListCall struct {
8738	s                     *Service
8739	listlogentriesrequest *ListLogEntriesRequest
8740	urlParams_            gensupport.URLParams
8741	ctx_                  context.Context
8742	header_               http.Header
8743}
8744
8745// List: Lists log entries. Use this method to retrieve log entries that
8746// originated from a project/folder/organization/billing account. For
8747// ways to export log entries, see Exporting Logs
8748// (https://cloud.google.com/logging/docs/export).
8749func (r *EntriesService) List(listlogentriesrequest *ListLogEntriesRequest) *EntriesListCall {
8750	c := &EntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8751	c.listlogentriesrequest = listlogentriesrequest
8752	return c
8753}
8754
8755// Fields allows partial responses to be retrieved. See
8756// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8757// for more information.
8758func (c *EntriesListCall) Fields(s ...googleapi.Field) *EntriesListCall {
8759	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8760	return c
8761}
8762
8763// Context sets the context to be used in this call's Do method. Any
8764// pending HTTP request will be aborted if the provided context is
8765// canceled.
8766func (c *EntriesListCall) Context(ctx context.Context) *EntriesListCall {
8767	c.ctx_ = ctx
8768	return c
8769}
8770
8771// Header returns an http.Header that can be modified by the caller to
8772// add HTTP headers to the request.
8773func (c *EntriesListCall) Header() http.Header {
8774	if c.header_ == nil {
8775		c.header_ = make(http.Header)
8776	}
8777	return c.header_
8778}
8779
8780func (c *EntriesListCall) doRequest(alt string) (*http.Response, error) {
8781	reqHeaders := make(http.Header)
8782	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8783	for k, v := range c.header_ {
8784		reqHeaders[k] = v
8785	}
8786	reqHeaders.Set("User-Agent", c.s.userAgent())
8787	var body io.Reader = nil
8788	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listlogentriesrequest)
8789	if err != nil {
8790		return nil, err
8791	}
8792	reqHeaders.Set("Content-Type", "application/json")
8793	c.urlParams_.Set("alt", alt)
8794	c.urlParams_.Set("prettyPrint", "false")
8795	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:list")
8796	urls += "?" + c.urlParams_.Encode()
8797	req, err := http.NewRequest("POST", urls, body)
8798	if err != nil {
8799		return nil, err
8800	}
8801	req.Header = reqHeaders
8802	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8803}
8804
8805// Do executes the "logging.entries.list" call.
8806// Exactly one of *ListLogEntriesResponse or error will be non-nil. Any
8807// non-2xx status code is an error. Response headers are in either
8808// *ListLogEntriesResponse.ServerResponse.Header or (if a response was
8809// returned at all) in error.(*googleapi.Error).Header. Use
8810// googleapi.IsNotModified to check whether the returned error was
8811// because http.StatusNotModified was returned.
8812func (c *EntriesListCall) Do(opts ...googleapi.CallOption) (*ListLogEntriesResponse, error) {
8813	gensupport.SetOptions(c.urlParams_, opts...)
8814	res, err := c.doRequest("json")
8815	if res != nil && res.StatusCode == http.StatusNotModified {
8816		if res.Body != nil {
8817			res.Body.Close()
8818		}
8819		return nil, &googleapi.Error{
8820			Code:   res.StatusCode,
8821			Header: res.Header,
8822		}
8823	}
8824	if err != nil {
8825		return nil, err
8826	}
8827	defer googleapi.CloseBody(res)
8828	if err := googleapi.CheckResponse(res); err != nil {
8829		return nil, err
8830	}
8831	ret := &ListLogEntriesResponse{
8832		ServerResponse: googleapi.ServerResponse{
8833			Header:         res.Header,
8834			HTTPStatusCode: res.StatusCode,
8835		},
8836	}
8837	target := &ret
8838	if err := gensupport.DecodeResponse(target, res); err != nil {
8839		return nil, err
8840	}
8841	return ret, nil
8842	// {
8843	//   "description": "Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs (https://cloud.google.com/logging/docs/export).",
8844	//   "flatPath": "v2/entries:list",
8845	//   "httpMethod": "POST",
8846	//   "id": "logging.entries.list",
8847	//   "parameterOrder": [],
8848	//   "parameters": {},
8849	//   "path": "v2/entries:list",
8850	//   "request": {
8851	//     "$ref": "ListLogEntriesRequest"
8852	//   },
8853	//   "response": {
8854	//     "$ref": "ListLogEntriesResponse"
8855	//   },
8856	//   "scopes": [
8857	//     "https://www.googleapis.com/auth/cloud-platform",
8858	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
8859	//     "https://www.googleapis.com/auth/logging.admin",
8860	//     "https://www.googleapis.com/auth/logging.read"
8861	//   ]
8862	// }
8863
8864}
8865
8866// Pages invokes f for each page of results.
8867// A non-nil error returned from f will halt the iteration.
8868// The provided context supersedes any context provided to the Context method.
8869func (c *EntriesListCall) Pages(ctx context.Context, f func(*ListLogEntriesResponse) error) error {
8870	c.ctx_ = ctx
8871	defer func(pt string) { c.listlogentriesrequest.PageToken = pt }(c.listlogentriesrequest.PageToken) // reset paging to original point
8872	for {
8873		x, err := c.Do()
8874		if err != nil {
8875			return err
8876		}
8877		if err := f(x); err != nil {
8878			return err
8879		}
8880		if x.NextPageToken == "" {
8881			return nil
8882		}
8883		c.listlogentriesrequest.PageToken = x.NextPageToken
8884	}
8885}
8886
8887// method id "logging.entries.tail":
8888
8889type EntriesTailCall struct {
8890	s                     *Service
8891	taillogentriesrequest *TailLogEntriesRequest
8892	urlParams_            gensupport.URLParams
8893	ctx_                  context.Context
8894	header_               http.Header
8895}
8896
8897// Tail: Streaming read of log entries as they are ingested. Until the
8898// stream is terminated, it will continue reading logs.
8899func (r *EntriesService) Tail(taillogentriesrequest *TailLogEntriesRequest) *EntriesTailCall {
8900	c := &EntriesTailCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8901	c.taillogentriesrequest = taillogentriesrequest
8902	return c
8903}
8904
8905// Fields allows partial responses to be retrieved. See
8906// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8907// for more information.
8908func (c *EntriesTailCall) Fields(s ...googleapi.Field) *EntriesTailCall {
8909	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8910	return c
8911}
8912
8913// Context sets the context to be used in this call's Do method. Any
8914// pending HTTP request will be aborted if the provided context is
8915// canceled.
8916func (c *EntriesTailCall) Context(ctx context.Context) *EntriesTailCall {
8917	c.ctx_ = ctx
8918	return c
8919}
8920
8921// Header returns an http.Header that can be modified by the caller to
8922// add HTTP headers to the request.
8923func (c *EntriesTailCall) Header() http.Header {
8924	if c.header_ == nil {
8925		c.header_ = make(http.Header)
8926	}
8927	return c.header_
8928}
8929
8930func (c *EntriesTailCall) doRequest(alt string) (*http.Response, error) {
8931	reqHeaders := make(http.Header)
8932	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8933	for k, v := range c.header_ {
8934		reqHeaders[k] = v
8935	}
8936	reqHeaders.Set("User-Agent", c.s.userAgent())
8937	var body io.Reader = nil
8938	body, err := googleapi.WithoutDataWrapper.JSONReader(c.taillogentriesrequest)
8939	if err != nil {
8940		return nil, err
8941	}
8942	reqHeaders.Set("Content-Type", "application/json")
8943	c.urlParams_.Set("alt", alt)
8944	c.urlParams_.Set("prettyPrint", "false")
8945	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:tail")
8946	urls += "?" + c.urlParams_.Encode()
8947	req, err := http.NewRequest("POST", urls, body)
8948	if err != nil {
8949		return nil, err
8950	}
8951	req.Header = reqHeaders
8952	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8953}
8954
8955// Do executes the "logging.entries.tail" call.
8956// Exactly one of *TailLogEntriesResponse or error will be non-nil. Any
8957// non-2xx status code is an error. Response headers are in either
8958// *TailLogEntriesResponse.ServerResponse.Header or (if a response was
8959// returned at all) in error.(*googleapi.Error).Header. Use
8960// googleapi.IsNotModified to check whether the returned error was
8961// because http.StatusNotModified was returned.
8962func (c *EntriesTailCall) Do(opts ...googleapi.CallOption) (*TailLogEntriesResponse, error) {
8963	gensupport.SetOptions(c.urlParams_, opts...)
8964	res, err := c.doRequest("json")
8965	if res != nil && res.StatusCode == http.StatusNotModified {
8966		if res.Body != nil {
8967			res.Body.Close()
8968		}
8969		return nil, &googleapi.Error{
8970			Code:   res.StatusCode,
8971			Header: res.Header,
8972		}
8973	}
8974	if err != nil {
8975		return nil, err
8976	}
8977	defer googleapi.CloseBody(res)
8978	if err := googleapi.CheckResponse(res); err != nil {
8979		return nil, err
8980	}
8981	ret := &TailLogEntriesResponse{
8982		ServerResponse: googleapi.ServerResponse{
8983			Header:         res.Header,
8984			HTTPStatusCode: res.StatusCode,
8985		},
8986	}
8987	target := &ret
8988	if err := gensupport.DecodeResponse(target, res); err != nil {
8989		return nil, err
8990	}
8991	return ret, nil
8992	// {
8993	//   "description": "Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs.",
8994	//   "flatPath": "v2/entries:tail",
8995	//   "httpMethod": "POST",
8996	//   "id": "logging.entries.tail",
8997	//   "parameterOrder": [],
8998	//   "parameters": {},
8999	//   "path": "v2/entries:tail",
9000	//   "request": {
9001	//     "$ref": "TailLogEntriesRequest"
9002	//   },
9003	//   "response": {
9004	//     "$ref": "TailLogEntriesResponse"
9005	//   },
9006	//   "scopes": [
9007	//     "https://www.googleapis.com/auth/cloud-platform",
9008	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
9009	//     "https://www.googleapis.com/auth/logging.admin",
9010	//     "https://www.googleapis.com/auth/logging.read"
9011	//   ]
9012	// }
9013
9014}
9015
9016// method id "logging.entries.write":
9017
9018type EntriesWriteCall struct {
9019	s                      *Service
9020	writelogentriesrequest *WriteLogEntriesRequest
9021	urlParams_             gensupport.URLParams
9022	ctx_                   context.Context
9023	header_                http.Header
9024}
9025
9026// Write: Writes log entries to Logging. This API method is the only way
9027// to send log entries to Logging. This method is used, directly or
9028// indirectly, by the Logging agent (fluentd) and all logging libraries
9029// configured to use Logging. A single request may contain log entries
9030// for a maximum of 1000 different resources (projects, organizations,
9031// billing accounts or folders)
9032func (r *EntriesService) Write(writelogentriesrequest *WriteLogEntriesRequest) *EntriesWriteCall {
9033	c := &EntriesWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9034	c.writelogentriesrequest = writelogentriesrequest
9035	return c
9036}
9037
9038// Fields allows partial responses to be retrieved. See
9039// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9040// for more information.
9041func (c *EntriesWriteCall) Fields(s ...googleapi.Field) *EntriesWriteCall {
9042	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9043	return c
9044}
9045
9046// Context sets the context to be used in this call's Do method. Any
9047// pending HTTP request will be aborted if the provided context is
9048// canceled.
9049func (c *EntriesWriteCall) Context(ctx context.Context) *EntriesWriteCall {
9050	c.ctx_ = ctx
9051	return c
9052}
9053
9054// Header returns an http.Header that can be modified by the caller to
9055// add HTTP headers to the request.
9056func (c *EntriesWriteCall) Header() http.Header {
9057	if c.header_ == nil {
9058		c.header_ = make(http.Header)
9059	}
9060	return c.header_
9061}
9062
9063func (c *EntriesWriteCall) doRequest(alt string) (*http.Response, error) {
9064	reqHeaders := make(http.Header)
9065	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9066	for k, v := range c.header_ {
9067		reqHeaders[k] = v
9068	}
9069	reqHeaders.Set("User-Agent", c.s.userAgent())
9070	var body io.Reader = nil
9071	body, err := googleapi.WithoutDataWrapper.JSONReader(c.writelogentriesrequest)
9072	if err != nil {
9073		return nil, err
9074	}
9075	reqHeaders.Set("Content-Type", "application/json")
9076	c.urlParams_.Set("alt", alt)
9077	c.urlParams_.Set("prettyPrint", "false")
9078	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:write")
9079	urls += "?" + c.urlParams_.Encode()
9080	req, err := http.NewRequest("POST", urls, body)
9081	if err != nil {
9082		return nil, err
9083	}
9084	req.Header = reqHeaders
9085	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9086}
9087
9088// Do executes the "logging.entries.write" call.
9089// Exactly one of *WriteLogEntriesResponse or error will be non-nil. Any
9090// non-2xx status code is an error. Response headers are in either
9091// *WriteLogEntriesResponse.ServerResponse.Header or (if a response was
9092// returned at all) in error.(*googleapi.Error).Header. Use
9093// googleapi.IsNotModified to check whether the returned error was
9094// because http.StatusNotModified was returned.
9095func (c *EntriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteLogEntriesResponse, error) {
9096	gensupport.SetOptions(c.urlParams_, opts...)
9097	res, err := c.doRequest("json")
9098	if res != nil && res.StatusCode == http.StatusNotModified {
9099		if res.Body != nil {
9100			res.Body.Close()
9101		}
9102		return nil, &googleapi.Error{
9103			Code:   res.StatusCode,
9104			Header: res.Header,
9105		}
9106	}
9107	if err != nil {
9108		return nil, err
9109	}
9110	defer googleapi.CloseBody(res)
9111	if err := googleapi.CheckResponse(res); err != nil {
9112		return nil, err
9113	}
9114	ret := &WriteLogEntriesResponse{
9115		ServerResponse: googleapi.ServerResponse{
9116			Header:         res.Header,
9117			HTTPStatusCode: res.StatusCode,
9118		},
9119	}
9120	target := &ret
9121	if err := gensupport.DecodeResponse(target, res); err != nil {
9122		return nil, err
9123	}
9124	return ret, nil
9125	// {
9126	//   "description": "Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)",
9127	//   "flatPath": "v2/entries:write",
9128	//   "httpMethod": "POST",
9129	//   "id": "logging.entries.write",
9130	//   "parameterOrder": [],
9131	//   "parameters": {},
9132	//   "path": "v2/entries:write",
9133	//   "request": {
9134	//     "$ref": "WriteLogEntriesRequest"
9135	//   },
9136	//   "response": {
9137	//     "$ref": "WriteLogEntriesResponse"
9138	//   },
9139	//   "scopes": [
9140	//     "https://www.googleapis.com/auth/cloud-platform",
9141	//     "https://www.googleapis.com/auth/logging.admin",
9142	//     "https://www.googleapis.com/auth/logging.write"
9143	//   ]
9144	// }
9145
9146}
9147
9148// method id "logging.exclusions.create":
9149
9150type ExclusionsCreateCall struct {
9151	s            *Service
9152	parent       string
9153	logexclusion *LogExclusion
9154	urlParams_   gensupport.URLParams
9155	ctx_         context.Context
9156	header_      http.Header
9157}
9158
9159// Create: Creates a new exclusion in a specified parent resource. Only
9160// log entries belonging to that resource can be excluded. You can have
9161// up to 10 exclusions in a resource.
9162//
9163// - parent: The parent resource in which to create the exclusion:
9164//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
9165//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
9166//   examples:"projects/my-logging-project" "organizations/123456789".
9167func (r *ExclusionsService) Create(parent string, logexclusion *LogExclusion) *ExclusionsCreateCall {
9168	c := &ExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9169	c.parent = parent
9170	c.logexclusion = logexclusion
9171	return c
9172}
9173
9174// Fields allows partial responses to be retrieved. See
9175// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9176// for more information.
9177func (c *ExclusionsCreateCall) Fields(s ...googleapi.Field) *ExclusionsCreateCall {
9178	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9179	return c
9180}
9181
9182// Context sets the context to be used in this call's Do method. Any
9183// pending HTTP request will be aborted if the provided context is
9184// canceled.
9185func (c *ExclusionsCreateCall) Context(ctx context.Context) *ExclusionsCreateCall {
9186	c.ctx_ = ctx
9187	return c
9188}
9189
9190// Header returns an http.Header that can be modified by the caller to
9191// add HTTP headers to the request.
9192func (c *ExclusionsCreateCall) Header() http.Header {
9193	if c.header_ == nil {
9194		c.header_ = make(http.Header)
9195	}
9196	return c.header_
9197}
9198
9199func (c *ExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
9200	reqHeaders := make(http.Header)
9201	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9202	for k, v := range c.header_ {
9203		reqHeaders[k] = v
9204	}
9205	reqHeaders.Set("User-Agent", c.s.userAgent())
9206	var body io.Reader = nil
9207	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
9208	if err != nil {
9209		return nil, err
9210	}
9211	reqHeaders.Set("Content-Type", "application/json")
9212	c.urlParams_.Set("alt", alt)
9213	c.urlParams_.Set("prettyPrint", "false")
9214	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
9215	urls += "?" + c.urlParams_.Encode()
9216	req, err := http.NewRequest("POST", urls, body)
9217	if err != nil {
9218		return nil, err
9219	}
9220	req.Header = reqHeaders
9221	googleapi.Expand(req.URL, map[string]string{
9222		"parent": c.parent,
9223	})
9224	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9225}
9226
9227// Do executes the "logging.exclusions.create" call.
9228// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
9229// status code is an error. Response headers are in either
9230// *LogExclusion.ServerResponse.Header or (if a response was returned at
9231// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9232// to check whether the returned error was because
9233// http.StatusNotModified was returned.
9234func (c *ExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
9235	gensupport.SetOptions(c.urlParams_, opts...)
9236	res, err := c.doRequest("json")
9237	if res != nil && res.StatusCode == http.StatusNotModified {
9238		if res.Body != nil {
9239			res.Body.Close()
9240		}
9241		return nil, &googleapi.Error{
9242			Code:   res.StatusCode,
9243			Header: res.Header,
9244		}
9245	}
9246	if err != nil {
9247		return nil, err
9248	}
9249	defer googleapi.CloseBody(res)
9250	if err := googleapi.CheckResponse(res); err != nil {
9251		return nil, err
9252	}
9253	ret := &LogExclusion{
9254		ServerResponse: googleapi.ServerResponse{
9255			Header:         res.Header,
9256			HTTPStatusCode: res.StatusCode,
9257		},
9258	}
9259	target := &ret
9260	if err := gensupport.DecodeResponse(target, res); err != nil {
9261		return nil, err
9262	}
9263	return ret, nil
9264	// {
9265	//   "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.",
9266	//   "flatPath": "v2/{v2Id}/{v2Id1}/exclusions",
9267	//   "httpMethod": "POST",
9268	//   "id": "logging.exclusions.create",
9269	//   "parameterOrder": [
9270	//     "parent"
9271	//   ],
9272	//   "parameters": {
9273	//     "parent": {
9274	//       "description": "Required. The parent resource in which to create the exclusion: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" For examples:\"projects/my-logging-project\" \"organizations/123456789\"",
9275	//       "location": "path",
9276	//       "pattern": "^[^/]+/[^/]+$",
9277	//       "required": true,
9278	//       "type": "string"
9279	//     }
9280	//   },
9281	//   "path": "v2/{+parent}/exclusions",
9282	//   "request": {
9283	//     "$ref": "LogExclusion"
9284	//   },
9285	//   "response": {
9286	//     "$ref": "LogExclusion"
9287	//   },
9288	//   "scopes": [
9289	//     "https://www.googleapis.com/auth/cloud-platform",
9290	//     "https://www.googleapis.com/auth/logging.admin"
9291	//   ]
9292	// }
9293
9294}
9295
9296// method id "logging.exclusions.delete":
9297
9298type ExclusionsDeleteCall struct {
9299	s          *Service
9300	name       string
9301	urlParams_ gensupport.URLParams
9302	ctx_       context.Context
9303	header_    http.Header
9304}
9305
9306// Delete: Deletes an exclusion.
9307//
9308// - name: The resource name of an existing exclusion to delete:
9309//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
9310//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
9311//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
9312//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
9313//   example:"projects/my-project/exclusions/my-exclusion".
9314func (r *ExclusionsService) Delete(name string) *ExclusionsDeleteCall {
9315	c := &ExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9316	c.name = name
9317	return c
9318}
9319
9320// Fields allows partial responses to be retrieved. See
9321// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9322// for more information.
9323func (c *ExclusionsDeleteCall) Fields(s ...googleapi.Field) *ExclusionsDeleteCall {
9324	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9325	return c
9326}
9327
9328// Context sets the context to be used in this call's Do method. Any
9329// pending HTTP request will be aborted if the provided context is
9330// canceled.
9331func (c *ExclusionsDeleteCall) Context(ctx context.Context) *ExclusionsDeleteCall {
9332	c.ctx_ = ctx
9333	return c
9334}
9335
9336// Header returns an http.Header that can be modified by the caller to
9337// add HTTP headers to the request.
9338func (c *ExclusionsDeleteCall) Header() http.Header {
9339	if c.header_ == nil {
9340		c.header_ = make(http.Header)
9341	}
9342	return c.header_
9343}
9344
9345func (c *ExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
9346	reqHeaders := make(http.Header)
9347	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9348	for k, v := range c.header_ {
9349		reqHeaders[k] = v
9350	}
9351	reqHeaders.Set("User-Agent", c.s.userAgent())
9352	var body io.Reader = nil
9353	c.urlParams_.Set("alt", alt)
9354	c.urlParams_.Set("prettyPrint", "false")
9355	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
9356	urls += "?" + c.urlParams_.Encode()
9357	req, err := http.NewRequest("DELETE", urls, body)
9358	if err != nil {
9359		return nil, err
9360	}
9361	req.Header = reqHeaders
9362	googleapi.Expand(req.URL, map[string]string{
9363		"name": c.name,
9364	})
9365	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9366}
9367
9368// Do executes the "logging.exclusions.delete" call.
9369// Exactly one of *Empty or error will be non-nil. Any non-2xx status
9370// code is an error. Response headers are in either
9371// *Empty.ServerResponse.Header or (if a response was returned at all)
9372// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9373// check whether the returned error was because http.StatusNotModified
9374// was returned.
9375func (c *ExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9376	gensupport.SetOptions(c.urlParams_, opts...)
9377	res, err := c.doRequest("json")
9378	if res != nil && res.StatusCode == http.StatusNotModified {
9379		if res.Body != nil {
9380			res.Body.Close()
9381		}
9382		return nil, &googleapi.Error{
9383			Code:   res.StatusCode,
9384			Header: res.Header,
9385		}
9386	}
9387	if err != nil {
9388		return nil, err
9389	}
9390	defer googleapi.CloseBody(res)
9391	if err := googleapi.CheckResponse(res); err != nil {
9392		return nil, err
9393	}
9394	ret := &Empty{
9395		ServerResponse: googleapi.ServerResponse{
9396			Header:         res.Header,
9397			HTTPStatusCode: res.StatusCode,
9398		},
9399	}
9400	target := &ret
9401	if err := gensupport.DecodeResponse(target, res); err != nil {
9402		return nil, err
9403	}
9404	return ret, nil
9405	// {
9406	//   "description": "Deletes an exclusion.",
9407	//   "flatPath": "v2/{v2Id}/{v2Id1}/exclusions/{exclusionsId}",
9408	//   "httpMethod": "DELETE",
9409	//   "id": "logging.exclusions.delete",
9410	//   "parameterOrder": [
9411	//     "name"
9412	//   ],
9413	//   "parameters": {
9414	//     "name": {
9415	//       "description": "Required. The resource name of an existing exclusion to delete: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
9416	//       "location": "path",
9417	//       "pattern": "^[^/]+/[^/]+/exclusions/[^/]+$",
9418	//       "required": true,
9419	//       "type": "string"
9420	//     }
9421	//   },
9422	//   "path": "v2/{+name}",
9423	//   "response": {
9424	//     "$ref": "Empty"
9425	//   },
9426	//   "scopes": [
9427	//     "https://www.googleapis.com/auth/cloud-platform",
9428	//     "https://www.googleapis.com/auth/logging.admin"
9429	//   ]
9430	// }
9431
9432}
9433
9434// method id "logging.exclusions.get":
9435
9436type ExclusionsGetCall struct {
9437	s            *Service
9438	name         string
9439	urlParams_   gensupport.URLParams
9440	ifNoneMatch_ string
9441	ctx_         context.Context
9442	header_      http.Header
9443}
9444
9445// Get: Gets the description of an exclusion.
9446//
9447// - name: The resource name of an existing exclusion:
9448//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
9449//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
9450//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
9451//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
9452//   example:"projects/my-project/exclusions/my-exclusion".
9453func (r *ExclusionsService) Get(name string) *ExclusionsGetCall {
9454	c := &ExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9455	c.name = name
9456	return c
9457}
9458
9459// Fields allows partial responses to be retrieved. See
9460// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9461// for more information.
9462func (c *ExclusionsGetCall) Fields(s ...googleapi.Field) *ExclusionsGetCall {
9463	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9464	return c
9465}
9466
9467// IfNoneMatch sets the optional parameter which makes the operation
9468// fail if the object's ETag matches the given value. This is useful for
9469// getting updates only after the object has changed since the last
9470// request. Use googleapi.IsNotModified to check whether the response
9471// error from Do is the result of In-None-Match.
9472func (c *ExclusionsGetCall) IfNoneMatch(entityTag string) *ExclusionsGetCall {
9473	c.ifNoneMatch_ = entityTag
9474	return c
9475}
9476
9477// Context sets the context to be used in this call's Do method. Any
9478// pending HTTP request will be aborted if the provided context is
9479// canceled.
9480func (c *ExclusionsGetCall) Context(ctx context.Context) *ExclusionsGetCall {
9481	c.ctx_ = ctx
9482	return c
9483}
9484
9485// Header returns an http.Header that can be modified by the caller to
9486// add HTTP headers to the request.
9487func (c *ExclusionsGetCall) Header() http.Header {
9488	if c.header_ == nil {
9489		c.header_ = make(http.Header)
9490	}
9491	return c.header_
9492}
9493
9494func (c *ExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
9495	reqHeaders := make(http.Header)
9496	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9497	for k, v := range c.header_ {
9498		reqHeaders[k] = v
9499	}
9500	reqHeaders.Set("User-Agent", c.s.userAgent())
9501	if c.ifNoneMatch_ != "" {
9502		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9503	}
9504	var body io.Reader = nil
9505	c.urlParams_.Set("alt", alt)
9506	c.urlParams_.Set("prettyPrint", "false")
9507	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
9508	urls += "?" + c.urlParams_.Encode()
9509	req, err := http.NewRequest("GET", urls, body)
9510	if err != nil {
9511		return nil, err
9512	}
9513	req.Header = reqHeaders
9514	googleapi.Expand(req.URL, map[string]string{
9515		"name": c.name,
9516	})
9517	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9518}
9519
9520// Do executes the "logging.exclusions.get" call.
9521// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
9522// status code is an error. Response headers are in either
9523// *LogExclusion.ServerResponse.Header or (if a response was returned at
9524// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9525// to check whether the returned error was because
9526// http.StatusNotModified was returned.
9527func (c *ExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
9528	gensupport.SetOptions(c.urlParams_, opts...)
9529	res, err := c.doRequest("json")
9530	if res != nil && res.StatusCode == http.StatusNotModified {
9531		if res.Body != nil {
9532			res.Body.Close()
9533		}
9534		return nil, &googleapi.Error{
9535			Code:   res.StatusCode,
9536			Header: res.Header,
9537		}
9538	}
9539	if err != nil {
9540		return nil, err
9541	}
9542	defer googleapi.CloseBody(res)
9543	if err := googleapi.CheckResponse(res); err != nil {
9544		return nil, err
9545	}
9546	ret := &LogExclusion{
9547		ServerResponse: googleapi.ServerResponse{
9548			Header:         res.Header,
9549			HTTPStatusCode: res.StatusCode,
9550		},
9551	}
9552	target := &ret
9553	if err := gensupport.DecodeResponse(target, res); err != nil {
9554		return nil, err
9555	}
9556	return ret, nil
9557	// {
9558	//   "description": "Gets the description of an exclusion.",
9559	//   "flatPath": "v2/{v2Id}/{v2Id1}/exclusions/{exclusionsId}",
9560	//   "httpMethod": "GET",
9561	//   "id": "logging.exclusions.get",
9562	//   "parameterOrder": [
9563	//     "name"
9564	//   ],
9565	//   "parameters": {
9566	//     "name": {
9567	//       "description": "Required. The resource name of an existing exclusion: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
9568	//       "location": "path",
9569	//       "pattern": "^[^/]+/[^/]+/exclusions/[^/]+$",
9570	//       "required": true,
9571	//       "type": "string"
9572	//     }
9573	//   },
9574	//   "path": "v2/{+name}",
9575	//   "response": {
9576	//     "$ref": "LogExclusion"
9577	//   },
9578	//   "scopes": [
9579	//     "https://www.googleapis.com/auth/cloud-platform",
9580	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
9581	//     "https://www.googleapis.com/auth/logging.admin",
9582	//     "https://www.googleapis.com/auth/logging.read"
9583	//   ]
9584	// }
9585
9586}
9587
9588// method id "logging.exclusions.list":
9589
9590type ExclusionsListCall struct {
9591	s            *Service
9592	parent       string
9593	urlParams_   gensupport.URLParams
9594	ifNoneMatch_ string
9595	ctx_         context.Context
9596	header_      http.Header
9597}
9598
9599// List: Lists all the exclusions in a parent resource.
9600//
9601// - parent: The parent resource whose exclusions are to be listed.
9602//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
9603//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
9604func (r *ExclusionsService) List(parent string) *ExclusionsListCall {
9605	c := &ExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9606	c.parent = parent
9607	return c
9608}
9609
9610// PageSize sets the optional parameter "pageSize": The maximum number
9611// of results to return from this request. Non-positive values are
9612// ignored. The presence of nextPageToken in the response indicates that
9613// more results might be available.
9614func (c *ExclusionsListCall) PageSize(pageSize int64) *ExclusionsListCall {
9615	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9616	return c
9617}
9618
9619// PageToken sets the optional parameter "pageToken": If present, then
9620// retrieve the next batch of results from the preceding call to this
9621// method. pageToken must be the value of nextPageToken from the
9622// previous response. The values of other method parameters should be
9623// identical to those in the previous call.
9624func (c *ExclusionsListCall) PageToken(pageToken string) *ExclusionsListCall {
9625	c.urlParams_.Set("pageToken", pageToken)
9626	return c
9627}
9628
9629// Fields allows partial responses to be retrieved. See
9630// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9631// for more information.
9632func (c *ExclusionsListCall) Fields(s ...googleapi.Field) *ExclusionsListCall {
9633	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9634	return c
9635}
9636
9637// IfNoneMatch sets the optional parameter which makes the operation
9638// fail if the object's ETag matches the given value. This is useful for
9639// getting updates only after the object has changed since the last
9640// request. Use googleapi.IsNotModified to check whether the response
9641// error from Do is the result of In-None-Match.
9642func (c *ExclusionsListCall) IfNoneMatch(entityTag string) *ExclusionsListCall {
9643	c.ifNoneMatch_ = entityTag
9644	return c
9645}
9646
9647// Context sets the context to be used in this call's Do method. Any
9648// pending HTTP request will be aborted if the provided context is
9649// canceled.
9650func (c *ExclusionsListCall) Context(ctx context.Context) *ExclusionsListCall {
9651	c.ctx_ = ctx
9652	return c
9653}
9654
9655// Header returns an http.Header that can be modified by the caller to
9656// add HTTP headers to the request.
9657func (c *ExclusionsListCall) Header() http.Header {
9658	if c.header_ == nil {
9659		c.header_ = make(http.Header)
9660	}
9661	return c.header_
9662}
9663
9664func (c *ExclusionsListCall) doRequest(alt string) (*http.Response, error) {
9665	reqHeaders := make(http.Header)
9666	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9667	for k, v := range c.header_ {
9668		reqHeaders[k] = v
9669	}
9670	reqHeaders.Set("User-Agent", c.s.userAgent())
9671	if c.ifNoneMatch_ != "" {
9672		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9673	}
9674	var body io.Reader = nil
9675	c.urlParams_.Set("alt", alt)
9676	c.urlParams_.Set("prettyPrint", "false")
9677	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
9678	urls += "?" + c.urlParams_.Encode()
9679	req, err := http.NewRequest("GET", urls, body)
9680	if err != nil {
9681		return nil, err
9682	}
9683	req.Header = reqHeaders
9684	googleapi.Expand(req.URL, map[string]string{
9685		"parent": c.parent,
9686	})
9687	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9688}
9689
9690// Do executes the "logging.exclusions.list" call.
9691// Exactly one of *ListExclusionsResponse or error will be non-nil. Any
9692// non-2xx status code is an error. Response headers are in either
9693// *ListExclusionsResponse.ServerResponse.Header or (if a response was
9694// returned at all) in error.(*googleapi.Error).Header. Use
9695// googleapi.IsNotModified to check whether the returned error was
9696// because http.StatusNotModified was returned.
9697func (c *ExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
9698	gensupport.SetOptions(c.urlParams_, opts...)
9699	res, err := c.doRequest("json")
9700	if res != nil && res.StatusCode == http.StatusNotModified {
9701		if res.Body != nil {
9702			res.Body.Close()
9703		}
9704		return nil, &googleapi.Error{
9705			Code:   res.StatusCode,
9706			Header: res.Header,
9707		}
9708	}
9709	if err != nil {
9710		return nil, err
9711	}
9712	defer googleapi.CloseBody(res)
9713	if err := googleapi.CheckResponse(res); err != nil {
9714		return nil, err
9715	}
9716	ret := &ListExclusionsResponse{
9717		ServerResponse: googleapi.ServerResponse{
9718			Header:         res.Header,
9719			HTTPStatusCode: res.StatusCode,
9720		},
9721	}
9722	target := &ret
9723	if err := gensupport.DecodeResponse(target, res); err != nil {
9724		return nil, err
9725	}
9726	return ret, nil
9727	// {
9728	//   "description": "Lists all the exclusions in a parent resource.",
9729	//   "flatPath": "v2/{v2Id}/{v2Id1}/exclusions",
9730	//   "httpMethod": "GET",
9731	//   "id": "logging.exclusions.list",
9732	//   "parameterOrder": [
9733	//     "parent"
9734	//   ],
9735	//   "parameters": {
9736	//     "pageSize": {
9737	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
9738	//       "format": "int32",
9739	//       "location": "query",
9740	//       "type": "integer"
9741	//     },
9742	//     "pageToken": {
9743	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
9744	//       "location": "query",
9745	//       "type": "string"
9746	//     },
9747	//     "parent": {
9748	//       "description": "Required. The parent resource whose exclusions are to be listed. \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" ",
9749	//       "location": "path",
9750	//       "pattern": "^[^/]+/[^/]+$",
9751	//       "required": true,
9752	//       "type": "string"
9753	//     }
9754	//   },
9755	//   "path": "v2/{+parent}/exclusions",
9756	//   "response": {
9757	//     "$ref": "ListExclusionsResponse"
9758	//   },
9759	//   "scopes": [
9760	//     "https://www.googleapis.com/auth/cloud-platform",
9761	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
9762	//     "https://www.googleapis.com/auth/logging.admin",
9763	//     "https://www.googleapis.com/auth/logging.read"
9764	//   ]
9765	// }
9766
9767}
9768
9769// Pages invokes f for each page of results.
9770// A non-nil error returned from f will halt the iteration.
9771// The provided context supersedes any context provided to the Context method.
9772func (c *ExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
9773	c.ctx_ = ctx
9774	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9775	for {
9776		x, err := c.Do()
9777		if err != nil {
9778			return err
9779		}
9780		if err := f(x); err != nil {
9781			return err
9782		}
9783		if x.NextPageToken == "" {
9784			return nil
9785		}
9786		c.PageToken(x.NextPageToken)
9787	}
9788}
9789
9790// method id "logging.exclusions.patch":
9791
9792type ExclusionsPatchCall struct {
9793	s            *Service
9794	name         string
9795	logexclusion *LogExclusion
9796	urlParams_   gensupport.URLParams
9797	ctx_         context.Context
9798	header_      http.Header
9799}
9800
9801// Patch: Changes one or more properties of an existing exclusion.
9802//
9803// - name: The resource name of the exclusion to update:
9804//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
9805//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
9806//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
9807//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
9808//   example:"projects/my-project/exclusions/my-exclusion".
9809func (r *ExclusionsService) Patch(name string, logexclusion *LogExclusion) *ExclusionsPatchCall {
9810	c := &ExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9811	c.name = name
9812	c.logexclusion = logexclusion
9813	return c
9814}
9815
9816// UpdateMask sets the optional parameter "updateMask": Required. A
9817// non-empty list of fields to change in the existing exclusion. New
9818// values for the fields are taken from the corresponding fields in the
9819// LogExclusion included in this request. Fields not mentioned in
9820// update_mask are not changed and are ignored in the request.For
9821// example, to change the filter and description of an exclusion,
9822// specify an update_mask of "filter,description".
9823func (c *ExclusionsPatchCall) UpdateMask(updateMask string) *ExclusionsPatchCall {
9824	c.urlParams_.Set("updateMask", updateMask)
9825	return c
9826}
9827
9828// Fields allows partial responses to be retrieved. See
9829// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9830// for more information.
9831func (c *ExclusionsPatchCall) Fields(s ...googleapi.Field) *ExclusionsPatchCall {
9832	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9833	return c
9834}
9835
9836// Context sets the context to be used in this call's Do method. Any
9837// pending HTTP request will be aborted if the provided context is
9838// canceled.
9839func (c *ExclusionsPatchCall) Context(ctx context.Context) *ExclusionsPatchCall {
9840	c.ctx_ = ctx
9841	return c
9842}
9843
9844// Header returns an http.Header that can be modified by the caller to
9845// add HTTP headers to the request.
9846func (c *ExclusionsPatchCall) Header() http.Header {
9847	if c.header_ == nil {
9848		c.header_ = make(http.Header)
9849	}
9850	return c.header_
9851}
9852
9853func (c *ExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
9854	reqHeaders := make(http.Header)
9855	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9856	for k, v := range c.header_ {
9857		reqHeaders[k] = v
9858	}
9859	reqHeaders.Set("User-Agent", c.s.userAgent())
9860	var body io.Reader = nil
9861	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
9862	if err != nil {
9863		return nil, err
9864	}
9865	reqHeaders.Set("Content-Type", "application/json")
9866	c.urlParams_.Set("alt", alt)
9867	c.urlParams_.Set("prettyPrint", "false")
9868	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
9869	urls += "?" + c.urlParams_.Encode()
9870	req, err := http.NewRequest("PATCH", urls, body)
9871	if err != nil {
9872		return nil, err
9873	}
9874	req.Header = reqHeaders
9875	googleapi.Expand(req.URL, map[string]string{
9876		"name": c.name,
9877	})
9878	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9879}
9880
9881// Do executes the "logging.exclusions.patch" call.
9882// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
9883// status code is an error. Response headers are in either
9884// *LogExclusion.ServerResponse.Header or (if a response was returned at
9885// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9886// to check whether the returned error was because
9887// http.StatusNotModified was returned.
9888func (c *ExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
9889	gensupport.SetOptions(c.urlParams_, opts...)
9890	res, err := c.doRequest("json")
9891	if res != nil && res.StatusCode == http.StatusNotModified {
9892		if res.Body != nil {
9893			res.Body.Close()
9894		}
9895		return nil, &googleapi.Error{
9896			Code:   res.StatusCode,
9897			Header: res.Header,
9898		}
9899	}
9900	if err != nil {
9901		return nil, err
9902	}
9903	defer googleapi.CloseBody(res)
9904	if err := googleapi.CheckResponse(res); err != nil {
9905		return nil, err
9906	}
9907	ret := &LogExclusion{
9908		ServerResponse: googleapi.ServerResponse{
9909			Header:         res.Header,
9910			HTTPStatusCode: res.StatusCode,
9911		},
9912	}
9913	target := &ret
9914	if err := gensupport.DecodeResponse(target, res); err != nil {
9915		return nil, err
9916	}
9917	return ret, nil
9918	// {
9919	//   "description": "Changes one or more properties of an existing exclusion.",
9920	//   "flatPath": "v2/{v2Id}/{v2Id1}/exclusions/{exclusionsId}",
9921	//   "httpMethod": "PATCH",
9922	//   "id": "logging.exclusions.patch",
9923	//   "parameterOrder": [
9924	//     "name"
9925	//   ],
9926	//   "parameters": {
9927	//     "name": {
9928	//       "description": "Required. The resource name of the exclusion to update: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
9929	//       "location": "path",
9930	//       "pattern": "^[^/]+/[^/]+/exclusions/[^/]+$",
9931	//       "required": true,
9932	//       "type": "string"
9933	//     },
9934	//     "updateMask": {
9935	//       "description": "Required. A non-empty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".",
9936	//       "format": "google-fieldmask",
9937	//       "location": "query",
9938	//       "type": "string"
9939	//     }
9940	//   },
9941	//   "path": "v2/{+name}",
9942	//   "request": {
9943	//     "$ref": "LogExclusion"
9944	//   },
9945	//   "response": {
9946	//     "$ref": "LogExclusion"
9947	//   },
9948	//   "scopes": [
9949	//     "https://www.googleapis.com/auth/cloud-platform",
9950	//     "https://www.googleapis.com/auth/logging.admin"
9951	//   ]
9952	// }
9953
9954}
9955
9956// method id "logging.folders.exclusions.create":
9957
9958type FoldersExclusionsCreateCall struct {
9959	s            *Service
9960	parent       string
9961	logexclusion *LogExclusion
9962	urlParams_   gensupport.URLParams
9963	ctx_         context.Context
9964	header_      http.Header
9965}
9966
9967// Create: Creates a new exclusion in a specified parent resource. Only
9968// log entries belonging to that resource can be excluded. You can have
9969// up to 10 exclusions in a resource.
9970//
9971// - parent: The parent resource in which to create the exclusion:
9972//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
9973//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
9974//   examples:"projects/my-logging-project" "organizations/123456789".
9975func (r *FoldersExclusionsService) Create(parent string, logexclusion *LogExclusion) *FoldersExclusionsCreateCall {
9976	c := &FoldersExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9977	c.parent = parent
9978	c.logexclusion = logexclusion
9979	return c
9980}
9981
9982// Fields allows partial responses to be retrieved. See
9983// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9984// for more information.
9985func (c *FoldersExclusionsCreateCall) Fields(s ...googleapi.Field) *FoldersExclusionsCreateCall {
9986	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9987	return c
9988}
9989
9990// Context sets the context to be used in this call's Do method. Any
9991// pending HTTP request will be aborted if the provided context is
9992// canceled.
9993func (c *FoldersExclusionsCreateCall) Context(ctx context.Context) *FoldersExclusionsCreateCall {
9994	c.ctx_ = ctx
9995	return c
9996}
9997
9998// Header returns an http.Header that can be modified by the caller to
9999// add HTTP headers to the request.
10000func (c *FoldersExclusionsCreateCall) Header() http.Header {
10001	if c.header_ == nil {
10002		c.header_ = make(http.Header)
10003	}
10004	return c.header_
10005}
10006
10007func (c *FoldersExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
10008	reqHeaders := make(http.Header)
10009	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10010	for k, v := range c.header_ {
10011		reqHeaders[k] = v
10012	}
10013	reqHeaders.Set("User-Agent", c.s.userAgent())
10014	var body io.Reader = nil
10015	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
10016	if err != nil {
10017		return nil, err
10018	}
10019	reqHeaders.Set("Content-Type", "application/json")
10020	c.urlParams_.Set("alt", alt)
10021	c.urlParams_.Set("prettyPrint", "false")
10022	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
10023	urls += "?" + c.urlParams_.Encode()
10024	req, err := http.NewRequest("POST", urls, body)
10025	if err != nil {
10026		return nil, err
10027	}
10028	req.Header = reqHeaders
10029	googleapi.Expand(req.URL, map[string]string{
10030		"parent": c.parent,
10031	})
10032	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10033}
10034
10035// Do executes the "logging.folders.exclusions.create" call.
10036// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
10037// status code is an error. Response headers are in either
10038// *LogExclusion.ServerResponse.Header or (if a response was returned at
10039// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10040// to check whether the returned error was because
10041// http.StatusNotModified was returned.
10042func (c *FoldersExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
10043	gensupport.SetOptions(c.urlParams_, opts...)
10044	res, err := c.doRequest("json")
10045	if res != nil && res.StatusCode == http.StatusNotModified {
10046		if res.Body != nil {
10047			res.Body.Close()
10048		}
10049		return nil, &googleapi.Error{
10050			Code:   res.StatusCode,
10051			Header: res.Header,
10052		}
10053	}
10054	if err != nil {
10055		return nil, err
10056	}
10057	defer googleapi.CloseBody(res)
10058	if err := googleapi.CheckResponse(res); err != nil {
10059		return nil, err
10060	}
10061	ret := &LogExclusion{
10062		ServerResponse: googleapi.ServerResponse{
10063			Header:         res.Header,
10064			HTTPStatusCode: res.StatusCode,
10065		},
10066	}
10067	target := &ret
10068	if err := gensupport.DecodeResponse(target, res); err != nil {
10069		return nil, err
10070	}
10071	return ret, nil
10072	// {
10073	//   "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.",
10074	//   "flatPath": "v2/folders/{foldersId}/exclusions",
10075	//   "httpMethod": "POST",
10076	//   "id": "logging.folders.exclusions.create",
10077	//   "parameterOrder": [
10078	//     "parent"
10079	//   ],
10080	//   "parameters": {
10081	//     "parent": {
10082	//       "description": "Required. The parent resource in which to create the exclusion: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" For examples:\"projects/my-logging-project\" \"organizations/123456789\"",
10083	//       "location": "path",
10084	//       "pattern": "^folders/[^/]+$",
10085	//       "required": true,
10086	//       "type": "string"
10087	//     }
10088	//   },
10089	//   "path": "v2/{+parent}/exclusions",
10090	//   "request": {
10091	//     "$ref": "LogExclusion"
10092	//   },
10093	//   "response": {
10094	//     "$ref": "LogExclusion"
10095	//   },
10096	//   "scopes": [
10097	//     "https://www.googleapis.com/auth/cloud-platform",
10098	//     "https://www.googleapis.com/auth/logging.admin"
10099	//   ]
10100	// }
10101
10102}
10103
10104// method id "logging.folders.exclusions.delete":
10105
10106type FoldersExclusionsDeleteCall struct {
10107	s          *Service
10108	name       string
10109	urlParams_ gensupport.URLParams
10110	ctx_       context.Context
10111	header_    http.Header
10112}
10113
10114// Delete: Deletes an exclusion.
10115//
10116// - name: The resource name of an existing exclusion to delete:
10117//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
10118//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
10119//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
10120//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
10121//   example:"projects/my-project/exclusions/my-exclusion".
10122func (r *FoldersExclusionsService) Delete(name string) *FoldersExclusionsDeleteCall {
10123	c := &FoldersExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10124	c.name = name
10125	return c
10126}
10127
10128// Fields allows partial responses to be retrieved. See
10129// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10130// for more information.
10131func (c *FoldersExclusionsDeleteCall) Fields(s ...googleapi.Field) *FoldersExclusionsDeleteCall {
10132	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10133	return c
10134}
10135
10136// Context sets the context to be used in this call's Do method. Any
10137// pending HTTP request will be aborted if the provided context is
10138// canceled.
10139func (c *FoldersExclusionsDeleteCall) Context(ctx context.Context) *FoldersExclusionsDeleteCall {
10140	c.ctx_ = ctx
10141	return c
10142}
10143
10144// Header returns an http.Header that can be modified by the caller to
10145// add HTTP headers to the request.
10146func (c *FoldersExclusionsDeleteCall) Header() http.Header {
10147	if c.header_ == nil {
10148		c.header_ = make(http.Header)
10149	}
10150	return c.header_
10151}
10152
10153func (c *FoldersExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
10154	reqHeaders := make(http.Header)
10155	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10156	for k, v := range c.header_ {
10157		reqHeaders[k] = v
10158	}
10159	reqHeaders.Set("User-Agent", c.s.userAgent())
10160	var body io.Reader = nil
10161	c.urlParams_.Set("alt", alt)
10162	c.urlParams_.Set("prettyPrint", "false")
10163	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
10164	urls += "?" + c.urlParams_.Encode()
10165	req, err := http.NewRequest("DELETE", urls, body)
10166	if err != nil {
10167		return nil, err
10168	}
10169	req.Header = reqHeaders
10170	googleapi.Expand(req.URL, map[string]string{
10171		"name": c.name,
10172	})
10173	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10174}
10175
10176// Do executes the "logging.folders.exclusions.delete" call.
10177// Exactly one of *Empty or error will be non-nil. Any non-2xx status
10178// code is an error. Response headers are in either
10179// *Empty.ServerResponse.Header or (if a response was returned at all)
10180// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10181// check whether the returned error was because http.StatusNotModified
10182// was returned.
10183func (c *FoldersExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10184	gensupport.SetOptions(c.urlParams_, opts...)
10185	res, err := c.doRequest("json")
10186	if res != nil && res.StatusCode == http.StatusNotModified {
10187		if res.Body != nil {
10188			res.Body.Close()
10189		}
10190		return nil, &googleapi.Error{
10191			Code:   res.StatusCode,
10192			Header: res.Header,
10193		}
10194	}
10195	if err != nil {
10196		return nil, err
10197	}
10198	defer googleapi.CloseBody(res)
10199	if err := googleapi.CheckResponse(res); err != nil {
10200		return nil, err
10201	}
10202	ret := &Empty{
10203		ServerResponse: googleapi.ServerResponse{
10204			Header:         res.Header,
10205			HTTPStatusCode: res.StatusCode,
10206		},
10207	}
10208	target := &ret
10209	if err := gensupport.DecodeResponse(target, res); err != nil {
10210		return nil, err
10211	}
10212	return ret, nil
10213	// {
10214	//   "description": "Deletes an exclusion.",
10215	//   "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}",
10216	//   "httpMethod": "DELETE",
10217	//   "id": "logging.folders.exclusions.delete",
10218	//   "parameterOrder": [
10219	//     "name"
10220	//   ],
10221	//   "parameters": {
10222	//     "name": {
10223	//       "description": "Required. The resource name of an existing exclusion to delete: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
10224	//       "location": "path",
10225	//       "pattern": "^folders/[^/]+/exclusions/[^/]+$",
10226	//       "required": true,
10227	//       "type": "string"
10228	//     }
10229	//   },
10230	//   "path": "v2/{+name}",
10231	//   "response": {
10232	//     "$ref": "Empty"
10233	//   },
10234	//   "scopes": [
10235	//     "https://www.googleapis.com/auth/cloud-platform",
10236	//     "https://www.googleapis.com/auth/logging.admin"
10237	//   ]
10238	// }
10239
10240}
10241
10242// method id "logging.folders.exclusions.get":
10243
10244type FoldersExclusionsGetCall struct {
10245	s            *Service
10246	name         string
10247	urlParams_   gensupport.URLParams
10248	ifNoneMatch_ string
10249	ctx_         context.Context
10250	header_      http.Header
10251}
10252
10253// Get: Gets the description of an exclusion.
10254//
10255// - name: The resource name of an existing exclusion:
10256//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
10257//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
10258//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
10259//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
10260//   example:"projects/my-project/exclusions/my-exclusion".
10261func (r *FoldersExclusionsService) Get(name string) *FoldersExclusionsGetCall {
10262	c := &FoldersExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10263	c.name = name
10264	return c
10265}
10266
10267// Fields allows partial responses to be retrieved. See
10268// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10269// for more information.
10270func (c *FoldersExclusionsGetCall) Fields(s ...googleapi.Field) *FoldersExclusionsGetCall {
10271	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10272	return c
10273}
10274
10275// IfNoneMatch sets the optional parameter which makes the operation
10276// fail if the object's ETag matches the given value. This is useful for
10277// getting updates only after the object has changed since the last
10278// request. Use googleapi.IsNotModified to check whether the response
10279// error from Do is the result of In-None-Match.
10280func (c *FoldersExclusionsGetCall) IfNoneMatch(entityTag string) *FoldersExclusionsGetCall {
10281	c.ifNoneMatch_ = entityTag
10282	return c
10283}
10284
10285// Context sets the context to be used in this call's Do method. Any
10286// pending HTTP request will be aborted if the provided context is
10287// canceled.
10288func (c *FoldersExclusionsGetCall) Context(ctx context.Context) *FoldersExclusionsGetCall {
10289	c.ctx_ = ctx
10290	return c
10291}
10292
10293// Header returns an http.Header that can be modified by the caller to
10294// add HTTP headers to the request.
10295func (c *FoldersExclusionsGetCall) Header() http.Header {
10296	if c.header_ == nil {
10297		c.header_ = make(http.Header)
10298	}
10299	return c.header_
10300}
10301
10302func (c *FoldersExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
10303	reqHeaders := make(http.Header)
10304	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10305	for k, v := range c.header_ {
10306		reqHeaders[k] = v
10307	}
10308	reqHeaders.Set("User-Agent", c.s.userAgent())
10309	if c.ifNoneMatch_ != "" {
10310		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10311	}
10312	var body io.Reader = nil
10313	c.urlParams_.Set("alt", alt)
10314	c.urlParams_.Set("prettyPrint", "false")
10315	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
10316	urls += "?" + c.urlParams_.Encode()
10317	req, err := http.NewRequest("GET", urls, body)
10318	if err != nil {
10319		return nil, err
10320	}
10321	req.Header = reqHeaders
10322	googleapi.Expand(req.URL, map[string]string{
10323		"name": c.name,
10324	})
10325	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10326}
10327
10328// Do executes the "logging.folders.exclusions.get" call.
10329// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
10330// status code is an error. Response headers are in either
10331// *LogExclusion.ServerResponse.Header or (if a response was returned at
10332// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10333// to check whether the returned error was because
10334// http.StatusNotModified was returned.
10335func (c *FoldersExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
10336	gensupport.SetOptions(c.urlParams_, opts...)
10337	res, err := c.doRequest("json")
10338	if res != nil && res.StatusCode == http.StatusNotModified {
10339		if res.Body != nil {
10340			res.Body.Close()
10341		}
10342		return nil, &googleapi.Error{
10343			Code:   res.StatusCode,
10344			Header: res.Header,
10345		}
10346	}
10347	if err != nil {
10348		return nil, err
10349	}
10350	defer googleapi.CloseBody(res)
10351	if err := googleapi.CheckResponse(res); err != nil {
10352		return nil, err
10353	}
10354	ret := &LogExclusion{
10355		ServerResponse: googleapi.ServerResponse{
10356			Header:         res.Header,
10357			HTTPStatusCode: res.StatusCode,
10358		},
10359	}
10360	target := &ret
10361	if err := gensupport.DecodeResponse(target, res); err != nil {
10362		return nil, err
10363	}
10364	return ret, nil
10365	// {
10366	//   "description": "Gets the description of an exclusion.",
10367	//   "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}",
10368	//   "httpMethod": "GET",
10369	//   "id": "logging.folders.exclusions.get",
10370	//   "parameterOrder": [
10371	//     "name"
10372	//   ],
10373	//   "parameters": {
10374	//     "name": {
10375	//       "description": "Required. The resource name of an existing exclusion: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
10376	//       "location": "path",
10377	//       "pattern": "^folders/[^/]+/exclusions/[^/]+$",
10378	//       "required": true,
10379	//       "type": "string"
10380	//     }
10381	//   },
10382	//   "path": "v2/{+name}",
10383	//   "response": {
10384	//     "$ref": "LogExclusion"
10385	//   },
10386	//   "scopes": [
10387	//     "https://www.googleapis.com/auth/cloud-platform",
10388	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
10389	//     "https://www.googleapis.com/auth/logging.admin",
10390	//     "https://www.googleapis.com/auth/logging.read"
10391	//   ]
10392	// }
10393
10394}
10395
10396// method id "logging.folders.exclusions.list":
10397
10398type FoldersExclusionsListCall struct {
10399	s            *Service
10400	parent       string
10401	urlParams_   gensupport.URLParams
10402	ifNoneMatch_ string
10403	ctx_         context.Context
10404	header_      http.Header
10405}
10406
10407// List: Lists all the exclusions in a parent resource.
10408//
10409// - parent: The parent resource whose exclusions are to be listed.
10410//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
10411//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
10412func (r *FoldersExclusionsService) List(parent string) *FoldersExclusionsListCall {
10413	c := &FoldersExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10414	c.parent = parent
10415	return c
10416}
10417
10418// PageSize sets the optional parameter "pageSize": The maximum number
10419// of results to return from this request. Non-positive values are
10420// ignored. The presence of nextPageToken in the response indicates that
10421// more results might be available.
10422func (c *FoldersExclusionsListCall) PageSize(pageSize int64) *FoldersExclusionsListCall {
10423	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10424	return c
10425}
10426
10427// PageToken sets the optional parameter "pageToken": If present, then
10428// retrieve the next batch of results from the preceding call to this
10429// method. pageToken must be the value of nextPageToken from the
10430// previous response. The values of other method parameters should be
10431// identical to those in the previous call.
10432func (c *FoldersExclusionsListCall) PageToken(pageToken string) *FoldersExclusionsListCall {
10433	c.urlParams_.Set("pageToken", pageToken)
10434	return c
10435}
10436
10437// Fields allows partial responses to be retrieved. See
10438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10439// for more information.
10440func (c *FoldersExclusionsListCall) Fields(s ...googleapi.Field) *FoldersExclusionsListCall {
10441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10442	return c
10443}
10444
10445// IfNoneMatch sets the optional parameter which makes the operation
10446// fail if the object's ETag matches the given value. This is useful for
10447// getting updates only after the object has changed since the last
10448// request. Use googleapi.IsNotModified to check whether the response
10449// error from Do is the result of In-None-Match.
10450func (c *FoldersExclusionsListCall) IfNoneMatch(entityTag string) *FoldersExclusionsListCall {
10451	c.ifNoneMatch_ = entityTag
10452	return c
10453}
10454
10455// Context sets the context to be used in this call's Do method. Any
10456// pending HTTP request will be aborted if the provided context is
10457// canceled.
10458func (c *FoldersExclusionsListCall) Context(ctx context.Context) *FoldersExclusionsListCall {
10459	c.ctx_ = ctx
10460	return c
10461}
10462
10463// Header returns an http.Header that can be modified by the caller to
10464// add HTTP headers to the request.
10465func (c *FoldersExclusionsListCall) Header() http.Header {
10466	if c.header_ == nil {
10467		c.header_ = make(http.Header)
10468	}
10469	return c.header_
10470}
10471
10472func (c *FoldersExclusionsListCall) doRequest(alt string) (*http.Response, error) {
10473	reqHeaders := make(http.Header)
10474	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10475	for k, v := range c.header_ {
10476		reqHeaders[k] = v
10477	}
10478	reqHeaders.Set("User-Agent", c.s.userAgent())
10479	if c.ifNoneMatch_ != "" {
10480		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10481	}
10482	var body io.Reader = nil
10483	c.urlParams_.Set("alt", alt)
10484	c.urlParams_.Set("prettyPrint", "false")
10485	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
10486	urls += "?" + c.urlParams_.Encode()
10487	req, err := http.NewRequest("GET", urls, body)
10488	if err != nil {
10489		return nil, err
10490	}
10491	req.Header = reqHeaders
10492	googleapi.Expand(req.URL, map[string]string{
10493		"parent": c.parent,
10494	})
10495	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10496}
10497
10498// Do executes the "logging.folders.exclusions.list" call.
10499// Exactly one of *ListExclusionsResponse or error will be non-nil. Any
10500// non-2xx status code is an error. Response headers are in either
10501// *ListExclusionsResponse.ServerResponse.Header or (if a response was
10502// returned at all) in error.(*googleapi.Error).Header. Use
10503// googleapi.IsNotModified to check whether the returned error was
10504// because http.StatusNotModified was returned.
10505func (c *FoldersExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
10506	gensupport.SetOptions(c.urlParams_, opts...)
10507	res, err := c.doRequest("json")
10508	if res != nil && res.StatusCode == http.StatusNotModified {
10509		if res.Body != nil {
10510			res.Body.Close()
10511		}
10512		return nil, &googleapi.Error{
10513			Code:   res.StatusCode,
10514			Header: res.Header,
10515		}
10516	}
10517	if err != nil {
10518		return nil, err
10519	}
10520	defer googleapi.CloseBody(res)
10521	if err := googleapi.CheckResponse(res); err != nil {
10522		return nil, err
10523	}
10524	ret := &ListExclusionsResponse{
10525		ServerResponse: googleapi.ServerResponse{
10526			Header:         res.Header,
10527			HTTPStatusCode: res.StatusCode,
10528		},
10529	}
10530	target := &ret
10531	if err := gensupport.DecodeResponse(target, res); err != nil {
10532		return nil, err
10533	}
10534	return ret, nil
10535	// {
10536	//   "description": "Lists all the exclusions in a parent resource.",
10537	//   "flatPath": "v2/folders/{foldersId}/exclusions",
10538	//   "httpMethod": "GET",
10539	//   "id": "logging.folders.exclusions.list",
10540	//   "parameterOrder": [
10541	//     "parent"
10542	//   ],
10543	//   "parameters": {
10544	//     "pageSize": {
10545	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
10546	//       "format": "int32",
10547	//       "location": "query",
10548	//       "type": "integer"
10549	//     },
10550	//     "pageToken": {
10551	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
10552	//       "location": "query",
10553	//       "type": "string"
10554	//     },
10555	//     "parent": {
10556	//       "description": "Required. The parent resource whose exclusions are to be listed. \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" ",
10557	//       "location": "path",
10558	//       "pattern": "^folders/[^/]+$",
10559	//       "required": true,
10560	//       "type": "string"
10561	//     }
10562	//   },
10563	//   "path": "v2/{+parent}/exclusions",
10564	//   "response": {
10565	//     "$ref": "ListExclusionsResponse"
10566	//   },
10567	//   "scopes": [
10568	//     "https://www.googleapis.com/auth/cloud-platform",
10569	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
10570	//     "https://www.googleapis.com/auth/logging.admin",
10571	//     "https://www.googleapis.com/auth/logging.read"
10572	//   ]
10573	// }
10574
10575}
10576
10577// Pages invokes f for each page of results.
10578// A non-nil error returned from f will halt the iteration.
10579// The provided context supersedes any context provided to the Context method.
10580func (c *FoldersExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
10581	c.ctx_ = ctx
10582	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10583	for {
10584		x, err := c.Do()
10585		if err != nil {
10586			return err
10587		}
10588		if err := f(x); err != nil {
10589			return err
10590		}
10591		if x.NextPageToken == "" {
10592			return nil
10593		}
10594		c.PageToken(x.NextPageToken)
10595	}
10596}
10597
10598// method id "logging.folders.exclusions.patch":
10599
10600type FoldersExclusionsPatchCall struct {
10601	s            *Service
10602	name         string
10603	logexclusion *LogExclusion
10604	urlParams_   gensupport.URLParams
10605	ctx_         context.Context
10606	header_      http.Header
10607}
10608
10609// Patch: Changes one or more properties of an existing exclusion.
10610//
10611// - name: The resource name of the exclusion to update:
10612//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
10613//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
10614//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
10615//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
10616//   example:"projects/my-project/exclusions/my-exclusion".
10617func (r *FoldersExclusionsService) Patch(name string, logexclusion *LogExclusion) *FoldersExclusionsPatchCall {
10618	c := &FoldersExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10619	c.name = name
10620	c.logexclusion = logexclusion
10621	return c
10622}
10623
10624// UpdateMask sets the optional parameter "updateMask": Required. A
10625// non-empty list of fields to change in the existing exclusion. New
10626// values for the fields are taken from the corresponding fields in the
10627// LogExclusion included in this request. Fields not mentioned in
10628// update_mask are not changed and are ignored in the request.For
10629// example, to change the filter and description of an exclusion,
10630// specify an update_mask of "filter,description".
10631func (c *FoldersExclusionsPatchCall) UpdateMask(updateMask string) *FoldersExclusionsPatchCall {
10632	c.urlParams_.Set("updateMask", updateMask)
10633	return c
10634}
10635
10636// Fields allows partial responses to be retrieved. See
10637// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10638// for more information.
10639func (c *FoldersExclusionsPatchCall) Fields(s ...googleapi.Field) *FoldersExclusionsPatchCall {
10640	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10641	return c
10642}
10643
10644// Context sets the context to be used in this call's Do method. Any
10645// pending HTTP request will be aborted if the provided context is
10646// canceled.
10647func (c *FoldersExclusionsPatchCall) Context(ctx context.Context) *FoldersExclusionsPatchCall {
10648	c.ctx_ = ctx
10649	return c
10650}
10651
10652// Header returns an http.Header that can be modified by the caller to
10653// add HTTP headers to the request.
10654func (c *FoldersExclusionsPatchCall) Header() http.Header {
10655	if c.header_ == nil {
10656		c.header_ = make(http.Header)
10657	}
10658	return c.header_
10659}
10660
10661func (c *FoldersExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
10662	reqHeaders := make(http.Header)
10663	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10664	for k, v := range c.header_ {
10665		reqHeaders[k] = v
10666	}
10667	reqHeaders.Set("User-Agent", c.s.userAgent())
10668	var body io.Reader = nil
10669	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
10670	if err != nil {
10671		return nil, err
10672	}
10673	reqHeaders.Set("Content-Type", "application/json")
10674	c.urlParams_.Set("alt", alt)
10675	c.urlParams_.Set("prettyPrint", "false")
10676	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
10677	urls += "?" + c.urlParams_.Encode()
10678	req, err := http.NewRequest("PATCH", urls, body)
10679	if err != nil {
10680		return nil, err
10681	}
10682	req.Header = reqHeaders
10683	googleapi.Expand(req.URL, map[string]string{
10684		"name": c.name,
10685	})
10686	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10687}
10688
10689// Do executes the "logging.folders.exclusions.patch" call.
10690// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
10691// status code is an error. Response headers are in either
10692// *LogExclusion.ServerResponse.Header or (if a response was returned at
10693// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10694// to check whether the returned error was because
10695// http.StatusNotModified was returned.
10696func (c *FoldersExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
10697	gensupport.SetOptions(c.urlParams_, opts...)
10698	res, err := c.doRequest("json")
10699	if res != nil && res.StatusCode == http.StatusNotModified {
10700		if res.Body != nil {
10701			res.Body.Close()
10702		}
10703		return nil, &googleapi.Error{
10704			Code:   res.StatusCode,
10705			Header: res.Header,
10706		}
10707	}
10708	if err != nil {
10709		return nil, err
10710	}
10711	defer googleapi.CloseBody(res)
10712	if err := googleapi.CheckResponse(res); err != nil {
10713		return nil, err
10714	}
10715	ret := &LogExclusion{
10716		ServerResponse: googleapi.ServerResponse{
10717			Header:         res.Header,
10718			HTTPStatusCode: res.StatusCode,
10719		},
10720	}
10721	target := &ret
10722	if err := gensupport.DecodeResponse(target, res); err != nil {
10723		return nil, err
10724	}
10725	return ret, nil
10726	// {
10727	//   "description": "Changes one or more properties of an existing exclusion.",
10728	//   "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}",
10729	//   "httpMethod": "PATCH",
10730	//   "id": "logging.folders.exclusions.patch",
10731	//   "parameterOrder": [
10732	//     "name"
10733	//   ],
10734	//   "parameters": {
10735	//     "name": {
10736	//       "description": "Required. The resource name of the exclusion to update: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
10737	//       "location": "path",
10738	//       "pattern": "^folders/[^/]+/exclusions/[^/]+$",
10739	//       "required": true,
10740	//       "type": "string"
10741	//     },
10742	//     "updateMask": {
10743	//       "description": "Required. A non-empty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".",
10744	//       "format": "google-fieldmask",
10745	//       "location": "query",
10746	//       "type": "string"
10747	//     }
10748	//   },
10749	//   "path": "v2/{+name}",
10750	//   "request": {
10751	//     "$ref": "LogExclusion"
10752	//   },
10753	//   "response": {
10754	//     "$ref": "LogExclusion"
10755	//   },
10756	//   "scopes": [
10757	//     "https://www.googleapis.com/auth/cloud-platform",
10758	//     "https://www.googleapis.com/auth/logging.admin"
10759	//   ]
10760	// }
10761
10762}
10763
10764// method id "logging.folders.locations.get":
10765
10766type FoldersLocationsGetCall struct {
10767	s            *Service
10768	name         string
10769	urlParams_   gensupport.URLParams
10770	ifNoneMatch_ string
10771	ctx_         context.Context
10772	header_      http.Header
10773}
10774
10775// Get: Gets information about a location.
10776//
10777// - name: Resource name for the location.
10778func (r *FoldersLocationsService) Get(name string) *FoldersLocationsGetCall {
10779	c := &FoldersLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10780	c.name = name
10781	return c
10782}
10783
10784// Fields allows partial responses to be retrieved. See
10785// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10786// for more information.
10787func (c *FoldersLocationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsGetCall {
10788	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10789	return c
10790}
10791
10792// IfNoneMatch sets the optional parameter which makes the operation
10793// fail if the object's ETag matches the given value. This is useful for
10794// getting updates only after the object has changed since the last
10795// request. Use googleapi.IsNotModified to check whether the response
10796// error from Do is the result of In-None-Match.
10797func (c *FoldersLocationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsGetCall {
10798	c.ifNoneMatch_ = entityTag
10799	return c
10800}
10801
10802// Context sets the context to be used in this call's Do method. Any
10803// pending HTTP request will be aborted if the provided context is
10804// canceled.
10805func (c *FoldersLocationsGetCall) Context(ctx context.Context) *FoldersLocationsGetCall {
10806	c.ctx_ = ctx
10807	return c
10808}
10809
10810// Header returns an http.Header that can be modified by the caller to
10811// add HTTP headers to the request.
10812func (c *FoldersLocationsGetCall) Header() http.Header {
10813	if c.header_ == nil {
10814		c.header_ = make(http.Header)
10815	}
10816	return c.header_
10817}
10818
10819func (c *FoldersLocationsGetCall) doRequest(alt string) (*http.Response, error) {
10820	reqHeaders := make(http.Header)
10821	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10822	for k, v := range c.header_ {
10823		reqHeaders[k] = v
10824	}
10825	reqHeaders.Set("User-Agent", c.s.userAgent())
10826	if c.ifNoneMatch_ != "" {
10827		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10828	}
10829	var body io.Reader = nil
10830	c.urlParams_.Set("alt", alt)
10831	c.urlParams_.Set("prettyPrint", "false")
10832	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
10833	urls += "?" + c.urlParams_.Encode()
10834	req, err := http.NewRequest("GET", urls, body)
10835	if err != nil {
10836		return nil, err
10837	}
10838	req.Header = reqHeaders
10839	googleapi.Expand(req.URL, map[string]string{
10840		"name": c.name,
10841	})
10842	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10843}
10844
10845// Do executes the "logging.folders.locations.get" call.
10846// Exactly one of *Location or error will be non-nil. Any non-2xx status
10847// code is an error. Response headers are in either
10848// *Location.ServerResponse.Header or (if a response was returned at
10849// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10850// to check whether the returned error was because
10851// http.StatusNotModified was returned.
10852func (c *FoldersLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
10853	gensupport.SetOptions(c.urlParams_, opts...)
10854	res, err := c.doRequest("json")
10855	if res != nil && res.StatusCode == http.StatusNotModified {
10856		if res.Body != nil {
10857			res.Body.Close()
10858		}
10859		return nil, &googleapi.Error{
10860			Code:   res.StatusCode,
10861			Header: res.Header,
10862		}
10863	}
10864	if err != nil {
10865		return nil, err
10866	}
10867	defer googleapi.CloseBody(res)
10868	if err := googleapi.CheckResponse(res); err != nil {
10869		return nil, err
10870	}
10871	ret := &Location{
10872		ServerResponse: googleapi.ServerResponse{
10873			Header:         res.Header,
10874			HTTPStatusCode: res.StatusCode,
10875		},
10876	}
10877	target := &ret
10878	if err := gensupport.DecodeResponse(target, res); err != nil {
10879		return nil, err
10880	}
10881	return ret, nil
10882	// {
10883	//   "description": "Gets information about a location.",
10884	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}",
10885	//   "httpMethod": "GET",
10886	//   "id": "logging.folders.locations.get",
10887	//   "parameterOrder": [
10888	//     "name"
10889	//   ],
10890	//   "parameters": {
10891	//     "name": {
10892	//       "description": "Resource name for the location.",
10893	//       "location": "path",
10894	//       "pattern": "^folders/[^/]+/locations/[^/]+$",
10895	//       "required": true,
10896	//       "type": "string"
10897	//     }
10898	//   },
10899	//   "path": "v2/{+name}",
10900	//   "response": {
10901	//     "$ref": "Location"
10902	//   },
10903	//   "scopes": [
10904	//     "https://www.googleapis.com/auth/cloud-platform",
10905	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
10906	//     "https://www.googleapis.com/auth/logging.admin",
10907	//     "https://www.googleapis.com/auth/logging.read"
10908	//   ]
10909	// }
10910
10911}
10912
10913// method id "logging.folders.locations.list":
10914
10915type FoldersLocationsListCall struct {
10916	s            *Service
10917	name         string
10918	urlParams_   gensupport.URLParams
10919	ifNoneMatch_ string
10920	ctx_         context.Context
10921	header_      http.Header
10922}
10923
10924// List: Lists information about the supported locations for this
10925// service.
10926//
10927// - name: The resource that owns the locations collection, if
10928//   applicable.
10929func (r *FoldersLocationsService) List(name string) *FoldersLocationsListCall {
10930	c := &FoldersLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10931	c.name = name
10932	return c
10933}
10934
10935// Filter sets the optional parameter "filter": A filter to narrow down
10936// results to a preferred subset. The filtering language accepts strings
10937// like "displayName=tokyo", and is documented in more detail in AIP-160
10938// (https://google.aip.dev/160).
10939func (c *FoldersLocationsListCall) Filter(filter string) *FoldersLocationsListCall {
10940	c.urlParams_.Set("filter", filter)
10941	return c
10942}
10943
10944// PageSize sets the optional parameter "pageSize": The maximum number
10945// of results to return. If not set, the service selects a default.
10946func (c *FoldersLocationsListCall) PageSize(pageSize int64) *FoldersLocationsListCall {
10947	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10948	return c
10949}
10950
10951// PageToken sets the optional parameter "pageToken": A page token
10952// received from the next_page_token field in the response. Send that
10953// page token to receive the subsequent page.
10954func (c *FoldersLocationsListCall) PageToken(pageToken string) *FoldersLocationsListCall {
10955	c.urlParams_.Set("pageToken", pageToken)
10956	return c
10957}
10958
10959// Fields allows partial responses to be retrieved. See
10960// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10961// for more information.
10962func (c *FoldersLocationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsListCall {
10963	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10964	return c
10965}
10966
10967// IfNoneMatch sets the optional parameter which makes the operation
10968// fail if the object's ETag matches the given value. This is useful for
10969// getting updates only after the object has changed since the last
10970// request. Use googleapi.IsNotModified to check whether the response
10971// error from Do is the result of In-None-Match.
10972func (c *FoldersLocationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsListCall {
10973	c.ifNoneMatch_ = entityTag
10974	return c
10975}
10976
10977// Context sets the context to be used in this call's Do method. Any
10978// pending HTTP request will be aborted if the provided context is
10979// canceled.
10980func (c *FoldersLocationsListCall) Context(ctx context.Context) *FoldersLocationsListCall {
10981	c.ctx_ = ctx
10982	return c
10983}
10984
10985// Header returns an http.Header that can be modified by the caller to
10986// add HTTP headers to the request.
10987func (c *FoldersLocationsListCall) Header() http.Header {
10988	if c.header_ == nil {
10989		c.header_ = make(http.Header)
10990	}
10991	return c.header_
10992}
10993
10994func (c *FoldersLocationsListCall) doRequest(alt string) (*http.Response, error) {
10995	reqHeaders := make(http.Header)
10996	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10997	for k, v := range c.header_ {
10998		reqHeaders[k] = v
10999	}
11000	reqHeaders.Set("User-Agent", c.s.userAgent())
11001	if c.ifNoneMatch_ != "" {
11002		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11003	}
11004	var body io.Reader = nil
11005	c.urlParams_.Set("alt", alt)
11006	c.urlParams_.Set("prettyPrint", "false")
11007	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
11008	urls += "?" + c.urlParams_.Encode()
11009	req, err := http.NewRequest("GET", urls, body)
11010	if err != nil {
11011		return nil, err
11012	}
11013	req.Header = reqHeaders
11014	googleapi.Expand(req.URL, map[string]string{
11015		"name": c.name,
11016	})
11017	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11018}
11019
11020// Do executes the "logging.folders.locations.list" call.
11021// Exactly one of *ListLocationsResponse or error will be non-nil. Any
11022// non-2xx status code is an error. Response headers are in either
11023// *ListLocationsResponse.ServerResponse.Header or (if a response was
11024// returned at all) in error.(*googleapi.Error).Header. Use
11025// googleapi.IsNotModified to check whether the returned error was
11026// because http.StatusNotModified was returned.
11027func (c *FoldersLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
11028	gensupport.SetOptions(c.urlParams_, opts...)
11029	res, err := c.doRequest("json")
11030	if res != nil && res.StatusCode == http.StatusNotModified {
11031		if res.Body != nil {
11032			res.Body.Close()
11033		}
11034		return nil, &googleapi.Error{
11035			Code:   res.StatusCode,
11036			Header: res.Header,
11037		}
11038	}
11039	if err != nil {
11040		return nil, err
11041	}
11042	defer googleapi.CloseBody(res)
11043	if err := googleapi.CheckResponse(res); err != nil {
11044		return nil, err
11045	}
11046	ret := &ListLocationsResponse{
11047		ServerResponse: googleapi.ServerResponse{
11048			Header:         res.Header,
11049			HTTPStatusCode: res.StatusCode,
11050		},
11051	}
11052	target := &ret
11053	if err := gensupport.DecodeResponse(target, res); err != nil {
11054		return nil, err
11055	}
11056	return ret, nil
11057	// {
11058	//   "description": "Lists information about the supported locations for this service.",
11059	//   "flatPath": "v2/folders/{foldersId}/locations",
11060	//   "httpMethod": "GET",
11061	//   "id": "logging.folders.locations.list",
11062	//   "parameterOrder": [
11063	//     "name"
11064	//   ],
11065	//   "parameters": {
11066	//     "filter": {
11067	//       "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in AIP-160 (https://google.aip.dev/160).",
11068	//       "location": "query",
11069	//       "type": "string"
11070	//     },
11071	//     "name": {
11072	//       "description": "The resource that owns the locations collection, if applicable.",
11073	//       "location": "path",
11074	//       "pattern": "^folders/[^/]+$",
11075	//       "required": true,
11076	//       "type": "string"
11077	//     },
11078	//     "pageSize": {
11079	//       "description": "The maximum number of results to return. If not set, the service selects a default.",
11080	//       "format": "int32",
11081	//       "location": "query",
11082	//       "type": "integer"
11083	//     },
11084	//     "pageToken": {
11085	//       "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.",
11086	//       "location": "query",
11087	//       "type": "string"
11088	//     }
11089	//   },
11090	//   "path": "v2/{+name}/locations",
11091	//   "response": {
11092	//     "$ref": "ListLocationsResponse"
11093	//   },
11094	//   "scopes": [
11095	//     "https://www.googleapis.com/auth/cloud-platform",
11096	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
11097	//     "https://www.googleapis.com/auth/logging.admin",
11098	//     "https://www.googleapis.com/auth/logging.read"
11099	//   ]
11100	// }
11101
11102}
11103
11104// Pages invokes f for each page of results.
11105// A non-nil error returned from f will halt the iteration.
11106// The provided context supersedes any context provided to the Context method.
11107func (c *FoldersLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
11108	c.ctx_ = ctx
11109	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11110	for {
11111		x, err := c.Do()
11112		if err != nil {
11113			return err
11114		}
11115		if err := f(x); err != nil {
11116			return err
11117		}
11118		if x.NextPageToken == "" {
11119			return nil
11120		}
11121		c.PageToken(x.NextPageToken)
11122	}
11123}
11124
11125// method id "logging.folders.locations.buckets.create":
11126
11127type FoldersLocationsBucketsCreateCall struct {
11128	s          *Service
11129	parent     string
11130	logbucket  *LogBucket
11131	urlParams_ gensupport.URLParams
11132	ctx_       context.Context
11133	header_    http.Header
11134}
11135
11136// Create: Creates a log bucket that can be used to store log entries.
11137// After a bucket has been created, the bucket's location cannot be
11138// changed.
11139//
11140// - parent: The resource in which to create the log bucket:
11141//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
11142//   example:"projects/my-project/locations/global".
11143func (r *FoldersLocationsBucketsService) Create(parent string, logbucket *LogBucket) *FoldersLocationsBucketsCreateCall {
11144	c := &FoldersLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11145	c.parent = parent
11146	c.logbucket = logbucket
11147	return c
11148}
11149
11150// BucketId sets the optional parameter "bucketId": Required. A
11151// client-assigned identifier such as "my-bucket". Identifiers are
11152// limited to 100 characters and can include only letters, digits,
11153// underscores, hyphens, and periods.
11154func (c *FoldersLocationsBucketsCreateCall) BucketId(bucketId string) *FoldersLocationsBucketsCreateCall {
11155	c.urlParams_.Set("bucketId", bucketId)
11156	return c
11157}
11158
11159// Fields allows partial responses to be retrieved. See
11160// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11161// for more information.
11162func (c *FoldersLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsCreateCall {
11163	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11164	return c
11165}
11166
11167// Context sets the context to be used in this call's Do method. Any
11168// pending HTTP request will be aborted if the provided context is
11169// canceled.
11170func (c *FoldersLocationsBucketsCreateCall) Context(ctx context.Context) *FoldersLocationsBucketsCreateCall {
11171	c.ctx_ = ctx
11172	return c
11173}
11174
11175// Header returns an http.Header that can be modified by the caller to
11176// add HTTP headers to the request.
11177func (c *FoldersLocationsBucketsCreateCall) Header() http.Header {
11178	if c.header_ == nil {
11179		c.header_ = make(http.Header)
11180	}
11181	return c.header_
11182}
11183
11184func (c *FoldersLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
11185	reqHeaders := make(http.Header)
11186	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
11187	for k, v := range c.header_ {
11188		reqHeaders[k] = v
11189	}
11190	reqHeaders.Set("User-Agent", c.s.userAgent())
11191	var body io.Reader = nil
11192	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
11193	if err != nil {
11194		return nil, err
11195	}
11196	reqHeaders.Set("Content-Type", "application/json")
11197	c.urlParams_.Set("alt", alt)
11198	c.urlParams_.Set("prettyPrint", "false")
11199	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
11200	urls += "?" + c.urlParams_.Encode()
11201	req, err := http.NewRequest("POST", urls, body)
11202	if err != nil {
11203		return nil, err
11204	}
11205	req.Header = reqHeaders
11206	googleapi.Expand(req.URL, map[string]string{
11207		"parent": c.parent,
11208	})
11209	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11210}
11211
11212// Do executes the "logging.folders.locations.buckets.create" call.
11213// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
11214// status code is an error. Response headers are in either
11215// *LogBucket.ServerResponse.Header or (if a response was returned at
11216// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11217// to check whether the returned error was because
11218// http.StatusNotModified was returned.
11219func (c *FoldersLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
11220	gensupport.SetOptions(c.urlParams_, opts...)
11221	res, err := c.doRequest("json")
11222	if res != nil && res.StatusCode == http.StatusNotModified {
11223		if res.Body != nil {
11224			res.Body.Close()
11225		}
11226		return nil, &googleapi.Error{
11227			Code:   res.StatusCode,
11228			Header: res.Header,
11229		}
11230	}
11231	if err != nil {
11232		return nil, err
11233	}
11234	defer googleapi.CloseBody(res)
11235	if err := googleapi.CheckResponse(res); err != nil {
11236		return nil, err
11237	}
11238	ret := &LogBucket{
11239		ServerResponse: googleapi.ServerResponse{
11240			Header:         res.Header,
11241			HTTPStatusCode: res.StatusCode,
11242		},
11243	}
11244	target := &ret
11245	if err := gensupport.DecodeResponse(target, res); err != nil {
11246		return nil, err
11247	}
11248	return ret, nil
11249	// {
11250	//   "description": "Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.",
11251	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets",
11252	//   "httpMethod": "POST",
11253	//   "id": "logging.folders.locations.buckets.create",
11254	//   "parameterOrder": [
11255	//     "parent"
11256	//   ],
11257	//   "parameters": {
11258	//     "bucketId": {
11259	//       "description": "Required. A client-assigned identifier such as \"my-bucket\". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.",
11260	//       "location": "query",
11261	//       "type": "string"
11262	//     },
11263	//     "parent": {
11264	//       "description": "Required. The resource in which to create the log bucket: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" For example:\"projects/my-project/locations/global\"",
11265	//       "location": "path",
11266	//       "pattern": "^folders/[^/]+/locations/[^/]+$",
11267	//       "required": true,
11268	//       "type": "string"
11269	//     }
11270	//   },
11271	//   "path": "v2/{+parent}/buckets",
11272	//   "request": {
11273	//     "$ref": "LogBucket"
11274	//   },
11275	//   "response": {
11276	//     "$ref": "LogBucket"
11277	//   },
11278	//   "scopes": [
11279	//     "https://www.googleapis.com/auth/cloud-platform",
11280	//     "https://www.googleapis.com/auth/logging.admin"
11281	//   ]
11282	// }
11283
11284}
11285
11286// method id "logging.folders.locations.buckets.delete":
11287
11288type FoldersLocationsBucketsDeleteCall struct {
11289	s          *Service
11290	name       string
11291	urlParams_ gensupport.URLParams
11292	ctx_       context.Context
11293	header_    http.Header
11294}
11295
11296// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to
11297// the DELETE_REQUESTED state. After 7 days, the bucket will be purged
11298// and all log entries in the bucket will be permanently deleted.
11299//
11300// - name: The full resource name of the bucket to delete.
11301//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
11302//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
11303//   CKET_ID]"
11304//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
11305//   s/[BUCKET_ID]"
11306//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
11307//   For
11308//   example:"projects/my-project/locations/global/buckets/my-bucket".
11309func (r *FoldersLocationsBucketsService) Delete(name string) *FoldersLocationsBucketsDeleteCall {
11310	c := &FoldersLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11311	c.name = name
11312	return c
11313}
11314
11315// Fields allows partial responses to be retrieved. See
11316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11317// for more information.
11318func (c *FoldersLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsDeleteCall {
11319	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11320	return c
11321}
11322
11323// Context sets the context to be used in this call's Do method. Any
11324// pending HTTP request will be aborted if the provided context is
11325// canceled.
11326func (c *FoldersLocationsBucketsDeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsDeleteCall {
11327	c.ctx_ = ctx
11328	return c
11329}
11330
11331// Header returns an http.Header that can be modified by the caller to
11332// add HTTP headers to the request.
11333func (c *FoldersLocationsBucketsDeleteCall) Header() http.Header {
11334	if c.header_ == nil {
11335		c.header_ = make(http.Header)
11336	}
11337	return c.header_
11338}
11339
11340func (c *FoldersLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
11341	reqHeaders := make(http.Header)
11342	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
11343	for k, v := range c.header_ {
11344		reqHeaders[k] = v
11345	}
11346	reqHeaders.Set("User-Agent", c.s.userAgent())
11347	var body io.Reader = nil
11348	c.urlParams_.Set("alt", alt)
11349	c.urlParams_.Set("prettyPrint", "false")
11350	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
11351	urls += "?" + c.urlParams_.Encode()
11352	req, err := http.NewRequest("DELETE", urls, body)
11353	if err != nil {
11354		return nil, err
11355	}
11356	req.Header = reqHeaders
11357	googleapi.Expand(req.URL, map[string]string{
11358		"name": c.name,
11359	})
11360	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11361}
11362
11363// Do executes the "logging.folders.locations.buckets.delete" call.
11364// Exactly one of *Empty or error will be non-nil. Any non-2xx status
11365// code is an error. Response headers are in either
11366// *Empty.ServerResponse.Header or (if a response was returned at all)
11367// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11368// check whether the returned error was because http.StatusNotModified
11369// was returned.
11370func (c *FoldersLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11371	gensupport.SetOptions(c.urlParams_, opts...)
11372	res, err := c.doRequest("json")
11373	if res != nil && res.StatusCode == http.StatusNotModified {
11374		if res.Body != nil {
11375			res.Body.Close()
11376		}
11377		return nil, &googleapi.Error{
11378			Code:   res.StatusCode,
11379			Header: res.Header,
11380		}
11381	}
11382	if err != nil {
11383		return nil, err
11384	}
11385	defer googleapi.CloseBody(res)
11386	if err := googleapi.CheckResponse(res); err != nil {
11387		return nil, err
11388	}
11389	ret := &Empty{
11390		ServerResponse: googleapi.ServerResponse{
11391			Header:         res.Header,
11392			HTTPStatusCode: res.StatusCode,
11393		},
11394	}
11395	target := &ret
11396	if err := gensupport.DecodeResponse(target, res); err != nil {
11397		return nil, err
11398	}
11399	return ret, nil
11400	// {
11401	//   "description": "Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.",
11402	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}",
11403	//   "httpMethod": "DELETE",
11404	//   "id": "logging.folders.locations.buckets.delete",
11405	//   "parameterOrder": [
11406	//     "name"
11407	//   ],
11408	//   "parameters": {
11409	//     "name": {
11410	//       "description": "Required. The full resource name of the bucket to delete. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
11411	//       "location": "path",
11412	//       "pattern": "^folders/[^/]+/locations/[^/]+/buckets/[^/]+$",
11413	//       "required": true,
11414	//       "type": "string"
11415	//     }
11416	//   },
11417	//   "path": "v2/{+name}",
11418	//   "response": {
11419	//     "$ref": "Empty"
11420	//   },
11421	//   "scopes": [
11422	//     "https://www.googleapis.com/auth/cloud-platform",
11423	//     "https://www.googleapis.com/auth/logging.admin"
11424	//   ]
11425	// }
11426
11427}
11428
11429// method id "logging.folders.locations.buckets.get":
11430
11431type FoldersLocationsBucketsGetCall struct {
11432	s            *Service
11433	name         string
11434	urlParams_   gensupport.URLParams
11435	ifNoneMatch_ string
11436	ctx_         context.Context
11437	header_      http.Header
11438}
11439
11440// Get: Gets a log bucket.
11441//
11442// - name: The resource name of the bucket:
11443//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
11444//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
11445//   CKET_ID]"
11446//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
11447//   s/[BUCKET_ID]"
11448//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
11449//   For
11450//   example:"projects/my-project/locations/global/buckets/my-bucket".
11451func (r *FoldersLocationsBucketsService) Get(name string) *FoldersLocationsBucketsGetCall {
11452	c := &FoldersLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11453	c.name = name
11454	return c
11455}
11456
11457// Fields allows partial responses to be retrieved. See
11458// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11459// for more information.
11460func (c *FoldersLocationsBucketsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsGetCall {
11461	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11462	return c
11463}
11464
11465// IfNoneMatch sets the optional parameter which makes the operation
11466// fail if the object's ETag matches the given value. This is useful for
11467// getting updates only after the object has changed since the last
11468// request. Use googleapi.IsNotModified to check whether the response
11469// error from Do is the result of In-None-Match.
11470func (c *FoldersLocationsBucketsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsGetCall {
11471	c.ifNoneMatch_ = entityTag
11472	return c
11473}
11474
11475// Context sets the context to be used in this call's Do method. Any
11476// pending HTTP request will be aborted if the provided context is
11477// canceled.
11478func (c *FoldersLocationsBucketsGetCall) Context(ctx context.Context) *FoldersLocationsBucketsGetCall {
11479	c.ctx_ = ctx
11480	return c
11481}
11482
11483// Header returns an http.Header that can be modified by the caller to
11484// add HTTP headers to the request.
11485func (c *FoldersLocationsBucketsGetCall) Header() http.Header {
11486	if c.header_ == nil {
11487		c.header_ = make(http.Header)
11488	}
11489	return c.header_
11490}
11491
11492func (c *FoldersLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
11493	reqHeaders := make(http.Header)
11494	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
11495	for k, v := range c.header_ {
11496		reqHeaders[k] = v
11497	}
11498	reqHeaders.Set("User-Agent", c.s.userAgent())
11499	if c.ifNoneMatch_ != "" {
11500		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11501	}
11502	var body io.Reader = nil
11503	c.urlParams_.Set("alt", alt)
11504	c.urlParams_.Set("prettyPrint", "false")
11505	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
11506	urls += "?" + c.urlParams_.Encode()
11507	req, err := http.NewRequest("GET", urls, body)
11508	if err != nil {
11509		return nil, err
11510	}
11511	req.Header = reqHeaders
11512	googleapi.Expand(req.URL, map[string]string{
11513		"name": c.name,
11514	})
11515	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11516}
11517
11518// Do executes the "logging.folders.locations.buckets.get" call.
11519// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
11520// status code is an error. Response headers are in either
11521// *LogBucket.ServerResponse.Header or (if a response was returned at
11522// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11523// to check whether the returned error was because
11524// http.StatusNotModified was returned.
11525func (c *FoldersLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
11526	gensupport.SetOptions(c.urlParams_, opts...)
11527	res, err := c.doRequest("json")
11528	if res != nil && res.StatusCode == http.StatusNotModified {
11529		if res.Body != nil {
11530			res.Body.Close()
11531		}
11532		return nil, &googleapi.Error{
11533			Code:   res.StatusCode,
11534			Header: res.Header,
11535		}
11536	}
11537	if err != nil {
11538		return nil, err
11539	}
11540	defer googleapi.CloseBody(res)
11541	if err := googleapi.CheckResponse(res); err != nil {
11542		return nil, err
11543	}
11544	ret := &LogBucket{
11545		ServerResponse: googleapi.ServerResponse{
11546			Header:         res.Header,
11547			HTTPStatusCode: res.StatusCode,
11548		},
11549	}
11550	target := &ret
11551	if err := gensupport.DecodeResponse(target, res); err != nil {
11552		return nil, err
11553	}
11554	return ret, nil
11555	// {
11556	//   "description": "Gets a log bucket.",
11557	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}",
11558	//   "httpMethod": "GET",
11559	//   "id": "logging.folders.locations.buckets.get",
11560	//   "parameterOrder": [
11561	//     "name"
11562	//   ],
11563	//   "parameters": {
11564	//     "name": {
11565	//       "description": "Required. The resource name of the bucket: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
11566	//       "location": "path",
11567	//       "pattern": "^folders/[^/]+/locations/[^/]+/buckets/[^/]+$",
11568	//       "required": true,
11569	//       "type": "string"
11570	//     }
11571	//   },
11572	//   "path": "v2/{+name}",
11573	//   "response": {
11574	//     "$ref": "LogBucket"
11575	//   },
11576	//   "scopes": [
11577	//     "https://www.googleapis.com/auth/cloud-platform",
11578	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
11579	//     "https://www.googleapis.com/auth/logging.admin",
11580	//     "https://www.googleapis.com/auth/logging.read"
11581	//   ]
11582	// }
11583
11584}
11585
11586// method id "logging.folders.locations.buckets.list":
11587
11588type FoldersLocationsBucketsListCall struct {
11589	s            *Service
11590	parent       string
11591	urlParams_   gensupport.URLParams
11592	ifNoneMatch_ string
11593	ctx_         context.Context
11594	header_      http.Header
11595}
11596
11597// List: Lists log buckets.
11598//
11599// - parent: The parent resource whose buckets are to be listed:
11600//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
11601//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
11602//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
11603//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations
11604//   portion of the resource must be specified, but supplying the
11605//   character - in place of LOCATION_ID will return all buckets.
11606func (r *FoldersLocationsBucketsService) List(parent string) *FoldersLocationsBucketsListCall {
11607	c := &FoldersLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11608	c.parent = parent
11609	return c
11610}
11611
11612// PageSize sets the optional parameter "pageSize": The maximum number
11613// of results to return from this request. Non-positive values are
11614// ignored. The presence of nextPageToken in the response indicates that
11615// more results might be available.
11616func (c *FoldersLocationsBucketsListCall) PageSize(pageSize int64) *FoldersLocationsBucketsListCall {
11617	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11618	return c
11619}
11620
11621// PageToken sets the optional parameter "pageToken": If present, then
11622// retrieve the next batch of results from the preceding call to this
11623// method. pageToken must be the value of nextPageToken from the
11624// previous response. The values of other method parameters should be
11625// identical to those in the previous call.
11626func (c *FoldersLocationsBucketsListCall) PageToken(pageToken string) *FoldersLocationsBucketsListCall {
11627	c.urlParams_.Set("pageToken", pageToken)
11628	return c
11629}
11630
11631// Fields allows partial responses to be retrieved. See
11632// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11633// for more information.
11634func (c *FoldersLocationsBucketsListCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsListCall {
11635	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11636	return c
11637}
11638
11639// IfNoneMatch sets the optional parameter which makes the operation
11640// fail if the object's ETag matches the given value. This is useful for
11641// getting updates only after the object has changed since the last
11642// request. Use googleapi.IsNotModified to check whether the response
11643// error from Do is the result of In-None-Match.
11644func (c *FoldersLocationsBucketsListCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsListCall {
11645	c.ifNoneMatch_ = entityTag
11646	return c
11647}
11648
11649// Context sets the context to be used in this call's Do method. Any
11650// pending HTTP request will be aborted if the provided context is
11651// canceled.
11652func (c *FoldersLocationsBucketsListCall) Context(ctx context.Context) *FoldersLocationsBucketsListCall {
11653	c.ctx_ = ctx
11654	return c
11655}
11656
11657// Header returns an http.Header that can be modified by the caller to
11658// add HTTP headers to the request.
11659func (c *FoldersLocationsBucketsListCall) Header() http.Header {
11660	if c.header_ == nil {
11661		c.header_ = make(http.Header)
11662	}
11663	return c.header_
11664}
11665
11666func (c *FoldersLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
11667	reqHeaders := make(http.Header)
11668	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
11669	for k, v := range c.header_ {
11670		reqHeaders[k] = v
11671	}
11672	reqHeaders.Set("User-Agent", c.s.userAgent())
11673	if c.ifNoneMatch_ != "" {
11674		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11675	}
11676	var body io.Reader = nil
11677	c.urlParams_.Set("alt", alt)
11678	c.urlParams_.Set("prettyPrint", "false")
11679	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
11680	urls += "?" + c.urlParams_.Encode()
11681	req, err := http.NewRequest("GET", urls, body)
11682	if err != nil {
11683		return nil, err
11684	}
11685	req.Header = reqHeaders
11686	googleapi.Expand(req.URL, map[string]string{
11687		"parent": c.parent,
11688	})
11689	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11690}
11691
11692// Do executes the "logging.folders.locations.buckets.list" call.
11693// Exactly one of *ListBucketsResponse or error will be non-nil. Any
11694// non-2xx status code is an error. Response headers are in either
11695// *ListBucketsResponse.ServerResponse.Header or (if a response was
11696// returned at all) in error.(*googleapi.Error).Header. Use
11697// googleapi.IsNotModified to check whether the returned error was
11698// because http.StatusNotModified was returned.
11699func (c *FoldersLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
11700	gensupport.SetOptions(c.urlParams_, opts...)
11701	res, err := c.doRequest("json")
11702	if res != nil && res.StatusCode == http.StatusNotModified {
11703		if res.Body != nil {
11704			res.Body.Close()
11705		}
11706		return nil, &googleapi.Error{
11707			Code:   res.StatusCode,
11708			Header: res.Header,
11709		}
11710	}
11711	if err != nil {
11712		return nil, err
11713	}
11714	defer googleapi.CloseBody(res)
11715	if err := googleapi.CheckResponse(res); err != nil {
11716		return nil, err
11717	}
11718	ret := &ListBucketsResponse{
11719		ServerResponse: googleapi.ServerResponse{
11720			Header:         res.Header,
11721			HTTPStatusCode: res.StatusCode,
11722		},
11723	}
11724	target := &ret
11725	if err := gensupport.DecodeResponse(target, res); err != nil {
11726		return nil, err
11727	}
11728	return ret, nil
11729	// {
11730	//   "description": "Lists log buckets.",
11731	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets",
11732	//   "httpMethod": "GET",
11733	//   "id": "logging.folders.locations.buckets.list",
11734	//   "parameterOrder": [
11735	//     "parent"
11736	//   ],
11737	//   "parameters": {
11738	//     "pageSize": {
11739	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
11740	//       "format": "int32",
11741	//       "location": "query",
11742	//       "type": "integer"
11743	//     },
11744	//     "pageToken": {
11745	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
11746	//       "location": "query",
11747	//       "type": "string"
11748	//     },
11749	//     "parent": {
11750	//       "description": "Required. The parent resource whose buckets are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]\" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets.",
11751	//       "location": "path",
11752	//       "pattern": "^folders/[^/]+/locations/[^/]+$",
11753	//       "required": true,
11754	//       "type": "string"
11755	//     }
11756	//   },
11757	//   "path": "v2/{+parent}/buckets",
11758	//   "response": {
11759	//     "$ref": "ListBucketsResponse"
11760	//   },
11761	//   "scopes": [
11762	//     "https://www.googleapis.com/auth/cloud-platform",
11763	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
11764	//     "https://www.googleapis.com/auth/logging.admin",
11765	//     "https://www.googleapis.com/auth/logging.read"
11766	//   ]
11767	// }
11768
11769}
11770
11771// Pages invokes f for each page of results.
11772// A non-nil error returned from f will halt the iteration.
11773// The provided context supersedes any context provided to the Context method.
11774func (c *FoldersLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
11775	c.ctx_ = ctx
11776	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11777	for {
11778		x, err := c.Do()
11779		if err != nil {
11780			return err
11781		}
11782		if err := f(x); err != nil {
11783			return err
11784		}
11785		if x.NextPageToken == "" {
11786			return nil
11787		}
11788		c.PageToken(x.NextPageToken)
11789	}
11790}
11791
11792// method id "logging.folders.locations.buckets.patch":
11793
11794type FoldersLocationsBucketsPatchCall struct {
11795	s          *Service
11796	name       string
11797	logbucket  *LogBucket
11798	urlParams_ gensupport.URLParams
11799	ctx_       context.Context
11800	header_    http.Header
11801}
11802
11803// Patch: Updates a log bucket. This method replaces the following
11804// fields in the existing bucket with values from the new bucket:
11805// retention_periodIf the retention period is decreased and the bucket
11806// is locked, FAILED_PRECONDITION will be returned.If the bucket has a
11807// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be
11808// returned.After a bucket has been created, the bucket's location
11809// cannot be changed.
11810//
11811// - name: The full resource name of the bucket to update.
11812//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
11813//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
11814//   CKET_ID]"
11815//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
11816//   s/[BUCKET_ID]"
11817//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
11818//   For
11819//   example:"projects/my-project/locations/global/buckets/my-bucket".
11820func (r *FoldersLocationsBucketsService) Patch(name string, logbucket *LogBucket) *FoldersLocationsBucketsPatchCall {
11821	c := &FoldersLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11822	c.name = name
11823	c.logbucket = logbucket
11824	return c
11825}
11826
11827// UpdateMask sets the optional parameter "updateMask": Required. Field
11828// mask that specifies the fields in bucket that need an update. A
11829// bucket field will be overwritten if, and only if, it is in the update
11830// mask. name and output only fields cannot be updated.For a detailed
11831// FieldMask definition, see:
11832// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
11833// example: updateMask=retention_days
11834func (c *FoldersLocationsBucketsPatchCall) UpdateMask(updateMask string) *FoldersLocationsBucketsPatchCall {
11835	c.urlParams_.Set("updateMask", updateMask)
11836	return c
11837}
11838
11839// Fields allows partial responses to be retrieved. See
11840// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11841// for more information.
11842func (c *FoldersLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsPatchCall {
11843	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11844	return c
11845}
11846
11847// Context sets the context to be used in this call's Do method. Any
11848// pending HTTP request will be aborted if the provided context is
11849// canceled.
11850func (c *FoldersLocationsBucketsPatchCall) Context(ctx context.Context) *FoldersLocationsBucketsPatchCall {
11851	c.ctx_ = ctx
11852	return c
11853}
11854
11855// Header returns an http.Header that can be modified by the caller to
11856// add HTTP headers to the request.
11857func (c *FoldersLocationsBucketsPatchCall) Header() http.Header {
11858	if c.header_ == nil {
11859		c.header_ = make(http.Header)
11860	}
11861	return c.header_
11862}
11863
11864func (c *FoldersLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
11865	reqHeaders := make(http.Header)
11866	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
11867	for k, v := range c.header_ {
11868		reqHeaders[k] = v
11869	}
11870	reqHeaders.Set("User-Agent", c.s.userAgent())
11871	var body io.Reader = nil
11872	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
11873	if err != nil {
11874		return nil, err
11875	}
11876	reqHeaders.Set("Content-Type", "application/json")
11877	c.urlParams_.Set("alt", alt)
11878	c.urlParams_.Set("prettyPrint", "false")
11879	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
11880	urls += "?" + c.urlParams_.Encode()
11881	req, err := http.NewRequest("PATCH", urls, body)
11882	if err != nil {
11883		return nil, err
11884	}
11885	req.Header = reqHeaders
11886	googleapi.Expand(req.URL, map[string]string{
11887		"name": c.name,
11888	})
11889	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11890}
11891
11892// Do executes the "logging.folders.locations.buckets.patch" call.
11893// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
11894// status code is an error. Response headers are in either
11895// *LogBucket.ServerResponse.Header or (if a response was returned at
11896// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11897// to check whether the returned error was because
11898// http.StatusNotModified was returned.
11899func (c *FoldersLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
11900	gensupport.SetOptions(c.urlParams_, opts...)
11901	res, err := c.doRequest("json")
11902	if res != nil && res.StatusCode == http.StatusNotModified {
11903		if res.Body != nil {
11904			res.Body.Close()
11905		}
11906		return nil, &googleapi.Error{
11907			Code:   res.StatusCode,
11908			Header: res.Header,
11909		}
11910	}
11911	if err != nil {
11912		return nil, err
11913	}
11914	defer googleapi.CloseBody(res)
11915	if err := googleapi.CheckResponse(res); err != nil {
11916		return nil, err
11917	}
11918	ret := &LogBucket{
11919		ServerResponse: googleapi.ServerResponse{
11920			Header:         res.Header,
11921			HTTPStatusCode: res.StatusCode,
11922		},
11923	}
11924	target := &ret
11925	if err := gensupport.DecodeResponse(target, res); err != nil {
11926		return nil, err
11927	}
11928	return ret, nil
11929	// {
11930	//   "description": "Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed.",
11931	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}",
11932	//   "httpMethod": "PATCH",
11933	//   "id": "logging.folders.locations.buckets.patch",
11934	//   "parameterOrder": [
11935	//     "name"
11936	//   ],
11937	//   "parameters": {
11938	//     "name": {
11939	//       "description": "Required. The full resource name of the bucket to update. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
11940	//       "location": "path",
11941	//       "pattern": "^folders/[^/]+/locations/[^/]+/buckets/[^/]+$",
11942	//       "required": true,
11943	//       "type": "string"
11944	//     },
11945	//     "updateMask": {
11946	//       "description": "Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days",
11947	//       "format": "google-fieldmask",
11948	//       "location": "query",
11949	//       "type": "string"
11950	//     }
11951	//   },
11952	//   "path": "v2/{+name}",
11953	//   "request": {
11954	//     "$ref": "LogBucket"
11955	//   },
11956	//   "response": {
11957	//     "$ref": "LogBucket"
11958	//   },
11959	//   "scopes": [
11960	//     "https://www.googleapis.com/auth/cloud-platform",
11961	//     "https://www.googleapis.com/auth/logging.admin"
11962	//   ]
11963	// }
11964
11965}
11966
11967// method id "logging.folders.locations.buckets.undelete":
11968
11969type FoldersLocationsBucketsUndeleteCall struct {
11970	s                     *Service
11971	name                  string
11972	undeletebucketrequest *UndeleteBucketRequest
11973	urlParams_            gensupport.URLParams
11974	ctx_                  context.Context
11975	header_               http.Header
11976}
11977
11978// Undelete: Undeletes a log bucket. A bucket that has been deleted can
11979// be undeleted within the grace period of 7 days.
11980//
11981// - name: The full resource name of the bucket to undelete.
11982//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
11983//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
11984//   CKET_ID]"
11985//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
11986//   s/[BUCKET_ID]"
11987//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
11988//   For
11989//   example:"projects/my-project/locations/global/buckets/my-bucket".
11990func (r *FoldersLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *FoldersLocationsBucketsUndeleteCall {
11991	c := &FoldersLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11992	c.name = name
11993	c.undeletebucketrequest = undeletebucketrequest
11994	return c
11995}
11996
11997// Fields allows partial responses to be retrieved. See
11998// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11999// for more information.
12000func (c *FoldersLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsUndeleteCall {
12001	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12002	return c
12003}
12004
12005// Context sets the context to be used in this call's Do method. Any
12006// pending HTTP request will be aborted if the provided context is
12007// canceled.
12008func (c *FoldersLocationsBucketsUndeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsUndeleteCall {
12009	c.ctx_ = ctx
12010	return c
12011}
12012
12013// Header returns an http.Header that can be modified by the caller to
12014// add HTTP headers to the request.
12015func (c *FoldersLocationsBucketsUndeleteCall) Header() http.Header {
12016	if c.header_ == nil {
12017		c.header_ = make(http.Header)
12018	}
12019	return c.header_
12020}
12021
12022func (c *FoldersLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
12023	reqHeaders := make(http.Header)
12024	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12025	for k, v := range c.header_ {
12026		reqHeaders[k] = v
12027	}
12028	reqHeaders.Set("User-Agent", c.s.userAgent())
12029	var body io.Reader = nil
12030	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
12031	if err != nil {
12032		return nil, err
12033	}
12034	reqHeaders.Set("Content-Type", "application/json")
12035	c.urlParams_.Set("alt", alt)
12036	c.urlParams_.Set("prettyPrint", "false")
12037	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
12038	urls += "?" + c.urlParams_.Encode()
12039	req, err := http.NewRequest("POST", urls, body)
12040	if err != nil {
12041		return nil, err
12042	}
12043	req.Header = reqHeaders
12044	googleapi.Expand(req.URL, map[string]string{
12045		"name": c.name,
12046	})
12047	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12048}
12049
12050// Do executes the "logging.folders.locations.buckets.undelete" call.
12051// Exactly one of *Empty or error will be non-nil. Any non-2xx status
12052// code is an error. Response headers are in either
12053// *Empty.ServerResponse.Header or (if a response was returned at all)
12054// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12055// check whether the returned error was because http.StatusNotModified
12056// was returned.
12057func (c *FoldersLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12058	gensupport.SetOptions(c.urlParams_, opts...)
12059	res, err := c.doRequest("json")
12060	if res != nil && res.StatusCode == http.StatusNotModified {
12061		if res.Body != nil {
12062			res.Body.Close()
12063		}
12064		return nil, &googleapi.Error{
12065			Code:   res.StatusCode,
12066			Header: res.Header,
12067		}
12068	}
12069	if err != nil {
12070		return nil, err
12071	}
12072	defer googleapi.CloseBody(res)
12073	if err := googleapi.CheckResponse(res); err != nil {
12074		return nil, err
12075	}
12076	ret := &Empty{
12077		ServerResponse: googleapi.ServerResponse{
12078			Header:         res.Header,
12079			HTTPStatusCode: res.StatusCode,
12080		},
12081	}
12082	target := &ret
12083	if err := gensupport.DecodeResponse(target, res); err != nil {
12084		return nil, err
12085	}
12086	return ret, nil
12087	// {
12088	//   "description": "Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.",
12089	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}:undelete",
12090	//   "httpMethod": "POST",
12091	//   "id": "logging.folders.locations.buckets.undelete",
12092	//   "parameterOrder": [
12093	//     "name"
12094	//   ],
12095	//   "parameters": {
12096	//     "name": {
12097	//       "description": "Required. The full resource name of the bucket to undelete. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
12098	//       "location": "path",
12099	//       "pattern": "^folders/[^/]+/locations/[^/]+/buckets/[^/]+$",
12100	//       "required": true,
12101	//       "type": "string"
12102	//     }
12103	//   },
12104	//   "path": "v2/{+name}:undelete",
12105	//   "request": {
12106	//     "$ref": "UndeleteBucketRequest"
12107	//   },
12108	//   "response": {
12109	//     "$ref": "Empty"
12110	//   },
12111	//   "scopes": [
12112	//     "https://www.googleapis.com/auth/cloud-platform",
12113	//     "https://www.googleapis.com/auth/logging.admin"
12114	//   ]
12115	// }
12116
12117}
12118
12119// method id "logging.folders.locations.buckets.views.create":
12120
12121type FoldersLocationsBucketsViewsCreateCall struct {
12122	s          *Service
12123	parent     string
12124	logview    *LogView
12125	urlParams_ gensupport.URLParams
12126	ctx_       context.Context
12127	header_    http.Header
12128}
12129
12130// Create: Creates a view over log entries in a log bucket. A bucket may
12131// contain a maximum of 30 views.
12132//
12133// - parent: The bucket in which to create the view
12134//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
12135//   ` For
12136//   example:"projects/my-project/locations/global/buckets/my-bucket".
12137func (r *FoldersLocationsBucketsViewsService) Create(parent string, logview *LogView) *FoldersLocationsBucketsViewsCreateCall {
12138	c := &FoldersLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12139	c.parent = parent
12140	c.logview = logview
12141	return c
12142}
12143
12144// ViewId sets the optional parameter "viewId": Required. The id to use
12145// for this view.
12146func (c *FoldersLocationsBucketsViewsCreateCall) ViewId(viewId string) *FoldersLocationsBucketsViewsCreateCall {
12147	c.urlParams_.Set("viewId", viewId)
12148	return c
12149}
12150
12151// Fields allows partial responses to be retrieved. See
12152// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12153// for more information.
12154func (c *FoldersLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsCreateCall {
12155	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12156	return c
12157}
12158
12159// Context sets the context to be used in this call's Do method. Any
12160// pending HTTP request will be aborted if the provided context is
12161// canceled.
12162func (c *FoldersLocationsBucketsViewsCreateCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsCreateCall {
12163	c.ctx_ = ctx
12164	return c
12165}
12166
12167// Header returns an http.Header that can be modified by the caller to
12168// add HTTP headers to the request.
12169func (c *FoldersLocationsBucketsViewsCreateCall) Header() http.Header {
12170	if c.header_ == nil {
12171		c.header_ = make(http.Header)
12172	}
12173	return c.header_
12174}
12175
12176func (c *FoldersLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
12177	reqHeaders := make(http.Header)
12178	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12179	for k, v := range c.header_ {
12180		reqHeaders[k] = v
12181	}
12182	reqHeaders.Set("User-Agent", c.s.userAgent())
12183	var body io.Reader = nil
12184	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
12185	if err != nil {
12186		return nil, err
12187	}
12188	reqHeaders.Set("Content-Type", "application/json")
12189	c.urlParams_.Set("alt", alt)
12190	c.urlParams_.Set("prettyPrint", "false")
12191	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
12192	urls += "?" + c.urlParams_.Encode()
12193	req, err := http.NewRequest("POST", urls, body)
12194	if err != nil {
12195		return nil, err
12196	}
12197	req.Header = reqHeaders
12198	googleapi.Expand(req.URL, map[string]string{
12199		"parent": c.parent,
12200	})
12201	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12202}
12203
12204// Do executes the "logging.folders.locations.buckets.views.create" call.
12205// Exactly one of *LogView or error will be non-nil. Any non-2xx status
12206// code is an error. Response headers are in either
12207// *LogView.ServerResponse.Header or (if a response was returned at all)
12208// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12209// check whether the returned error was because http.StatusNotModified
12210// was returned.
12211func (c *FoldersLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
12212	gensupport.SetOptions(c.urlParams_, opts...)
12213	res, err := c.doRequest("json")
12214	if res != nil && res.StatusCode == http.StatusNotModified {
12215		if res.Body != nil {
12216			res.Body.Close()
12217		}
12218		return nil, &googleapi.Error{
12219			Code:   res.StatusCode,
12220			Header: res.Header,
12221		}
12222	}
12223	if err != nil {
12224		return nil, err
12225	}
12226	defer googleapi.CloseBody(res)
12227	if err := googleapi.CheckResponse(res); err != nil {
12228		return nil, err
12229	}
12230	ret := &LogView{
12231		ServerResponse: googleapi.ServerResponse{
12232			Header:         res.Header,
12233			HTTPStatusCode: res.StatusCode,
12234		},
12235	}
12236	target := &ret
12237	if err := gensupport.DecodeResponse(target, res); err != nil {
12238		return nil, err
12239	}
12240	return ret, nil
12241	// {
12242	//   "description": "Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.",
12243	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views",
12244	//   "httpMethod": "POST",
12245	//   "id": "logging.folders.locations.buckets.views.create",
12246	//   "parameterOrder": [
12247	//     "parent"
12248	//   ],
12249	//   "parameters": {
12250	//     "parent": {
12251	//       "description": "Required. The bucket in which to create the view `\"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\"` For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
12252	//       "location": "path",
12253	//       "pattern": "^folders/[^/]+/locations/[^/]+/buckets/[^/]+$",
12254	//       "required": true,
12255	//       "type": "string"
12256	//     },
12257	//     "viewId": {
12258	//       "description": "Required. The id to use for this view.",
12259	//       "location": "query",
12260	//       "type": "string"
12261	//     }
12262	//   },
12263	//   "path": "v2/{+parent}/views",
12264	//   "request": {
12265	//     "$ref": "LogView"
12266	//   },
12267	//   "response": {
12268	//     "$ref": "LogView"
12269	//   },
12270	//   "scopes": [
12271	//     "https://www.googleapis.com/auth/cloud-platform",
12272	//     "https://www.googleapis.com/auth/logging.admin"
12273	//   ]
12274	// }
12275
12276}
12277
12278// method id "logging.folders.locations.buckets.views.delete":
12279
12280type FoldersLocationsBucketsViewsDeleteCall struct {
12281	s          *Service
12282	name       string
12283	urlParams_ gensupport.URLParams
12284	ctx_       context.Context
12285	header_    http.Header
12286}
12287
12288// Delete: Deletes a view on a log bucket.
12289//
12290// - name: The full resource name of the view to delete:
12291//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
12292//   iews/[VIEW_ID]" For
12293//   example:"projects/my-project/locations/global/buckets/my-bucket/view
12294//   s/my-view".
12295func (r *FoldersLocationsBucketsViewsService) Delete(name string) *FoldersLocationsBucketsViewsDeleteCall {
12296	c := &FoldersLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12297	c.name = name
12298	return c
12299}
12300
12301// Fields allows partial responses to be retrieved. See
12302// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12303// for more information.
12304func (c *FoldersLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsDeleteCall {
12305	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12306	return c
12307}
12308
12309// Context sets the context to be used in this call's Do method. Any
12310// pending HTTP request will be aborted if the provided context is
12311// canceled.
12312func (c *FoldersLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsDeleteCall {
12313	c.ctx_ = ctx
12314	return c
12315}
12316
12317// Header returns an http.Header that can be modified by the caller to
12318// add HTTP headers to the request.
12319func (c *FoldersLocationsBucketsViewsDeleteCall) Header() http.Header {
12320	if c.header_ == nil {
12321		c.header_ = make(http.Header)
12322	}
12323	return c.header_
12324}
12325
12326func (c *FoldersLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
12327	reqHeaders := make(http.Header)
12328	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12329	for k, v := range c.header_ {
12330		reqHeaders[k] = v
12331	}
12332	reqHeaders.Set("User-Agent", c.s.userAgent())
12333	var body io.Reader = nil
12334	c.urlParams_.Set("alt", alt)
12335	c.urlParams_.Set("prettyPrint", "false")
12336	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
12337	urls += "?" + c.urlParams_.Encode()
12338	req, err := http.NewRequest("DELETE", urls, body)
12339	if err != nil {
12340		return nil, err
12341	}
12342	req.Header = reqHeaders
12343	googleapi.Expand(req.URL, map[string]string{
12344		"name": c.name,
12345	})
12346	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12347}
12348
12349// Do executes the "logging.folders.locations.buckets.views.delete" call.
12350// Exactly one of *Empty or error will be non-nil. Any non-2xx status
12351// code is an error. Response headers are in either
12352// *Empty.ServerResponse.Header or (if a response was returned at all)
12353// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12354// check whether the returned error was because http.StatusNotModified
12355// was returned.
12356func (c *FoldersLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12357	gensupport.SetOptions(c.urlParams_, opts...)
12358	res, err := c.doRequest("json")
12359	if res != nil && res.StatusCode == http.StatusNotModified {
12360		if res.Body != nil {
12361			res.Body.Close()
12362		}
12363		return nil, &googleapi.Error{
12364			Code:   res.StatusCode,
12365			Header: res.Header,
12366		}
12367	}
12368	if err != nil {
12369		return nil, err
12370	}
12371	defer googleapi.CloseBody(res)
12372	if err := googleapi.CheckResponse(res); err != nil {
12373		return nil, err
12374	}
12375	ret := &Empty{
12376		ServerResponse: googleapi.ServerResponse{
12377			Header:         res.Header,
12378			HTTPStatusCode: res.StatusCode,
12379		},
12380	}
12381	target := &ret
12382	if err := gensupport.DecodeResponse(target, res); err != nil {
12383		return nil, err
12384	}
12385	return ret, nil
12386	// {
12387	//   "description": "Deletes a view on a log bucket.",
12388	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
12389	//   "httpMethod": "DELETE",
12390	//   "id": "logging.folders.locations.buckets.views.delete",
12391	//   "parameterOrder": [
12392	//     "name"
12393	//   ],
12394	//   "parameters": {
12395	//     "name": {
12396	//       "description": "Required. The full resource name of the view to delete: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
12397	//       "location": "path",
12398	//       "pattern": "^folders/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
12399	//       "required": true,
12400	//       "type": "string"
12401	//     }
12402	//   },
12403	//   "path": "v2/{+name}",
12404	//   "response": {
12405	//     "$ref": "Empty"
12406	//   },
12407	//   "scopes": [
12408	//     "https://www.googleapis.com/auth/cloud-platform",
12409	//     "https://www.googleapis.com/auth/logging.admin"
12410	//   ]
12411	// }
12412
12413}
12414
12415// method id "logging.folders.locations.buckets.views.get":
12416
12417type FoldersLocationsBucketsViewsGetCall struct {
12418	s            *Service
12419	name         string
12420	urlParams_   gensupport.URLParams
12421	ifNoneMatch_ string
12422	ctx_         context.Context
12423	header_      http.Header
12424}
12425
12426// Get: Gets a view on a log bucket..
12427//
12428// - name: The resource name of the policy:
12429//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
12430//   iews/[VIEW_ID]" For
12431//   example:"projects/my-project/locations/global/buckets/my-bucket/view
12432//   s/my-view".
12433func (r *FoldersLocationsBucketsViewsService) Get(name string) *FoldersLocationsBucketsViewsGetCall {
12434	c := &FoldersLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12435	c.name = name
12436	return c
12437}
12438
12439// Fields allows partial responses to be retrieved. See
12440// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12441// for more information.
12442func (c *FoldersLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsGetCall {
12443	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12444	return c
12445}
12446
12447// IfNoneMatch sets the optional parameter which makes the operation
12448// fail if the object's ETag matches the given value. This is useful for
12449// getting updates only after the object has changed since the last
12450// request. Use googleapi.IsNotModified to check whether the response
12451// error from Do is the result of In-None-Match.
12452func (c *FoldersLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsViewsGetCall {
12453	c.ifNoneMatch_ = entityTag
12454	return c
12455}
12456
12457// Context sets the context to be used in this call's Do method. Any
12458// pending HTTP request will be aborted if the provided context is
12459// canceled.
12460func (c *FoldersLocationsBucketsViewsGetCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsGetCall {
12461	c.ctx_ = ctx
12462	return c
12463}
12464
12465// Header returns an http.Header that can be modified by the caller to
12466// add HTTP headers to the request.
12467func (c *FoldersLocationsBucketsViewsGetCall) Header() http.Header {
12468	if c.header_ == nil {
12469		c.header_ = make(http.Header)
12470	}
12471	return c.header_
12472}
12473
12474func (c *FoldersLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
12475	reqHeaders := make(http.Header)
12476	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12477	for k, v := range c.header_ {
12478		reqHeaders[k] = v
12479	}
12480	reqHeaders.Set("User-Agent", c.s.userAgent())
12481	if c.ifNoneMatch_ != "" {
12482		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12483	}
12484	var body io.Reader = nil
12485	c.urlParams_.Set("alt", alt)
12486	c.urlParams_.Set("prettyPrint", "false")
12487	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
12488	urls += "?" + c.urlParams_.Encode()
12489	req, err := http.NewRequest("GET", urls, body)
12490	if err != nil {
12491		return nil, err
12492	}
12493	req.Header = reqHeaders
12494	googleapi.Expand(req.URL, map[string]string{
12495		"name": c.name,
12496	})
12497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12498}
12499
12500// Do executes the "logging.folders.locations.buckets.views.get" call.
12501// Exactly one of *LogView or error will be non-nil. Any non-2xx status
12502// code is an error. Response headers are in either
12503// *LogView.ServerResponse.Header or (if a response was returned at all)
12504// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12505// check whether the returned error was because http.StatusNotModified
12506// was returned.
12507func (c *FoldersLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
12508	gensupport.SetOptions(c.urlParams_, opts...)
12509	res, err := c.doRequest("json")
12510	if res != nil && res.StatusCode == http.StatusNotModified {
12511		if res.Body != nil {
12512			res.Body.Close()
12513		}
12514		return nil, &googleapi.Error{
12515			Code:   res.StatusCode,
12516			Header: res.Header,
12517		}
12518	}
12519	if err != nil {
12520		return nil, err
12521	}
12522	defer googleapi.CloseBody(res)
12523	if err := googleapi.CheckResponse(res); err != nil {
12524		return nil, err
12525	}
12526	ret := &LogView{
12527		ServerResponse: googleapi.ServerResponse{
12528			Header:         res.Header,
12529			HTTPStatusCode: res.StatusCode,
12530		},
12531	}
12532	target := &ret
12533	if err := gensupport.DecodeResponse(target, res); err != nil {
12534		return nil, err
12535	}
12536	return ret, nil
12537	// {
12538	//   "description": "Gets a view on a log bucket..",
12539	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
12540	//   "httpMethod": "GET",
12541	//   "id": "logging.folders.locations.buckets.views.get",
12542	//   "parameterOrder": [
12543	//     "name"
12544	//   ],
12545	//   "parameters": {
12546	//     "name": {
12547	//       "description": "Required. The resource name of the policy: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
12548	//       "location": "path",
12549	//       "pattern": "^folders/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
12550	//       "required": true,
12551	//       "type": "string"
12552	//     }
12553	//   },
12554	//   "path": "v2/{+name}",
12555	//   "response": {
12556	//     "$ref": "LogView"
12557	//   },
12558	//   "scopes": [
12559	//     "https://www.googleapis.com/auth/cloud-platform",
12560	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
12561	//     "https://www.googleapis.com/auth/logging.admin",
12562	//     "https://www.googleapis.com/auth/logging.read"
12563	//   ]
12564	// }
12565
12566}
12567
12568// method id "logging.folders.locations.buckets.views.list":
12569
12570type FoldersLocationsBucketsViewsListCall struct {
12571	s            *Service
12572	parent       string
12573	urlParams_   gensupport.URLParams
12574	ifNoneMatch_ string
12575	ctx_         context.Context
12576	header_      http.Header
12577}
12578
12579// List: Lists views on a log bucket.
12580//
12581// - parent: The bucket whose views are to be listed:
12582//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
12583func (r *FoldersLocationsBucketsViewsService) List(parent string) *FoldersLocationsBucketsViewsListCall {
12584	c := &FoldersLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12585	c.parent = parent
12586	return c
12587}
12588
12589// PageSize sets the optional parameter "pageSize": The maximum number
12590// of results to return from this request.Non-positive values are
12591// ignored. The presence of nextPageToken in the response indicates that
12592// more results might be available.
12593func (c *FoldersLocationsBucketsViewsListCall) PageSize(pageSize int64) *FoldersLocationsBucketsViewsListCall {
12594	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12595	return c
12596}
12597
12598// PageToken sets the optional parameter "pageToken": If present, then
12599// retrieve the next batch of results from the preceding call to this
12600// method. pageToken must be the value of nextPageToken from the
12601// previous response. The values of other method parameters should be
12602// identical to those in the previous call.
12603func (c *FoldersLocationsBucketsViewsListCall) PageToken(pageToken string) *FoldersLocationsBucketsViewsListCall {
12604	c.urlParams_.Set("pageToken", pageToken)
12605	return c
12606}
12607
12608// Fields allows partial responses to be retrieved. See
12609// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12610// for more information.
12611func (c *FoldersLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsListCall {
12612	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12613	return c
12614}
12615
12616// IfNoneMatch sets the optional parameter which makes the operation
12617// fail if the object's ETag matches the given value. This is useful for
12618// getting updates only after the object has changed since the last
12619// request. Use googleapi.IsNotModified to check whether the response
12620// error from Do is the result of In-None-Match.
12621func (c *FoldersLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsViewsListCall {
12622	c.ifNoneMatch_ = entityTag
12623	return c
12624}
12625
12626// Context sets the context to be used in this call's Do method. Any
12627// pending HTTP request will be aborted if the provided context is
12628// canceled.
12629func (c *FoldersLocationsBucketsViewsListCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsListCall {
12630	c.ctx_ = ctx
12631	return c
12632}
12633
12634// Header returns an http.Header that can be modified by the caller to
12635// add HTTP headers to the request.
12636func (c *FoldersLocationsBucketsViewsListCall) Header() http.Header {
12637	if c.header_ == nil {
12638		c.header_ = make(http.Header)
12639	}
12640	return c.header_
12641}
12642
12643func (c *FoldersLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
12644	reqHeaders := make(http.Header)
12645	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12646	for k, v := range c.header_ {
12647		reqHeaders[k] = v
12648	}
12649	reqHeaders.Set("User-Agent", c.s.userAgent())
12650	if c.ifNoneMatch_ != "" {
12651		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12652	}
12653	var body io.Reader = nil
12654	c.urlParams_.Set("alt", alt)
12655	c.urlParams_.Set("prettyPrint", "false")
12656	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
12657	urls += "?" + c.urlParams_.Encode()
12658	req, err := http.NewRequest("GET", urls, body)
12659	if err != nil {
12660		return nil, err
12661	}
12662	req.Header = reqHeaders
12663	googleapi.Expand(req.URL, map[string]string{
12664		"parent": c.parent,
12665	})
12666	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12667}
12668
12669// Do executes the "logging.folders.locations.buckets.views.list" call.
12670// Exactly one of *ListViewsResponse or error will be non-nil. Any
12671// non-2xx status code is an error. Response headers are in either
12672// *ListViewsResponse.ServerResponse.Header or (if a response was
12673// returned at all) in error.(*googleapi.Error).Header. Use
12674// googleapi.IsNotModified to check whether the returned error was
12675// because http.StatusNotModified was returned.
12676func (c *FoldersLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
12677	gensupport.SetOptions(c.urlParams_, opts...)
12678	res, err := c.doRequest("json")
12679	if res != nil && res.StatusCode == http.StatusNotModified {
12680		if res.Body != nil {
12681			res.Body.Close()
12682		}
12683		return nil, &googleapi.Error{
12684			Code:   res.StatusCode,
12685			Header: res.Header,
12686		}
12687	}
12688	if err != nil {
12689		return nil, err
12690	}
12691	defer googleapi.CloseBody(res)
12692	if err := googleapi.CheckResponse(res); err != nil {
12693		return nil, err
12694	}
12695	ret := &ListViewsResponse{
12696		ServerResponse: googleapi.ServerResponse{
12697			Header:         res.Header,
12698			HTTPStatusCode: res.StatusCode,
12699		},
12700	}
12701	target := &ret
12702	if err := gensupport.DecodeResponse(target, res); err != nil {
12703		return nil, err
12704	}
12705	return ret, nil
12706	// {
12707	//   "description": "Lists views on a log bucket.",
12708	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views",
12709	//   "httpMethod": "GET",
12710	//   "id": "logging.folders.locations.buckets.views.list",
12711	//   "parameterOrder": [
12712	//     "parent"
12713	//   ],
12714	//   "parameters": {
12715	//     "pageSize": {
12716	//       "description": "Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
12717	//       "format": "int32",
12718	//       "location": "query",
12719	//       "type": "integer"
12720	//     },
12721	//     "pageToken": {
12722	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
12723	//       "location": "query",
12724	//       "type": "string"
12725	//     },
12726	//     "parent": {
12727	//       "description": "Required. The bucket whose views are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" ",
12728	//       "location": "path",
12729	//       "pattern": "^folders/[^/]+/locations/[^/]+/buckets/[^/]+$",
12730	//       "required": true,
12731	//       "type": "string"
12732	//     }
12733	//   },
12734	//   "path": "v2/{+parent}/views",
12735	//   "response": {
12736	//     "$ref": "ListViewsResponse"
12737	//   },
12738	//   "scopes": [
12739	//     "https://www.googleapis.com/auth/cloud-platform",
12740	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
12741	//     "https://www.googleapis.com/auth/logging.admin",
12742	//     "https://www.googleapis.com/auth/logging.read"
12743	//   ]
12744	// }
12745
12746}
12747
12748// Pages invokes f for each page of results.
12749// A non-nil error returned from f will halt the iteration.
12750// The provided context supersedes any context provided to the Context method.
12751func (c *FoldersLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
12752	c.ctx_ = ctx
12753	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12754	for {
12755		x, err := c.Do()
12756		if err != nil {
12757			return err
12758		}
12759		if err := f(x); err != nil {
12760			return err
12761		}
12762		if x.NextPageToken == "" {
12763			return nil
12764		}
12765		c.PageToken(x.NextPageToken)
12766	}
12767}
12768
12769// method id "logging.folders.locations.buckets.views.patch":
12770
12771type FoldersLocationsBucketsViewsPatchCall struct {
12772	s          *Service
12773	name       string
12774	logview    *LogView
12775	urlParams_ gensupport.URLParams
12776	ctx_       context.Context
12777	header_    http.Header
12778}
12779
12780// Patch: Updates a view on a log bucket. This method replaces the
12781// following fields in the existing view with values from the new view:
12782// filter.
12783//
12784// - name: The full resource name of the view to update
12785//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
12786//   iews/[VIEW_ID]" For
12787//   example:"projects/my-project/locations/global/buckets/my-bucket/view
12788//   s/my-view".
12789func (r *FoldersLocationsBucketsViewsService) Patch(name string, logview *LogView) *FoldersLocationsBucketsViewsPatchCall {
12790	c := &FoldersLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12791	c.name = name
12792	c.logview = logview
12793	return c
12794}
12795
12796// UpdateMask sets the optional parameter "updateMask": Field mask that
12797// specifies the fields in view that need an update. A field will be
12798// overwritten if, and only if, it is in the update mask. name and
12799// output only fields cannot be updated.For a detailed FieldMask
12800// definition, see
12801// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
12802// example: updateMask=filter
12803func (c *FoldersLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *FoldersLocationsBucketsViewsPatchCall {
12804	c.urlParams_.Set("updateMask", updateMask)
12805	return c
12806}
12807
12808// Fields allows partial responses to be retrieved. See
12809// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12810// for more information.
12811func (c *FoldersLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsPatchCall {
12812	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12813	return c
12814}
12815
12816// Context sets the context to be used in this call's Do method. Any
12817// pending HTTP request will be aborted if the provided context is
12818// canceled.
12819func (c *FoldersLocationsBucketsViewsPatchCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsPatchCall {
12820	c.ctx_ = ctx
12821	return c
12822}
12823
12824// Header returns an http.Header that can be modified by the caller to
12825// add HTTP headers to the request.
12826func (c *FoldersLocationsBucketsViewsPatchCall) Header() http.Header {
12827	if c.header_ == nil {
12828		c.header_ = make(http.Header)
12829	}
12830	return c.header_
12831}
12832
12833func (c *FoldersLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
12834	reqHeaders := make(http.Header)
12835	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12836	for k, v := range c.header_ {
12837		reqHeaders[k] = v
12838	}
12839	reqHeaders.Set("User-Agent", c.s.userAgent())
12840	var body io.Reader = nil
12841	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
12842	if err != nil {
12843		return nil, err
12844	}
12845	reqHeaders.Set("Content-Type", "application/json")
12846	c.urlParams_.Set("alt", alt)
12847	c.urlParams_.Set("prettyPrint", "false")
12848	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
12849	urls += "?" + c.urlParams_.Encode()
12850	req, err := http.NewRequest("PATCH", urls, body)
12851	if err != nil {
12852		return nil, err
12853	}
12854	req.Header = reqHeaders
12855	googleapi.Expand(req.URL, map[string]string{
12856		"name": c.name,
12857	})
12858	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12859}
12860
12861// Do executes the "logging.folders.locations.buckets.views.patch" call.
12862// Exactly one of *LogView or error will be non-nil. Any non-2xx status
12863// code is an error. Response headers are in either
12864// *LogView.ServerResponse.Header or (if a response was returned at all)
12865// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12866// check whether the returned error was because http.StatusNotModified
12867// was returned.
12868func (c *FoldersLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
12869	gensupport.SetOptions(c.urlParams_, opts...)
12870	res, err := c.doRequest("json")
12871	if res != nil && res.StatusCode == http.StatusNotModified {
12872		if res.Body != nil {
12873			res.Body.Close()
12874		}
12875		return nil, &googleapi.Error{
12876			Code:   res.StatusCode,
12877			Header: res.Header,
12878		}
12879	}
12880	if err != nil {
12881		return nil, err
12882	}
12883	defer googleapi.CloseBody(res)
12884	if err := googleapi.CheckResponse(res); err != nil {
12885		return nil, err
12886	}
12887	ret := &LogView{
12888		ServerResponse: googleapi.ServerResponse{
12889			Header:         res.Header,
12890			HTTPStatusCode: res.StatusCode,
12891		},
12892	}
12893	target := &ret
12894	if err := gensupport.DecodeResponse(target, res); err != nil {
12895		return nil, err
12896	}
12897	return ret, nil
12898	// {
12899	//   "description": "Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter.",
12900	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
12901	//   "httpMethod": "PATCH",
12902	//   "id": "logging.folders.locations.buckets.views.patch",
12903	//   "parameterOrder": [
12904	//     "name"
12905	//   ],
12906	//   "parameters": {
12907	//     "name": {
12908	//       "description": "Required. The full resource name of the view to update \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
12909	//       "location": "path",
12910	//       "pattern": "^folders/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
12911	//       "required": true,
12912	//       "type": "string"
12913	//     },
12914	//     "updateMask": {
12915	//       "description": "Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
12916	//       "format": "google-fieldmask",
12917	//       "location": "query",
12918	//       "type": "string"
12919	//     }
12920	//   },
12921	//   "path": "v2/{+name}",
12922	//   "request": {
12923	//     "$ref": "LogView"
12924	//   },
12925	//   "response": {
12926	//     "$ref": "LogView"
12927	//   },
12928	//   "scopes": [
12929	//     "https://www.googleapis.com/auth/cloud-platform",
12930	//     "https://www.googleapis.com/auth/logging.admin"
12931	//   ]
12932	// }
12933
12934}
12935
12936// method id "logging.folders.locations.operations.cancel":
12937
12938type FoldersLocationsOperationsCancelCall struct {
12939	s                      *Service
12940	name                   string
12941	canceloperationrequest *CancelOperationRequest
12942	urlParams_             gensupport.URLParams
12943	ctx_                   context.Context
12944	header_                http.Header
12945}
12946
12947// Cancel: Starts asynchronous cancellation on a long-running operation.
12948// The server makes a best effort to cancel the operation, but success
12949// is not guaranteed. If the server doesn't support this method, it
12950// returns google.rpc.Code.UNIMPLEMENTED. Clients can use
12951// Operations.GetOperation or other methods to check whether the
12952// cancellation succeeded or whether the operation completed despite
12953// cancellation. On successful cancellation, the operation is not
12954// deleted; instead, it becomes an operation with an Operation.error
12955// value with a google.rpc.Status.code of 1, corresponding to
12956// Code.CANCELLED.
12957//
12958// - name: The name of the operation resource to be cancelled.
12959func (r *FoldersLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *FoldersLocationsOperationsCancelCall {
12960	c := &FoldersLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12961	c.name = name
12962	c.canceloperationrequest = canceloperationrequest
12963	return c
12964}
12965
12966// Fields allows partial responses to be retrieved. See
12967// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12968// for more information.
12969func (c *FoldersLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsCancelCall {
12970	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12971	return c
12972}
12973
12974// Context sets the context to be used in this call's Do method. Any
12975// pending HTTP request will be aborted if the provided context is
12976// canceled.
12977func (c *FoldersLocationsOperationsCancelCall) Context(ctx context.Context) *FoldersLocationsOperationsCancelCall {
12978	c.ctx_ = ctx
12979	return c
12980}
12981
12982// Header returns an http.Header that can be modified by the caller to
12983// add HTTP headers to the request.
12984func (c *FoldersLocationsOperationsCancelCall) Header() http.Header {
12985	if c.header_ == nil {
12986		c.header_ = make(http.Header)
12987	}
12988	return c.header_
12989}
12990
12991func (c *FoldersLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
12992	reqHeaders := make(http.Header)
12993	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12994	for k, v := range c.header_ {
12995		reqHeaders[k] = v
12996	}
12997	reqHeaders.Set("User-Agent", c.s.userAgent())
12998	var body io.Reader = nil
12999	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
13000	if err != nil {
13001		return nil, err
13002	}
13003	reqHeaders.Set("Content-Type", "application/json")
13004	c.urlParams_.Set("alt", alt)
13005	c.urlParams_.Set("prettyPrint", "false")
13006	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
13007	urls += "?" + c.urlParams_.Encode()
13008	req, err := http.NewRequest("POST", urls, body)
13009	if err != nil {
13010		return nil, err
13011	}
13012	req.Header = reqHeaders
13013	googleapi.Expand(req.URL, map[string]string{
13014		"name": c.name,
13015	})
13016	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13017}
13018
13019// Do executes the "logging.folders.locations.operations.cancel" call.
13020// Exactly one of *Empty or error will be non-nil. Any non-2xx status
13021// code is an error. Response headers are in either
13022// *Empty.ServerResponse.Header or (if a response was returned at all)
13023// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13024// check whether the returned error was because http.StatusNotModified
13025// was returned.
13026func (c *FoldersLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
13027	gensupport.SetOptions(c.urlParams_, opts...)
13028	res, err := c.doRequest("json")
13029	if res != nil && res.StatusCode == http.StatusNotModified {
13030		if res.Body != nil {
13031			res.Body.Close()
13032		}
13033		return nil, &googleapi.Error{
13034			Code:   res.StatusCode,
13035			Header: res.Header,
13036		}
13037	}
13038	if err != nil {
13039		return nil, err
13040	}
13041	defer googleapi.CloseBody(res)
13042	if err := googleapi.CheckResponse(res); err != nil {
13043		return nil, err
13044	}
13045	ret := &Empty{
13046		ServerResponse: googleapi.ServerResponse{
13047			Header:         res.Header,
13048			HTTPStatusCode: res.StatusCode,
13049		},
13050	}
13051	target := &ret
13052	if err := gensupport.DecodeResponse(target, res); err != nil {
13053		return nil, err
13054	}
13055	return ret, nil
13056	// {
13057	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.",
13058	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/operations/{operationsId}:cancel",
13059	//   "httpMethod": "POST",
13060	//   "id": "logging.folders.locations.operations.cancel",
13061	//   "parameterOrder": [
13062	//     "name"
13063	//   ],
13064	//   "parameters": {
13065	//     "name": {
13066	//       "description": "The name of the operation resource to be cancelled.",
13067	//       "location": "path",
13068	//       "pattern": "^folders/[^/]+/locations/[^/]+/operations/[^/]+$",
13069	//       "required": true,
13070	//       "type": "string"
13071	//     }
13072	//   },
13073	//   "path": "v2/{+name}:cancel",
13074	//   "request": {
13075	//     "$ref": "CancelOperationRequest"
13076	//   },
13077	//   "response": {
13078	//     "$ref": "Empty"
13079	//   },
13080	//   "scopes": [
13081	//     "https://www.googleapis.com/auth/cloud-platform",
13082	//     "https://www.googleapis.com/auth/logging.admin"
13083	//   ]
13084	// }
13085
13086}
13087
13088// method id "logging.folders.locations.operations.get":
13089
13090type FoldersLocationsOperationsGetCall struct {
13091	s            *Service
13092	name         string
13093	urlParams_   gensupport.URLParams
13094	ifNoneMatch_ string
13095	ctx_         context.Context
13096	header_      http.Header
13097}
13098
13099// Get: Gets the latest state of a long-running operation. Clients can
13100// use this method to poll the operation result at intervals as
13101// recommended by the API service.
13102//
13103// - name: The name of the operation resource.
13104func (r *FoldersLocationsOperationsService) Get(name string) *FoldersLocationsOperationsGetCall {
13105	c := &FoldersLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13106	c.name = name
13107	return c
13108}
13109
13110// Fields allows partial responses to be retrieved. See
13111// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13112// for more information.
13113func (c *FoldersLocationsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsGetCall {
13114	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13115	return c
13116}
13117
13118// IfNoneMatch sets the optional parameter which makes the operation
13119// fail if the object's ETag matches the given value. This is useful for
13120// getting updates only after the object has changed since the last
13121// request. Use googleapi.IsNotModified to check whether the response
13122// error from Do is the result of In-None-Match.
13123func (c *FoldersLocationsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOperationsGetCall {
13124	c.ifNoneMatch_ = entityTag
13125	return c
13126}
13127
13128// Context sets the context to be used in this call's Do method. Any
13129// pending HTTP request will be aborted if the provided context is
13130// canceled.
13131func (c *FoldersLocationsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOperationsGetCall {
13132	c.ctx_ = ctx
13133	return c
13134}
13135
13136// Header returns an http.Header that can be modified by the caller to
13137// add HTTP headers to the request.
13138func (c *FoldersLocationsOperationsGetCall) Header() http.Header {
13139	if c.header_ == nil {
13140		c.header_ = make(http.Header)
13141	}
13142	return c.header_
13143}
13144
13145func (c *FoldersLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
13146	reqHeaders := make(http.Header)
13147	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
13148	for k, v := range c.header_ {
13149		reqHeaders[k] = v
13150	}
13151	reqHeaders.Set("User-Agent", c.s.userAgent())
13152	if c.ifNoneMatch_ != "" {
13153		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13154	}
13155	var body io.Reader = nil
13156	c.urlParams_.Set("alt", alt)
13157	c.urlParams_.Set("prettyPrint", "false")
13158	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
13159	urls += "?" + c.urlParams_.Encode()
13160	req, err := http.NewRequest("GET", urls, body)
13161	if err != nil {
13162		return nil, err
13163	}
13164	req.Header = reqHeaders
13165	googleapi.Expand(req.URL, map[string]string{
13166		"name": c.name,
13167	})
13168	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13169}
13170
13171// Do executes the "logging.folders.locations.operations.get" call.
13172// Exactly one of *Operation or error will be non-nil. Any non-2xx
13173// status code is an error. Response headers are in either
13174// *Operation.ServerResponse.Header or (if a response was returned at
13175// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13176// to check whether the returned error was because
13177// http.StatusNotModified was returned.
13178func (c *FoldersLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13179	gensupport.SetOptions(c.urlParams_, opts...)
13180	res, err := c.doRequest("json")
13181	if res != nil && res.StatusCode == http.StatusNotModified {
13182		if res.Body != nil {
13183			res.Body.Close()
13184		}
13185		return nil, &googleapi.Error{
13186			Code:   res.StatusCode,
13187			Header: res.Header,
13188		}
13189	}
13190	if err != nil {
13191		return nil, err
13192	}
13193	defer googleapi.CloseBody(res)
13194	if err := googleapi.CheckResponse(res); err != nil {
13195		return nil, err
13196	}
13197	ret := &Operation{
13198		ServerResponse: googleapi.ServerResponse{
13199			Header:         res.Header,
13200			HTTPStatusCode: res.StatusCode,
13201		},
13202	}
13203	target := &ret
13204	if err := gensupport.DecodeResponse(target, res); err != nil {
13205		return nil, err
13206	}
13207	return ret, nil
13208	// {
13209	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
13210	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/operations/{operationsId}",
13211	//   "httpMethod": "GET",
13212	//   "id": "logging.folders.locations.operations.get",
13213	//   "parameterOrder": [
13214	//     "name"
13215	//   ],
13216	//   "parameters": {
13217	//     "name": {
13218	//       "description": "The name of the operation resource.",
13219	//       "location": "path",
13220	//       "pattern": "^folders/[^/]+/locations/[^/]+/operations/[^/]+$",
13221	//       "required": true,
13222	//       "type": "string"
13223	//     }
13224	//   },
13225	//   "path": "v2/{+name}",
13226	//   "response": {
13227	//     "$ref": "Operation"
13228	//   },
13229	//   "scopes": [
13230	//     "https://www.googleapis.com/auth/cloud-platform",
13231	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
13232	//     "https://www.googleapis.com/auth/logging.admin",
13233	//     "https://www.googleapis.com/auth/logging.read"
13234	//   ]
13235	// }
13236
13237}
13238
13239// method id "logging.folders.locations.operations.list":
13240
13241type FoldersLocationsOperationsListCall struct {
13242	s            *Service
13243	name         string
13244	urlParams_   gensupport.URLParams
13245	ifNoneMatch_ string
13246	ctx_         context.Context
13247	header_      http.Header
13248}
13249
13250// List: Lists operations that match the specified filter in the
13251// request. If the server doesn't support this method, it returns
13252// UNIMPLEMENTED.NOTE: the name binding allows API services to override
13253// the binding to use different resource name schemes, such as
13254// users/*/operations. To override the binding, API services can add a
13255// binding such as "/v1/{name=users/*}/operations" to their service
13256// configuration. For backwards compatibility, the default name includes
13257// the operations collection id, however overriding users must ensure
13258// the name binding is the parent resource, without the operations
13259// collection id.
13260//
13261// - name: The name of the operation's parent resource.
13262func (r *FoldersLocationsOperationsService) List(name string) *FoldersLocationsOperationsListCall {
13263	c := &FoldersLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13264	c.name = name
13265	return c
13266}
13267
13268// Filter sets the optional parameter "filter": The standard list
13269// filter.
13270func (c *FoldersLocationsOperationsListCall) Filter(filter string) *FoldersLocationsOperationsListCall {
13271	c.urlParams_.Set("filter", filter)
13272	return c
13273}
13274
13275// PageSize sets the optional parameter "pageSize": The standard list
13276// page size.
13277func (c *FoldersLocationsOperationsListCall) PageSize(pageSize int64) *FoldersLocationsOperationsListCall {
13278	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13279	return c
13280}
13281
13282// PageToken sets the optional parameter "pageToken": The standard list
13283// page token.
13284func (c *FoldersLocationsOperationsListCall) PageToken(pageToken string) *FoldersLocationsOperationsListCall {
13285	c.urlParams_.Set("pageToken", pageToken)
13286	return c
13287}
13288
13289// Fields allows partial responses to be retrieved. See
13290// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13291// for more information.
13292func (c *FoldersLocationsOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsListCall {
13293	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13294	return c
13295}
13296
13297// IfNoneMatch sets the optional parameter which makes the operation
13298// fail if the object's ETag matches the given value. This is useful for
13299// getting updates only after the object has changed since the last
13300// request. Use googleapi.IsNotModified to check whether the response
13301// error from Do is the result of In-None-Match.
13302func (c *FoldersLocationsOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsOperationsListCall {
13303	c.ifNoneMatch_ = entityTag
13304	return c
13305}
13306
13307// Context sets the context to be used in this call's Do method. Any
13308// pending HTTP request will be aborted if the provided context is
13309// canceled.
13310func (c *FoldersLocationsOperationsListCall) Context(ctx context.Context) *FoldersLocationsOperationsListCall {
13311	c.ctx_ = ctx
13312	return c
13313}
13314
13315// Header returns an http.Header that can be modified by the caller to
13316// add HTTP headers to the request.
13317func (c *FoldersLocationsOperationsListCall) Header() http.Header {
13318	if c.header_ == nil {
13319		c.header_ = make(http.Header)
13320	}
13321	return c.header_
13322}
13323
13324func (c *FoldersLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
13325	reqHeaders := make(http.Header)
13326	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
13327	for k, v := range c.header_ {
13328		reqHeaders[k] = v
13329	}
13330	reqHeaders.Set("User-Agent", c.s.userAgent())
13331	if c.ifNoneMatch_ != "" {
13332		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13333	}
13334	var body io.Reader = nil
13335	c.urlParams_.Set("alt", alt)
13336	c.urlParams_.Set("prettyPrint", "false")
13337	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
13338	urls += "?" + c.urlParams_.Encode()
13339	req, err := http.NewRequest("GET", urls, body)
13340	if err != nil {
13341		return nil, err
13342	}
13343	req.Header = reqHeaders
13344	googleapi.Expand(req.URL, map[string]string{
13345		"name": c.name,
13346	})
13347	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13348}
13349
13350// Do executes the "logging.folders.locations.operations.list" call.
13351// Exactly one of *ListOperationsResponse or error will be non-nil. Any
13352// non-2xx status code is an error. Response headers are in either
13353// *ListOperationsResponse.ServerResponse.Header or (if a response was
13354// returned at all) in error.(*googleapi.Error).Header. Use
13355// googleapi.IsNotModified to check whether the returned error was
13356// because http.StatusNotModified was returned.
13357func (c *FoldersLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
13358	gensupport.SetOptions(c.urlParams_, opts...)
13359	res, err := c.doRequest("json")
13360	if res != nil && res.StatusCode == http.StatusNotModified {
13361		if res.Body != nil {
13362			res.Body.Close()
13363		}
13364		return nil, &googleapi.Error{
13365			Code:   res.StatusCode,
13366			Header: res.Header,
13367		}
13368	}
13369	if err != nil {
13370		return nil, err
13371	}
13372	defer googleapi.CloseBody(res)
13373	if err := googleapi.CheckResponse(res); err != nil {
13374		return nil, err
13375	}
13376	ret := &ListOperationsResponse{
13377		ServerResponse: googleapi.ServerResponse{
13378			Header:         res.Header,
13379			HTTPStatusCode: res.StatusCode,
13380		},
13381	}
13382	target := &ret
13383	if err := gensupport.DecodeResponse(target, res); err != nil {
13384		return nil, err
13385	}
13386	return ret, nil
13387	// {
13388	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
13389	//   "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/operations",
13390	//   "httpMethod": "GET",
13391	//   "id": "logging.folders.locations.operations.list",
13392	//   "parameterOrder": [
13393	//     "name"
13394	//   ],
13395	//   "parameters": {
13396	//     "filter": {
13397	//       "description": "The standard list filter.",
13398	//       "location": "query",
13399	//       "type": "string"
13400	//     },
13401	//     "name": {
13402	//       "description": "The name of the operation's parent resource.",
13403	//       "location": "path",
13404	//       "pattern": "^folders/[^/]+/locations/[^/]+$",
13405	//       "required": true,
13406	//       "type": "string"
13407	//     },
13408	//     "pageSize": {
13409	//       "description": "The standard list page size.",
13410	//       "format": "int32",
13411	//       "location": "query",
13412	//       "type": "integer"
13413	//     },
13414	//     "pageToken": {
13415	//       "description": "The standard list page token.",
13416	//       "location": "query",
13417	//       "type": "string"
13418	//     }
13419	//   },
13420	//   "path": "v2/{+name}/operations",
13421	//   "response": {
13422	//     "$ref": "ListOperationsResponse"
13423	//   },
13424	//   "scopes": [
13425	//     "https://www.googleapis.com/auth/cloud-platform",
13426	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
13427	//     "https://www.googleapis.com/auth/logging.admin",
13428	//     "https://www.googleapis.com/auth/logging.read"
13429	//   ]
13430	// }
13431
13432}
13433
13434// Pages invokes f for each page of results.
13435// A non-nil error returned from f will halt the iteration.
13436// The provided context supersedes any context provided to the Context method.
13437func (c *FoldersLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
13438	c.ctx_ = ctx
13439	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13440	for {
13441		x, err := c.Do()
13442		if err != nil {
13443			return err
13444		}
13445		if err := f(x); err != nil {
13446			return err
13447		}
13448		if x.NextPageToken == "" {
13449			return nil
13450		}
13451		c.PageToken(x.NextPageToken)
13452	}
13453}
13454
13455// method id "logging.folders.logs.delete":
13456
13457type FoldersLogsDeleteCall struct {
13458	s          *Service
13459	logName    string
13460	urlParams_ gensupport.URLParams
13461	ctx_       context.Context
13462	header_    http.Header
13463}
13464
13465// Delete: Deletes all the log entries in a log for the _Default Log
13466// Bucket. The log reappears if it receives new entries. Log entries
13467// written shortly before the delete operation might not be deleted.
13468// Entries received after the delete operation with a timestamp before
13469// the operation will be deleted.
13470//
13471// - logName: The resource name of the log to delete:
13472//   projects/[PROJECT_ID]/logs/[LOG_ID]
13473//   organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
13474//   billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
13475//   folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
13476//   example, "projects/my-project-id/logs/syslog",
13477//   "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For
13478//   more information about log names, see LogEntry.
13479func (r *FoldersLogsService) Delete(logName string) *FoldersLogsDeleteCall {
13480	c := &FoldersLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13481	c.logName = logName
13482	return c
13483}
13484
13485// Fields allows partial responses to be retrieved. See
13486// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13487// for more information.
13488func (c *FoldersLogsDeleteCall) Fields(s ...googleapi.Field) *FoldersLogsDeleteCall {
13489	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13490	return c
13491}
13492
13493// Context sets the context to be used in this call's Do method. Any
13494// pending HTTP request will be aborted if the provided context is
13495// canceled.
13496func (c *FoldersLogsDeleteCall) Context(ctx context.Context) *FoldersLogsDeleteCall {
13497	c.ctx_ = ctx
13498	return c
13499}
13500
13501// Header returns an http.Header that can be modified by the caller to
13502// add HTTP headers to the request.
13503func (c *FoldersLogsDeleteCall) Header() http.Header {
13504	if c.header_ == nil {
13505		c.header_ = make(http.Header)
13506	}
13507	return c.header_
13508}
13509
13510func (c *FoldersLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
13511	reqHeaders := make(http.Header)
13512	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
13513	for k, v := range c.header_ {
13514		reqHeaders[k] = v
13515	}
13516	reqHeaders.Set("User-Agent", c.s.userAgent())
13517	var body io.Reader = nil
13518	c.urlParams_.Set("alt", alt)
13519	c.urlParams_.Set("prettyPrint", "false")
13520	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
13521	urls += "?" + c.urlParams_.Encode()
13522	req, err := http.NewRequest("DELETE", urls, body)
13523	if err != nil {
13524		return nil, err
13525	}
13526	req.Header = reqHeaders
13527	googleapi.Expand(req.URL, map[string]string{
13528		"logName": c.logName,
13529	})
13530	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13531}
13532
13533// Do executes the "logging.folders.logs.delete" call.
13534// Exactly one of *Empty or error will be non-nil. Any non-2xx status
13535// code is an error. Response headers are in either
13536// *Empty.ServerResponse.Header or (if a response was returned at all)
13537// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13538// check whether the returned error was because http.StatusNotModified
13539// was returned.
13540func (c *FoldersLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
13541	gensupport.SetOptions(c.urlParams_, opts...)
13542	res, err := c.doRequest("json")
13543	if res != nil && res.StatusCode == http.StatusNotModified {
13544		if res.Body != nil {
13545			res.Body.Close()
13546		}
13547		return nil, &googleapi.Error{
13548			Code:   res.StatusCode,
13549			Header: res.Header,
13550		}
13551	}
13552	if err != nil {
13553		return nil, err
13554	}
13555	defer googleapi.CloseBody(res)
13556	if err := googleapi.CheckResponse(res); err != nil {
13557		return nil, err
13558	}
13559	ret := &Empty{
13560		ServerResponse: googleapi.ServerResponse{
13561			Header:         res.Header,
13562			HTTPStatusCode: res.StatusCode,
13563		},
13564	}
13565	target := &ret
13566	if err := gensupport.DecodeResponse(target, res); err != nil {
13567		return nil, err
13568	}
13569	return ret, nil
13570	// {
13571	//   "description": "Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.",
13572	//   "flatPath": "v2/folders/{foldersId}/logs/{logsId}",
13573	//   "httpMethod": "DELETE",
13574	//   "id": "logging.folders.logs.delete",
13575	//   "parameterOrder": [
13576	//     "logName"
13577	//   ],
13578	//   "parameters": {
13579	//     "logName": {
13580	//       "description": "Required. The resource name of the log to delete: projects/[PROJECT_ID]/logs/[LOG_ID] organizations/[ORGANIZATION_ID]/logs/[LOG_ID] billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/123/logs/cloudaudit.googleapis.com%2Factivity\".For more information about log names, see LogEntry.",
13581	//       "location": "path",
13582	//       "pattern": "^folders/[^/]+/logs/[^/]+$",
13583	//       "required": true,
13584	//       "type": "string"
13585	//     }
13586	//   },
13587	//   "path": "v2/{+logName}",
13588	//   "response": {
13589	//     "$ref": "Empty"
13590	//   },
13591	//   "scopes": [
13592	//     "https://www.googleapis.com/auth/cloud-platform",
13593	//     "https://www.googleapis.com/auth/logging.admin"
13594	//   ]
13595	// }
13596
13597}
13598
13599// method id "logging.folders.logs.list":
13600
13601type FoldersLogsListCall struct {
13602	s            *Service
13603	parent       string
13604	urlParams_   gensupport.URLParams
13605	ifNoneMatch_ string
13606	ctx_         context.Context
13607	header_      http.Header
13608}
13609
13610// List: Lists the logs in projects, organizations, folders, or billing
13611// accounts. Only logs that have entries are listed.
13612//
13613// - parent: The resource name that owns the logs: projects/[PROJECT_ID]
13614//   organizations/[ORGANIZATION_ID]
13615//   billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID].
13616func (r *FoldersLogsService) List(parent string) *FoldersLogsListCall {
13617	c := &FoldersLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13618	c.parent = parent
13619	return c
13620}
13621
13622// PageSize sets the optional parameter "pageSize": The maximum number
13623// of results to return from this request. Non-positive values are
13624// ignored. The presence of nextPageToken in the response indicates that
13625// more results might be available.
13626func (c *FoldersLogsListCall) PageSize(pageSize int64) *FoldersLogsListCall {
13627	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13628	return c
13629}
13630
13631// PageToken sets the optional parameter "pageToken": If present, then
13632// retrieve the next batch of results from the preceding call to this
13633// method. pageToken must be the value of nextPageToken from the
13634// previous response. The values of other method parameters should be
13635// identical to those in the previous call.
13636func (c *FoldersLogsListCall) PageToken(pageToken string) *FoldersLogsListCall {
13637	c.urlParams_.Set("pageToken", pageToken)
13638	return c
13639}
13640
13641// ResourceNames sets the optional parameter "resourceNames": The
13642// resource name that owns the logs:
13643// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/view
13644// s/[VIEW_ID]
13645// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKE
13646// T_ID]/views/[VIEW_ID]
13647// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[
13648// BUCKET_ID]/views/[VIEW_ID]
13649// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/
13650// [VIEW_ID]To support legacy queries, it could also be:
13651// projects/[PROJECT_ID] organizations/[ORGANIZATION_ID]
13652// billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]
13653func (c *FoldersLogsListCall) ResourceNames(resourceNames ...string) *FoldersLogsListCall {
13654	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
13655	return c
13656}
13657
13658// Fields allows partial responses to be retrieved. See
13659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13660// for more information.
13661func (c *FoldersLogsListCall) Fields(s ...googleapi.Field) *FoldersLogsListCall {
13662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13663	return c
13664}
13665
13666// IfNoneMatch sets the optional parameter which makes the operation
13667// fail if the object's ETag matches the given value. This is useful for
13668// getting updates only after the object has changed since the last
13669// request. Use googleapi.IsNotModified to check whether the response
13670// error from Do is the result of In-None-Match.
13671func (c *FoldersLogsListCall) IfNoneMatch(entityTag string) *FoldersLogsListCall {
13672	c.ifNoneMatch_ = entityTag
13673	return c
13674}
13675
13676// Context sets the context to be used in this call's Do method. Any
13677// pending HTTP request will be aborted if the provided context is
13678// canceled.
13679func (c *FoldersLogsListCall) Context(ctx context.Context) *FoldersLogsListCall {
13680	c.ctx_ = ctx
13681	return c
13682}
13683
13684// Header returns an http.Header that can be modified by the caller to
13685// add HTTP headers to the request.
13686func (c *FoldersLogsListCall) Header() http.Header {
13687	if c.header_ == nil {
13688		c.header_ = make(http.Header)
13689	}
13690	return c.header_
13691}
13692
13693func (c *FoldersLogsListCall) doRequest(alt string) (*http.Response, error) {
13694	reqHeaders := make(http.Header)
13695	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
13696	for k, v := range c.header_ {
13697		reqHeaders[k] = v
13698	}
13699	reqHeaders.Set("User-Agent", c.s.userAgent())
13700	if c.ifNoneMatch_ != "" {
13701		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13702	}
13703	var body io.Reader = nil
13704	c.urlParams_.Set("alt", alt)
13705	c.urlParams_.Set("prettyPrint", "false")
13706	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
13707	urls += "?" + c.urlParams_.Encode()
13708	req, err := http.NewRequest("GET", urls, body)
13709	if err != nil {
13710		return nil, err
13711	}
13712	req.Header = reqHeaders
13713	googleapi.Expand(req.URL, map[string]string{
13714		"parent": c.parent,
13715	})
13716	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13717}
13718
13719// Do executes the "logging.folders.logs.list" call.
13720// Exactly one of *ListLogsResponse or error will be non-nil. Any
13721// non-2xx status code is an error. Response headers are in either
13722// *ListLogsResponse.ServerResponse.Header or (if a response was
13723// returned at all) in error.(*googleapi.Error).Header. Use
13724// googleapi.IsNotModified to check whether the returned error was
13725// because http.StatusNotModified was returned.
13726func (c *FoldersLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
13727	gensupport.SetOptions(c.urlParams_, opts...)
13728	res, err := c.doRequest("json")
13729	if res != nil && res.StatusCode == http.StatusNotModified {
13730		if res.Body != nil {
13731			res.Body.Close()
13732		}
13733		return nil, &googleapi.Error{
13734			Code:   res.StatusCode,
13735			Header: res.Header,
13736		}
13737	}
13738	if err != nil {
13739		return nil, err
13740	}
13741	defer googleapi.CloseBody(res)
13742	if err := googleapi.CheckResponse(res); err != nil {
13743		return nil, err
13744	}
13745	ret := &ListLogsResponse{
13746		ServerResponse: googleapi.ServerResponse{
13747			Header:         res.Header,
13748			HTTPStatusCode: res.StatusCode,
13749		},
13750	}
13751	target := &ret
13752	if err := gensupport.DecodeResponse(target, res); err != nil {
13753		return nil, err
13754	}
13755	return ret, nil
13756	// {
13757	//   "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.",
13758	//   "flatPath": "v2/folders/{foldersId}/logs",
13759	//   "httpMethod": "GET",
13760	//   "id": "logging.folders.logs.list",
13761	//   "parameterOrder": [
13762	//     "parent"
13763	//   ],
13764	//   "parameters": {
13765	//     "pageSize": {
13766	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
13767	//       "format": "int32",
13768	//       "location": "query",
13769	//       "type": "integer"
13770	//     },
13771	//     "pageToken": {
13772	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
13773	//       "location": "query",
13774	//       "type": "string"
13775	//     },
13776	//     "parent": {
13777	//       "description": "Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]",
13778	//       "location": "path",
13779	//       "pattern": "^folders/[^/]+$",
13780	//       "required": true,
13781	//       "type": "string"
13782	//     },
13783	//     "resourceNames": {
13784	//       "description": "Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]",
13785	//       "location": "query",
13786	//       "repeated": true,
13787	//       "type": "string"
13788	//     }
13789	//   },
13790	//   "path": "v2/{+parent}/logs",
13791	//   "response": {
13792	//     "$ref": "ListLogsResponse"
13793	//   },
13794	//   "scopes": [
13795	//     "https://www.googleapis.com/auth/cloud-platform",
13796	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
13797	//     "https://www.googleapis.com/auth/logging.admin",
13798	//     "https://www.googleapis.com/auth/logging.read"
13799	//   ]
13800	// }
13801
13802}
13803
13804// Pages invokes f for each page of results.
13805// A non-nil error returned from f will halt the iteration.
13806// The provided context supersedes any context provided to the Context method.
13807func (c *FoldersLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
13808	c.ctx_ = ctx
13809	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13810	for {
13811		x, err := c.Do()
13812		if err != nil {
13813			return err
13814		}
13815		if err := f(x); err != nil {
13816			return err
13817		}
13818		if x.NextPageToken == "" {
13819			return nil
13820		}
13821		c.PageToken(x.NextPageToken)
13822	}
13823}
13824
13825// method id "logging.folders.sinks.create":
13826
13827type FoldersSinksCreateCall struct {
13828	s          *Service
13829	parent     string
13830	logsink    *LogSink
13831	urlParams_ gensupport.URLParams
13832	ctx_       context.Context
13833	header_    http.Header
13834}
13835
13836// Create: Creates a sink that exports specified log entries to a
13837// destination. The export of newly-ingested log entries begins
13838// immediately, unless the sink's writer_identity is not permitted to
13839// write to the destination. A sink can export log entries only from the
13840// resource owning the sink.
13841//
13842// - parent: The resource in which to create the sink:
13843//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
13844//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
13845//   examples:"projects/my-project" "organizations/123456789".
13846func (r *FoldersSinksService) Create(parent string, logsink *LogSink) *FoldersSinksCreateCall {
13847	c := &FoldersSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13848	c.parent = parent
13849	c.logsink = logsink
13850	return c
13851}
13852
13853// UniqueWriterIdentity sets the optional parameter
13854// "uniqueWriterIdentity": Determines the kind of IAM identity returned
13855// as writer_identity in the new sink. If this value is omitted or set
13856// to false, and if the sink's parent is a project, then the value
13857// returned as writer_identity is the same group or service account used
13858// by Cloud Logging before the addition of writer identities to this
13859// API. The sink's destination must be in the same project as the sink
13860// itself.If this field is set to true, or if the sink is owned by a
13861// non-project resource such as an organization, then the value of
13862// writer_identity will be a unique service account used only for
13863// exports from the new sink. For more information, see writer_identity
13864// in LogSink.
13865func (c *FoldersSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksCreateCall {
13866	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
13867	return c
13868}
13869
13870// Fields allows partial responses to be retrieved. See
13871// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13872// for more information.
13873func (c *FoldersSinksCreateCall) Fields(s ...googleapi.Field) *FoldersSinksCreateCall {
13874	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13875	return c
13876}
13877
13878// Context sets the context to be used in this call's Do method. Any
13879// pending HTTP request will be aborted if the provided context is
13880// canceled.
13881func (c *FoldersSinksCreateCall) Context(ctx context.Context) *FoldersSinksCreateCall {
13882	c.ctx_ = ctx
13883	return c
13884}
13885
13886// Header returns an http.Header that can be modified by the caller to
13887// add HTTP headers to the request.
13888func (c *FoldersSinksCreateCall) Header() http.Header {
13889	if c.header_ == nil {
13890		c.header_ = make(http.Header)
13891	}
13892	return c.header_
13893}
13894
13895func (c *FoldersSinksCreateCall) doRequest(alt string) (*http.Response, error) {
13896	reqHeaders := make(http.Header)
13897	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
13898	for k, v := range c.header_ {
13899		reqHeaders[k] = v
13900	}
13901	reqHeaders.Set("User-Agent", c.s.userAgent())
13902	var body io.Reader = nil
13903	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
13904	if err != nil {
13905		return nil, err
13906	}
13907	reqHeaders.Set("Content-Type", "application/json")
13908	c.urlParams_.Set("alt", alt)
13909	c.urlParams_.Set("prettyPrint", "false")
13910	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
13911	urls += "?" + c.urlParams_.Encode()
13912	req, err := http.NewRequest("POST", urls, body)
13913	if err != nil {
13914		return nil, err
13915	}
13916	req.Header = reqHeaders
13917	googleapi.Expand(req.URL, map[string]string{
13918		"parent": c.parent,
13919	})
13920	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13921}
13922
13923// Do executes the "logging.folders.sinks.create" call.
13924// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
13925// code is an error. Response headers are in either
13926// *LogSink.ServerResponse.Header or (if a response was returned at all)
13927// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13928// check whether the returned error was because http.StatusNotModified
13929// was returned.
13930func (c *FoldersSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
13931	gensupport.SetOptions(c.urlParams_, opts...)
13932	res, err := c.doRequest("json")
13933	if res != nil && res.StatusCode == http.StatusNotModified {
13934		if res.Body != nil {
13935			res.Body.Close()
13936		}
13937		return nil, &googleapi.Error{
13938			Code:   res.StatusCode,
13939			Header: res.Header,
13940		}
13941	}
13942	if err != nil {
13943		return nil, err
13944	}
13945	defer googleapi.CloseBody(res)
13946	if err := googleapi.CheckResponse(res); err != nil {
13947		return nil, err
13948	}
13949	ret := &LogSink{
13950		ServerResponse: googleapi.ServerResponse{
13951			Header:         res.Header,
13952			HTTPStatusCode: res.StatusCode,
13953		},
13954	}
13955	target := &ret
13956	if err := gensupport.DecodeResponse(target, res); err != nil {
13957		return nil, err
13958	}
13959	return ret, nil
13960	// {
13961	//   "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.",
13962	//   "flatPath": "v2/folders/{foldersId}/sinks",
13963	//   "httpMethod": "POST",
13964	//   "id": "logging.folders.sinks.create",
13965	//   "parameterOrder": [
13966	//     "parent"
13967	//   ],
13968	//   "parameters": {
13969	//     "parent": {
13970	//       "description": "Required. The resource in which to create the sink: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" For examples:\"projects/my-project\" \"organizations/123456789\"",
13971	//       "location": "path",
13972	//       "pattern": "^folders/[^/]+$",
13973	//       "required": true,
13974	//       "type": "string"
13975	//     },
13976	//     "uniqueWriterIdentity": {
13977	//       "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.",
13978	//       "location": "query",
13979	//       "type": "boolean"
13980	//     }
13981	//   },
13982	//   "path": "v2/{+parent}/sinks",
13983	//   "request": {
13984	//     "$ref": "LogSink"
13985	//   },
13986	//   "response": {
13987	//     "$ref": "LogSink"
13988	//   },
13989	//   "scopes": [
13990	//     "https://www.googleapis.com/auth/cloud-platform",
13991	//     "https://www.googleapis.com/auth/logging.admin"
13992	//   ]
13993	// }
13994
13995}
13996
13997// method id "logging.folders.sinks.delete":
13998
13999type FoldersSinksDeleteCall struct {
14000	s          *Service
14001	sinkNameid string
14002	urlParams_ gensupport.URLParams
14003	ctx_       context.Context
14004	header_    http.Header
14005}
14006
14007// Delete: Deletes a sink. If the sink has a unique writer_identity,
14008// then that service account is also deleted.
14009//
14010// - sinkName: The full resource name of the sink to delete, including
14011//   the parent resource and the sink identifier:
14012//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
14013//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
14014//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
14015//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
14016//   example:"projects/my-project/sinks/my-sink".
14017func (r *FoldersSinksService) Delete(sinkNameid string) *FoldersSinksDeleteCall {
14018	c := &FoldersSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14019	c.sinkNameid = sinkNameid
14020	return c
14021}
14022
14023// Fields allows partial responses to be retrieved. See
14024// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14025// for more information.
14026func (c *FoldersSinksDeleteCall) Fields(s ...googleapi.Field) *FoldersSinksDeleteCall {
14027	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14028	return c
14029}
14030
14031// Context sets the context to be used in this call's Do method. Any
14032// pending HTTP request will be aborted if the provided context is
14033// canceled.
14034func (c *FoldersSinksDeleteCall) Context(ctx context.Context) *FoldersSinksDeleteCall {
14035	c.ctx_ = ctx
14036	return c
14037}
14038
14039// Header returns an http.Header that can be modified by the caller to
14040// add HTTP headers to the request.
14041func (c *FoldersSinksDeleteCall) Header() http.Header {
14042	if c.header_ == nil {
14043		c.header_ = make(http.Header)
14044	}
14045	return c.header_
14046}
14047
14048func (c *FoldersSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
14049	reqHeaders := make(http.Header)
14050	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14051	for k, v := range c.header_ {
14052		reqHeaders[k] = v
14053	}
14054	reqHeaders.Set("User-Agent", c.s.userAgent())
14055	var body io.Reader = nil
14056	c.urlParams_.Set("alt", alt)
14057	c.urlParams_.Set("prettyPrint", "false")
14058	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
14059	urls += "?" + c.urlParams_.Encode()
14060	req, err := http.NewRequest("DELETE", urls, body)
14061	if err != nil {
14062		return nil, err
14063	}
14064	req.Header = reqHeaders
14065	googleapi.Expand(req.URL, map[string]string{
14066		"sinkName": c.sinkNameid,
14067	})
14068	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14069}
14070
14071// Do executes the "logging.folders.sinks.delete" call.
14072// Exactly one of *Empty or error will be non-nil. Any non-2xx status
14073// code is an error. Response headers are in either
14074// *Empty.ServerResponse.Header or (if a response was returned at all)
14075// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14076// check whether the returned error was because http.StatusNotModified
14077// was returned.
14078func (c *FoldersSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14079	gensupport.SetOptions(c.urlParams_, opts...)
14080	res, err := c.doRequest("json")
14081	if res != nil && res.StatusCode == http.StatusNotModified {
14082		if res.Body != nil {
14083			res.Body.Close()
14084		}
14085		return nil, &googleapi.Error{
14086			Code:   res.StatusCode,
14087			Header: res.Header,
14088		}
14089	}
14090	if err != nil {
14091		return nil, err
14092	}
14093	defer googleapi.CloseBody(res)
14094	if err := googleapi.CheckResponse(res); err != nil {
14095		return nil, err
14096	}
14097	ret := &Empty{
14098		ServerResponse: googleapi.ServerResponse{
14099			Header:         res.Header,
14100			HTTPStatusCode: res.StatusCode,
14101		},
14102	}
14103	target := &ret
14104	if err := gensupport.DecodeResponse(target, res); err != nil {
14105		return nil, err
14106	}
14107	return ret, nil
14108	// {
14109	//   "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.",
14110	//   "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}",
14111	//   "httpMethod": "DELETE",
14112	//   "id": "logging.folders.sinks.delete",
14113	//   "parameterOrder": [
14114	//     "sinkName"
14115	//   ],
14116	//   "parameters": {
14117	//     "sinkName": {
14118	//       "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
14119	//       "location": "path",
14120	//       "pattern": "^folders/[^/]+/sinks/[^/]+$",
14121	//       "required": true,
14122	//       "type": "string"
14123	//     }
14124	//   },
14125	//   "path": "v2/{+sinkName}",
14126	//   "response": {
14127	//     "$ref": "Empty"
14128	//   },
14129	//   "scopes": [
14130	//     "https://www.googleapis.com/auth/cloud-platform",
14131	//     "https://www.googleapis.com/auth/logging.admin"
14132	//   ]
14133	// }
14134
14135}
14136
14137// method id "logging.folders.sinks.get":
14138
14139type FoldersSinksGetCall struct {
14140	s            *Service
14141	sinkName     string
14142	urlParams_   gensupport.URLParams
14143	ifNoneMatch_ string
14144	ctx_         context.Context
14145	header_      http.Header
14146}
14147
14148// Get: Gets a sink.
14149//
14150// - sinkName: The resource name of the sink:
14151//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
14152//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
14153//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
14154//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
14155//   example:"projects/my-project/sinks/my-sink".
14156func (r *FoldersSinksService) Get(sinkName string) *FoldersSinksGetCall {
14157	c := &FoldersSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14158	c.sinkName = sinkName
14159	return c
14160}
14161
14162// Fields allows partial responses to be retrieved. See
14163// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14164// for more information.
14165func (c *FoldersSinksGetCall) Fields(s ...googleapi.Field) *FoldersSinksGetCall {
14166	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14167	return c
14168}
14169
14170// IfNoneMatch sets the optional parameter which makes the operation
14171// fail if the object's ETag matches the given value. This is useful for
14172// getting updates only after the object has changed since the last
14173// request. Use googleapi.IsNotModified to check whether the response
14174// error from Do is the result of In-None-Match.
14175func (c *FoldersSinksGetCall) IfNoneMatch(entityTag string) *FoldersSinksGetCall {
14176	c.ifNoneMatch_ = entityTag
14177	return c
14178}
14179
14180// Context sets the context to be used in this call's Do method. Any
14181// pending HTTP request will be aborted if the provided context is
14182// canceled.
14183func (c *FoldersSinksGetCall) Context(ctx context.Context) *FoldersSinksGetCall {
14184	c.ctx_ = ctx
14185	return c
14186}
14187
14188// Header returns an http.Header that can be modified by the caller to
14189// add HTTP headers to the request.
14190func (c *FoldersSinksGetCall) Header() http.Header {
14191	if c.header_ == nil {
14192		c.header_ = make(http.Header)
14193	}
14194	return c.header_
14195}
14196
14197func (c *FoldersSinksGetCall) doRequest(alt string) (*http.Response, error) {
14198	reqHeaders := make(http.Header)
14199	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14200	for k, v := range c.header_ {
14201		reqHeaders[k] = v
14202	}
14203	reqHeaders.Set("User-Agent", c.s.userAgent())
14204	if c.ifNoneMatch_ != "" {
14205		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14206	}
14207	var body io.Reader = nil
14208	c.urlParams_.Set("alt", alt)
14209	c.urlParams_.Set("prettyPrint", "false")
14210	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
14211	urls += "?" + c.urlParams_.Encode()
14212	req, err := http.NewRequest("GET", urls, body)
14213	if err != nil {
14214		return nil, err
14215	}
14216	req.Header = reqHeaders
14217	googleapi.Expand(req.URL, map[string]string{
14218		"sinkName": c.sinkName,
14219	})
14220	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14221}
14222
14223// Do executes the "logging.folders.sinks.get" call.
14224// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
14225// code is an error. Response headers are in either
14226// *LogSink.ServerResponse.Header or (if a response was returned at all)
14227// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14228// check whether the returned error was because http.StatusNotModified
14229// was returned.
14230func (c *FoldersSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
14231	gensupport.SetOptions(c.urlParams_, opts...)
14232	res, err := c.doRequest("json")
14233	if res != nil && res.StatusCode == http.StatusNotModified {
14234		if res.Body != nil {
14235			res.Body.Close()
14236		}
14237		return nil, &googleapi.Error{
14238			Code:   res.StatusCode,
14239			Header: res.Header,
14240		}
14241	}
14242	if err != nil {
14243		return nil, err
14244	}
14245	defer googleapi.CloseBody(res)
14246	if err := googleapi.CheckResponse(res); err != nil {
14247		return nil, err
14248	}
14249	ret := &LogSink{
14250		ServerResponse: googleapi.ServerResponse{
14251			Header:         res.Header,
14252			HTTPStatusCode: res.StatusCode,
14253		},
14254	}
14255	target := &ret
14256	if err := gensupport.DecodeResponse(target, res); err != nil {
14257		return nil, err
14258	}
14259	return ret, nil
14260	// {
14261	//   "description": "Gets a sink.",
14262	//   "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}",
14263	//   "httpMethod": "GET",
14264	//   "id": "logging.folders.sinks.get",
14265	//   "parameterOrder": [
14266	//     "sinkName"
14267	//   ],
14268	//   "parameters": {
14269	//     "sinkName": {
14270	//       "description": "Required. The resource name of the sink: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
14271	//       "location": "path",
14272	//       "pattern": "^folders/[^/]+/sinks/[^/]+$",
14273	//       "required": true,
14274	//       "type": "string"
14275	//     }
14276	//   },
14277	//   "path": "v2/{+sinkName}",
14278	//   "response": {
14279	//     "$ref": "LogSink"
14280	//   },
14281	//   "scopes": [
14282	//     "https://www.googleapis.com/auth/cloud-platform",
14283	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
14284	//     "https://www.googleapis.com/auth/logging.admin",
14285	//     "https://www.googleapis.com/auth/logging.read"
14286	//   ]
14287	// }
14288
14289}
14290
14291// method id "logging.folders.sinks.list":
14292
14293type FoldersSinksListCall struct {
14294	s            *Service
14295	parent       string
14296	urlParams_   gensupport.URLParams
14297	ifNoneMatch_ string
14298	ctx_         context.Context
14299	header_      http.Header
14300}
14301
14302// List: Lists sinks.
14303//
14304// - parent: The parent resource whose sinks are to be listed:
14305//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
14306//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
14307func (r *FoldersSinksService) List(parent string) *FoldersSinksListCall {
14308	c := &FoldersSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14309	c.parent = parent
14310	return c
14311}
14312
14313// PageSize sets the optional parameter "pageSize": The maximum number
14314// of results to return from this request. Non-positive values are
14315// ignored. The presence of nextPageToken in the response indicates that
14316// more results might be available.
14317func (c *FoldersSinksListCall) PageSize(pageSize int64) *FoldersSinksListCall {
14318	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14319	return c
14320}
14321
14322// PageToken sets the optional parameter "pageToken": If present, then
14323// retrieve the next batch of results from the preceding call to this
14324// method. pageToken must be the value of nextPageToken from the
14325// previous response. The values of other method parameters should be
14326// identical to those in the previous call.
14327func (c *FoldersSinksListCall) PageToken(pageToken string) *FoldersSinksListCall {
14328	c.urlParams_.Set("pageToken", pageToken)
14329	return c
14330}
14331
14332// Fields allows partial responses to be retrieved. See
14333// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14334// for more information.
14335func (c *FoldersSinksListCall) Fields(s ...googleapi.Field) *FoldersSinksListCall {
14336	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14337	return c
14338}
14339
14340// IfNoneMatch sets the optional parameter which makes the operation
14341// fail if the object's ETag matches the given value. This is useful for
14342// getting updates only after the object has changed since the last
14343// request. Use googleapi.IsNotModified to check whether the response
14344// error from Do is the result of In-None-Match.
14345func (c *FoldersSinksListCall) IfNoneMatch(entityTag string) *FoldersSinksListCall {
14346	c.ifNoneMatch_ = entityTag
14347	return c
14348}
14349
14350// Context sets the context to be used in this call's Do method. Any
14351// pending HTTP request will be aborted if the provided context is
14352// canceled.
14353func (c *FoldersSinksListCall) Context(ctx context.Context) *FoldersSinksListCall {
14354	c.ctx_ = ctx
14355	return c
14356}
14357
14358// Header returns an http.Header that can be modified by the caller to
14359// add HTTP headers to the request.
14360func (c *FoldersSinksListCall) Header() http.Header {
14361	if c.header_ == nil {
14362		c.header_ = make(http.Header)
14363	}
14364	return c.header_
14365}
14366
14367func (c *FoldersSinksListCall) doRequest(alt string) (*http.Response, error) {
14368	reqHeaders := make(http.Header)
14369	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14370	for k, v := range c.header_ {
14371		reqHeaders[k] = v
14372	}
14373	reqHeaders.Set("User-Agent", c.s.userAgent())
14374	if c.ifNoneMatch_ != "" {
14375		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14376	}
14377	var body io.Reader = nil
14378	c.urlParams_.Set("alt", alt)
14379	c.urlParams_.Set("prettyPrint", "false")
14380	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
14381	urls += "?" + c.urlParams_.Encode()
14382	req, err := http.NewRequest("GET", urls, body)
14383	if err != nil {
14384		return nil, err
14385	}
14386	req.Header = reqHeaders
14387	googleapi.Expand(req.URL, map[string]string{
14388		"parent": c.parent,
14389	})
14390	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14391}
14392
14393// Do executes the "logging.folders.sinks.list" call.
14394// Exactly one of *ListSinksResponse or error will be non-nil. Any
14395// non-2xx status code is an error. Response headers are in either
14396// *ListSinksResponse.ServerResponse.Header or (if a response was
14397// returned at all) in error.(*googleapi.Error).Header. Use
14398// googleapi.IsNotModified to check whether the returned error was
14399// because http.StatusNotModified was returned.
14400func (c *FoldersSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
14401	gensupport.SetOptions(c.urlParams_, opts...)
14402	res, err := c.doRequest("json")
14403	if res != nil && res.StatusCode == http.StatusNotModified {
14404		if res.Body != nil {
14405			res.Body.Close()
14406		}
14407		return nil, &googleapi.Error{
14408			Code:   res.StatusCode,
14409			Header: res.Header,
14410		}
14411	}
14412	if err != nil {
14413		return nil, err
14414	}
14415	defer googleapi.CloseBody(res)
14416	if err := googleapi.CheckResponse(res); err != nil {
14417		return nil, err
14418	}
14419	ret := &ListSinksResponse{
14420		ServerResponse: googleapi.ServerResponse{
14421			Header:         res.Header,
14422			HTTPStatusCode: res.StatusCode,
14423		},
14424	}
14425	target := &ret
14426	if err := gensupport.DecodeResponse(target, res); err != nil {
14427		return nil, err
14428	}
14429	return ret, nil
14430	// {
14431	//   "description": "Lists sinks.",
14432	//   "flatPath": "v2/folders/{foldersId}/sinks",
14433	//   "httpMethod": "GET",
14434	//   "id": "logging.folders.sinks.list",
14435	//   "parameterOrder": [
14436	//     "parent"
14437	//   ],
14438	//   "parameters": {
14439	//     "pageSize": {
14440	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
14441	//       "format": "int32",
14442	//       "location": "query",
14443	//       "type": "integer"
14444	//     },
14445	//     "pageToken": {
14446	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
14447	//       "location": "query",
14448	//       "type": "string"
14449	//     },
14450	//     "parent": {
14451	//       "description": "Required. The parent resource whose sinks are to be listed: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" ",
14452	//       "location": "path",
14453	//       "pattern": "^folders/[^/]+$",
14454	//       "required": true,
14455	//       "type": "string"
14456	//     }
14457	//   },
14458	//   "path": "v2/{+parent}/sinks",
14459	//   "response": {
14460	//     "$ref": "ListSinksResponse"
14461	//   },
14462	//   "scopes": [
14463	//     "https://www.googleapis.com/auth/cloud-platform",
14464	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
14465	//     "https://www.googleapis.com/auth/logging.admin",
14466	//     "https://www.googleapis.com/auth/logging.read"
14467	//   ]
14468	// }
14469
14470}
14471
14472// Pages invokes f for each page of results.
14473// A non-nil error returned from f will halt the iteration.
14474// The provided context supersedes any context provided to the Context method.
14475func (c *FoldersSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
14476	c.ctx_ = ctx
14477	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14478	for {
14479		x, err := c.Do()
14480		if err != nil {
14481			return err
14482		}
14483		if err := f(x); err != nil {
14484			return err
14485		}
14486		if x.NextPageToken == "" {
14487			return nil
14488		}
14489		c.PageToken(x.NextPageToken)
14490	}
14491}
14492
14493// method id "logging.folders.sinks.patch":
14494
14495type FoldersSinksPatchCall struct {
14496	s          *Service
14497	sinkNameid string
14498	logsink    *LogSink
14499	urlParams_ gensupport.URLParams
14500	ctx_       context.Context
14501	header_    http.Header
14502}
14503
14504// Patch: Updates a sink. This method replaces the following fields in
14505// the existing sink with values from the new sink: destination, and
14506// filter.The updated sink might also have a new writer_identity; see
14507// the unique_writer_identity field.
14508//
14509// - sinkName: The full resource name of the sink to update, including
14510//   the parent resource and the sink identifier:
14511//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
14512//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
14513//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
14514//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
14515//   example:"projects/my-project/sinks/my-sink".
14516func (r *FoldersSinksService) Patch(sinkNameid string, logsink *LogSink) *FoldersSinksPatchCall {
14517	c := &FoldersSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14518	c.sinkNameid = sinkNameid
14519	c.logsink = logsink
14520	return c
14521}
14522
14523// UniqueWriterIdentity sets the optional parameter
14524// "uniqueWriterIdentity": See sinks.create for a description of this
14525// field. When updating a sink, the effect of this field on the value of
14526// writer_identity in the updated sink depends on both the old and new
14527// values of this field: If the old and new values of this field are
14528// both false or both true, then there is no change to the sink's
14529// writer_identity. If the old value is false and the new value is true,
14530// then writer_identity is changed to a unique service account. It is an
14531// error if the old value is true and the new value is set to false or
14532// defaulted to false.
14533func (c *FoldersSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksPatchCall {
14534	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
14535	return c
14536}
14537
14538// UpdateMask sets the optional parameter "updateMask": Field mask that
14539// specifies the fields in sink that need an update. A sink field will
14540// be overwritten if, and only if, it is in the update mask. name and
14541// output only fields cannot be updated.An empty updateMask is
14542// temporarily treated as using the following mask for backwards
14543// compatibility purposes:destination,filter,includeChildrenAt some
14544// point in the future, behavior will be removed and specifying an empty
14545// updateMask will be an error.For a detailed FieldMask definition, see
14546// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
14547// example: updateMask=filter
14548func (c *FoldersSinksPatchCall) UpdateMask(updateMask string) *FoldersSinksPatchCall {
14549	c.urlParams_.Set("updateMask", updateMask)
14550	return c
14551}
14552
14553// Fields allows partial responses to be retrieved. See
14554// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14555// for more information.
14556func (c *FoldersSinksPatchCall) Fields(s ...googleapi.Field) *FoldersSinksPatchCall {
14557	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14558	return c
14559}
14560
14561// Context sets the context to be used in this call's Do method. Any
14562// pending HTTP request will be aborted if the provided context is
14563// canceled.
14564func (c *FoldersSinksPatchCall) Context(ctx context.Context) *FoldersSinksPatchCall {
14565	c.ctx_ = ctx
14566	return c
14567}
14568
14569// Header returns an http.Header that can be modified by the caller to
14570// add HTTP headers to the request.
14571func (c *FoldersSinksPatchCall) Header() http.Header {
14572	if c.header_ == nil {
14573		c.header_ = make(http.Header)
14574	}
14575	return c.header_
14576}
14577
14578func (c *FoldersSinksPatchCall) doRequest(alt string) (*http.Response, error) {
14579	reqHeaders := make(http.Header)
14580	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14581	for k, v := range c.header_ {
14582		reqHeaders[k] = v
14583	}
14584	reqHeaders.Set("User-Agent", c.s.userAgent())
14585	var body io.Reader = nil
14586	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
14587	if err != nil {
14588		return nil, err
14589	}
14590	reqHeaders.Set("Content-Type", "application/json")
14591	c.urlParams_.Set("alt", alt)
14592	c.urlParams_.Set("prettyPrint", "false")
14593	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
14594	urls += "?" + c.urlParams_.Encode()
14595	req, err := http.NewRequest("PATCH", urls, body)
14596	if err != nil {
14597		return nil, err
14598	}
14599	req.Header = reqHeaders
14600	googleapi.Expand(req.URL, map[string]string{
14601		"sinkName": c.sinkNameid,
14602	})
14603	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14604}
14605
14606// Do executes the "logging.folders.sinks.patch" call.
14607// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
14608// code is an error. Response headers are in either
14609// *LogSink.ServerResponse.Header or (if a response was returned at all)
14610// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14611// check whether the returned error was because http.StatusNotModified
14612// was returned.
14613func (c *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
14614	gensupport.SetOptions(c.urlParams_, opts...)
14615	res, err := c.doRequest("json")
14616	if res != nil && res.StatusCode == http.StatusNotModified {
14617		if res.Body != nil {
14618			res.Body.Close()
14619		}
14620		return nil, &googleapi.Error{
14621			Code:   res.StatusCode,
14622			Header: res.Header,
14623		}
14624	}
14625	if err != nil {
14626		return nil, err
14627	}
14628	defer googleapi.CloseBody(res)
14629	if err := googleapi.CheckResponse(res); err != nil {
14630		return nil, err
14631	}
14632	ret := &LogSink{
14633		ServerResponse: googleapi.ServerResponse{
14634			Header:         res.Header,
14635			HTTPStatusCode: res.StatusCode,
14636		},
14637	}
14638	target := &ret
14639	if err := gensupport.DecodeResponse(target, res); err != nil {
14640		return nil, err
14641	}
14642	return ret, nil
14643	// {
14644	//   "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
14645	//   "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}",
14646	//   "httpMethod": "PATCH",
14647	//   "id": "logging.folders.sinks.patch",
14648	//   "parameterOrder": [
14649	//     "sinkName"
14650	//   ],
14651	//   "parameters": {
14652	//     "sinkName": {
14653	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
14654	//       "location": "path",
14655	//       "pattern": "^folders/[^/]+/sinks/[^/]+$",
14656	//       "required": true,
14657	//       "type": "string"
14658	//     },
14659	//     "uniqueWriterIdentity": {
14660	//       "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false.",
14661	//       "location": "query",
14662	//       "type": "boolean"
14663	//     },
14664	//     "updateMask": {
14665	//       "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
14666	//       "format": "google-fieldmask",
14667	//       "location": "query",
14668	//       "type": "string"
14669	//     }
14670	//   },
14671	//   "path": "v2/{+sinkName}",
14672	//   "request": {
14673	//     "$ref": "LogSink"
14674	//   },
14675	//   "response": {
14676	//     "$ref": "LogSink"
14677	//   },
14678	//   "scopes": [
14679	//     "https://www.googleapis.com/auth/cloud-platform",
14680	//     "https://www.googleapis.com/auth/logging.admin"
14681	//   ]
14682	// }
14683
14684}
14685
14686// method id "logging.folders.sinks.update":
14687
14688type FoldersSinksUpdateCall struct {
14689	s          *Service
14690	sinkNameid string
14691	logsink    *LogSink
14692	urlParams_ gensupport.URLParams
14693	ctx_       context.Context
14694	header_    http.Header
14695}
14696
14697// Update: Updates a sink. This method replaces the following fields in
14698// the existing sink with values from the new sink: destination, and
14699// filter.The updated sink might also have a new writer_identity; see
14700// the unique_writer_identity field.
14701//
14702// - sinkName: The full resource name of the sink to update, including
14703//   the parent resource and the sink identifier:
14704//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
14705//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
14706//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
14707//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
14708//   example:"projects/my-project/sinks/my-sink".
14709func (r *FoldersSinksService) Update(sinkNameid string, logsink *LogSink) *FoldersSinksUpdateCall {
14710	c := &FoldersSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14711	c.sinkNameid = sinkNameid
14712	c.logsink = logsink
14713	return c
14714}
14715
14716// UniqueWriterIdentity sets the optional parameter
14717// "uniqueWriterIdentity": See sinks.create for a description of this
14718// field. When updating a sink, the effect of this field on the value of
14719// writer_identity in the updated sink depends on both the old and new
14720// values of this field: If the old and new values of this field are
14721// both false or both true, then there is no change to the sink's
14722// writer_identity. If the old value is false and the new value is true,
14723// then writer_identity is changed to a unique service account. It is an
14724// error if the old value is true and the new value is set to false or
14725// defaulted to false.
14726func (c *FoldersSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksUpdateCall {
14727	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
14728	return c
14729}
14730
14731// UpdateMask sets the optional parameter "updateMask": Field mask that
14732// specifies the fields in sink that need an update. A sink field will
14733// be overwritten if, and only if, it is in the update mask. name and
14734// output only fields cannot be updated.An empty updateMask is
14735// temporarily treated as using the following mask for backwards
14736// compatibility purposes:destination,filter,includeChildrenAt some
14737// point in the future, behavior will be removed and specifying an empty
14738// updateMask will be an error.For a detailed FieldMask definition, see
14739// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
14740// example: updateMask=filter
14741func (c *FoldersSinksUpdateCall) UpdateMask(updateMask string) *FoldersSinksUpdateCall {
14742	c.urlParams_.Set("updateMask", updateMask)
14743	return c
14744}
14745
14746// Fields allows partial responses to be retrieved. See
14747// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14748// for more information.
14749func (c *FoldersSinksUpdateCall) Fields(s ...googleapi.Field) *FoldersSinksUpdateCall {
14750	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14751	return c
14752}
14753
14754// Context sets the context to be used in this call's Do method. Any
14755// pending HTTP request will be aborted if the provided context is
14756// canceled.
14757func (c *FoldersSinksUpdateCall) Context(ctx context.Context) *FoldersSinksUpdateCall {
14758	c.ctx_ = ctx
14759	return c
14760}
14761
14762// Header returns an http.Header that can be modified by the caller to
14763// add HTTP headers to the request.
14764func (c *FoldersSinksUpdateCall) Header() http.Header {
14765	if c.header_ == nil {
14766		c.header_ = make(http.Header)
14767	}
14768	return c.header_
14769}
14770
14771func (c *FoldersSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
14772	reqHeaders := make(http.Header)
14773	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14774	for k, v := range c.header_ {
14775		reqHeaders[k] = v
14776	}
14777	reqHeaders.Set("User-Agent", c.s.userAgent())
14778	var body io.Reader = nil
14779	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
14780	if err != nil {
14781		return nil, err
14782	}
14783	reqHeaders.Set("Content-Type", "application/json")
14784	c.urlParams_.Set("alt", alt)
14785	c.urlParams_.Set("prettyPrint", "false")
14786	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
14787	urls += "?" + c.urlParams_.Encode()
14788	req, err := http.NewRequest("PUT", urls, body)
14789	if err != nil {
14790		return nil, err
14791	}
14792	req.Header = reqHeaders
14793	googleapi.Expand(req.URL, map[string]string{
14794		"sinkName": c.sinkNameid,
14795	})
14796	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14797}
14798
14799// Do executes the "logging.folders.sinks.update" call.
14800// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
14801// code is an error. Response headers are in either
14802// *LogSink.ServerResponse.Header or (if a response was returned at all)
14803// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14804// check whether the returned error was because http.StatusNotModified
14805// was returned.
14806func (c *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
14807	gensupport.SetOptions(c.urlParams_, opts...)
14808	res, err := c.doRequest("json")
14809	if res != nil && res.StatusCode == http.StatusNotModified {
14810		if res.Body != nil {
14811			res.Body.Close()
14812		}
14813		return nil, &googleapi.Error{
14814			Code:   res.StatusCode,
14815			Header: res.Header,
14816		}
14817	}
14818	if err != nil {
14819		return nil, err
14820	}
14821	defer googleapi.CloseBody(res)
14822	if err := googleapi.CheckResponse(res); err != nil {
14823		return nil, err
14824	}
14825	ret := &LogSink{
14826		ServerResponse: googleapi.ServerResponse{
14827			Header:         res.Header,
14828			HTTPStatusCode: res.StatusCode,
14829		},
14830	}
14831	target := &ret
14832	if err := gensupport.DecodeResponse(target, res); err != nil {
14833		return nil, err
14834	}
14835	return ret, nil
14836	// {
14837	//   "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
14838	//   "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}",
14839	//   "httpMethod": "PUT",
14840	//   "id": "logging.folders.sinks.update",
14841	//   "parameterOrder": [
14842	//     "sinkName"
14843	//   ],
14844	//   "parameters": {
14845	//     "sinkName": {
14846	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
14847	//       "location": "path",
14848	//       "pattern": "^folders/[^/]+/sinks/[^/]+$",
14849	//       "required": true,
14850	//       "type": "string"
14851	//     },
14852	//     "uniqueWriterIdentity": {
14853	//       "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false.",
14854	//       "location": "query",
14855	//       "type": "boolean"
14856	//     },
14857	//     "updateMask": {
14858	//       "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
14859	//       "format": "google-fieldmask",
14860	//       "location": "query",
14861	//       "type": "string"
14862	//     }
14863	//   },
14864	//   "path": "v2/{+sinkName}",
14865	//   "request": {
14866	//     "$ref": "LogSink"
14867	//   },
14868	//   "response": {
14869	//     "$ref": "LogSink"
14870	//   },
14871	//   "scopes": [
14872	//     "https://www.googleapis.com/auth/cloud-platform",
14873	//     "https://www.googleapis.com/auth/logging.admin"
14874	//   ]
14875	// }
14876
14877}
14878
14879// method id "logging.locations.get":
14880
14881type LocationsGetCall struct {
14882	s            *Service
14883	name         string
14884	urlParams_   gensupport.URLParams
14885	ifNoneMatch_ string
14886	ctx_         context.Context
14887	header_      http.Header
14888}
14889
14890// Get: Gets information about a location.
14891//
14892// - name: Resource name for the location.
14893func (r *LocationsService) Get(name string) *LocationsGetCall {
14894	c := &LocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14895	c.name = name
14896	return c
14897}
14898
14899// Fields allows partial responses to be retrieved. See
14900// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14901// for more information.
14902func (c *LocationsGetCall) Fields(s ...googleapi.Field) *LocationsGetCall {
14903	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14904	return c
14905}
14906
14907// IfNoneMatch sets the optional parameter which makes the operation
14908// fail if the object's ETag matches the given value. This is useful for
14909// getting updates only after the object has changed since the last
14910// request. Use googleapi.IsNotModified to check whether the response
14911// error from Do is the result of In-None-Match.
14912func (c *LocationsGetCall) IfNoneMatch(entityTag string) *LocationsGetCall {
14913	c.ifNoneMatch_ = entityTag
14914	return c
14915}
14916
14917// Context sets the context to be used in this call's Do method. Any
14918// pending HTTP request will be aborted if the provided context is
14919// canceled.
14920func (c *LocationsGetCall) Context(ctx context.Context) *LocationsGetCall {
14921	c.ctx_ = ctx
14922	return c
14923}
14924
14925// Header returns an http.Header that can be modified by the caller to
14926// add HTTP headers to the request.
14927func (c *LocationsGetCall) Header() http.Header {
14928	if c.header_ == nil {
14929		c.header_ = make(http.Header)
14930	}
14931	return c.header_
14932}
14933
14934func (c *LocationsGetCall) doRequest(alt string) (*http.Response, error) {
14935	reqHeaders := make(http.Header)
14936	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14937	for k, v := range c.header_ {
14938		reqHeaders[k] = v
14939	}
14940	reqHeaders.Set("User-Agent", c.s.userAgent())
14941	if c.ifNoneMatch_ != "" {
14942		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14943	}
14944	var body io.Reader = nil
14945	c.urlParams_.Set("alt", alt)
14946	c.urlParams_.Set("prettyPrint", "false")
14947	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
14948	urls += "?" + c.urlParams_.Encode()
14949	req, err := http.NewRequest("GET", urls, body)
14950	if err != nil {
14951		return nil, err
14952	}
14953	req.Header = reqHeaders
14954	googleapi.Expand(req.URL, map[string]string{
14955		"name": c.name,
14956	})
14957	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14958}
14959
14960// Do executes the "logging.locations.get" call.
14961// Exactly one of *Location or error will be non-nil. Any non-2xx status
14962// code is an error. Response headers are in either
14963// *Location.ServerResponse.Header or (if a response was returned at
14964// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14965// to check whether the returned error was because
14966// http.StatusNotModified was returned.
14967func (c *LocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
14968	gensupport.SetOptions(c.urlParams_, opts...)
14969	res, err := c.doRequest("json")
14970	if res != nil && res.StatusCode == http.StatusNotModified {
14971		if res.Body != nil {
14972			res.Body.Close()
14973		}
14974		return nil, &googleapi.Error{
14975			Code:   res.StatusCode,
14976			Header: res.Header,
14977		}
14978	}
14979	if err != nil {
14980		return nil, err
14981	}
14982	defer googleapi.CloseBody(res)
14983	if err := googleapi.CheckResponse(res); err != nil {
14984		return nil, err
14985	}
14986	ret := &Location{
14987		ServerResponse: googleapi.ServerResponse{
14988			Header:         res.Header,
14989			HTTPStatusCode: res.StatusCode,
14990		},
14991	}
14992	target := &ret
14993	if err := gensupport.DecodeResponse(target, res); err != nil {
14994		return nil, err
14995	}
14996	return ret, nil
14997	// {
14998	//   "description": "Gets information about a location.",
14999	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}",
15000	//   "httpMethod": "GET",
15001	//   "id": "logging.locations.get",
15002	//   "parameterOrder": [
15003	//     "name"
15004	//   ],
15005	//   "parameters": {
15006	//     "name": {
15007	//       "description": "Resource name for the location.",
15008	//       "location": "path",
15009	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+$",
15010	//       "required": true,
15011	//       "type": "string"
15012	//     }
15013	//   },
15014	//   "path": "v2/{+name}",
15015	//   "response": {
15016	//     "$ref": "Location"
15017	//   },
15018	//   "scopes": [
15019	//     "https://www.googleapis.com/auth/cloud-platform",
15020	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
15021	//     "https://www.googleapis.com/auth/logging.admin",
15022	//     "https://www.googleapis.com/auth/logging.read"
15023	//   ]
15024	// }
15025
15026}
15027
15028// method id "logging.locations.list":
15029
15030type LocationsListCall struct {
15031	s            *Service
15032	name         string
15033	urlParams_   gensupport.URLParams
15034	ifNoneMatch_ string
15035	ctx_         context.Context
15036	header_      http.Header
15037}
15038
15039// List: Lists information about the supported locations for this
15040// service.
15041//
15042// - name: The resource that owns the locations collection, if
15043//   applicable.
15044func (r *LocationsService) List(name string) *LocationsListCall {
15045	c := &LocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15046	c.name = name
15047	return c
15048}
15049
15050// Filter sets the optional parameter "filter": A filter to narrow down
15051// results to a preferred subset. The filtering language accepts strings
15052// like "displayName=tokyo", and is documented in more detail in AIP-160
15053// (https://google.aip.dev/160).
15054func (c *LocationsListCall) Filter(filter string) *LocationsListCall {
15055	c.urlParams_.Set("filter", filter)
15056	return c
15057}
15058
15059// PageSize sets the optional parameter "pageSize": The maximum number
15060// of results to return. If not set, the service selects a default.
15061func (c *LocationsListCall) PageSize(pageSize int64) *LocationsListCall {
15062	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15063	return c
15064}
15065
15066// PageToken sets the optional parameter "pageToken": A page token
15067// received from the next_page_token field in the response. Send that
15068// page token to receive the subsequent page.
15069func (c *LocationsListCall) PageToken(pageToken string) *LocationsListCall {
15070	c.urlParams_.Set("pageToken", pageToken)
15071	return c
15072}
15073
15074// Fields allows partial responses to be retrieved. See
15075// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15076// for more information.
15077func (c *LocationsListCall) Fields(s ...googleapi.Field) *LocationsListCall {
15078	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15079	return c
15080}
15081
15082// IfNoneMatch sets the optional parameter which makes the operation
15083// fail if the object's ETag matches the given value. This is useful for
15084// getting updates only after the object has changed since the last
15085// request. Use googleapi.IsNotModified to check whether the response
15086// error from Do is the result of In-None-Match.
15087func (c *LocationsListCall) IfNoneMatch(entityTag string) *LocationsListCall {
15088	c.ifNoneMatch_ = entityTag
15089	return c
15090}
15091
15092// Context sets the context to be used in this call's Do method. Any
15093// pending HTTP request will be aborted if the provided context is
15094// canceled.
15095func (c *LocationsListCall) Context(ctx context.Context) *LocationsListCall {
15096	c.ctx_ = ctx
15097	return c
15098}
15099
15100// Header returns an http.Header that can be modified by the caller to
15101// add HTTP headers to the request.
15102func (c *LocationsListCall) Header() http.Header {
15103	if c.header_ == nil {
15104		c.header_ = make(http.Header)
15105	}
15106	return c.header_
15107}
15108
15109func (c *LocationsListCall) doRequest(alt string) (*http.Response, error) {
15110	reqHeaders := make(http.Header)
15111	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15112	for k, v := range c.header_ {
15113		reqHeaders[k] = v
15114	}
15115	reqHeaders.Set("User-Agent", c.s.userAgent())
15116	if c.ifNoneMatch_ != "" {
15117		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15118	}
15119	var body io.Reader = nil
15120	c.urlParams_.Set("alt", alt)
15121	c.urlParams_.Set("prettyPrint", "false")
15122	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
15123	urls += "?" + c.urlParams_.Encode()
15124	req, err := http.NewRequest("GET", urls, body)
15125	if err != nil {
15126		return nil, err
15127	}
15128	req.Header = reqHeaders
15129	googleapi.Expand(req.URL, map[string]string{
15130		"name": c.name,
15131	})
15132	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15133}
15134
15135// Do executes the "logging.locations.list" call.
15136// Exactly one of *ListLocationsResponse or error will be non-nil. Any
15137// non-2xx status code is an error. Response headers are in either
15138// *ListLocationsResponse.ServerResponse.Header or (if a response was
15139// returned at all) in error.(*googleapi.Error).Header. Use
15140// googleapi.IsNotModified to check whether the returned error was
15141// because http.StatusNotModified was returned.
15142func (c *LocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
15143	gensupport.SetOptions(c.urlParams_, opts...)
15144	res, err := c.doRequest("json")
15145	if res != nil && res.StatusCode == http.StatusNotModified {
15146		if res.Body != nil {
15147			res.Body.Close()
15148		}
15149		return nil, &googleapi.Error{
15150			Code:   res.StatusCode,
15151			Header: res.Header,
15152		}
15153	}
15154	if err != nil {
15155		return nil, err
15156	}
15157	defer googleapi.CloseBody(res)
15158	if err := googleapi.CheckResponse(res); err != nil {
15159		return nil, err
15160	}
15161	ret := &ListLocationsResponse{
15162		ServerResponse: googleapi.ServerResponse{
15163			Header:         res.Header,
15164			HTTPStatusCode: res.StatusCode,
15165		},
15166	}
15167	target := &ret
15168	if err := gensupport.DecodeResponse(target, res); err != nil {
15169		return nil, err
15170	}
15171	return ret, nil
15172	// {
15173	//   "description": "Lists information about the supported locations for this service.",
15174	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations",
15175	//   "httpMethod": "GET",
15176	//   "id": "logging.locations.list",
15177	//   "parameterOrder": [
15178	//     "name"
15179	//   ],
15180	//   "parameters": {
15181	//     "filter": {
15182	//       "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in AIP-160 (https://google.aip.dev/160).",
15183	//       "location": "query",
15184	//       "type": "string"
15185	//     },
15186	//     "name": {
15187	//       "description": "The resource that owns the locations collection, if applicable.",
15188	//       "location": "path",
15189	//       "pattern": "^[^/]+/[^/]+$",
15190	//       "required": true,
15191	//       "type": "string"
15192	//     },
15193	//     "pageSize": {
15194	//       "description": "The maximum number of results to return. If not set, the service selects a default.",
15195	//       "format": "int32",
15196	//       "location": "query",
15197	//       "type": "integer"
15198	//     },
15199	//     "pageToken": {
15200	//       "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.",
15201	//       "location": "query",
15202	//       "type": "string"
15203	//     }
15204	//   },
15205	//   "path": "v2/{+name}/locations",
15206	//   "response": {
15207	//     "$ref": "ListLocationsResponse"
15208	//   },
15209	//   "scopes": [
15210	//     "https://www.googleapis.com/auth/cloud-platform",
15211	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
15212	//     "https://www.googleapis.com/auth/logging.admin",
15213	//     "https://www.googleapis.com/auth/logging.read"
15214	//   ]
15215	// }
15216
15217}
15218
15219// Pages invokes f for each page of results.
15220// A non-nil error returned from f will halt the iteration.
15221// The provided context supersedes any context provided to the Context method.
15222func (c *LocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
15223	c.ctx_ = ctx
15224	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15225	for {
15226		x, err := c.Do()
15227		if err != nil {
15228			return err
15229		}
15230		if err := f(x); err != nil {
15231			return err
15232		}
15233		if x.NextPageToken == "" {
15234			return nil
15235		}
15236		c.PageToken(x.NextPageToken)
15237	}
15238}
15239
15240// method id "logging.locations.buckets.create":
15241
15242type LocationsBucketsCreateCall struct {
15243	s          *Service
15244	parent     string
15245	logbucket  *LogBucket
15246	urlParams_ gensupport.URLParams
15247	ctx_       context.Context
15248	header_    http.Header
15249}
15250
15251// Create: Creates a log bucket that can be used to store log entries.
15252// After a bucket has been created, the bucket's location cannot be
15253// changed.
15254//
15255// - parent: The resource in which to create the log bucket:
15256//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
15257//   example:"projects/my-project/locations/global".
15258func (r *LocationsBucketsService) Create(parent string, logbucket *LogBucket) *LocationsBucketsCreateCall {
15259	c := &LocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15260	c.parent = parent
15261	c.logbucket = logbucket
15262	return c
15263}
15264
15265// BucketId sets the optional parameter "bucketId": Required. A
15266// client-assigned identifier such as "my-bucket". Identifiers are
15267// limited to 100 characters and can include only letters, digits,
15268// underscores, hyphens, and periods.
15269func (c *LocationsBucketsCreateCall) BucketId(bucketId string) *LocationsBucketsCreateCall {
15270	c.urlParams_.Set("bucketId", bucketId)
15271	return c
15272}
15273
15274// Fields allows partial responses to be retrieved. See
15275// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15276// for more information.
15277func (c *LocationsBucketsCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsCreateCall {
15278	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15279	return c
15280}
15281
15282// Context sets the context to be used in this call's Do method. Any
15283// pending HTTP request will be aborted if the provided context is
15284// canceled.
15285func (c *LocationsBucketsCreateCall) Context(ctx context.Context) *LocationsBucketsCreateCall {
15286	c.ctx_ = ctx
15287	return c
15288}
15289
15290// Header returns an http.Header that can be modified by the caller to
15291// add HTTP headers to the request.
15292func (c *LocationsBucketsCreateCall) Header() http.Header {
15293	if c.header_ == nil {
15294		c.header_ = make(http.Header)
15295	}
15296	return c.header_
15297}
15298
15299func (c *LocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
15300	reqHeaders := make(http.Header)
15301	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15302	for k, v := range c.header_ {
15303		reqHeaders[k] = v
15304	}
15305	reqHeaders.Set("User-Agent", c.s.userAgent())
15306	var body io.Reader = nil
15307	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
15308	if err != nil {
15309		return nil, err
15310	}
15311	reqHeaders.Set("Content-Type", "application/json")
15312	c.urlParams_.Set("alt", alt)
15313	c.urlParams_.Set("prettyPrint", "false")
15314	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
15315	urls += "?" + c.urlParams_.Encode()
15316	req, err := http.NewRequest("POST", urls, body)
15317	if err != nil {
15318		return nil, err
15319	}
15320	req.Header = reqHeaders
15321	googleapi.Expand(req.URL, map[string]string{
15322		"parent": c.parent,
15323	})
15324	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15325}
15326
15327// Do executes the "logging.locations.buckets.create" call.
15328// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
15329// status code is an error. Response headers are in either
15330// *LogBucket.ServerResponse.Header or (if a response was returned at
15331// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15332// to check whether the returned error was because
15333// http.StatusNotModified was returned.
15334func (c *LocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
15335	gensupport.SetOptions(c.urlParams_, opts...)
15336	res, err := c.doRequest("json")
15337	if res != nil && res.StatusCode == http.StatusNotModified {
15338		if res.Body != nil {
15339			res.Body.Close()
15340		}
15341		return nil, &googleapi.Error{
15342			Code:   res.StatusCode,
15343			Header: res.Header,
15344		}
15345	}
15346	if err != nil {
15347		return nil, err
15348	}
15349	defer googleapi.CloseBody(res)
15350	if err := googleapi.CheckResponse(res); err != nil {
15351		return nil, err
15352	}
15353	ret := &LogBucket{
15354		ServerResponse: googleapi.ServerResponse{
15355			Header:         res.Header,
15356			HTTPStatusCode: res.StatusCode,
15357		},
15358	}
15359	target := &ret
15360	if err := gensupport.DecodeResponse(target, res); err != nil {
15361		return nil, err
15362	}
15363	return ret, nil
15364	// {
15365	//   "description": "Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.",
15366	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets",
15367	//   "httpMethod": "POST",
15368	//   "id": "logging.locations.buckets.create",
15369	//   "parameterOrder": [
15370	//     "parent"
15371	//   ],
15372	//   "parameters": {
15373	//     "bucketId": {
15374	//       "description": "Required. A client-assigned identifier such as \"my-bucket\". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.",
15375	//       "location": "query",
15376	//       "type": "string"
15377	//     },
15378	//     "parent": {
15379	//       "description": "Required. The resource in which to create the log bucket: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" For example:\"projects/my-project/locations/global\"",
15380	//       "location": "path",
15381	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+$",
15382	//       "required": true,
15383	//       "type": "string"
15384	//     }
15385	//   },
15386	//   "path": "v2/{+parent}/buckets",
15387	//   "request": {
15388	//     "$ref": "LogBucket"
15389	//   },
15390	//   "response": {
15391	//     "$ref": "LogBucket"
15392	//   },
15393	//   "scopes": [
15394	//     "https://www.googleapis.com/auth/cloud-platform",
15395	//     "https://www.googleapis.com/auth/logging.admin"
15396	//   ]
15397	// }
15398
15399}
15400
15401// method id "logging.locations.buckets.delete":
15402
15403type LocationsBucketsDeleteCall struct {
15404	s          *Service
15405	name       string
15406	urlParams_ gensupport.URLParams
15407	ctx_       context.Context
15408	header_    http.Header
15409}
15410
15411// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to
15412// the DELETE_REQUESTED state. After 7 days, the bucket will be purged
15413// and all log entries in the bucket will be permanently deleted.
15414//
15415// - name: The full resource name of the bucket to delete.
15416//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
15417//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
15418//   CKET_ID]"
15419//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
15420//   s/[BUCKET_ID]"
15421//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
15422//   For
15423//   example:"projects/my-project/locations/global/buckets/my-bucket".
15424func (r *LocationsBucketsService) Delete(name string) *LocationsBucketsDeleteCall {
15425	c := &LocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15426	c.name = name
15427	return c
15428}
15429
15430// Fields allows partial responses to be retrieved. See
15431// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15432// for more information.
15433func (c *LocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsDeleteCall {
15434	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15435	return c
15436}
15437
15438// Context sets the context to be used in this call's Do method. Any
15439// pending HTTP request will be aborted if the provided context is
15440// canceled.
15441func (c *LocationsBucketsDeleteCall) Context(ctx context.Context) *LocationsBucketsDeleteCall {
15442	c.ctx_ = ctx
15443	return c
15444}
15445
15446// Header returns an http.Header that can be modified by the caller to
15447// add HTTP headers to the request.
15448func (c *LocationsBucketsDeleteCall) Header() http.Header {
15449	if c.header_ == nil {
15450		c.header_ = make(http.Header)
15451	}
15452	return c.header_
15453}
15454
15455func (c *LocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
15456	reqHeaders := make(http.Header)
15457	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15458	for k, v := range c.header_ {
15459		reqHeaders[k] = v
15460	}
15461	reqHeaders.Set("User-Agent", c.s.userAgent())
15462	var body io.Reader = nil
15463	c.urlParams_.Set("alt", alt)
15464	c.urlParams_.Set("prettyPrint", "false")
15465	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
15466	urls += "?" + c.urlParams_.Encode()
15467	req, err := http.NewRequest("DELETE", urls, body)
15468	if err != nil {
15469		return nil, err
15470	}
15471	req.Header = reqHeaders
15472	googleapi.Expand(req.URL, map[string]string{
15473		"name": c.name,
15474	})
15475	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15476}
15477
15478// Do executes the "logging.locations.buckets.delete" call.
15479// Exactly one of *Empty or error will be non-nil. Any non-2xx status
15480// code is an error. Response headers are in either
15481// *Empty.ServerResponse.Header or (if a response was returned at all)
15482// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15483// check whether the returned error was because http.StatusNotModified
15484// was returned.
15485func (c *LocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
15486	gensupport.SetOptions(c.urlParams_, opts...)
15487	res, err := c.doRequest("json")
15488	if res != nil && res.StatusCode == http.StatusNotModified {
15489		if res.Body != nil {
15490			res.Body.Close()
15491		}
15492		return nil, &googleapi.Error{
15493			Code:   res.StatusCode,
15494			Header: res.Header,
15495		}
15496	}
15497	if err != nil {
15498		return nil, err
15499	}
15500	defer googleapi.CloseBody(res)
15501	if err := googleapi.CheckResponse(res); err != nil {
15502		return nil, err
15503	}
15504	ret := &Empty{
15505		ServerResponse: googleapi.ServerResponse{
15506			Header:         res.Header,
15507			HTTPStatusCode: res.StatusCode,
15508		},
15509	}
15510	target := &ret
15511	if err := gensupport.DecodeResponse(target, res); err != nil {
15512		return nil, err
15513	}
15514	return ret, nil
15515	// {
15516	//   "description": "Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.",
15517	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}",
15518	//   "httpMethod": "DELETE",
15519	//   "id": "logging.locations.buckets.delete",
15520	//   "parameterOrder": [
15521	//     "name"
15522	//   ],
15523	//   "parameters": {
15524	//     "name": {
15525	//       "description": "Required. The full resource name of the bucket to delete. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
15526	//       "location": "path",
15527	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/buckets/[^/]+$",
15528	//       "required": true,
15529	//       "type": "string"
15530	//     }
15531	//   },
15532	//   "path": "v2/{+name}",
15533	//   "response": {
15534	//     "$ref": "Empty"
15535	//   },
15536	//   "scopes": [
15537	//     "https://www.googleapis.com/auth/cloud-platform",
15538	//     "https://www.googleapis.com/auth/logging.admin"
15539	//   ]
15540	// }
15541
15542}
15543
15544// method id "logging.locations.buckets.get":
15545
15546type LocationsBucketsGetCall struct {
15547	s            *Service
15548	name         string
15549	urlParams_   gensupport.URLParams
15550	ifNoneMatch_ string
15551	ctx_         context.Context
15552	header_      http.Header
15553}
15554
15555// Get: Gets a log bucket.
15556//
15557// - name: The resource name of the bucket:
15558//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
15559//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
15560//   CKET_ID]"
15561//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
15562//   s/[BUCKET_ID]"
15563//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
15564//   For
15565//   example:"projects/my-project/locations/global/buckets/my-bucket".
15566func (r *LocationsBucketsService) Get(name string) *LocationsBucketsGetCall {
15567	c := &LocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15568	c.name = name
15569	return c
15570}
15571
15572// Fields allows partial responses to be retrieved. See
15573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15574// for more information.
15575func (c *LocationsBucketsGetCall) Fields(s ...googleapi.Field) *LocationsBucketsGetCall {
15576	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15577	return c
15578}
15579
15580// IfNoneMatch sets the optional parameter which makes the operation
15581// fail if the object's ETag matches the given value. This is useful for
15582// getting updates only after the object has changed since the last
15583// request. Use googleapi.IsNotModified to check whether the response
15584// error from Do is the result of In-None-Match.
15585func (c *LocationsBucketsGetCall) IfNoneMatch(entityTag string) *LocationsBucketsGetCall {
15586	c.ifNoneMatch_ = entityTag
15587	return c
15588}
15589
15590// Context sets the context to be used in this call's Do method. Any
15591// pending HTTP request will be aborted if the provided context is
15592// canceled.
15593func (c *LocationsBucketsGetCall) Context(ctx context.Context) *LocationsBucketsGetCall {
15594	c.ctx_ = ctx
15595	return c
15596}
15597
15598// Header returns an http.Header that can be modified by the caller to
15599// add HTTP headers to the request.
15600func (c *LocationsBucketsGetCall) Header() http.Header {
15601	if c.header_ == nil {
15602		c.header_ = make(http.Header)
15603	}
15604	return c.header_
15605}
15606
15607func (c *LocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
15608	reqHeaders := make(http.Header)
15609	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15610	for k, v := range c.header_ {
15611		reqHeaders[k] = v
15612	}
15613	reqHeaders.Set("User-Agent", c.s.userAgent())
15614	if c.ifNoneMatch_ != "" {
15615		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15616	}
15617	var body io.Reader = nil
15618	c.urlParams_.Set("alt", alt)
15619	c.urlParams_.Set("prettyPrint", "false")
15620	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
15621	urls += "?" + c.urlParams_.Encode()
15622	req, err := http.NewRequest("GET", urls, body)
15623	if err != nil {
15624		return nil, err
15625	}
15626	req.Header = reqHeaders
15627	googleapi.Expand(req.URL, map[string]string{
15628		"name": c.name,
15629	})
15630	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15631}
15632
15633// Do executes the "logging.locations.buckets.get" call.
15634// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
15635// status code is an error. Response headers are in either
15636// *LogBucket.ServerResponse.Header or (if a response was returned at
15637// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15638// to check whether the returned error was because
15639// http.StatusNotModified was returned.
15640func (c *LocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
15641	gensupport.SetOptions(c.urlParams_, opts...)
15642	res, err := c.doRequest("json")
15643	if res != nil && res.StatusCode == http.StatusNotModified {
15644		if res.Body != nil {
15645			res.Body.Close()
15646		}
15647		return nil, &googleapi.Error{
15648			Code:   res.StatusCode,
15649			Header: res.Header,
15650		}
15651	}
15652	if err != nil {
15653		return nil, err
15654	}
15655	defer googleapi.CloseBody(res)
15656	if err := googleapi.CheckResponse(res); err != nil {
15657		return nil, err
15658	}
15659	ret := &LogBucket{
15660		ServerResponse: googleapi.ServerResponse{
15661			Header:         res.Header,
15662			HTTPStatusCode: res.StatusCode,
15663		},
15664	}
15665	target := &ret
15666	if err := gensupport.DecodeResponse(target, res); err != nil {
15667		return nil, err
15668	}
15669	return ret, nil
15670	// {
15671	//   "description": "Gets a log bucket.",
15672	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}",
15673	//   "httpMethod": "GET",
15674	//   "id": "logging.locations.buckets.get",
15675	//   "parameterOrder": [
15676	//     "name"
15677	//   ],
15678	//   "parameters": {
15679	//     "name": {
15680	//       "description": "Required. The resource name of the bucket: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
15681	//       "location": "path",
15682	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/buckets/[^/]+$",
15683	//       "required": true,
15684	//       "type": "string"
15685	//     }
15686	//   },
15687	//   "path": "v2/{+name}",
15688	//   "response": {
15689	//     "$ref": "LogBucket"
15690	//   },
15691	//   "scopes": [
15692	//     "https://www.googleapis.com/auth/cloud-platform",
15693	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
15694	//     "https://www.googleapis.com/auth/logging.admin",
15695	//     "https://www.googleapis.com/auth/logging.read"
15696	//   ]
15697	// }
15698
15699}
15700
15701// method id "logging.locations.buckets.list":
15702
15703type LocationsBucketsListCall struct {
15704	s            *Service
15705	parent       string
15706	urlParams_   gensupport.URLParams
15707	ifNoneMatch_ string
15708	ctx_         context.Context
15709	header_      http.Header
15710}
15711
15712// List: Lists log buckets.
15713//
15714// - parent: The parent resource whose buckets are to be listed:
15715//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
15716//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
15717//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
15718//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations
15719//   portion of the resource must be specified, but supplying the
15720//   character - in place of LOCATION_ID will return all buckets.
15721func (r *LocationsBucketsService) List(parent string) *LocationsBucketsListCall {
15722	c := &LocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15723	c.parent = parent
15724	return c
15725}
15726
15727// PageSize sets the optional parameter "pageSize": The maximum number
15728// of results to return from this request. Non-positive values are
15729// ignored. The presence of nextPageToken in the response indicates that
15730// more results might be available.
15731func (c *LocationsBucketsListCall) PageSize(pageSize int64) *LocationsBucketsListCall {
15732	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15733	return c
15734}
15735
15736// PageToken sets the optional parameter "pageToken": If present, then
15737// retrieve the next batch of results from the preceding call to this
15738// method. pageToken must be the value of nextPageToken from the
15739// previous response. The values of other method parameters should be
15740// identical to those in the previous call.
15741func (c *LocationsBucketsListCall) PageToken(pageToken string) *LocationsBucketsListCall {
15742	c.urlParams_.Set("pageToken", pageToken)
15743	return c
15744}
15745
15746// Fields allows partial responses to be retrieved. See
15747// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15748// for more information.
15749func (c *LocationsBucketsListCall) Fields(s ...googleapi.Field) *LocationsBucketsListCall {
15750	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15751	return c
15752}
15753
15754// IfNoneMatch sets the optional parameter which makes the operation
15755// fail if the object's ETag matches the given value. This is useful for
15756// getting updates only after the object has changed since the last
15757// request. Use googleapi.IsNotModified to check whether the response
15758// error from Do is the result of In-None-Match.
15759func (c *LocationsBucketsListCall) IfNoneMatch(entityTag string) *LocationsBucketsListCall {
15760	c.ifNoneMatch_ = entityTag
15761	return c
15762}
15763
15764// Context sets the context to be used in this call's Do method. Any
15765// pending HTTP request will be aborted if the provided context is
15766// canceled.
15767func (c *LocationsBucketsListCall) Context(ctx context.Context) *LocationsBucketsListCall {
15768	c.ctx_ = ctx
15769	return c
15770}
15771
15772// Header returns an http.Header that can be modified by the caller to
15773// add HTTP headers to the request.
15774func (c *LocationsBucketsListCall) Header() http.Header {
15775	if c.header_ == nil {
15776		c.header_ = make(http.Header)
15777	}
15778	return c.header_
15779}
15780
15781func (c *LocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
15782	reqHeaders := make(http.Header)
15783	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15784	for k, v := range c.header_ {
15785		reqHeaders[k] = v
15786	}
15787	reqHeaders.Set("User-Agent", c.s.userAgent())
15788	if c.ifNoneMatch_ != "" {
15789		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15790	}
15791	var body io.Reader = nil
15792	c.urlParams_.Set("alt", alt)
15793	c.urlParams_.Set("prettyPrint", "false")
15794	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
15795	urls += "?" + c.urlParams_.Encode()
15796	req, err := http.NewRequest("GET", urls, body)
15797	if err != nil {
15798		return nil, err
15799	}
15800	req.Header = reqHeaders
15801	googleapi.Expand(req.URL, map[string]string{
15802		"parent": c.parent,
15803	})
15804	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15805}
15806
15807// Do executes the "logging.locations.buckets.list" call.
15808// Exactly one of *ListBucketsResponse or error will be non-nil. Any
15809// non-2xx status code is an error. Response headers are in either
15810// *ListBucketsResponse.ServerResponse.Header or (if a response was
15811// returned at all) in error.(*googleapi.Error).Header. Use
15812// googleapi.IsNotModified to check whether the returned error was
15813// because http.StatusNotModified was returned.
15814func (c *LocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
15815	gensupport.SetOptions(c.urlParams_, opts...)
15816	res, err := c.doRequest("json")
15817	if res != nil && res.StatusCode == http.StatusNotModified {
15818		if res.Body != nil {
15819			res.Body.Close()
15820		}
15821		return nil, &googleapi.Error{
15822			Code:   res.StatusCode,
15823			Header: res.Header,
15824		}
15825	}
15826	if err != nil {
15827		return nil, err
15828	}
15829	defer googleapi.CloseBody(res)
15830	if err := googleapi.CheckResponse(res); err != nil {
15831		return nil, err
15832	}
15833	ret := &ListBucketsResponse{
15834		ServerResponse: googleapi.ServerResponse{
15835			Header:         res.Header,
15836			HTTPStatusCode: res.StatusCode,
15837		},
15838	}
15839	target := &ret
15840	if err := gensupport.DecodeResponse(target, res); err != nil {
15841		return nil, err
15842	}
15843	return ret, nil
15844	// {
15845	//   "description": "Lists log buckets.",
15846	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets",
15847	//   "httpMethod": "GET",
15848	//   "id": "logging.locations.buckets.list",
15849	//   "parameterOrder": [
15850	//     "parent"
15851	//   ],
15852	//   "parameters": {
15853	//     "pageSize": {
15854	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
15855	//       "format": "int32",
15856	//       "location": "query",
15857	//       "type": "integer"
15858	//     },
15859	//     "pageToken": {
15860	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
15861	//       "location": "query",
15862	//       "type": "string"
15863	//     },
15864	//     "parent": {
15865	//       "description": "Required. The parent resource whose buckets are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]\" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets.",
15866	//       "location": "path",
15867	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+$",
15868	//       "required": true,
15869	//       "type": "string"
15870	//     }
15871	//   },
15872	//   "path": "v2/{+parent}/buckets",
15873	//   "response": {
15874	//     "$ref": "ListBucketsResponse"
15875	//   },
15876	//   "scopes": [
15877	//     "https://www.googleapis.com/auth/cloud-platform",
15878	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
15879	//     "https://www.googleapis.com/auth/logging.admin",
15880	//     "https://www.googleapis.com/auth/logging.read"
15881	//   ]
15882	// }
15883
15884}
15885
15886// Pages invokes f for each page of results.
15887// A non-nil error returned from f will halt the iteration.
15888// The provided context supersedes any context provided to the Context method.
15889func (c *LocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
15890	c.ctx_ = ctx
15891	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15892	for {
15893		x, err := c.Do()
15894		if err != nil {
15895			return err
15896		}
15897		if err := f(x); err != nil {
15898			return err
15899		}
15900		if x.NextPageToken == "" {
15901			return nil
15902		}
15903		c.PageToken(x.NextPageToken)
15904	}
15905}
15906
15907// method id "logging.locations.buckets.patch":
15908
15909type LocationsBucketsPatchCall struct {
15910	s          *Service
15911	name       string
15912	logbucket  *LogBucket
15913	urlParams_ gensupport.URLParams
15914	ctx_       context.Context
15915	header_    http.Header
15916}
15917
15918// Patch: Updates a log bucket. This method replaces the following
15919// fields in the existing bucket with values from the new bucket:
15920// retention_periodIf the retention period is decreased and the bucket
15921// is locked, FAILED_PRECONDITION will be returned.If the bucket has a
15922// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be
15923// returned.After a bucket has been created, the bucket's location
15924// cannot be changed.
15925//
15926// - name: The full resource name of the bucket to update.
15927//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
15928//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
15929//   CKET_ID]"
15930//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
15931//   s/[BUCKET_ID]"
15932//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
15933//   For
15934//   example:"projects/my-project/locations/global/buckets/my-bucket".
15935func (r *LocationsBucketsService) Patch(name string, logbucket *LogBucket) *LocationsBucketsPatchCall {
15936	c := &LocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15937	c.name = name
15938	c.logbucket = logbucket
15939	return c
15940}
15941
15942// UpdateMask sets the optional parameter "updateMask": Required. Field
15943// mask that specifies the fields in bucket that need an update. A
15944// bucket field will be overwritten if, and only if, it is in the update
15945// mask. name and output only fields cannot be updated.For a detailed
15946// FieldMask definition, see:
15947// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
15948// example: updateMask=retention_days
15949func (c *LocationsBucketsPatchCall) UpdateMask(updateMask string) *LocationsBucketsPatchCall {
15950	c.urlParams_.Set("updateMask", updateMask)
15951	return c
15952}
15953
15954// Fields allows partial responses to be retrieved. See
15955// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15956// for more information.
15957func (c *LocationsBucketsPatchCall) Fields(s ...googleapi.Field) *LocationsBucketsPatchCall {
15958	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15959	return c
15960}
15961
15962// Context sets the context to be used in this call's Do method. Any
15963// pending HTTP request will be aborted if the provided context is
15964// canceled.
15965func (c *LocationsBucketsPatchCall) Context(ctx context.Context) *LocationsBucketsPatchCall {
15966	c.ctx_ = ctx
15967	return c
15968}
15969
15970// Header returns an http.Header that can be modified by the caller to
15971// add HTTP headers to the request.
15972func (c *LocationsBucketsPatchCall) Header() http.Header {
15973	if c.header_ == nil {
15974		c.header_ = make(http.Header)
15975	}
15976	return c.header_
15977}
15978
15979func (c *LocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
15980	reqHeaders := make(http.Header)
15981	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15982	for k, v := range c.header_ {
15983		reqHeaders[k] = v
15984	}
15985	reqHeaders.Set("User-Agent", c.s.userAgent())
15986	var body io.Reader = nil
15987	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
15988	if err != nil {
15989		return nil, err
15990	}
15991	reqHeaders.Set("Content-Type", "application/json")
15992	c.urlParams_.Set("alt", alt)
15993	c.urlParams_.Set("prettyPrint", "false")
15994	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
15995	urls += "?" + c.urlParams_.Encode()
15996	req, err := http.NewRequest("PATCH", urls, body)
15997	if err != nil {
15998		return nil, err
15999	}
16000	req.Header = reqHeaders
16001	googleapi.Expand(req.URL, map[string]string{
16002		"name": c.name,
16003	})
16004	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16005}
16006
16007// Do executes the "logging.locations.buckets.patch" call.
16008// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
16009// status code is an error. Response headers are in either
16010// *LogBucket.ServerResponse.Header or (if a response was returned at
16011// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16012// to check whether the returned error was because
16013// http.StatusNotModified was returned.
16014func (c *LocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
16015	gensupport.SetOptions(c.urlParams_, opts...)
16016	res, err := c.doRequest("json")
16017	if res != nil && res.StatusCode == http.StatusNotModified {
16018		if res.Body != nil {
16019			res.Body.Close()
16020		}
16021		return nil, &googleapi.Error{
16022			Code:   res.StatusCode,
16023			Header: res.Header,
16024		}
16025	}
16026	if err != nil {
16027		return nil, err
16028	}
16029	defer googleapi.CloseBody(res)
16030	if err := googleapi.CheckResponse(res); err != nil {
16031		return nil, err
16032	}
16033	ret := &LogBucket{
16034		ServerResponse: googleapi.ServerResponse{
16035			Header:         res.Header,
16036			HTTPStatusCode: res.StatusCode,
16037		},
16038	}
16039	target := &ret
16040	if err := gensupport.DecodeResponse(target, res); err != nil {
16041		return nil, err
16042	}
16043	return ret, nil
16044	// {
16045	//   "description": "Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed.",
16046	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}",
16047	//   "httpMethod": "PATCH",
16048	//   "id": "logging.locations.buckets.patch",
16049	//   "parameterOrder": [
16050	//     "name"
16051	//   ],
16052	//   "parameters": {
16053	//     "name": {
16054	//       "description": "Required. The full resource name of the bucket to update. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
16055	//       "location": "path",
16056	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/buckets/[^/]+$",
16057	//       "required": true,
16058	//       "type": "string"
16059	//     },
16060	//     "updateMask": {
16061	//       "description": "Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days",
16062	//       "format": "google-fieldmask",
16063	//       "location": "query",
16064	//       "type": "string"
16065	//     }
16066	//   },
16067	//   "path": "v2/{+name}",
16068	//   "request": {
16069	//     "$ref": "LogBucket"
16070	//   },
16071	//   "response": {
16072	//     "$ref": "LogBucket"
16073	//   },
16074	//   "scopes": [
16075	//     "https://www.googleapis.com/auth/cloud-platform",
16076	//     "https://www.googleapis.com/auth/logging.admin"
16077	//   ]
16078	// }
16079
16080}
16081
16082// method id "logging.locations.buckets.undelete":
16083
16084type LocationsBucketsUndeleteCall struct {
16085	s                     *Service
16086	name                  string
16087	undeletebucketrequest *UndeleteBucketRequest
16088	urlParams_            gensupport.URLParams
16089	ctx_                  context.Context
16090	header_               http.Header
16091}
16092
16093// Undelete: Undeletes a log bucket. A bucket that has been deleted can
16094// be undeleted within the grace period of 7 days.
16095//
16096// - name: The full resource name of the bucket to undelete.
16097//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
16098//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
16099//   CKET_ID]"
16100//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
16101//   s/[BUCKET_ID]"
16102//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
16103//   For
16104//   example:"projects/my-project/locations/global/buckets/my-bucket".
16105func (r *LocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *LocationsBucketsUndeleteCall {
16106	c := &LocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16107	c.name = name
16108	c.undeletebucketrequest = undeletebucketrequest
16109	return c
16110}
16111
16112// Fields allows partial responses to be retrieved. See
16113// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16114// for more information.
16115func (c *LocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsUndeleteCall {
16116	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16117	return c
16118}
16119
16120// Context sets the context to be used in this call's Do method. Any
16121// pending HTTP request will be aborted if the provided context is
16122// canceled.
16123func (c *LocationsBucketsUndeleteCall) Context(ctx context.Context) *LocationsBucketsUndeleteCall {
16124	c.ctx_ = ctx
16125	return c
16126}
16127
16128// Header returns an http.Header that can be modified by the caller to
16129// add HTTP headers to the request.
16130func (c *LocationsBucketsUndeleteCall) Header() http.Header {
16131	if c.header_ == nil {
16132		c.header_ = make(http.Header)
16133	}
16134	return c.header_
16135}
16136
16137func (c *LocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
16138	reqHeaders := make(http.Header)
16139	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16140	for k, v := range c.header_ {
16141		reqHeaders[k] = v
16142	}
16143	reqHeaders.Set("User-Agent", c.s.userAgent())
16144	var body io.Reader = nil
16145	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
16146	if err != nil {
16147		return nil, err
16148	}
16149	reqHeaders.Set("Content-Type", "application/json")
16150	c.urlParams_.Set("alt", alt)
16151	c.urlParams_.Set("prettyPrint", "false")
16152	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
16153	urls += "?" + c.urlParams_.Encode()
16154	req, err := http.NewRequest("POST", urls, body)
16155	if err != nil {
16156		return nil, err
16157	}
16158	req.Header = reqHeaders
16159	googleapi.Expand(req.URL, map[string]string{
16160		"name": c.name,
16161	})
16162	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16163}
16164
16165// Do executes the "logging.locations.buckets.undelete" call.
16166// Exactly one of *Empty or error will be non-nil. Any non-2xx status
16167// code is an error. Response headers are in either
16168// *Empty.ServerResponse.Header or (if a response was returned at all)
16169// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16170// check whether the returned error was because http.StatusNotModified
16171// was returned.
16172func (c *LocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
16173	gensupport.SetOptions(c.urlParams_, opts...)
16174	res, err := c.doRequest("json")
16175	if res != nil && res.StatusCode == http.StatusNotModified {
16176		if res.Body != nil {
16177			res.Body.Close()
16178		}
16179		return nil, &googleapi.Error{
16180			Code:   res.StatusCode,
16181			Header: res.Header,
16182		}
16183	}
16184	if err != nil {
16185		return nil, err
16186	}
16187	defer googleapi.CloseBody(res)
16188	if err := googleapi.CheckResponse(res); err != nil {
16189		return nil, err
16190	}
16191	ret := &Empty{
16192		ServerResponse: googleapi.ServerResponse{
16193			Header:         res.Header,
16194			HTTPStatusCode: res.StatusCode,
16195		},
16196	}
16197	target := &ret
16198	if err := gensupport.DecodeResponse(target, res); err != nil {
16199		return nil, err
16200	}
16201	return ret, nil
16202	// {
16203	//   "description": "Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.",
16204	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}:undelete",
16205	//   "httpMethod": "POST",
16206	//   "id": "logging.locations.buckets.undelete",
16207	//   "parameterOrder": [
16208	//     "name"
16209	//   ],
16210	//   "parameters": {
16211	//     "name": {
16212	//       "description": "Required. The full resource name of the bucket to undelete. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
16213	//       "location": "path",
16214	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/buckets/[^/]+$",
16215	//       "required": true,
16216	//       "type": "string"
16217	//     }
16218	//   },
16219	//   "path": "v2/{+name}:undelete",
16220	//   "request": {
16221	//     "$ref": "UndeleteBucketRequest"
16222	//   },
16223	//   "response": {
16224	//     "$ref": "Empty"
16225	//   },
16226	//   "scopes": [
16227	//     "https://www.googleapis.com/auth/cloud-platform",
16228	//     "https://www.googleapis.com/auth/logging.admin"
16229	//   ]
16230	// }
16231
16232}
16233
16234// method id "logging.locations.buckets.views.create":
16235
16236type LocationsBucketsViewsCreateCall struct {
16237	s          *Service
16238	parent     string
16239	logview    *LogView
16240	urlParams_ gensupport.URLParams
16241	ctx_       context.Context
16242	header_    http.Header
16243}
16244
16245// Create: Creates a view over log entries in a log bucket. A bucket may
16246// contain a maximum of 30 views.
16247//
16248// - parent: The bucket in which to create the view
16249//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
16250//   ` For
16251//   example:"projects/my-project/locations/global/buckets/my-bucket".
16252func (r *LocationsBucketsViewsService) Create(parent string, logview *LogView) *LocationsBucketsViewsCreateCall {
16253	c := &LocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16254	c.parent = parent
16255	c.logview = logview
16256	return c
16257}
16258
16259// ViewId sets the optional parameter "viewId": Required. The id to use
16260// for this view.
16261func (c *LocationsBucketsViewsCreateCall) ViewId(viewId string) *LocationsBucketsViewsCreateCall {
16262	c.urlParams_.Set("viewId", viewId)
16263	return c
16264}
16265
16266// Fields allows partial responses to be retrieved. See
16267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16268// for more information.
16269func (c *LocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsCreateCall {
16270	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16271	return c
16272}
16273
16274// Context sets the context to be used in this call's Do method. Any
16275// pending HTTP request will be aborted if the provided context is
16276// canceled.
16277func (c *LocationsBucketsViewsCreateCall) Context(ctx context.Context) *LocationsBucketsViewsCreateCall {
16278	c.ctx_ = ctx
16279	return c
16280}
16281
16282// Header returns an http.Header that can be modified by the caller to
16283// add HTTP headers to the request.
16284func (c *LocationsBucketsViewsCreateCall) Header() http.Header {
16285	if c.header_ == nil {
16286		c.header_ = make(http.Header)
16287	}
16288	return c.header_
16289}
16290
16291func (c *LocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
16292	reqHeaders := make(http.Header)
16293	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16294	for k, v := range c.header_ {
16295		reqHeaders[k] = v
16296	}
16297	reqHeaders.Set("User-Agent", c.s.userAgent())
16298	var body io.Reader = nil
16299	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
16300	if err != nil {
16301		return nil, err
16302	}
16303	reqHeaders.Set("Content-Type", "application/json")
16304	c.urlParams_.Set("alt", alt)
16305	c.urlParams_.Set("prettyPrint", "false")
16306	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
16307	urls += "?" + c.urlParams_.Encode()
16308	req, err := http.NewRequest("POST", urls, body)
16309	if err != nil {
16310		return nil, err
16311	}
16312	req.Header = reqHeaders
16313	googleapi.Expand(req.URL, map[string]string{
16314		"parent": c.parent,
16315	})
16316	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16317}
16318
16319// Do executes the "logging.locations.buckets.views.create" call.
16320// Exactly one of *LogView or error will be non-nil. Any non-2xx status
16321// code is an error. Response headers are in either
16322// *LogView.ServerResponse.Header or (if a response was returned at all)
16323// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16324// check whether the returned error was because http.StatusNotModified
16325// was returned.
16326func (c *LocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
16327	gensupport.SetOptions(c.urlParams_, opts...)
16328	res, err := c.doRequest("json")
16329	if res != nil && res.StatusCode == http.StatusNotModified {
16330		if res.Body != nil {
16331			res.Body.Close()
16332		}
16333		return nil, &googleapi.Error{
16334			Code:   res.StatusCode,
16335			Header: res.Header,
16336		}
16337	}
16338	if err != nil {
16339		return nil, err
16340	}
16341	defer googleapi.CloseBody(res)
16342	if err := googleapi.CheckResponse(res); err != nil {
16343		return nil, err
16344	}
16345	ret := &LogView{
16346		ServerResponse: googleapi.ServerResponse{
16347			Header:         res.Header,
16348			HTTPStatusCode: res.StatusCode,
16349		},
16350	}
16351	target := &ret
16352	if err := gensupport.DecodeResponse(target, res); err != nil {
16353		return nil, err
16354	}
16355	return ret, nil
16356	// {
16357	//   "description": "Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.",
16358	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}/views",
16359	//   "httpMethod": "POST",
16360	//   "id": "logging.locations.buckets.views.create",
16361	//   "parameterOrder": [
16362	//     "parent"
16363	//   ],
16364	//   "parameters": {
16365	//     "parent": {
16366	//       "description": "Required. The bucket in which to create the view `\"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\"` For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
16367	//       "location": "path",
16368	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/buckets/[^/]+$",
16369	//       "required": true,
16370	//       "type": "string"
16371	//     },
16372	//     "viewId": {
16373	//       "description": "Required. The id to use for this view.",
16374	//       "location": "query",
16375	//       "type": "string"
16376	//     }
16377	//   },
16378	//   "path": "v2/{+parent}/views",
16379	//   "request": {
16380	//     "$ref": "LogView"
16381	//   },
16382	//   "response": {
16383	//     "$ref": "LogView"
16384	//   },
16385	//   "scopes": [
16386	//     "https://www.googleapis.com/auth/cloud-platform",
16387	//     "https://www.googleapis.com/auth/logging.admin"
16388	//   ]
16389	// }
16390
16391}
16392
16393// method id "logging.locations.buckets.views.delete":
16394
16395type LocationsBucketsViewsDeleteCall struct {
16396	s          *Service
16397	name       string
16398	urlParams_ gensupport.URLParams
16399	ctx_       context.Context
16400	header_    http.Header
16401}
16402
16403// Delete: Deletes a view on a log bucket.
16404//
16405// - name: The full resource name of the view to delete:
16406//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
16407//   iews/[VIEW_ID]" For
16408//   example:"projects/my-project/locations/global/buckets/my-bucket/view
16409//   s/my-view".
16410func (r *LocationsBucketsViewsService) Delete(name string) *LocationsBucketsViewsDeleteCall {
16411	c := &LocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16412	c.name = name
16413	return c
16414}
16415
16416// Fields allows partial responses to be retrieved. See
16417// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16418// for more information.
16419func (c *LocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsDeleteCall {
16420	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16421	return c
16422}
16423
16424// Context sets the context to be used in this call's Do method. Any
16425// pending HTTP request will be aborted if the provided context is
16426// canceled.
16427func (c *LocationsBucketsViewsDeleteCall) Context(ctx context.Context) *LocationsBucketsViewsDeleteCall {
16428	c.ctx_ = ctx
16429	return c
16430}
16431
16432// Header returns an http.Header that can be modified by the caller to
16433// add HTTP headers to the request.
16434func (c *LocationsBucketsViewsDeleteCall) Header() http.Header {
16435	if c.header_ == nil {
16436		c.header_ = make(http.Header)
16437	}
16438	return c.header_
16439}
16440
16441func (c *LocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
16442	reqHeaders := make(http.Header)
16443	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16444	for k, v := range c.header_ {
16445		reqHeaders[k] = v
16446	}
16447	reqHeaders.Set("User-Agent", c.s.userAgent())
16448	var body io.Reader = nil
16449	c.urlParams_.Set("alt", alt)
16450	c.urlParams_.Set("prettyPrint", "false")
16451	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
16452	urls += "?" + c.urlParams_.Encode()
16453	req, err := http.NewRequest("DELETE", urls, body)
16454	if err != nil {
16455		return nil, err
16456	}
16457	req.Header = reqHeaders
16458	googleapi.Expand(req.URL, map[string]string{
16459		"name": c.name,
16460	})
16461	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16462}
16463
16464// Do executes the "logging.locations.buckets.views.delete" call.
16465// Exactly one of *Empty or error will be non-nil. Any non-2xx status
16466// code is an error. Response headers are in either
16467// *Empty.ServerResponse.Header or (if a response was returned at all)
16468// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16469// check whether the returned error was because http.StatusNotModified
16470// was returned.
16471func (c *LocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
16472	gensupport.SetOptions(c.urlParams_, opts...)
16473	res, err := c.doRequest("json")
16474	if res != nil && res.StatusCode == http.StatusNotModified {
16475		if res.Body != nil {
16476			res.Body.Close()
16477		}
16478		return nil, &googleapi.Error{
16479			Code:   res.StatusCode,
16480			Header: res.Header,
16481		}
16482	}
16483	if err != nil {
16484		return nil, err
16485	}
16486	defer googleapi.CloseBody(res)
16487	if err := googleapi.CheckResponse(res); err != nil {
16488		return nil, err
16489	}
16490	ret := &Empty{
16491		ServerResponse: googleapi.ServerResponse{
16492			Header:         res.Header,
16493			HTTPStatusCode: res.StatusCode,
16494		},
16495	}
16496	target := &ret
16497	if err := gensupport.DecodeResponse(target, res); err != nil {
16498		return nil, err
16499	}
16500	return ret, nil
16501	// {
16502	//   "description": "Deletes a view on a log bucket.",
16503	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
16504	//   "httpMethod": "DELETE",
16505	//   "id": "logging.locations.buckets.views.delete",
16506	//   "parameterOrder": [
16507	//     "name"
16508	//   ],
16509	//   "parameters": {
16510	//     "name": {
16511	//       "description": "Required. The full resource name of the view to delete: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
16512	//       "location": "path",
16513	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
16514	//       "required": true,
16515	//       "type": "string"
16516	//     }
16517	//   },
16518	//   "path": "v2/{+name}",
16519	//   "response": {
16520	//     "$ref": "Empty"
16521	//   },
16522	//   "scopes": [
16523	//     "https://www.googleapis.com/auth/cloud-platform",
16524	//     "https://www.googleapis.com/auth/logging.admin"
16525	//   ]
16526	// }
16527
16528}
16529
16530// method id "logging.locations.buckets.views.get":
16531
16532type LocationsBucketsViewsGetCall struct {
16533	s            *Service
16534	name         string
16535	urlParams_   gensupport.URLParams
16536	ifNoneMatch_ string
16537	ctx_         context.Context
16538	header_      http.Header
16539}
16540
16541// Get: Gets a view on a log bucket..
16542//
16543// - name: The resource name of the policy:
16544//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
16545//   iews/[VIEW_ID]" For
16546//   example:"projects/my-project/locations/global/buckets/my-bucket/view
16547//   s/my-view".
16548func (r *LocationsBucketsViewsService) Get(name string) *LocationsBucketsViewsGetCall {
16549	c := &LocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16550	c.name = name
16551	return c
16552}
16553
16554// Fields allows partial responses to be retrieved. See
16555// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16556// for more information.
16557func (c *LocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsGetCall {
16558	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16559	return c
16560}
16561
16562// IfNoneMatch sets the optional parameter which makes the operation
16563// fail if the object's ETag matches the given value. This is useful for
16564// getting updates only after the object has changed since the last
16565// request. Use googleapi.IsNotModified to check whether the response
16566// error from Do is the result of In-None-Match.
16567func (c *LocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *LocationsBucketsViewsGetCall {
16568	c.ifNoneMatch_ = entityTag
16569	return c
16570}
16571
16572// Context sets the context to be used in this call's Do method. Any
16573// pending HTTP request will be aborted if the provided context is
16574// canceled.
16575func (c *LocationsBucketsViewsGetCall) Context(ctx context.Context) *LocationsBucketsViewsGetCall {
16576	c.ctx_ = ctx
16577	return c
16578}
16579
16580// Header returns an http.Header that can be modified by the caller to
16581// add HTTP headers to the request.
16582func (c *LocationsBucketsViewsGetCall) Header() http.Header {
16583	if c.header_ == nil {
16584		c.header_ = make(http.Header)
16585	}
16586	return c.header_
16587}
16588
16589func (c *LocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
16590	reqHeaders := make(http.Header)
16591	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16592	for k, v := range c.header_ {
16593		reqHeaders[k] = v
16594	}
16595	reqHeaders.Set("User-Agent", c.s.userAgent())
16596	if c.ifNoneMatch_ != "" {
16597		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16598	}
16599	var body io.Reader = nil
16600	c.urlParams_.Set("alt", alt)
16601	c.urlParams_.Set("prettyPrint", "false")
16602	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
16603	urls += "?" + c.urlParams_.Encode()
16604	req, err := http.NewRequest("GET", urls, body)
16605	if err != nil {
16606		return nil, err
16607	}
16608	req.Header = reqHeaders
16609	googleapi.Expand(req.URL, map[string]string{
16610		"name": c.name,
16611	})
16612	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16613}
16614
16615// Do executes the "logging.locations.buckets.views.get" call.
16616// Exactly one of *LogView or error will be non-nil. Any non-2xx status
16617// code is an error. Response headers are in either
16618// *LogView.ServerResponse.Header or (if a response was returned at all)
16619// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16620// check whether the returned error was because http.StatusNotModified
16621// was returned.
16622func (c *LocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
16623	gensupport.SetOptions(c.urlParams_, opts...)
16624	res, err := c.doRequest("json")
16625	if res != nil && res.StatusCode == http.StatusNotModified {
16626		if res.Body != nil {
16627			res.Body.Close()
16628		}
16629		return nil, &googleapi.Error{
16630			Code:   res.StatusCode,
16631			Header: res.Header,
16632		}
16633	}
16634	if err != nil {
16635		return nil, err
16636	}
16637	defer googleapi.CloseBody(res)
16638	if err := googleapi.CheckResponse(res); err != nil {
16639		return nil, err
16640	}
16641	ret := &LogView{
16642		ServerResponse: googleapi.ServerResponse{
16643			Header:         res.Header,
16644			HTTPStatusCode: res.StatusCode,
16645		},
16646	}
16647	target := &ret
16648	if err := gensupport.DecodeResponse(target, res); err != nil {
16649		return nil, err
16650	}
16651	return ret, nil
16652	// {
16653	//   "description": "Gets a view on a log bucket..",
16654	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
16655	//   "httpMethod": "GET",
16656	//   "id": "logging.locations.buckets.views.get",
16657	//   "parameterOrder": [
16658	//     "name"
16659	//   ],
16660	//   "parameters": {
16661	//     "name": {
16662	//       "description": "Required. The resource name of the policy: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
16663	//       "location": "path",
16664	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
16665	//       "required": true,
16666	//       "type": "string"
16667	//     }
16668	//   },
16669	//   "path": "v2/{+name}",
16670	//   "response": {
16671	//     "$ref": "LogView"
16672	//   },
16673	//   "scopes": [
16674	//     "https://www.googleapis.com/auth/cloud-platform",
16675	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
16676	//     "https://www.googleapis.com/auth/logging.admin",
16677	//     "https://www.googleapis.com/auth/logging.read"
16678	//   ]
16679	// }
16680
16681}
16682
16683// method id "logging.locations.buckets.views.list":
16684
16685type LocationsBucketsViewsListCall struct {
16686	s            *Service
16687	parent       string
16688	urlParams_   gensupport.URLParams
16689	ifNoneMatch_ string
16690	ctx_         context.Context
16691	header_      http.Header
16692}
16693
16694// List: Lists views on a log bucket.
16695//
16696// - parent: The bucket whose views are to be listed:
16697//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
16698func (r *LocationsBucketsViewsService) List(parent string) *LocationsBucketsViewsListCall {
16699	c := &LocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16700	c.parent = parent
16701	return c
16702}
16703
16704// PageSize sets the optional parameter "pageSize": The maximum number
16705// of results to return from this request.Non-positive values are
16706// ignored. The presence of nextPageToken in the response indicates that
16707// more results might be available.
16708func (c *LocationsBucketsViewsListCall) PageSize(pageSize int64) *LocationsBucketsViewsListCall {
16709	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16710	return c
16711}
16712
16713// PageToken sets the optional parameter "pageToken": If present, then
16714// retrieve the next batch of results from the preceding call to this
16715// method. pageToken must be the value of nextPageToken from the
16716// previous response. The values of other method parameters should be
16717// identical to those in the previous call.
16718func (c *LocationsBucketsViewsListCall) PageToken(pageToken string) *LocationsBucketsViewsListCall {
16719	c.urlParams_.Set("pageToken", pageToken)
16720	return c
16721}
16722
16723// Fields allows partial responses to be retrieved. See
16724// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16725// for more information.
16726func (c *LocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsListCall {
16727	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16728	return c
16729}
16730
16731// IfNoneMatch sets the optional parameter which makes the operation
16732// fail if the object's ETag matches the given value. This is useful for
16733// getting updates only after the object has changed since the last
16734// request. Use googleapi.IsNotModified to check whether the response
16735// error from Do is the result of In-None-Match.
16736func (c *LocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *LocationsBucketsViewsListCall {
16737	c.ifNoneMatch_ = entityTag
16738	return c
16739}
16740
16741// Context sets the context to be used in this call's Do method. Any
16742// pending HTTP request will be aborted if the provided context is
16743// canceled.
16744func (c *LocationsBucketsViewsListCall) Context(ctx context.Context) *LocationsBucketsViewsListCall {
16745	c.ctx_ = ctx
16746	return c
16747}
16748
16749// Header returns an http.Header that can be modified by the caller to
16750// add HTTP headers to the request.
16751func (c *LocationsBucketsViewsListCall) Header() http.Header {
16752	if c.header_ == nil {
16753		c.header_ = make(http.Header)
16754	}
16755	return c.header_
16756}
16757
16758func (c *LocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
16759	reqHeaders := make(http.Header)
16760	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16761	for k, v := range c.header_ {
16762		reqHeaders[k] = v
16763	}
16764	reqHeaders.Set("User-Agent", c.s.userAgent())
16765	if c.ifNoneMatch_ != "" {
16766		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16767	}
16768	var body io.Reader = nil
16769	c.urlParams_.Set("alt", alt)
16770	c.urlParams_.Set("prettyPrint", "false")
16771	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
16772	urls += "?" + c.urlParams_.Encode()
16773	req, err := http.NewRequest("GET", urls, body)
16774	if err != nil {
16775		return nil, err
16776	}
16777	req.Header = reqHeaders
16778	googleapi.Expand(req.URL, map[string]string{
16779		"parent": c.parent,
16780	})
16781	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16782}
16783
16784// Do executes the "logging.locations.buckets.views.list" call.
16785// Exactly one of *ListViewsResponse or error will be non-nil. Any
16786// non-2xx status code is an error. Response headers are in either
16787// *ListViewsResponse.ServerResponse.Header or (if a response was
16788// returned at all) in error.(*googleapi.Error).Header. Use
16789// googleapi.IsNotModified to check whether the returned error was
16790// because http.StatusNotModified was returned.
16791func (c *LocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
16792	gensupport.SetOptions(c.urlParams_, opts...)
16793	res, err := c.doRequest("json")
16794	if res != nil && res.StatusCode == http.StatusNotModified {
16795		if res.Body != nil {
16796			res.Body.Close()
16797		}
16798		return nil, &googleapi.Error{
16799			Code:   res.StatusCode,
16800			Header: res.Header,
16801		}
16802	}
16803	if err != nil {
16804		return nil, err
16805	}
16806	defer googleapi.CloseBody(res)
16807	if err := googleapi.CheckResponse(res); err != nil {
16808		return nil, err
16809	}
16810	ret := &ListViewsResponse{
16811		ServerResponse: googleapi.ServerResponse{
16812			Header:         res.Header,
16813			HTTPStatusCode: res.StatusCode,
16814		},
16815	}
16816	target := &ret
16817	if err := gensupport.DecodeResponse(target, res); err != nil {
16818		return nil, err
16819	}
16820	return ret, nil
16821	// {
16822	//   "description": "Lists views on a log bucket.",
16823	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}/views",
16824	//   "httpMethod": "GET",
16825	//   "id": "logging.locations.buckets.views.list",
16826	//   "parameterOrder": [
16827	//     "parent"
16828	//   ],
16829	//   "parameters": {
16830	//     "pageSize": {
16831	//       "description": "Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
16832	//       "format": "int32",
16833	//       "location": "query",
16834	//       "type": "integer"
16835	//     },
16836	//     "pageToken": {
16837	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
16838	//       "location": "query",
16839	//       "type": "string"
16840	//     },
16841	//     "parent": {
16842	//       "description": "Required. The bucket whose views are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" ",
16843	//       "location": "path",
16844	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/buckets/[^/]+$",
16845	//       "required": true,
16846	//       "type": "string"
16847	//     }
16848	//   },
16849	//   "path": "v2/{+parent}/views",
16850	//   "response": {
16851	//     "$ref": "ListViewsResponse"
16852	//   },
16853	//   "scopes": [
16854	//     "https://www.googleapis.com/auth/cloud-platform",
16855	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
16856	//     "https://www.googleapis.com/auth/logging.admin",
16857	//     "https://www.googleapis.com/auth/logging.read"
16858	//   ]
16859	// }
16860
16861}
16862
16863// Pages invokes f for each page of results.
16864// A non-nil error returned from f will halt the iteration.
16865// The provided context supersedes any context provided to the Context method.
16866func (c *LocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
16867	c.ctx_ = ctx
16868	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16869	for {
16870		x, err := c.Do()
16871		if err != nil {
16872			return err
16873		}
16874		if err := f(x); err != nil {
16875			return err
16876		}
16877		if x.NextPageToken == "" {
16878			return nil
16879		}
16880		c.PageToken(x.NextPageToken)
16881	}
16882}
16883
16884// method id "logging.locations.buckets.views.patch":
16885
16886type LocationsBucketsViewsPatchCall struct {
16887	s          *Service
16888	name       string
16889	logview    *LogView
16890	urlParams_ gensupport.URLParams
16891	ctx_       context.Context
16892	header_    http.Header
16893}
16894
16895// Patch: Updates a view on a log bucket. This method replaces the
16896// following fields in the existing view with values from the new view:
16897// filter.
16898//
16899// - name: The full resource name of the view to update
16900//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
16901//   iews/[VIEW_ID]" For
16902//   example:"projects/my-project/locations/global/buckets/my-bucket/view
16903//   s/my-view".
16904func (r *LocationsBucketsViewsService) Patch(name string, logview *LogView) *LocationsBucketsViewsPatchCall {
16905	c := &LocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16906	c.name = name
16907	c.logview = logview
16908	return c
16909}
16910
16911// UpdateMask sets the optional parameter "updateMask": Field mask that
16912// specifies the fields in view that need an update. A field will be
16913// overwritten if, and only if, it is in the update mask. name and
16914// output only fields cannot be updated.For a detailed FieldMask
16915// definition, see
16916// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
16917// example: updateMask=filter
16918func (c *LocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *LocationsBucketsViewsPatchCall {
16919	c.urlParams_.Set("updateMask", updateMask)
16920	return c
16921}
16922
16923// Fields allows partial responses to be retrieved. See
16924// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16925// for more information.
16926func (c *LocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsPatchCall {
16927	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16928	return c
16929}
16930
16931// Context sets the context to be used in this call's Do method. Any
16932// pending HTTP request will be aborted if the provided context is
16933// canceled.
16934func (c *LocationsBucketsViewsPatchCall) Context(ctx context.Context) *LocationsBucketsViewsPatchCall {
16935	c.ctx_ = ctx
16936	return c
16937}
16938
16939// Header returns an http.Header that can be modified by the caller to
16940// add HTTP headers to the request.
16941func (c *LocationsBucketsViewsPatchCall) Header() http.Header {
16942	if c.header_ == nil {
16943		c.header_ = make(http.Header)
16944	}
16945	return c.header_
16946}
16947
16948func (c *LocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
16949	reqHeaders := make(http.Header)
16950	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16951	for k, v := range c.header_ {
16952		reqHeaders[k] = v
16953	}
16954	reqHeaders.Set("User-Agent", c.s.userAgent())
16955	var body io.Reader = nil
16956	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
16957	if err != nil {
16958		return nil, err
16959	}
16960	reqHeaders.Set("Content-Type", "application/json")
16961	c.urlParams_.Set("alt", alt)
16962	c.urlParams_.Set("prettyPrint", "false")
16963	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
16964	urls += "?" + c.urlParams_.Encode()
16965	req, err := http.NewRequest("PATCH", urls, body)
16966	if err != nil {
16967		return nil, err
16968	}
16969	req.Header = reqHeaders
16970	googleapi.Expand(req.URL, map[string]string{
16971		"name": c.name,
16972	})
16973	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16974}
16975
16976// Do executes the "logging.locations.buckets.views.patch" call.
16977// Exactly one of *LogView or error will be non-nil. Any non-2xx status
16978// code is an error. Response headers are in either
16979// *LogView.ServerResponse.Header or (if a response was returned at all)
16980// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16981// check whether the returned error was because http.StatusNotModified
16982// was returned.
16983func (c *LocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
16984	gensupport.SetOptions(c.urlParams_, opts...)
16985	res, err := c.doRequest("json")
16986	if res != nil && res.StatusCode == http.StatusNotModified {
16987		if res.Body != nil {
16988			res.Body.Close()
16989		}
16990		return nil, &googleapi.Error{
16991			Code:   res.StatusCode,
16992			Header: res.Header,
16993		}
16994	}
16995	if err != nil {
16996		return nil, err
16997	}
16998	defer googleapi.CloseBody(res)
16999	if err := googleapi.CheckResponse(res); err != nil {
17000		return nil, err
17001	}
17002	ret := &LogView{
17003		ServerResponse: googleapi.ServerResponse{
17004			Header:         res.Header,
17005			HTTPStatusCode: res.StatusCode,
17006		},
17007	}
17008	target := &ret
17009	if err := gensupport.DecodeResponse(target, res); err != nil {
17010		return nil, err
17011	}
17012	return ret, nil
17013	// {
17014	//   "description": "Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter.",
17015	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
17016	//   "httpMethod": "PATCH",
17017	//   "id": "logging.locations.buckets.views.patch",
17018	//   "parameterOrder": [
17019	//     "name"
17020	//   ],
17021	//   "parameters": {
17022	//     "name": {
17023	//       "description": "Required. The full resource name of the view to update \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
17024	//       "location": "path",
17025	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
17026	//       "required": true,
17027	//       "type": "string"
17028	//     },
17029	//     "updateMask": {
17030	//       "description": "Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
17031	//       "format": "google-fieldmask",
17032	//       "location": "query",
17033	//       "type": "string"
17034	//     }
17035	//   },
17036	//   "path": "v2/{+name}",
17037	//   "request": {
17038	//     "$ref": "LogView"
17039	//   },
17040	//   "response": {
17041	//     "$ref": "LogView"
17042	//   },
17043	//   "scopes": [
17044	//     "https://www.googleapis.com/auth/cloud-platform",
17045	//     "https://www.googleapis.com/auth/logging.admin"
17046	//   ]
17047	// }
17048
17049}
17050
17051// method id "logging.locations.operations.cancel":
17052
17053type LocationsOperationsCancelCall struct {
17054	s                      *Service
17055	name                   string
17056	canceloperationrequest *CancelOperationRequest
17057	urlParams_             gensupport.URLParams
17058	ctx_                   context.Context
17059	header_                http.Header
17060}
17061
17062// Cancel: Starts asynchronous cancellation on a long-running operation.
17063// The server makes a best effort to cancel the operation, but success
17064// is not guaranteed. If the server doesn't support this method, it
17065// returns google.rpc.Code.UNIMPLEMENTED. Clients can use
17066// Operations.GetOperation or other methods to check whether the
17067// cancellation succeeded or whether the operation completed despite
17068// cancellation. On successful cancellation, the operation is not
17069// deleted; instead, it becomes an operation with an Operation.error
17070// value with a google.rpc.Status.code of 1, corresponding to
17071// Code.CANCELLED.
17072//
17073// - name: The name of the operation resource to be cancelled.
17074func (r *LocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *LocationsOperationsCancelCall {
17075	c := &LocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17076	c.name = name
17077	c.canceloperationrequest = canceloperationrequest
17078	return c
17079}
17080
17081// Fields allows partial responses to be retrieved. See
17082// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17083// for more information.
17084func (c *LocationsOperationsCancelCall) Fields(s ...googleapi.Field) *LocationsOperationsCancelCall {
17085	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17086	return c
17087}
17088
17089// Context sets the context to be used in this call's Do method. Any
17090// pending HTTP request will be aborted if the provided context is
17091// canceled.
17092func (c *LocationsOperationsCancelCall) Context(ctx context.Context) *LocationsOperationsCancelCall {
17093	c.ctx_ = ctx
17094	return c
17095}
17096
17097// Header returns an http.Header that can be modified by the caller to
17098// add HTTP headers to the request.
17099func (c *LocationsOperationsCancelCall) Header() http.Header {
17100	if c.header_ == nil {
17101		c.header_ = make(http.Header)
17102	}
17103	return c.header_
17104}
17105
17106func (c *LocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
17107	reqHeaders := make(http.Header)
17108	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
17109	for k, v := range c.header_ {
17110		reqHeaders[k] = v
17111	}
17112	reqHeaders.Set("User-Agent", c.s.userAgent())
17113	var body io.Reader = nil
17114	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
17115	if err != nil {
17116		return nil, err
17117	}
17118	reqHeaders.Set("Content-Type", "application/json")
17119	c.urlParams_.Set("alt", alt)
17120	c.urlParams_.Set("prettyPrint", "false")
17121	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
17122	urls += "?" + c.urlParams_.Encode()
17123	req, err := http.NewRequest("POST", urls, body)
17124	if err != nil {
17125		return nil, err
17126	}
17127	req.Header = reqHeaders
17128	googleapi.Expand(req.URL, map[string]string{
17129		"name": c.name,
17130	})
17131	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17132}
17133
17134// Do executes the "logging.locations.operations.cancel" call.
17135// Exactly one of *Empty or error will be non-nil. Any non-2xx status
17136// code is an error. Response headers are in either
17137// *Empty.ServerResponse.Header or (if a response was returned at all)
17138// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17139// check whether the returned error was because http.StatusNotModified
17140// was returned.
17141func (c *LocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
17142	gensupport.SetOptions(c.urlParams_, opts...)
17143	res, err := c.doRequest("json")
17144	if res != nil && res.StatusCode == http.StatusNotModified {
17145		if res.Body != nil {
17146			res.Body.Close()
17147		}
17148		return nil, &googleapi.Error{
17149			Code:   res.StatusCode,
17150			Header: res.Header,
17151		}
17152	}
17153	if err != nil {
17154		return nil, err
17155	}
17156	defer googleapi.CloseBody(res)
17157	if err := googleapi.CheckResponse(res); err != nil {
17158		return nil, err
17159	}
17160	ret := &Empty{
17161		ServerResponse: googleapi.ServerResponse{
17162			Header:         res.Header,
17163			HTTPStatusCode: res.StatusCode,
17164		},
17165	}
17166	target := &ret
17167	if err := gensupport.DecodeResponse(target, res); err != nil {
17168		return nil, err
17169	}
17170	return ret, nil
17171	// {
17172	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.",
17173	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/operations/{operationsId}:cancel",
17174	//   "httpMethod": "POST",
17175	//   "id": "logging.locations.operations.cancel",
17176	//   "parameterOrder": [
17177	//     "name"
17178	//   ],
17179	//   "parameters": {
17180	//     "name": {
17181	//       "description": "The name of the operation resource to be cancelled.",
17182	//       "location": "path",
17183	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/operations/[^/]+$",
17184	//       "required": true,
17185	//       "type": "string"
17186	//     }
17187	//   },
17188	//   "path": "v2/{+name}:cancel",
17189	//   "request": {
17190	//     "$ref": "CancelOperationRequest"
17191	//   },
17192	//   "response": {
17193	//     "$ref": "Empty"
17194	//   },
17195	//   "scopes": [
17196	//     "https://www.googleapis.com/auth/cloud-platform",
17197	//     "https://www.googleapis.com/auth/logging.admin"
17198	//   ]
17199	// }
17200
17201}
17202
17203// method id "logging.locations.operations.get":
17204
17205type LocationsOperationsGetCall struct {
17206	s            *Service
17207	name         string
17208	urlParams_   gensupport.URLParams
17209	ifNoneMatch_ string
17210	ctx_         context.Context
17211	header_      http.Header
17212}
17213
17214// Get: Gets the latest state of a long-running operation. Clients can
17215// use this method to poll the operation result at intervals as
17216// recommended by the API service.
17217//
17218// - name: The name of the operation resource.
17219func (r *LocationsOperationsService) Get(name string) *LocationsOperationsGetCall {
17220	c := &LocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17221	c.name = name
17222	return c
17223}
17224
17225// Fields allows partial responses to be retrieved. See
17226// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17227// for more information.
17228func (c *LocationsOperationsGetCall) Fields(s ...googleapi.Field) *LocationsOperationsGetCall {
17229	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17230	return c
17231}
17232
17233// IfNoneMatch sets the optional parameter which makes the operation
17234// fail if the object's ETag matches the given value. This is useful for
17235// getting updates only after the object has changed since the last
17236// request. Use googleapi.IsNotModified to check whether the response
17237// error from Do is the result of In-None-Match.
17238func (c *LocationsOperationsGetCall) IfNoneMatch(entityTag string) *LocationsOperationsGetCall {
17239	c.ifNoneMatch_ = entityTag
17240	return c
17241}
17242
17243// Context sets the context to be used in this call's Do method. Any
17244// pending HTTP request will be aborted if the provided context is
17245// canceled.
17246func (c *LocationsOperationsGetCall) Context(ctx context.Context) *LocationsOperationsGetCall {
17247	c.ctx_ = ctx
17248	return c
17249}
17250
17251// Header returns an http.Header that can be modified by the caller to
17252// add HTTP headers to the request.
17253func (c *LocationsOperationsGetCall) Header() http.Header {
17254	if c.header_ == nil {
17255		c.header_ = make(http.Header)
17256	}
17257	return c.header_
17258}
17259
17260func (c *LocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
17261	reqHeaders := make(http.Header)
17262	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
17263	for k, v := range c.header_ {
17264		reqHeaders[k] = v
17265	}
17266	reqHeaders.Set("User-Agent", c.s.userAgent())
17267	if c.ifNoneMatch_ != "" {
17268		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17269	}
17270	var body io.Reader = nil
17271	c.urlParams_.Set("alt", alt)
17272	c.urlParams_.Set("prettyPrint", "false")
17273	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
17274	urls += "?" + c.urlParams_.Encode()
17275	req, err := http.NewRequest("GET", urls, body)
17276	if err != nil {
17277		return nil, err
17278	}
17279	req.Header = reqHeaders
17280	googleapi.Expand(req.URL, map[string]string{
17281		"name": c.name,
17282	})
17283	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17284}
17285
17286// Do executes the "logging.locations.operations.get" call.
17287// Exactly one of *Operation or error will be non-nil. Any non-2xx
17288// status code is an error. Response headers are in either
17289// *Operation.ServerResponse.Header or (if a response was returned at
17290// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17291// to check whether the returned error was because
17292// http.StatusNotModified was returned.
17293func (c *LocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17294	gensupport.SetOptions(c.urlParams_, opts...)
17295	res, err := c.doRequest("json")
17296	if res != nil && res.StatusCode == http.StatusNotModified {
17297		if res.Body != nil {
17298			res.Body.Close()
17299		}
17300		return nil, &googleapi.Error{
17301			Code:   res.StatusCode,
17302			Header: res.Header,
17303		}
17304	}
17305	if err != nil {
17306		return nil, err
17307	}
17308	defer googleapi.CloseBody(res)
17309	if err := googleapi.CheckResponse(res); err != nil {
17310		return nil, err
17311	}
17312	ret := &Operation{
17313		ServerResponse: googleapi.ServerResponse{
17314			Header:         res.Header,
17315			HTTPStatusCode: res.StatusCode,
17316		},
17317	}
17318	target := &ret
17319	if err := gensupport.DecodeResponse(target, res); err != nil {
17320		return nil, err
17321	}
17322	return ret, nil
17323	// {
17324	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
17325	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/operations/{operationsId}",
17326	//   "httpMethod": "GET",
17327	//   "id": "logging.locations.operations.get",
17328	//   "parameterOrder": [
17329	//     "name"
17330	//   ],
17331	//   "parameters": {
17332	//     "name": {
17333	//       "description": "The name of the operation resource.",
17334	//       "location": "path",
17335	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+/operations/[^/]+$",
17336	//       "required": true,
17337	//       "type": "string"
17338	//     }
17339	//   },
17340	//   "path": "v2/{+name}",
17341	//   "response": {
17342	//     "$ref": "Operation"
17343	//   },
17344	//   "scopes": [
17345	//     "https://www.googleapis.com/auth/cloud-platform",
17346	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
17347	//     "https://www.googleapis.com/auth/logging.admin",
17348	//     "https://www.googleapis.com/auth/logging.read"
17349	//   ]
17350	// }
17351
17352}
17353
17354// method id "logging.locations.operations.list":
17355
17356type LocationsOperationsListCall struct {
17357	s            *Service
17358	name         string
17359	urlParams_   gensupport.URLParams
17360	ifNoneMatch_ string
17361	ctx_         context.Context
17362	header_      http.Header
17363}
17364
17365// List: Lists operations that match the specified filter in the
17366// request. If the server doesn't support this method, it returns
17367// UNIMPLEMENTED.NOTE: the name binding allows API services to override
17368// the binding to use different resource name schemes, such as
17369// users/*/operations. To override the binding, API services can add a
17370// binding such as "/v1/{name=users/*}/operations" to their service
17371// configuration. For backwards compatibility, the default name includes
17372// the operations collection id, however overriding users must ensure
17373// the name binding is the parent resource, without the operations
17374// collection id.
17375//
17376// - name: The name of the operation's parent resource.
17377func (r *LocationsOperationsService) List(name string) *LocationsOperationsListCall {
17378	c := &LocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17379	c.name = name
17380	return c
17381}
17382
17383// Filter sets the optional parameter "filter": The standard list
17384// filter.
17385func (c *LocationsOperationsListCall) Filter(filter string) *LocationsOperationsListCall {
17386	c.urlParams_.Set("filter", filter)
17387	return c
17388}
17389
17390// PageSize sets the optional parameter "pageSize": The standard list
17391// page size.
17392func (c *LocationsOperationsListCall) PageSize(pageSize int64) *LocationsOperationsListCall {
17393	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17394	return c
17395}
17396
17397// PageToken sets the optional parameter "pageToken": The standard list
17398// page token.
17399func (c *LocationsOperationsListCall) PageToken(pageToken string) *LocationsOperationsListCall {
17400	c.urlParams_.Set("pageToken", pageToken)
17401	return c
17402}
17403
17404// Fields allows partial responses to be retrieved. See
17405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17406// for more information.
17407func (c *LocationsOperationsListCall) Fields(s ...googleapi.Field) *LocationsOperationsListCall {
17408	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17409	return c
17410}
17411
17412// IfNoneMatch sets the optional parameter which makes the operation
17413// fail if the object's ETag matches the given value. This is useful for
17414// getting updates only after the object has changed since the last
17415// request. Use googleapi.IsNotModified to check whether the response
17416// error from Do is the result of In-None-Match.
17417func (c *LocationsOperationsListCall) IfNoneMatch(entityTag string) *LocationsOperationsListCall {
17418	c.ifNoneMatch_ = entityTag
17419	return c
17420}
17421
17422// Context sets the context to be used in this call's Do method. Any
17423// pending HTTP request will be aborted if the provided context is
17424// canceled.
17425func (c *LocationsOperationsListCall) Context(ctx context.Context) *LocationsOperationsListCall {
17426	c.ctx_ = ctx
17427	return c
17428}
17429
17430// Header returns an http.Header that can be modified by the caller to
17431// add HTTP headers to the request.
17432func (c *LocationsOperationsListCall) Header() http.Header {
17433	if c.header_ == nil {
17434		c.header_ = make(http.Header)
17435	}
17436	return c.header_
17437}
17438
17439func (c *LocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
17440	reqHeaders := make(http.Header)
17441	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
17442	for k, v := range c.header_ {
17443		reqHeaders[k] = v
17444	}
17445	reqHeaders.Set("User-Agent", c.s.userAgent())
17446	if c.ifNoneMatch_ != "" {
17447		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17448	}
17449	var body io.Reader = nil
17450	c.urlParams_.Set("alt", alt)
17451	c.urlParams_.Set("prettyPrint", "false")
17452	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
17453	urls += "?" + c.urlParams_.Encode()
17454	req, err := http.NewRequest("GET", urls, body)
17455	if err != nil {
17456		return nil, err
17457	}
17458	req.Header = reqHeaders
17459	googleapi.Expand(req.URL, map[string]string{
17460		"name": c.name,
17461	})
17462	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17463}
17464
17465// Do executes the "logging.locations.operations.list" call.
17466// Exactly one of *ListOperationsResponse or error will be non-nil. Any
17467// non-2xx status code is an error. Response headers are in either
17468// *ListOperationsResponse.ServerResponse.Header or (if a response was
17469// returned at all) in error.(*googleapi.Error).Header. Use
17470// googleapi.IsNotModified to check whether the returned error was
17471// because http.StatusNotModified was returned.
17472func (c *LocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
17473	gensupport.SetOptions(c.urlParams_, opts...)
17474	res, err := c.doRequest("json")
17475	if res != nil && res.StatusCode == http.StatusNotModified {
17476		if res.Body != nil {
17477			res.Body.Close()
17478		}
17479		return nil, &googleapi.Error{
17480			Code:   res.StatusCode,
17481			Header: res.Header,
17482		}
17483	}
17484	if err != nil {
17485		return nil, err
17486	}
17487	defer googleapi.CloseBody(res)
17488	if err := googleapi.CheckResponse(res); err != nil {
17489		return nil, err
17490	}
17491	ret := &ListOperationsResponse{
17492		ServerResponse: googleapi.ServerResponse{
17493			Header:         res.Header,
17494			HTTPStatusCode: res.StatusCode,
17495		},
17496	}
17497	target := &ret
17498	if err := gensupport.DecodeResponse(target, res); err != nil {
17499		return nil, err
17500	}
17501	return ret, nil
17502	// {
17503	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
17504	//   "flatPath": "v2/{v2Id}/{v2Id1}/locations/{locationsId}/operations",
17505	//   "httpMethod": "GET",
17506	//   "id": "logging.locations.operations.list",
17507	//   "parameterOrder": [
17508	//     "name"
17509	//   ],
17510	//   "parameters": {
17511	//     "filter": {
17512	//       "description": "The standard list filter.",
17513	//       "location": "query",
17514	//       "type": "string"
17515	//     },
17516	//     "name": {
17517	//       "description": "The name of the operation's parent resource.",
17518	//       "location": "path",
17519	//       "pattern": "^[^/]+/[^/]+/locations/[^/]+$",
17520	//       "required": true,
17521	//       "type": "string"
17522	//     },
17523	//     "pageSize": {
17524	//       "description": "The standard list page size.",
17525	//       "format": "int32",
17526	//       "location": "query",
17527	//       "type": "integer"
17528	//     },
17529	//     "pageToken": {
17530	//       "description": "The standard list page token.",
17531	//       "location": "query",
17532	//       "type": "string"
17533	//     }
17534	//   },
17535	//   "path": "v2/{+name}/operations",
17536	//   "response": {
17537	//     "$ref": "ListOperationsResponse"
17538	//   },
17539	//   "scopes": [
17540	//     "https://www.googleapis.com/auth/cloud-platform",
17541	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
17542	//     "https://www.googleapis.com/auth/logging.admin",
17543	//     "https://www.googleapis.com/auth/logging.read"
17544	//   ]
17545	// }
17546
17547}
17548
17549// Pages invokes f for each page of results.
17550// A non-nil error returned from f will halt the iteration.
17551// The provided context supersedes any context provided to the Context method.
17552func (c *LocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
17553	c.ctx_ = ctx
17554	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17555	for {
17556		x, err := c.Do()
17557		if err != nil {
17558			return err
17559		}
17560		if err := f(x); err != nil {
17561			return err
17562		}
17563		if x.NextPageToken == "" {
17564			return nil
17565		}
17566		c.PageToken(x.NextPageToken)
17567	}
17568}
17569
17570// method id "logging.logs.delete":
17571
17572type LogsDeleteCall struct {
17573	s          *Service
17574	logName    string
17575	urlParams_ gensupport.URLParams
17576	ctx_       context.Context
17577	header_    http.Header
17578}
17579
17580// Delete: Deletes all the log entries in a log for the _Default Log
17581// Bucket. The log reappears if it receives new entries. Log entries
17582// written shortly before the delete operation might not be deleted.
17583// Entries received after the delete operation with a timestamp before
17584// the operation will be deleted.
17585//
17586// - logName: The resource name of the log to delete:
17587//   projects/[PROJECT_ID]/logs/[LOG_ID]
17588//   organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
17589//   billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
17590//   folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
17591//   example, "projects/my-project-id/logs/syslog",
17592//   "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For
17593//   more information about log names, see LogEntry.
17594func (r *LogsService) Delete(logName string) *LogsDeleteCall {
17595	c := &LogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17596	c.logName = logName
17597	return c
17598}
17599
17600// Fields allows partial responses to be retrieved. See
17601// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17602// for more information.
17603func (c *LogsDeleteCall) Fields(s ...googleapi.Field) *LogsDeleteCall {
17604	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17605	return c
17606}
17607
17608// Context sets the context to be used in this call's Do method. Any
17609// pending HTTP request will be aborted if the provided context is
17610// canceled.
17611func (c *LogsDeleteCall) Context(ctx context.Context) *LogsDeleteCall {
17612	c.ctx_ = ctx
17613	return c
17614}
17615
17616// Header returns an http.Header that can be modified by the caller to
17617// add HTTP headers to the request.
17618func (c *LogsDeleteCall) Header() http.Header {
17619	if c.header_ == nil {
17620		c.header_ = make(http.Header)
17621	}
17622	return c.header_
17623}
17624
17625func (c *LogsDeleteCall) doRequest(alt string) (*http.Response, error) {
17626	reqHeaders := make(http.Header)
17627	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
17628	for k, v := range c.header_ {
17629		reqHeaders[k] = v
17630	}
17631	reqHeaders.Set("User-Agent", c.s.userAgent())
17632	var body io.Reader = nil
17633	c.urlParams_.Set("alt", alt)
17634	c.urlParams_.Set("prettyPrint", "false")
17635	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
17636	urls += "?" + c.urlParams_.Encode()
17637	req, err := http.NewRequest("DELETE", urls, body)
17638	if err != nil {
17639		return nil, err
17640	}
17641	req.Header = reqHeaders
17642	googleapi.Expand(req.URL, map[string]string{
17643		"logName": c.logName,
17644	})
17645	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17646}
17647
17648// Do executes the "logging.logs.delete" call.
17649// Exactly one of *Empty or error will be non-nil. Any non-2xx status
17650// code is an error. Response headers are in either
17651// *Empty.ServerResponse.Header or (if a response was returned at all)
17652// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17653// check whether the returned error was because http.StatusNotModified
17654// was returned.
17655func (c *LogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
17656	gensupport.SetOptions(c.urlParams_, opts...)
17657	res, err := c.doRequest("json")
17658	if res != nil && res.StatusCode == http.StatusNotModified {
17659		if res.Body != nil {
17660			res.Body.Close()
17661		}
17662		return nil, &googleapi.Error{
17663			Code:   res.StatusCode,
17664			Header: res.Header,
17665		}
17666	}
17667	if err != nil {
17668		return nil, err
17669	}
17670	defer googleapi.CloseBody(res)
17671	if err := googleapi.CheckResponse(res); err != nil {
17672		return nil, err
17673	}
17674	ret := &Empty{
17675		ServerResponse: googleapi.ServerResponse{
17676			Header:         res.Header,
17677			HTTPStatusCode: res.StatusCode,
17678		},
17679	}
17680	target := &ret
17681	if err := gensupport.DecodeResponse(target, res); err != nil {
17682		return nil, err
17683	}
17684	return ret, nil
17685	// {
17686	//   "description": "Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.",
17687	//   "flatPath": "v2/{v2Id}/{v2Id1}/logs/{logsId}",
17688	//   "httpMethod": "DELETE",
17689	//   "id": "logging.logs.delete",
17690	//   "parameterOrder": [
17691	//     "logName"
17692	//   ],
17693	//   "parameters": {
17694	//     "logName": {
17695	//       "description": "Required. The resource name of the log to delete: projects/[PROJECT_ID]/logs/[LOG_ID] organizations/[ORGANIZATION_ID]/logs/[LOG_ID] billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/123/logs/cloudaudit.googleapis.com%2Factivity\".For more information about log names, see LogEntry.",
17696	//       "location": "path",
17697	//       "pattern": "^[^/]+/[^/]+/logs/[^/]+$",
17698	//       "required": true,
17699	//       "type": "string"
17700	//     }
17701	//   },
17702	//   "path": "v2/{+logName}",
17703	//   "response": {
17704	//     "$ref": "Empty"
17705	//   },
17706	//   "scopes": [
17707	//     "https://www.googleapis.com/auth/cloud-platform",
17708	//     "https://www.googleapis.com/auth/logging.admin"
17709	//   ]
17710	// }
17711
17712}
17713
17714// method id "logging.logs.list":
17715
17716type LogsListCall struct {
17717	s            *Service
17718	parent       string
17719	urlParams_   gensupport.URLParams
17720	ifNoneMatch_ string
17721	ctx_         context.Context
17722	header_      http.Header
17723}
17724
17725// List: Lists the logs in projects, organizations, folders, or billing
17726// accounts. Only logs that have entries are listed.
17727//
17728// - parent: The resource name that owns the logs: projects/[PROJECT_ID]
17729//   organizations/[ORGANIZATION_ID]
17730//   billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID].
17731func (r *LogsService) List(parent string) *LogsListCall {
17732	c := &LogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17733	c.parent = parent
17734	return c
17735}
17736
17737// PageSize sets the optional parameter "pageSize": The maximum number
17738// of results to return from this request. Non-positive values are
17739// ignored. The presence of nextPageToken in the response indicates that
17740// more results might be available.
17741func (c *LogsListCall) PageSize(pageSize int64) *LogsListCall {
17742	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17743	return c
17744}
17745
17746// PageToken sets the optional parameter "pageToken": If present, then
17747// retrieve the next batch of results from the preceding call to this
17748// method. pageToken must be the value of nextPageToken from the
17749// previous response. The values of other method parameters should be
17750// identical to those in the previous call.
17751func (c *LogsListCall) PageToken(pageToken string) *LogsListCall {
17752	c.urlParams_.Set("pageToken", pageToken)
17753	return c
17754}
17755
17756// ResourceNames sets the optional parameter "resourceNames": The
17757// resource name that owns the logs:
17758// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/view
17759// s/[VIEW_ID]
17760// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKE
17761// T_ID]/views/[VIEW_ID]
17762// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[
17763// BUCKET_ID]/views/[VIEW_ID]
17764// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/
17765// [VIEW_ID]To support legacy queries, it could also be:
17766// projects/[PROJECT_ID] organizations/[ORGANIZATION_ID]
17767// billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]
17768func (c *LogsListCall) ResourceNames(resourceNames ...string) *LogsListCall {
17769	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
17770	return c
17771}
17772
17773// Fields allows partial responses to be retrieved. See
17774// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17775// for more information.
17776func (c *LogsListCall) Fields(s ...googleapi.Field) *LogsListCall {
17777	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17778	return c
17779}
17780
17781// IfNoneMatch sets the optional parameter which makes the operation
17782// fail if the object's ETag matches the given value. This is useful for
17783// getting updates only after the object has changed since the last
17784// request. Use googleapi.IsNotModified to check whether the response
17785// error from Do is the result of In-None-Match.
17786func (c *LogsListCall) IfNoneMatch(entityTag string) *LogsListCall {
17787	c.ifNoneMatch_ = entityTag
17788	return c
17789}
17790
17791// Context sets the context to be used in this call's Do method. Any
17792// pending HTTP request will be aborted if the provided context is
17793// canceled.
17794func (c *LogsListCall) Context(ctx context.Context) *LogsListCall {
17795	c.ctx_ = ctx
17796	return c
17797}
17798
17799// Header returns an http.Header that can be modified by the caller to
17800// add HTTP headers to the request.
17801func (c *LogsListCall) Header() http.Header {
17802	if c.header_ == nil {
17803		c.header_ = make(http.Header)
17804	}
17805	return c.header_
17806}
17807
17808func (c *LogsListCall) doRequest(alt string) (*http.Response, error) {
17809	reqHeaders := make(http.Header)
17810	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
17811	for k, v := range c.header_ {
17812		reqHeaders[k] = v
17813	}
17814	reqHeaders.Set("User-Agent", c.s.userAgent())
17815	if c.ifNoneMatch_ != "" {
17816		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17817	}
17818	var body io.Reader = nil
17819	c.urlParams_.Set("alt", alt)
17820	c.urlParams_.Set("prettyPrint", "false")
17821	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
17822	urls += "?" + c.urlParams_.Encode()
17823	req, err := http.NewRequest("GET", urls, body)
17824	if err != nil {
17825		return nil, err
17826	}
17827	req.Header = reqHeaders
17828	googleapi.Expand(req.URL, map[string]string{
17829		"parent": c.parent,
17830	})
17831	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17832}
17833
17834// Do executes the "logging.logs.list" call.
17835// Exactly one of *ListLogsResponse or error will be non-nil. Any
17836// non-2xx status code is an error. Response headers are in either
17837// *ListLogsResponse.ServerResponse.Header or (if a response was
17838// returned at all) in error.(*googleapi.Error).Header. Use
17839// googleapi.IsNotModified to check whether the returned error was
17840// because http.StatusNotModified was returned.
17841func (c *LogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
17842	gensupport.SetOptions(c.urlParams_, opts...)
17843	res, err := c.doRequest("json")
17844	if res != nil && res.StatusCode == http.StatusNotModified {
17845		if res.Body != nil {
17846			res.Body.Close()
17847		}
17848		return nil, &googleapi.Error{
17849			Code:   res.StatusCode,
17850			Header: res.Header,
17851		}
17852	}
17853	if err != nil {
17854		return nil, err
17855	}
17856	defer googleapi.CloseBody(res)
17857	if err := googleapi.CheckResponse(res); err != nil {
17858		return nil, err
17859	}
17860	ret := &ListLogsResponse{
17861		ServerResponse: googleapi.ServerResponse{
17862			Header:         res.Header,
17863			HTTPStatusCode: res.StatusCode,
17864		},
17865	}
17866	target := &ret
17867	if err := gensupport.DecodeResponse(target, res); err != nil {
17868		return nil, err
17869	}
17870	return ret, nil
17871	// {
17872	//   "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.",
17873	//   "flatPath": "v2/{v2Id}/{v2Id1}/logs",
17874	//   "httpMethod": "GET",
17875	//   "id": "logging.logs.list",
17876	//   "parameterOrder": [
17877	//     "parent"
17878	//   ],
17879	//   "parameters": {
17880	//     "pageSize": {
17881	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
17882	//       "format": "int32",
17883	//       "location": "query",
17884	//       "type": "integer"
17885	//     },
17886	//     "pageToken": {
17887	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
17888	//       "location": "query",
17889	//       "type": "string"
17890	//     },
17891	//     "parent": {
17892	//       "description": "Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]",
17893	//       "location": "path",
17894	//       "pattern": "^[^/]+/[^/]+$",
17895	//       "required": true,
17896	//       "type": "string"
17897	//     },
17898	//     "resourceNames": {
17899	//       "description": "Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]",
17900	//       "location": "query",
17901	//       "repeated": true,
17902	//       "type": "string"
17903	//     }
17904	//   },
17905	//   "path": "v2/{+parent}/logs",
17906	//   "response": {
17907	//     "$ref": "ListLogsResponse"
17908	//   },
17909	//   "scopes": [
17910	//     "https://www.googleapis.com/auth/cloud-platform",
17911	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
17912	//     "https://www.googleapis.com/auth/logging.admin",
17913	//     "https://www.googleapis.com/auth/logging.read"
17914	//   ]
17915	// }
17916
17917}
17918
17919// Pages invokes f for each page of results.
17920// A non-nil error returned from f will halt the iteration.
17921// The provided context supersedes any context provided to the Context method.
17922func (c *LogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
17923	c.ctx_ = ctx
17924	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17925	for {
17926		x, err := c.Do()
17927		if err != nil {
17928			return err
17929		}
17930		if err := f(x); err != nil {
17931			return err
17932		}
17933		if x.NextPageToken == "" {
17934			return nil
17935		}
17936		c.PageToken(x.NextPageToken)
17937	}
17938}
17939
17940// method id "logging.monitoredResourceDescriptors.list":
17941
17942type MonitoredResourceDescriptorsListCall struct {
17943	s            *Service
17944	urlParams_   gensupport.URLParams
17945	ifNoneMatch_ string
17946	ctx_         context.Context
17947	header_      http.Header
17948}
17949
17950// List: Lists the descriptors for monitored resource types used by
17951// Logging.
17952func (r *MonitoredResourceDescriptorsService) List() *MonitoredResourceDescriptorsListCall {
17953	c := &MonitoredResourceDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17954	return c
17955}
17956
17957// PageSize sets the optional parameter "pageSize": The maximum number
17958// of results to return from this request. Non-positive values are
17959// ignored. The presence of nextPageToken in the response indicates that
17960// more results might be available.
17961func (c *MonitoredResourceDescriptorsListCall) PageSize(pageSize int64) *MonitoredResourceDescriptorsListCall {
17962	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17963	return c
17964}
17965
17966// PageToken sets the optional parameter "pageToken": If present, then
17967// retrieve the next batch of results from the preceding call to this
17968// method. pageToken must be the value of nextPageToken from the
17969// previous response. The values of other method parameters should be
17970// identical to those in the previous call.
17971func (c *MonitoredResourceDescriptorsListCall) PageToken(pageToken string) *MonitoredResourceDescriptorsListCall {
17972	c.urlParams_.Set("pageToken", pageToken)
17973	return c
17974}
17975
17976// Fields allows partial responses to be retrieved. See
17977// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17978// for more information.
17979func (c *MonitoredResourceDescriptorsListCall) Fields(s ...googleapi.Field) *MonitoredResourceDescriptorsListCall {
17980	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17981	return c
17982}
17983
17984// IfNoneMatch sets the optional parameter which makes the operation
17985// fail if the object's ETag matches the given value. This is useful for
17986// getting updates only after the object has changed since the last
17987// request. Use googleapi.IsNotModified to check whether the response
17988// error from Do is the result of In-None-Match.
17989func (c *MonitoredResourceDescriptorsListCall) IfNoneMatch(entityTag string) *MonitoredResourceDescriptorsListCall {
17990	c.ifNoneMatch_ = entityTag
17991	return c
17992}
17993
17994// Context sets the context to be used in this call's Do method. Any
17995// pending HTTP request will be aborted if the provided context is
17996// canceled.
17997func (c *MonitoredResourceDescriptorsListCall) Context(ctx context.Context) *MonitoredResourceDescriptorsListCall {
17998	c.ctx_ = ctx
17999	return c
18000}
18001
18002// Header returns an http.Header that can be modified by the caller to
18003// add HTTP headers to the request.
18004func (c *MonitoredResourceDescriptorsListCall) Header() http.Header {
18005	if c.header_ == nil {
18006		c.header_ = make(http.Header)
18007	}
18008	return c.header_
18009}
18010
18011func (c *MonitoredResourceDescriptorsListCall) doRequest(alt string) (*http.Response, error) {
18012	reqHeaders := make(http.Header)
18013	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
18014	for k, v := range c.header_ {
18015		reqHeaders[k] = v
18016	}
18017	reqHeaders.Set("User-Agent", c.s.userAgent())
18018	if c.ifNoneMatch_ != "" {
18019		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18020	}
18021	var body io.Reader = nil
18022	c.urlParams_.Set("alt", alt)
18023	c.urlParams_.Set("prettyPrint", "false")
18024	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/monitoredResourceDescriptors")
18025	urls += "?" + c.urlParams_.Encode()
18026	req, err := http.NewRequest("GET", urls, body)
18027	if err != nil {
18028		return nil, err
18029	}
18030	req.Header = reqHeaders
18031	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18032}
18033
18034// Do executes the "logging.monitoredResourceDescriptors.list" call.
18035// Exactly one of *ListMonitoredResourceDescriptorsResponse or error
18036// will be non-nil. Any non-2xx status code is an error. Response
18037// headers are in either
18038// *ListMonitoredResourceDescriptorsResponse.ServerResponse.Header or
18039// (if a response was returned at all) in
18040// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18041// whether the returned error was because http.StatusNotModified was
18042// returned.
18043func (c *MonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) {
18044	gensupport.SetOptions(c.urlParams_, opts...)
18045	res, err := c.doRequest("json")
18046	if res != nil && res.StatusCode == http.StatusNotModified {
18047		if res.Body != nil {
18048			res.Body.Close()
18049		}
18050		return nil, &googleapi.Error{
18051			Code:   res.StatusCode,
18052			Header: res.Header,
18053		}
18054	}
18055	if err != nil {
18056		return nil, err
18057	}
18058	defer googleapi.CloseBody(res)
18059	if err := googleapi.CheckResponse(res); err != nil {
18060		return nil, err
18061	}
18062	ret := &ListMonitoredResourceDescriptorsResponse{
18063		ServerResponse: googleapi.ServerResponse{
18064			Header:         res.Header,
18065			HTTPStatusCode: res.StatusCode,
18066		},
18067	}
18068	target := &ret
18069	if err := gensupport.DecodeResponse(target, res); err != nil {
18070		return nil, err
18071	}
18072	return ret, nil
18073	// {
18074	//   "description": "Lists the descriptors for monitored resource types used by Logging.",
18075	//   "flatPath": "v2/monitoredResourceDescriptors",
18076	//   "httpMethod": "GET",
18077	//   "id": "logging.monitoredResourceDescriptors.list",
18078	//   "parameterOrder": [],
18079	//   "parameters": {
18080	//     "pageSize": {
18081	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
18082	//       "format": "int32",
18083	//       "location": "query",
18084	//       "type": "integer"
18085	//     },
18086	//     "pageToken": {
18087	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
18088	//       "location": "query",
18089	//       "type": "string"
18090	//     }
18091	//   },
18092	//   "path": "v2/monitoredResourceDescriptors",
18093	//   "response": {
18094	//     "$ref": "ListMonitoredResourceDescriptorsResponse"
18095	//   },
18096	//   "scopes": [
18097	//     "https://www.googleapis.com/auth/cloud-platform",
18098	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
18099	//     "https://www.googleapis.com/auth/logging.admin",
18100	//     "https://www.googleapis.com/auth/logging.read"
18101	//   ]
18102	// }
18103
18104}
18105
18106// Pages invokes f for each page of results.
18107// A non-nil error returned from f will halt the iteration.
18108// The provided context supersedes any context provided to the Context method.
18109func (c *MonitoredResourceDescriptorsListCall) Pages(ctx context.Context, f func(*ListMonitoredResourceDescriptorsResponse) error) error {
18110	c.ctx_ = ctx
18111	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18112	for {
18113		x, err := c.Do()
18114		if err != nil {
18115			return err
18116		}
18117		if err := f(x); err != nil {
18118			return err
18119		}
18120		if x.NextPageToken == "" {
18121			return nil
18122		}
18123		c.PageToken(x.NextPageToken)
18124	}
18125}
18126
18127// method id "logging.organizations.getCmekSettings":
18128
18129type OrganizationsGetCmekSettingsCall struct {
18130	s            *Service
18131	name         string
18132	urlParams_   gensupport.URLParams
18133	ifNoneMatch_ string
18134	ctx_         context.Context
18135	header_      http.Header
18136}
18137
18138// GetCmekSettings: Gets the Logs Router CMEK settings for the given
18139// resource.Note: CMEK for the Logs Router can currently only be
18140// configured for GCP organizations. Once configured, it applies to all
18141// projects and folders in the GCP organization.See Enabling CMEK for
18142// Logs Router
18143// (https://cloud.google.com/logging/docs/routing/managed-encryption)
18144// for more information.
18145//
18146// - name: The resource for which to retrieve CMEK settings.
18147//   "projects/[PROJECT_ID]/cmekSettings"
18148//   "organizations/[ORGANIZATION_ID]/cmekSettings"
18149//   "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
18150//   "folders/[FOLDER_ID]/cmekSettings" For
18151//   example:"organizations/12345/cmekSettings"Note: CMEK for the Logs
18152//   Router can currently only be configured for GCP organizations. Once
18153//   configured, it applies to all projects and folders in the GCP
18154//   organization.
18155func (r *OrganizationsService) GetCmekSettings(name string) *OrganizationsGetCmekSettingsCall {
18156	c := &OrganizationsGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18157	c.name = name
18158	return c
18159}
18160
18161// Fields allows partial responses to be retrieved. See
18162// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18163// for more information.
18164func (c *OrganizationsGetCmekSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetCmekSettingsCall {
18165	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18166	return c
18167}
18168
18169// IfNoneMatch sets the optional parameter which makes the operation
18170// fail if the object's ETag matches the given value. This is useful for
18171// getting updates only after the object has changed since the last
18172// request. Use googleapi.IsNotModified to check whether the response
18173// error from Do is the result of In-None-Match.
18174func (c *OrganizationsGetCmekSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetCmekSettingsCall {
18175	c.ifNoneMatch_ = entityTag
18176	return c
18177}
18178
18179// Context sets the context to be used in this call's Do method. Any
18180// pending HTTP request will be aborted if the provided context is
18181// canceled.
18182func (c *OrganizationsGetCmekSettingsCall) Context(ctx context.Context) *OrganizationsGetCmekSettingsCall {
18183	c.ctx_ = ctx
18184	return c
18185}
18186
18187// Header returns an http.Header that can be modified by the caller to
18188// add HTTP headers to the request.
18189func (c *OrganizationsGetCmekSettingsCall) Header() http.Header {
18190	if c.header_ == nil {
18191		c.header_ = make(http.Header)
18192	}
18193	return c.header_
18194}
18195
18196func (c *OrganizationsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
18197	reqHeaders := make(http.Header)
18198	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
18199	for k, v := range c.header_ {
18200		reqHeaders[k] = v
18201	}
18202	reqHeaders.Set("User-Agent", c.s.userAgent())
18203	if c.ifNoneMatch_ != "" {
18204		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18205	}
18206	var body io.Reader = nil
18207	c.urlParams_.Set("alt", alt)
18208	c.urlParams_.Set("prettyPrint", "false")
18209	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
18210	urls += "?" + c.urlParams_.Encode()
18211	req, err := http.NewRequest("GET", urls, body)
18212	if err != nil {
18213		return nil, err
18214	}
18215	req.Header = reqHeaders
18216	googleapi.Expand(req.URL, map[string]string{
18217		"name": c.name,
18218	})
18219	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18220}
18221
18222// Do executes the "logging.organizations.getCmekSettings" call.
18223// Exactly one of *CmekSettings or error will be non-nil. Any non-2xx
18224// status code is an error. Response headers are in either
18225// *CmekSettings.ServerResponse.Header or (if a response was returned at
18226// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18227// to check whether the returned error was because
18228// http.StatusNotModified was returned.
18229func (c *OrganizationsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
18230	gensupport.SetOptions(c.urlParams_, opts...)
18231	res, err := c.doRequest("json")
18232	if res != nil && res.StatusCode == http.StatusNotModified {
18233		if res.Body != nil {
18234			res.Body.Close()
18235		}
18236		return nil, &googleapi.Error{
18237			Code:   res.StatusCode,
18238			Header: res.Header,
18239		}
18240	}
18241	if err != nil {
18242		return nil, err
18243	}
18244	defer googleapi.CloseBody(res)
18245	if err := googleapi.CheckResponse(res); err != nil {
18246		return nil, err
18247	}
18248	ret := &CmekSettings{
18249		ServerResponse: googleapi.ServerResponse{
18250			Header:         res.Header,
18251			HTTPStatusCode: res.StatusCode,
18252		},
18253	}
18254	target := &ret
18255	if err := gensupport.DecodeResponse(target, res); err != nil {
18256		return nil, err
18257	}
18258	return ret, nil
18259	// {
18260	//   "description": "Gets the Logs Router CMEK settings for the given resource.Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.See Enabling CMEK for Logs Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.",
18261	//   "flatPath": "v2/organizations/{organizationsId}/cmekSettings",
18262	//   "httpMethod": "GET",
18263	//   "id": "logging.organizations.getCmekSettings",
18264	//   "parameterOrder": [
18265	//     "name"
18266	//   ],
18267	//   "parameters": {
18268	//     "name": {
18269	//       "description": "Required. The resource for which to retrieve CMEK settings. \"projects/[PROJECT_ID]/cmekSettings\" \"organizations/[ORGANIZATION_ID]/cmekSettings\" \"billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings\" \"folders/[FOLDER_ID]/cmekSettings\" For example:\"organizations/12345/cmekSettings\"Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.",
18270	//       "location": "path",
18271	//       "pattern": "^organizations/[^/]+$",
18272	//       "required": true,
18273	//       "type": "string"
18274	//     }
18275	//   },
18276	//   "path": "v2/{+name}/cmekSettings",
18277	//   "response": {
18278	//     "$ref": "CmekSettings"
18279	//   },
18280	//   "scopes": [
18281	//     "https://www.googleapis.com/auth/cloud-platform",
18282	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
18283	//     "https://www.googleapis.com/auth/logging.admin",
18284	//     "https://www.googleapis.com/auth/logging.read"
18285	//   ]
18286	// }
18287
18288}
18289
18290// method id "logging.organizations.updateCmekSettings":
18291
18292type OrganizationsUpdateCmekSettingsCall struct {
18293	s            *Service
18294	name         string
18295	cmeksettings *CmekSettings
18296	urlParams_   gensupport.URLParams
18297	ctx_         context.Context
18298	header_      http.Header
18299}
18300
18301// UpdateCmekSettings: Updates the Logs Router CMEK settings for the
18302// given resource.Note: CMEK for the Logs Router can currently only be
18303// configured for GCP organizations. Once configured, it applies to all
18304// projects and folders in the GCP organization.UpdateCmekSettings will
18305// fail if 1) kms_key_name is invalid, or 2) the associated service
18306// account does not have the required
18307// roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key,
18308// or 3) access to the key is disabled.See Enabling CMEK for Logs Router
18309// (https://cloud.google.com/logging/docs/routing/managed-encryption)
18310// for more information.
18311//
18312// - name: The resource name for the CMEK settings to update.
18313//   "projects/[PROJECT_ID]/cmekSettings"
18314//   "organizations/[ORGANIZATION_ID]/cmekSettings"
18315//   "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
18316//   "folders/[FOLDER_ID]/cmekSettings" For
18317//   example:"organizations/12345/cmekSettings"Note: CMEK for the Logs
18318//   Router can currently only be configured for GCP organizations. Once
18319//   configured, it applies to all projects and folders in the GCP
18320//   organization.
18321func (r *OrganizationsService) UpdateCmekSettings(name string, cmeksettings *CmekSettings) *OrganizationsUpdateCmekSettingsCall {
18322	c := &OrganizationsUpdateCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18323	c.name = name
18324	c.cmeksettings = cmeksettings
18325	return c
18326}
18327
18328// UpdateMask sets the optional parameter "updateMask": Field mask
18329// identifying which fields from cmek_settings should be updated. A
18330// field will be overwritten if and only if it is in the update mask.
18331// Output only fields cannot be updated.See FieldMask for more
18332// information.For example: "updateMask=kmsKeyName"
18333func (c *OrganizationsUpdateCmekSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateCmekSettingsCall {
18334	c.urlParams_.Set("updateMask", updateMask)
18335	return c
18336}
18337
18338// Fields allows partial responses to be retrieved. See
18339// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18340// for more information.
18341func (c *OrganizationsUpdateCmekSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateCmekSettingsCall {
18342	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18343	return c
18344}
18345
18346// Context sets the context to be used in this call's Do method. Any
18347// pending HTTP request will be aborted if the provided context is
18348// canceled.
18349func (c *OrganizationsUpdateCmekSettingsCall) Context(ctx context.Context) *OrganizationsUpdateCmekSettingsCall {
18350	c.ctx_ = ctx
18351	return c
18352}
18353
18354// Header returns an http.Header that can be modified by the caller to
18355// add HTTP headers to the request.
18356func (c *OrganizationsUpdateCmekSettingsCall) Header() http.Header {
18357	if c.header_ == nil {
18358		c.header_ = make(http.Header)
18359	}
18360	return c.header_
18361}
18362
18363func (c *OrganizationsUpdateCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
18364	reqHeaders := make(http.Header)
18365	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
18366	for k, v := range c.header_ {
18367		reqHeaders[k] = v
18368	}
18369	reqHeaders.Set("User-Agent", c.s.userAgent())
18370	var body io.Reader = nil
18371	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cmeksettings)
18372	if err != nil {
18373		return nil, err
18374	}
18375	reqHeaders.Set("Content-Type", "application/json")
18376	c.urlParams_.Set("alt", alt)
18377	c.urlParams_.Set("prettyPrint", "false")
18378	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
18379	urls += "?" + c.urlParams_.Encode()
18380	req, err := http.NewRequest("PATCH", urls, body)
18381	if err != nil {
18382		return nil, err
18383	}
18384	req.Header = reqHeaders
18385	googleapi.Expand(req.URL, map[string]string{
18386		"name": c.name,
18387	})
18388	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18389}
18390
18391// Do executes the "logging.organizations.updateCmekSettings" call.
18392// Exactly one of *CmekSettings or error will be non-nil. Any non-2xx
18393// status code is an error. Response headers are in either
18394// *CmekSettings.ServerResponse.Header or (if a response was returned at
18395// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18396// to check whether the returned error was because
18397// http.StatusNotModified was returned.
18398func (c *OrganizationsUpdateCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
18399	gensupport.SetOptions(c.urlParams_, opts...)
18400	res, err := c.doRequest("json")
18401	if res != nil && res.StatusCode == http.StatusNotModified {
18402		if res.Body != nil {
18403			res.Body.Close()
18404		}
18405		return nil, &googleapi.Error{
18406			Code:   res.StatusCode,
18407			Header: res.Header,
18408		}
18409	}
18410	if err != nil {
18411		return nil, err
18412	}
18413	defer googleapi.CloseBody(res)
18414	if err := googleapi.CheckResponse(res); err != nil {
18415		return nil, err
18416	}
18417	ret := &CmekSettings{
18418		ServerResponse: googleapi.ServerResponse{
18419			Header:         res.Header,
18420			HTTPStatusCode: res.StatusCode,
18421		},
18422	}
18423	target := &ret
18424	if err := gensupport.DecodeResponse(target, res); err != nil {
18425		return nil, err
18426	}
18427	return ret, nil
18428	// {
18429	//   "description": "Updates the Logs Router CMEK settings for the given resource.Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.UpdateCmekSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled.See Enabling CMEK for Logs Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.",
18430	//   "flatPath": "v2/organizations/{organizationsId}/cmekSettings",
18431	//   "httpMethod": "PATCH",
18432	//   "id": "logging.organizations.updateCmekSettings",
18433	//   "parameterOrder": [
18434	//     "name"
18435	//   ],
18436	//   "parameters": {
18437	//     "name": {
18438	//       "description": "Required. The resource name for the CMEK settings to update. \"projects/[PROJECT_ID]/cmekSettings\" \"organizations/[ORGANIZATION_ID]/cmekSettings\" \"billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings\" \"folders/[FOLDER_ID]/cmekSettings\" For example:\"organizations/12345/cmekSettings\"Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.",
18439	//       "location": "path",
18440	//       "pattern": "^organizations/[^/]+$",
18441	//       "required": true,
18442	//       "type": "string"
18443	//     },
18444	//     "updateMask": {
18445	//       "description": "Optional. Field mask identifying which fields from cmek_settings should be updated. A field will be overwritten if and only if it is in the update mask. Output only fields cannot be updated.See FieldMask for more information.For example: \"updateMask=kmsKeyName\"",
18446	//       "format": "google-fieldmask",
18447	//       "location": "query",
18448	//       "type": "string"
18449	//     }
18450	//   },
18451	//   "path": "v2/{+name}/cmekSettings",
18452	//   "request": {
18453	//     "$ref": "CmekSettings"
18454	//   },
18455	//   "response": {
18456	//     "$ref": "CmekSettings"
18457	//   },
18458	//   "scopes": [
18459	//     "https://www.googleapis.com/auth/cloud-platform",
18460	//     "https://www.googleapis.com/auth/logging.admin"
18461	//   ]
18462	// }
18463
18464}
18465
18466// method id "logging.organizations.exclusions.create":
18467
18468type OrganizationsExclusionsCreateCall struct {
18469	s            *Service
18470	parent       string
18471	logexclusion *LogExclusion
18472	urlParams_   gensupport.URLParams
18473	ctx_         context.Context
18474	header_      http.Header
18475}
18476
18477// Create: Creates a new exclusion in a specified parent resource. Only
18478// log entries belonging to that resource can be excluded. You can have
18479// up to 10 exclusions in a resource.
18480//
18481// - parent: The parent resource in which to create the exclusion:
18482//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
18483//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
18484//   examples:"projects/my-logging-project" "organizations/123456789".
18485func (r *OrganizationsExclusionsService) Create(parent string, logexclusion *LogExclusion) *OrganizationsExclusionsCreateCall {
18486	c := &OrganizationsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18487	c.parent = parent
18488	c.logexclusion = logexclusion
18489	return c
18490}
18491
18492// Fields allows partial responses to be retrieved. See
18493// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18494// for more information.
18495func (c *OrganizationsExclusionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsCreateCall {
18496	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18497	return c
18498}
18499
18500// Context sets the context to be used in this call's Do method. Any
18501// pending HTTP request will be aborted if the provided context is
18502// canceled.
18503func (c *OrganizationsExclusionsCreateCall) Context(ctx context.Context) *OrganizationsExclusionsCreateCall {
18504	c.ctx_ = ctx
18505	return c
18506}
18507
18508// Header returns an http.Header that can be modified by the caller to
18509// add HTTP headers to the request.
18510func (c *OrganizationsExclusionsCreateCall) Header() http.Header {
18511	if c.header_ == nil {
18512		c.header_ = make(http.Header)
18513	}
18514	return c.header_
18515}
18516
18517func (c *OrganizationsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
18518	reqHeaders := make(http.Header)
18519	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
18520	for k, v := range c.header_ {
18521		reqHeaders[k] = v
18522	}
18523	reqHeaders.Set("User-Agent", c.s.userAgent())
18524	var body io.Reader = nil
18525	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
18526	if err != nil {
18527		return nil, err
18528	}
18529	reqHeaders.Set("Content-Type", "application/json")
18530	c.urlParams_.Set("alt", alt)
18531	c.urlParams_.Set("prettyPrint", "false")
18532	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
18533	urls += "?" + c.urlParams_.Encode()
18534	req, err := http.NewRequest("POST", urls, body)
18535	if err != nil {
18536		return nil, err
18537	}
18538	req.Header = reqHeaders
18539	googleapi.Expand(req.URL, map[string]string{
18540		"parent": c.parent,
18541	})
18542	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18543}
18544
18545// Do executes the "logging.organizations.exclusions.create" call.
18546// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
18547// status code is an error. Response headers are in either
18548// *LogExclusion.ServerResponse.Header or (if a response was returned at
18549// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18550// to check whether the returned error was because
18551// http.StatusNotModified was returned.
18552func (c *OrganizationsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
18553	gensupport.SetOptions(c.urlParams_, opts...)
18554	res, err := c.doRequest("json")
18555	if res != nil && res.StatusCode == http.StatusNotModified {
18556		if res.Body != nil {
18557			res.Body.Close()
18558		}
18559		return nil, &googleapi.Error{
18560			Code:   res.StatusCode,
18561			Header: res.Header,
18562		}
18563	}
18564	if err != nil {
18565		return nil, err
18566	}
18567	defer googleapi.CloseBody(res)
18568	if err := googleapi.CheckResponse(res); err != nil {
18569		return nil, err
18570	}
18571	ret := &LogExclusion{
18572		ServerResponse: googleapi.ServerResponse{
18573			Header:         res.Header,
18574			HTTPStatusCode: res.StatusCode,
18575		},
18576	}
18577	target := &ret
18578	if err := gensupport.DecodeResponse(target, res); err != nil {
18579		return nil, err
18580	}
18581	return ret, nil
18582	// {
18583	//   "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.",
18584	//   "flatPath": "v2/organizations/{organizationsId}/exclusions",
18585	//   "httpMethod": "POST",
18586	//   "id": "logging.organizations.exclusions.create",
18587	//   "parameterOrder": [
18588	//     "parent"
18589	//   ],
18590	//   "parameters": {
18591	//     "parent": {
18592	//       "description": "Required. The parent resource in which to create the exclusion: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" For examples:\"projects/my-logging-project\" \"organizations/123456789\"",
18593	//       "location": "path",
18594	//       "pattern": "^organizations/[^/]+$",
18595	//       "required": true,
18596	//       "type": "string"
18597	//     }
18598	//   },
18599	//   "path": "v2/{+parent}/exclusions",
18600	//   "request": {
18601	//     "$ref": "LogExclusion"
18602	//   },
18603	//   "response": {
18604	//     "$ref": "LogExclusion"
18605	//   },
18606	//   "scopes": [
18607	//     "https://www.googleapis.com/auth/cloud-platform",
18608	//     "https://www.googleapis.com/auth/logging.admin"
18609	//   ]
18610	// }
18611
18612}
18613
18614// method id "logging.organizations.exclusions.delete":
18615
18616type OrganizationsExclusionsDeleteCall struct {
18617	s          *Service
18618	name       string
18619	urlParams_ gensupport.URLParams
18620	ctx_       context.Context
18621	header_    http.Header
18622}
18623
18624// Delete: Deletes an exclusion.
18625//
18626// - name: The resource name of an existing exclusion to delete:
18627//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
18628//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
18629//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
18630//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
18631//   example:"projects/my-project/exclusions/my-exclusion".
18632func (r *OrganizationsExclusionsService) Delete(name string) *OrganizationsExclusionsDeleteCall {
18633	c := &OrganizationsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18634	c.name = name
18635	return c
18636}
18637
18638// Fields allows partial responses to be retrieved. See
18639// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18640// for more information.
18641func (c *OrganizationsExclusionsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsDeleteCall {
18642	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18643	return c
18644}
18645
18646// Context sets the context to be used in this call's Do method. Any
18647// pending HTTP request will be aborted if the provided context is
18648// canceled.
18649func (c *OrganizationsExclusionsDeleteCall) Context(ctx context.Context) *OrganizationsExclusionsDeleteCall {
18650	c.ctx_ = ctx
18651	return c
18652}
18653
18654// Header returns an http.Header that can be modified by the caller to
18655// add HTTP headers to the request.
18656func (c *OrganizationsExclusionsDeleteCall) Header() http.Header {
18657	if c.header_ == nil {
18658		c.header_ = make(http.Header)
18659	}
18660	return c.header_
18661}
18662
18663func (c *OrganizationsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
18664	reqHeaders := make(http.Header)
18665	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
18666	for k, v := range c.header_ {
18667		reqHeaders[k] = v
18668	}
18669	reqHeaders.Set("User-Agent", c.s.userAgent())
18670	var body io.Reader = nil
18671	c.urlParams_.Set("alt", alt)
18672	c.urlParams_.Set("prettyPrint", "false")
18673	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
18674	urls += "?" + c.urlParams_.Encode()
18675	req, err := http.NewRequest("DELETE", urls, body)
18676	if err != nil {
18677		return nil, err
18678	}
18679	req.Header = reqHeaders
18680	googleapi.Expand(req.URL, map[string]string{
18681		"name": c.name,
18682	})
18683	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18684}
18685
18686// Do executes the "logging.organizations.exclusions.delete" call.
18687// Exactly one of *Empty or error will be non-nil. Any non-2xx status
18688// code is an error. Response headers are in either
18689// *Empty.ServerResponse.Header or (if a response was returned at all)
18690// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
18691// check whether the returned error was because http.StatusNotModified
18692// was returned.
18693func (c *OrganizationsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
18694	gensupport.SetOptions(c.urlParams_, opts...)
18695	res, err := c.doRequest("json")
18696	if res != nil && res.StatusCode == http.StatusNotModified {
18697		if res.Body != nil {
18698			res.Body.Close()
18699		}
18700		return nil, &googleapi.Error{
18701			Code:   res.StatusCode,
18702			Header: res.Header,
18703		}
18704	}
18705	if err != nil {
18706		return nil, err
18707	}
18708	defer googleapi.CloseBody(res)
18709	if err := googleapi.CheckResponse(res); err != nil {
18710		return nil, err
18711	}
18712	ret := &Empty{
18713		ServerResponse: googleapi.ServerResponse{
18714			Header:         res.Header,
18715			HTTPStatusCode: res.StatusCode,
18716		},
18717	}
18718	target := &ret
18719	if err := gensupport.DecodeResponse(target, res); err != nil {
18720		return nil, err
18721	}
18722	return ret, nil
18723	// {
18724	//   "description": "Deletes an exclusion.",
18725	//   "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}",
18726	//   "httpMethod": "DELETE",
18727	//   "id": "logging.organizations.exclusions.delete",
18728	//   "parameterOrder": [
18729	//     "name"
18730	//   ],
18731	//   "parameters": {
18732	//     "name": {
18733	//       "description": "Required. The resource name of an existing exclusion to delete: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
18734	//       "location": "path",
18735	//       "pattern": "^organizations/[^/]+/exclusions/[^/]+$",
18736	//       "required": true,
18737	//       "type": "string"
18738	//     }
18739	//   },
18740	//   "path": "v2/{+name}",
18741	//   "response": {
18742	//     "$ref": "Empty"
18743	//   },
18744	//   "scopes": [
18745	//     "https://www.googleapis.com/auth/cloud-platform",
18746	//     "https://www.googleapis.com/auth/logging.admin"
18747	//   ]
18748	// }
18749
18750}
18751
18752// method id "logging.organizations.exclusions.get":
18753
18754type OrganizationsExclusionsGetCall struct {
18755	s            *Service
18756	name         string
18757	urlParams_   gensupport.URLParams
18758	ifNoneMatch_ string
18759	ctx_         context.Context
18760	header_      http.Header
18761}
18762
18763// Get: Gets the description of an exclusion.
18764//
18765// - name: The resource name of an existing exclusion:
18766//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
18767//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
18768//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
18769//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
18770//   example:"projects/my-project/exclusions/my-exclusion".
18771func (r *OrganizationsExclusionsService) Get(name string) *OrganizationsExclusionsGetCall {
18772	c := &OrganizationsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18773	c.name = name
18774	return c
18775}
18776
18777// Fields allows partial responses to be retrieved. See
18778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18779// for more information.
18780func (c *OrganizationsExclusionsGetCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsGetCall {
18781	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18782	return c
18783}
18784
18785// IfNoneMatch sets the optional parameter which makes the operation
18786// fail if the object's ETag matches the given value. This is useful for
18787// getting updates only after the object has changed since the last
18788// request. Use googleapi.IsNotModified to check whether the response
18789// error from Do is the result of In-None-Match.
18790func (c *OrganizationsExclusionsGetCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsGetCall {
18791	c.ifNoneMatch_ = entityTag
18792	return c
18793}
18794
18795// Context sets the context to be used in this call's Do method. Any
18796// pending HTTP request will be aborted if the provided context is
18797// canceled.
18798func (c *OrganizationsExclusionsGetCall) Context(ctx context.Context) *OrganizationsExclusionsGetCall {
18799	c.ctx_ = ctx
18800	return c
18801}
18802
18803// Header returns an http.Header that can be modified by the caller to
18804// add HTTP headers to the request.
18805func (c *OrganizationsExclusionsGetCall) Header() http.Header {
18806	if c.header_ == nil {
18807		c.header_ = make(http.Header)
18808	}
18809	return c.header_
18810}
18811
18812func (c *OrganizationsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
18813	reqHeaders := make(http.Header)
18814	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
18815	for k, v := range c.header_ {
18816		reqHeaders[k] = v
18817	}
18818	reqHeaders.Set("User-Agent", c.s.userAgent())
18819	if c.ifNoneMatch_ != "" {
18820		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18821	}
18822	var body io.Reader = nil
18823	c.urlParams_.Set("alt", alt)
18824	c.urlParams_.Set("prettyPrint", "false")
18825	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
18826	urls += "?" + c.urlParams_.Encode()
18827	req, err := http.NewRequest("GET", urls, body)
18828	if err != nil {
18829		return nil, err
18830	}
18831	req.Header = reqHeaders
18832	googleapi.Expand(req.URL, map[string]string{
18833		"name": c.name,
18834	})
18835	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18836}
18837
18838// Do executes the "logging.organizations.exclusions.get" call.
18839// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
18840// status code is an error. Response headers are in either
18841// *LogExclusion.ServerResponse.Header or (if a response was returned at
18842// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18843// to check whether the returned error was because
18844// http.StatusNotModified was returned.
18845func (c *OrganizationsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
18846	gensupport.SetOptions(c.urlParams_, opts...)
18847	res, err := c.doRequest("json")
18848	if res != nil && res.StatusCode == http.StatusNotModified {
18849		if res.Body != nil {
18850			res.Body.Close()
18851		}
18852		return nil, &googleapi.Error{
18853			Code:   res.StatusCode,
18854			Header: res.Header,
18855		}
18856	}
18857	if err != nil {
18858		return nil, err
18859	}
18860	defer googleapi.CloseBody(res)
18861	if err := googleapi.CheckResponse(res); err != nil {
18862		return nil, err
18863	}
18864	ret := &LogExclusion{
18865		ServerResponse: googleapi.ServerResponse{
18866			Header:         res.Header,
18867			HTTPStatusCode: res.StatusCode,
18868		},
18869	}
18870	target := &ret
18871	if err := gensupport.DecodeResponse(target, res); err != nil {
18872		return nil, err
18873	}
18874	return ret, nil
18875	// {
18876	//   "description": "Gets the description of an exclusion.",
18877	//   "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}",
18878	//   "httpMethod": "GET",
18879	//   "id": "logging.organizations.exclusions.get",
18880	//   "parameterOrder": [
18881	//     "name"
18882	//   ],
18883	//   "parameters": {
18884	//     "name": {
18885	//       "description": "Required. The resource name of an existing exclusion: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
18886	//       "location": "path",
18887	//       "pattern": "^organizations/[^/]+/exclusions/[^/]+$",
18888	//       "required": true,
18889	//       "type": "string"
18890	//     }
18891	//   },
18892	//   "path": "v2/{+name}",
18893	//   "response": {
18894	//     "$ref": "LogExclusion"
18895	//   },
18896	//   "scopes": [
18897	//     "https://www.googleapis.com/auth/cloud-platform",
18898	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
18899	//     "https://www.googleapis.com/auth/logging.admin",
18900	//     "https://www.googleapis.com/auth/logging.read"
18901	//   ]
18902	// }
18903
18904}
18905
18906// method id "logging.organizations.exclusions.list":
18907
18908type OrganizationsExclusionsListCall struct {
18909	s            *Service
18910	parent       string
18911	urlParams_   gensupport.URLParams
18912	ifNoneMatch_ string
18913	ctx_         context.Context
18914	header_      http.Header
18915}
18916
18917// List: Lists all the exclusions in a parent resource.
18918//
18919// - parent: The parent resource whose exclusions are to be listed.
18920//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
18921//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
18922func (r *OrganizationsExclusionsService) List(parent string) *OrganizationsExclusionsListCall {
18923	c := &OrganizationsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18924	c.parent = parent
18925	return c
18926}
18927
18928// PageSize sets the optional parameter "pageSize": The maximum number
18929// of results to return from this request. Non-positive values are
18930// ignored. The presence of nextPageToken in the response indicates that
18931// more results might be available.
18932func (c *OrganizationsExclusionsListCall) PageSize(pageSize int64) *OrganizationsExclusionsListCall {
18933	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18934	return c
18935}
18936
18937// PageToken sets the optional parameter "pageToken": If present, then
18938// retrieve the next batch of results from the preceding call to this
18939// method. pageToken must be the value of nextPageToken from the
18940// previous response. The values of other method parameters should be
18941// identical to those in the previous call.
18942func (c *OrganizationsExclusionsListCall) PageToken(pageToken string) *OrganizationsExclusionsListCall {
18943	c.urlParams_.Set("pageToken", pageToken)
18944	return c
18945}
18946
18947// Fields allows partial responses to be retrieved. See
18948// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18949// for more information.
18950func (c *OrganizationsExclusionsListCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsListCall {
18951	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18952	return c
18953}
18954
18955// IfNoneMatch sets the optional parameter which makes the operation
18956// fail if the object's ETag matches the given value. This is useful for
18957// getting updates only after the object has changed since the last
18958// request. Use googleapi.IsNotModified to check whether the response
18959// error from Do is the result of In-None-Match.
18960func (c *OrganizationsExclusionsListCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsListCall {
18961	c.ifNoneMatch_ = entityTag
18962	return c
18963}
18964
18965// Context sets the context to be used in this call's Do method. Any
18966// pending HTTP request will be aborted if the provided context is
18967// canceled.
18968func (c *OrganizationsExclusionsListCall) Context(ctx context.Context) *OrganizationsExclusionsListCall {
18969	c.ctx_ = ctx
18970	return c
18971}
18972
18973// Header returns an http.Header that can be modified by the caller to
18974// add HTTP headers to the request.
18975func (c *OrganizationsExclusionsListCall) Header() http.Header {
18976	if c.header_ == nil {
18977		c.header_ = make(http.Header)
18978	}
18979	return c.header_
18980}
18981
18982func (c *OrganizationsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
18983	reqHeaders := make(http.Header)
18984	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
18985	for k, v := range c.header_ {
18986		reqHeaders[k] = v
18987	}
18988	reqHeaders.Set("User-Agent", c.s.userAgent())
18989	if c.ifNoneMatch_ != "" {
18990		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18991	}
18992	var body io.Reader = nil
18993	c.urlParams_.Set("alt", alt)
18994	c.urlParams_.Set("prettyPrint", "false")
18995	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
18996	urls += "?" + c.urlParams_.Encode()
18997	req, err := http.NewRequest("GET", urls, body)
18998	if err != nil {
18999		return nil, err
19000	}
19001	req.Header = reqHeaders
19002	googleapi.Expand(req.URL, map[string]string{
19003		"parent": c.parent,
19004	})
19005	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19006}
19007
19008// Do executes the "logging.organizations.exclusions.list" call.
19009// Exactly one of *ListExclusionsResponse or error will be non-nil. Any
19010// non-2xx status code is an error. Response headers are in either
19011// *ListExclusionsResponse.ServerResponse.Header or (if a response was
19012// returned at all) in error.(*googleapi.Error).Header. Use
19013// googleapi.IsNotModified to check whether the returned error was
19014// because http.StatusNotModified was returned.
19015func (c *OrganizationsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
19016	gensupport.SetOptions(c.urlParams_, opts...)
19017	res, err := c.doRequest("json")
19018	if res != nil && res.StatusCode == http.StatusNotModified {
19019		if res.Body != nil {
19020			res.Body.Close()
19021		}
19022		return nil, &googleapi.Error{
19023			Code:   res.StatusCode,
19024			Header: res.Header,
19025		}
19026	}
19027	if err != nil {
19028		return nil, err
19029	}
19030	defer googleapi.CloseBody(res)
19031	if err := googleapi.CheckResponse(res); err != nil {
19032		return nil, err
19033	}
19034	ret := &ListExclusionsResponse{
19035		ServerResponse: googleapi.ServerResponse{
19036			Header:         res.Header,
19037			HTTPStatusCode: res.StatusCode,
19038		},
19039	}
19040	target := &ret
19041	if err := gensupport.DecodeResponse(target, res); err != nil {
19042		return nil, err
19043	}
19044	return ret, nil
19045	// {
19046	//   "description": "Lists all the exclusions in a parent resource.",
19047	//   "flatPath": "v2/organizations/{organizationsId}/exclusions",
19048	//   "httpMethod": "GET",
19049	//   "id": "logging.organizations.exclusions.list",
19050	//   "parameterOrder": [
19051	//     "parent"
19052	//   ],
19053	//   "parameters": {
19054	//     "pageSize": {
19055	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
19056	//       "format": "int32",
19057	//       "location": "query",
19058	//       "type": "integer"
19059	//     },
19060	//     "pageToken": {
19061	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
19062	//       "location": "query",
19063	//       "type": "string"
19064	//     },
19065	//     "parent": {
19066	//       "description": "Required. The parent resource whose exclusions are to be listed. \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" ",
19067	//       "location": "path",
19068	//       "pattern": "^organizations/[^/]+$",
19069	//       "required": true,
19070	//       "type": "string"
19071	//     }
19072	//   },
19073	//   "path": "v2/{+parent}/exclusions",
19074	//   "response": {
19075	//     "$ref": "ListExclusionsResponse"
19076	//   },
19077	//   "scopes": [
19078	//     "https://www.googleapis.com/auth/cloud-platform",
19079	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
19080	//     "https://www.googleapis.com/auth/logging.admin",
19081	//     "https://www.googleapis.com/auth/logging.read"
19082	//   ]
19083	// }
19084
19085}
19086
19087// Pages invokes f for each page of results.
19088// A non-nil error returned from f will halt the iteration.
19089// The provided context supersedes any context provided to the Context method.
19090func (c *OrganizationsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
19091	c.ctx_ = ctx
19092	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19093	for {
19094		x, err := c.Do()
19095		if err != nil {
19096			return err
19097		}
19098		if err := f(x); err != nil {
19099			return err
19100		}
19101		if x.NextPageToken == "" {
19102			return nil
19103		}
19104		c.PageToken(x.NextPageToken)
19105	}
19106}
19107
19108// method id "logging.organizations.exclusions.patch":
19109
19110type OrganizationsExclusionsPatchCall struct {
19111	s            *Service
19112	name         string
19113	logexclusion *LogExclusion
19114	urlParams_   gensupport.URLParams
19115	ctx_         context.Context
19116	header_      http.Header
19117}
19118
19119// Patch: Changes one or more properties of an existing exclusion.
19120//
19121// - name: The resource name of the exclusion to update:
19122//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
19123//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
19124//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
19125//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
19126//   example:"projects/my-project/exclusions/my-exclusion".
19127func (r *OrganizationsExclusionsService) Patch(name string, logexclusion *LogExclusion) *OrganizationsExclusionsPatchCall {
19128	c := &OrganizationsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19129	c.name = name
19130	c.logexclusion = logexclusion
19131	return c
19132}
19133
19134// UpdateMask sets the optional parameter "updateMask": Required. A
19135// non-empty list of fields to change in the existing exclusion. New
19136// values for the fields are taken from the corresponding fields in the
19137// LogExclusion included in this request. Fields not mentioned in
19138// update_mask are not changed and are ignored in the request.For
19139// example, to change the filter and description of an exclusion,
19140// specify an update_mask of "filter,description".
19141func (c *OrganizationsExclusionsPatchCall) UpdateMask(updateMask string) *OrganizationsExclusionsPatchCall {
19142	c.urlParams_.Set("updateMask", updateMask)
19143	return c
19144}
19145
19146// Fields allows partial responses to be retrieved. See
19147// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19148// for more information.
19149func (c *OrganizationsExclusionsPatchCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsPatchCall {
19150	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19151	return c
19152}
19153
19154// Context sets the context to be used in this call's Do method. Any
19155// pending HTTP request will be aborted if the provided context is
19156// canceled.
19157func (c *OrganizationsExclusionsPatchCall) Context(ctx context.Context) *OrganizationsExclusionsPatchCall {
19158	c.ctx_ = ctx
19159	return c
19160}
19161
19162// Header returns an http.Header that can be modified by the caller to
19163// add HTTP headers to the request.
19164func (c *OrganizationsExclusionsPatchCall) Header() http.Header {
19165	if c.header_ == nil {
19166		c.header_ = make(http.Header)
19167	}
19168	return c.header_
19169}
19170
19171func (c *OrganizationsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
19172	reqHeaders := make(http.Header)
19173	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
19174	for k, v := range c.header_ {
19175		reqHeaders[k] = v
19176	}
19177	reqHeaders.Set("User-Agent", c.s.userAgent())
19178	var body io.Reader = nil
19179	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
19180	if err != nil {
19181		return nil, err
19182	}
19183	reqHeaders.Set("Content-Type", "application/json")
19184	c.urlParams_.Set("alt", alt)
19185	c.urlParams_.Set("prettyPrint", "false")
19186	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
19187	urls += "?" + c.urlParams_.Encode()
19188	req, err := http.NewRequest("PATCH", urls, body)
19189	if err != nil {
19190		return nil, err
19191	}
19192	req.Header = reqHeaders
19193	googleapi.Expand(req.URL, map[string]string{
19194		"name": c.name,
19195	})
19196	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19197}
19198
19199// Do executes the "logging.organizations.exclusions.patch" call.
19200// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
19201// status code is an error. Response headers are in either
19202// *LogExclusion.ServerResponse.Header or (if a response was returned at
19203// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19204// to check whether the returned error was because
19205// http.StatusNotModified was returned.
19206func (c *OrganizationsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
19207	gensupport.SetOptions(c.urlParams_, opts...)
19208	res, err := c.doRequest("json")
19209	if res != nil && res.StatusCode == http.StatusNotModified {
19210		if res.Body != nil {
19211			res.Body.Close()
19212		}
19213		return nil, &googleapi.Error{
19214			Code:   res.StatusCode,
19215			Header: res.Header,
19216		}
19217	}
19218	if err != nil {
19219		return nil, err
19220	}
19221	defer googleapi.CloseBody(res)
19222	if err := googleapi.CheckResponse(res); err != nil {
19223		return nil, err
19224	}
19225	ret := &LogExclusion{
19226		ServerResponse: googleapi.ServerResponse{
19227			Header:         res.Header,
19228			HTTPStatusCode: res.StatusCode,
19229		},
19230	}
19231	target := &ret
19232	if err := gensupport.DecodeResponse(target, res); err != nil {
19233		return nil, err
19234	}
19235	return ret, nil
19236	// {
19237	//   "description": "Changes one or more properties of an existing exclusion.",
19238	//   "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}",
19239	//   "httpMethod": "PATCH",
19240	//   "id": "logging.organizations.exclusions.patch",
19241	//   "parameterOrder": [
19242	//     "name"
19243	//   ],
19244	//   "parameters": {
19245	//     "name": {
19246	//       "description": "Required. The resource name of the exclusion to update: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
19247	//       "location": "path",
19248	//       "pattern": "^organizations/[^/]+/exclusions/[^/]+$",
19249	//       "required": true,
19250	//       "type": "string"
19251	//     },
19252	//     "updateMask": {
19253	//       "description": "Required. A non-empty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".",
19254	//       "format": "google-fieldmask",
19255	//       "location": "query",
19256	//       "type": "string"
19257	//     }
19258	//   },
19259	//   "path": "v2/{+name}",
19260	//   "request": {
19261	//     "$ref": "LogExclusion"
19262	//   },
19263	//   "response": {
19264	//     "$ref": "LogExclusion"
19265	//   },
19266	//   "scopes": [
19267	//     "https://www.googleapis.com/auth/cloud-platform",
19268	//     "https://www.googleapis.com/auth/logging.admin"
19269	//   ]
19270	// }
19271
19272}
19273
19274// method id "logging.organizations.locations.get":
19275
19276type OrganizationsLocationsGetCall struct {
19277	s            *Service
19278	name         string
19279	urlParams_   gensupport.URLParams
19280	ifNoneMatch_ string
19281	ctx_         context.Context
19282	header_      http.Header
19283}
19284
19285// Get: Gets information about a location.
19286//
19287// - name: Resource name for the location.
19288func (r *OrganizationsLocationsService) Get(name string) *OrganizationsLocationsGetCall {
19289	c := &OrganizationsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19290	c.name = name
19291	return c
19292}
19293
19294// Fields allows partial responses to be retrieved. See
19295// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19296// for more information.
19297func (c *OrganizationsLocationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGetCall {
19298	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19299	return c
19300}
19301
19302// IfNoneMatch sets the optional parameter which makes the operation
19303// fail if the object's ETag matches the given value. This is useful for
19304// getting updates only after the object has changed since the last
19305// request. Use googleapi.IsNotModified to check whether the response
19306// error from Do is the result of In-None-Match.
19307func (c *OrganizationsLocationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGetCall {
19308	c.ifNoneMatch_ = entityTag
19309	return c
19310}
19311
19312// Context sets the context to be used in this call's Do method. Any
19313// pending HTTP request will be aborted if the provided context is
19314// canceled.
19315func (c *OrganizationsLocationsGetCall) Context(ctx context.Context) *OrganizationsLocationsGetCall {
19316	c.ctx_ = ctx
19317	return c
19318}
19319
19320// Header returns an http.Header that can be modified by the caller to
19321// add HTTP headers to the request.
19322func (c *OrganizationsLocationsGetCall) Header() http.Header {
19323	if c.header_ == nil {
19324		c.header_ = make(http.Header)
19325	}
19326	return c.header_
19327}
19328
19329func (c *OrganizationsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
19330	reqHeaders := make(http.Header)
19331	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
19332	for k, v := range c.header_ {
19333		reqHeaders[k] = v
19334	}
19335	reqHeaders.Set("User-Agent", c.s.userAgent())
19336	if c.ifNoneMatch_ != "" {
19337		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19338	}
19339	var body io.Reader = nil
19340	c.urlParams_.Set("alt", alt)
19341	c.urlParams_.Set("prettyPrint", "false")
19342	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
19343	urls += "?" + c.urlParams_.Encode()
19344	req, err := http.NewRequest("GET", urls, body)
19345	if err != nil {
19346		return nil, err
19347	}
19348	req.Header = reqHeaders
19349	googleapi.Expand(req.URL, map[string]string{
19350		"name": c.name,
19351	})
19352	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19353}
19354
19355// Do executes the "logging.organizations.locations.get" call.
19356// Exactly one of *Location or error will be non-nil. Any non-2xx status
19357// code is an error. Response headers are in either
19358// *Location.ServerResponse.Header or (if a response was returned at
19359// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19360// to check whether the returned error was because
19361// http.StatusNotModified was returned.
19362func (c *OrganizationsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
19363	gensupport.SetOptions(c.urlParams_, opts...)
19364	res, err := c.doRequest("json")
19365	if res != nil && res.StatusCode == http.StatusNotModified {
19366		if res.Body != nil {
19367			res.Body.Close()
19368		}
19369		return nil, &googleapi.Error{
19370			Code:   res.StatusCode,
19371			Header: res.Header,
19372		}
19373	}
19374	if err != nil {
19375		return nil, err
19376	}
19377	defer googleapi.CloseBody(res)
19378	if err := googleapi.CheckResponse(res); err != nil {
19379		return nil, err
19380	}
19381	ret := &Location{
19382		ServerResponse: googleapi.ServerResponse{
19383			Header:         res.Header,
19384			HTTPStatusCode: res.StatusCode,
19385		},
19386	}
19387	target := &ret
19388	if err := gensupport.DecodeResponse(target, res); err != nil {
19389		return nil, err
19390	}
19391	return ret, nil
19392	// {
19393	//   "description": "Gets information about a location.",
19394	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}",
19395	//   "httpMethod": "GET",
19396	//   "id": "logging.organizations.locations.get",
19397	//   "parameterOrder": [
19398	//     "name"
19399	//   ],
19400	//   "parameters": {
19401	//     "name": {
19402	//       "description": "Resource name for the location.",
19403	//       "location": "path",
19404	//       "pattern": "^organizations/[^/]+/locations/[^/]+$",
19405	//       "required": true,
19406	//       "type": "string"
19407	//     }
19408	//   },
19409	//   "path": "v2/{+name}",
19410	//   "response": {
19411	//     "$ref": "Location"
19412	//   },
19413	//   "scopes": [
19414	//     "https://www.googleapis.com/auth/cloud-platform",
19415	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
19416	//     "https://www.googleapis.com/auth/logging.admin",
19417	//     "https://www.googleapis.com/auth/logging.read"
19418	//   ]
19419	// }
19420
19421}
19422
19423// method id "logging.organizations.locations.list":
19424
19425type OrganizationsLocationsListCall struct {
19426	s            *Service
19427	name         string
19428	urlParams_   gensupport.URLParams
19429	ifNoneMatch_ string
19430	ctx_         context.Context
19431	header_      http.Header
19432}
19433
19434// List: Lists information about the supported locations for this
19435// service.
19436//
19437// - name: The resource that owns the locations collection, if
19438//   applicable.
19439func (r *OrganizationsLocationsService) List(name string) *OrganizationsLocationsListCall {
19440	c := &OrganizationsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19441	c.name = name
19442	return c
19443}
19444
19445// Filter sets the optional parameter "filter": A filter to narrow down
19446// results to a preferred subset. The filtering language accepts strings
19447// like "displayName=tokyo", and is documented in more detail in AIP-160
19448// (https://google.aip.dev/160).
19449func (c *OrganizationsLocationsListCall) Filter(filter string) *OrganizationsLocationsListCall {
19450	c.urlParams_.Set("filter", filter)
19451	return c
19452}
19453
19454// PageSize sets the optional parameter "pageSize": The maximum number
19455// of results to return. If not set, the service selects a default.
19456func (c *OrganizationsLocationsListCall) PageSize(pageSize int64) *OrganizationsLocationsListCall {
19457	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19458	return c
19459}
19460
19461// PageToken sets the optional parameter "pageToken": A page token
19462// received from the next_page_token field in the response. Send that
19463// page token to receive the subsequent page.
19464func (c *OrganizationsLocationsListCall) PageToken(pageToken string) *OrganizationsLocationsListCall {
19465	c.urlParams_.Set("pageToken", pageToken)
19466	return c
19467}
19468
19469// Fields allows partial responses to be retrieved. See
19470// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19471// for more information.
19472func (c *OrganizationsLocationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsListCall {
19473	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19474	return c
19475}
19476
19477// IfNoneMatch sets the optional parameter which makes the operation
19478// fail if the object's ETag matches the given value. This is useful for
19479// getting updates only after the object has changed since the last
19480// request. Use googleapi.IsNotModified to check whether the response
19481// error from Do is the result of In-None-Match.
19482func (c *OrganizationsLocationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsListCall {
19483	c.ifNoneMatch_ = entityTag
19484	return c
19485}
19486
19487// Context sets the context to be used in this call's Do method. Any
19488// pending HTTP request will be aborted if the provided context is
19489// canceled.
19490func (c *OrganizationsLocationsListCall) Context(ctx context.Context) *OrganizationsLocationsListCall {
19491	c.ctx_ = ctx
19492	return c
19493}
19494
19495// Header returns an http.Header that can be modified by the caller to
19496// add HTTP headers to the request.
19497func (c *OrganizationsLocationsListCall) Header() http.Header {
19498	if c.header_ == nil {
19499		c.header_ = make(http.Header)
19500	}
19501	return c.header_
19502}
19503
19504func (c *OrganizationsLocationsListCall) doRequest(alt string) (*http.Response, error) {
19505	reqHeaders := make(http.Header)
19506	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
19507	for k, v := range c.header_ {
19508		reqHeaders[k] = v
19509	}
19510	reqHeaders.Set("User-Agent", c.s.userAgent())
19511	if c.ifNoneMatch_ != "" {
19512		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19513	}
19514	var body io.Reader = nil
19515	c.urlParams_.Set("alt", alt)
19516	c.urlParams_.Set("prettyPrint", "false")
19517	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
19518	urls += "?" + c.urlParams_.Encode()
19519	req, err := http.NewRequest("GET", urls, body)
19520	if err != nil {
19521		return nil, err
19522	}
19523	req.Header = reqHeaders
19524	googleapi.Expand(req.URL, map[string]string{
19525		"name": c.name,
19526	})
19527	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19528}
19529
19530// Do executes the "logging.organizations.locations.list" call.
19531// Exactly one of *ListLocationsResponse or error will be non-nil. Any
19532// non-2xx status code is an error. Response headers are in either
19533// *ListLocationsResponse.ServerResponse.Header or (if a response was
19534// returned at all) in error.(*googleapi.Error).Header. Use
19535// googleapi.IsNotModified to check whether the returned error was
19536// because http.StatusNotModified was returned.
19537func (c *OrganizationsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
19538	gensupport.SetOptions(c.urlParams_, opts...)
19539	res, err := c.doRequest("json")
19540	if res != nil && res.StatusCode == http.StatusNotModified {
19541		if res.Body != nil {
19542			res.Body.Close()
19543		}
19544		return nil, &googleapi.Error{
19545			Code:   res.StatusCode,
19546			Header: res.Header,
19547		}
19548	}
19549	if err != nil {
19550		return nil, err
19551	}
19552	defer googleapi.CloseBody(res)
19553	if err := googleapi.CheckResponse(res); err != nil {
19554		return nil, err
19555	}
19556	ret := &ListLocationsResponse{
19557		ServerResponse: googleapi.ServerResponse{
19558			Header:         res.Header,
19559			HTTPStatusCode: res.StatusCode,
19560		},
19561	}
19562	target := &ret
19563	if err := gensupport.DecodeResponse(target, res); err != nil {
19564		return nil, err
19565	}
19566	return ret, nil
19567	// {
19568	//   "description": "Lists information about the supported locations for this service.",
19569	//   "flatPath": "v2/organizations/{organizationsId}/locations",
19570	//   "httpMethod": "GET",
19571	//   "id": "logging.organizations.locations.list",
19572	//   "parameterOrder": [
19573	//     "name"
19574	//   ],
19575	//   "parameters": {
19576	//     "filter": {
19577	//       "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in AIP-160 (https://google.aip.dev/160).",
19578	//       "location": "query",
19579	//       "type": "string"
19580	//     },
19581	//     "name": {
19582	//       "description": "The resource that owns the locations collection, if applicable.",
19583	//       "location": "path",
19584	//       "pattern": "^organizations/[^/]+$",
19585	//       "required": true,
19586	//       "type": "string"
19587	//     },
19588	//     "pageSize": {
19589	//       "description": "The maximum number of results to return. If not set, the service selects a default.",
19590	//       "format": "int32",
19591	//       "location": "query",
19592	//       "type": "integer"
19593	//     },
19594	//     "pageToken": {
19595	//       "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.",
19596	//       "location": "query",
19597	//       "type": "string"
19598	//     }
19599	//   },
19600	//   "path": "v2/{+name}/locations",
19601	//   "response": {
19602	//     "$ref": "ListLocationsResponse"
19603	//   },
19604	//   "scopes": [
19605	//     "https://www.googleapis.com/auth/cloud-platform",
19606	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
19607	//     "https://www.googleapis.com/auth/logging.admin",
19608	//     "https://www.googleapis.com/auth/logging.read"
19609	//   ]
19610	// }
19611
19612}
19613
19614// Pages invokes f for each page of results.
19615// A non-nil error returned from f will halt the iteration.
19616// The provided context supersedes any context provided to the Context method.
19617func (c *OrganizationsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
19618	c.ctx_ = ctx
19619	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19620	for {
19621		x, err := c.Do()
19622		if err != nil {
19623			return err
19624		}
19625		if err := f(x); err != nil {
19626			return err
19627		}
19628		if x.NextPageToken == "" {
19629			return nil
19630		}
19631		c.PageToken(x.NextPageToken)
19632	}
19633}
19634
19635// method id "logging.organizations.locations.buckets.create":
19636
19637type OrganizationsLocationsBucketsCreateCall struct {
19638	s          *Service
19639	parent     string
19640	logbucket  *LogBucket
19641	urlParams_ gensupport.URLParams
19642	ctx_       context.Context
19643	header_    http.Header
19644}
19645
19646// Create: Creates a log bucket that can be used to store log entries.
19647// After a bucket has been created, the bucket's location cannot be
19648// changed.
19649//
19650// - parent: The resource in which to create the log bucket:
19651//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
19652//   example:"projects/my-project/locations/global".
19653func (r *OrganizationsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *OrganizationsLocationsBucketsCreateCall {
19654	c := &OrganizationsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19655	c.parent = parent
19656	c.logbucket = logbucket
19657	return c
19658}
19659
19660// BucketId sets the optional parameter "bucketId": Required. A
19661// client-assigned identifier such as "my-bucket". Identifiers are
19662// limited to 100 characters and can include only letters, digits,
19663// underscores, hyphens, and periods.
19664func (c *OrganizationsLocationsBucketsCreateCall) BucketId(bucketId string) *OrganizationsLocationsBucketsCreateCall {
19665	c.urlParams_.Set("bucketId", bucketId)
19666	return c
19667}
19668
19669// Fields allows partial responses to be retrieved. See
19670// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19671// for more information.
19672func (c *OrganizationsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsCreateCall {
19673	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19674	return c
19675}
19676
19677// Context sets the context to be used in this call's Do method. Any
19678// pending HTTP request will be aborted if the provided context is
19679// canceled.
19680func (c *OrganizationsLocationsBucketsCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsCreateCall {
19681	c.ctx_ = ctx
19682	return c
19683}
19684
19685// Header returns an http.Header that can be modified by the caller to
19686// add HTTP headers to the request.
19687func (c *OrganizationsLocationsBucketsCreateCall) Header() http.Header {
19688	if c.header_ == nil {
19689		c.header_ = make(http.Header)
19690	}
19691	return c.header_
19692}
19693
19694func (c *OrganizationsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
19695	reqHeaders := make(http.Header)
19696	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
19697	for k, v := range c.header_ {
19698		reqHeaders[k] = v
19699	}
19700	reqHeaders.Set("User-Agent", c.s.userAgent())
19701	var body io.Reader = nil
19702	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
19703	if err != nil {
19704		return nil, err
19705	}
19706	reqHeaders.Set("Content-Type", "application/json")
19707	c.urlParams_.Set("alt", alt)
19708	c.urlParams_.Set("prettyPrint", "false")
19709	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
19710	urls += "?" + c.urlParams_.Encode()
19711	req, err := http.NewRequest("POST", urls, body)
19712	if err != nil {
19713		return nil, err
19714	}
19715	req.Header = reqHeaders
19716	googleapi.Expand(req.URL, map[string]string{
19717		"parent": c.parent,
19718	})
19719	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19720}
19721
19722// Do executes the "logging.organizations.locations.buckets.create" call.
19723// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
19724// status code is an error. Response headers are in either
19725// *LogBucket.ServerResponse.Header or (if a response was returned at
19726// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19727// to check whether the returned error was because
19728// http.StatusNotModified was returned.
19729func (c *OrganizationsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
19730	gensupport.SetOptions(c.urlParams_, opts...)
19731	res, err := c.doRequest("json")
19732	if res != nil && res.StatusCode == http.StatusNotModified {
19733		if res.Body != nil {
19734			res.Body.Close()
19735		}
19736		return nil, &googleapi.Error{
19737			Code:   res.StatusCode,
19738			Header: res.Header,
19739		}
19740	}
19741	if err != nil {
19742		return nil, err
19743	}
19744	defer googleapi.CloseBody(res)
19745	if err := googleapi.CheckResponse(res); err != nil {
19746		return nil, err
19747	}
19748	ret := &LogBucket{
19749		ServerResponse: googleapi.ServerResponse{
19750			Header:         res.Header,
19751			HTTPStatusCode: res.StatusCode,
19752		},
19753	}
19754	target := &ret
19755	if err := gensupport.DecodeResponse(target, res); err != nil {
19756		return nil, err
19757	}
19758	return ret, nil
19759	// {
19760	//   "description": "Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.",
19761	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets",
19762	//   "httpMethod": "POST",
19763	//   "id": "logging.organizations.locations.buckets.create",
19764	//   "parameterOrder": [
19765	//     "parent"
19766	//   ],
19767	//   "parameters": {
19768	//     "bucketId": {
19769	//       "description": "Required. A client-assigned identifier such as \"my-bucket\". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.",
19770	//       "location": "query",
19771	//       "type": "string"
19772	//     },
19773	//     "parent": {
19774	//       "description": "Required. The resource in which to create the log bucket: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" For example:\"projects/my-project/locations/global\"",
19775	//       "location": "path",
19776	//       "pattern": "^organizations/[^/]+/locations/[^/]+$",
19777	//       "required": true,
19778	//       "type": "string"
19779	//     }
19780	//   },
19781	//   "path": "v2/{+parent}/buckets",
19782	//   "request": {
19783	//     "$ref": "LogBucket"
19784	//   },
19785	//   "response": {
19786	//     "$ref": "LogBucket"
19787	//   },
19788	//   "scopes": [
19789	//     "https://www.googleapis.com/auth/cloud-platform",
19790	//     "https://www.googleapis.com/auth/logging.admin"
19791	//   ]
19792	// }
19793
19794}
19795
19796// method id "logging.organizations.locations.buckets.delete":
19797
19798type OrganizationsLocationsBucketsDeleteCall struct {
19799	s          *Service
19800	name       string
19801	urlParams_ gensupport.URLParams
19802	ctx_       context.Context
19803	header_    http.Header
19804}
19805
19806// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to
19807// the DELETE_REQUESTED state. After 7 days, the bucket will be purged
19808// and all log entries in the bucket will be permanently deleted.
19809//
19810// - name: The full resource name of the bucket to delete.
19811//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
19812//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
19813//   CKET_ID]"
19814//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
19815//   s/[BUCKET_ID]"
19816//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
19817//   For
19818//   example:"projects/my-project/locations/global/buckets/my-bucket".
19819func (r *OrganizationsLocationsBucketsService) Delete(name string) *OrganizationsLocationsBucketsDeleteCall {
19820	c := &OrganizationsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19821	c.name = name
19822	return c
19823}
19824
19825// Fields allows partial responses to be retrieved. See
19826// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19827// for more information.
19828func (c *OrganizationsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsDeleteCall {
19829	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19830	return c
19831}
19832
19833// Context sets the context to be used in this call's Do method. Any
19834// pending HTTP request will be aborted if the provided context is
19835// canceled.
19836func (c *OrganizationsLocationsBucketsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsDeleteCall {
19837	c.ctx_ = ctx
19838	return c
19839}
19840
19841// Header returns an http.Header that can be modified by the caller to
19842// add HTTP headers to the request.
19843func (c *OrganizationsLocationsBucketsDeleteCall) Header() http.Header {
19844	if c.header_ == nil {
19845		c.header_ = make(http.Header)
19846	}
19847	return c.header_
19848}
19849
19850func (c *OrganizationsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
19851	reqHeaders := make(http.Header)
19852	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
19853	for k, v := range c.header_ {
19854		reqHeaders[k] = v
19855	}
19856	reqHeaders.Set("User-Agent", c.s.userAgent())
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/{+name}")
19861	urls += "?" + c.urlParams_.Encode()
19862	req, err := http.NewRequest("DELETE", urls, body)
19863	if err != nil {
19864		return nil, err
19865	}
19866	req.Header = reqHeaders
19867	googleapi.Expand(req.URL, map[string]string{
19868		"name": c.name,
19869	})
19870	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19871}
19872
19873// Do executes the "logging.organizations.locations.buckets.delete" call.
19874// Exactly one of *Empty or error will be non-nil. Any non-2xx status
19875// code is an error. Response headers are in either
19876// *Empty.ServerResponse.Header or (if a response was returned at all)
19877// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19878// check whether the returned error was because http.StatusNotModified
19879// was returned.
19880func (c *OrganizationsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
19881	gensupport.SetOptions(c.urlParams_, opts...)
19882	res, err := c.doRequest("json")
19883	if res != nil && res.StatusCode == http.StatusNotModified {
19884		if res.Body != nil {
19885			res.Body.Close()
19886		}
19887		return nil, &googleapi.Error{
19888			Code:   res.StatusCode,
19889			Header: res.Header,
19890		}
19891	}
19892	if err != nil {
19893		return nil, err
19894	}
19895	defer googleapi.CloseBody(res)
19896	if err := googleapi.CheckResponse(res); err != nil {
19897		return nil, err
19898	}
19899	ret := &Empty{
19900		ServerResponse: googleapi.ServerResponse{
19901			Header:         res.Header,
19902			HTTPStatusCode: res.StatusCode,
19903		},
19904	}
19905	target := &ret
19906	if err := gensupport.DecodeResponse(target, res); err != nil {
19907		return nil, err
19908	}
19909	return ret, nil
19910	// {
19911	//   "description": "Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.",
19912	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}",
19913	//   "httpMethod": "DELETE",
19914	//   "id": "logging.organizations.locations.buckets.delete",
19915	//   "parameterOrder": [
19916	//     "name"
19917	//   ],
19918	//   "parameters": {
19919	//     "name": {
19920	//       "description": "Required. The full resource name of the bucket to delete. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
19921	//       "location": "path",
19922	//       "pattern": "^organizations/[^/]+/locations/[^/]+/buckets/[^/]+$",
19923	//       "required": true,
19924	//       "type": "string"
19925	//     }
19926	//   },
19927	//   "path": "v2/{+name}",
19928	//   "response": {
19929	//     "$ref": "Empty"
19930	//   },
19931	//   "scopes": [
19932	//     "https://www.googleapis.com/auth/cloud-platform",
19933	//     "https://www.googleapis.com/auth/logging.admin"
19934	//   ]
19935	// }
19936
19937}
19938
19939// method id "logging.organizations.locations.buckets.get":
19940
19941type OrganizationsLocationsBucketsGetCall struct {
19942	s            *Service
19943	name         string
19944	urlParams_   gensupport.URLParams
19945	ifNoneMatch_ string
19946	ctx_         context.Context
19947	header_      http.Header
19948}
19949
19950// Get: Gets a log bucket.
19951//
19952// - name: The resource name of the bucket:
19953//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
19954//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
19955//   CKET_ID]"
19956//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
19957//   s/[BUCKET_ID]"
19958//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
19959//   For
19960//   example:"projects/my-project/locations/global/buckets/my-bucket".
19961func (r *OrganizationsLocationsBucketsService) Get(name string) *OrganizationsLocationsBucketsGetCall {
19962	c := &OrganizationsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19963	c.name = name
19964	return c
19965}
19966
19967// Fields allows partial responses to be retrieved. See
19968// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19969// for more information.
19970func (c *OrganizationsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsGetCall {
19971	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19972	return c
19973}
19974
19975// IfNoneMatch sets the optional parameter which makes the operation
19976// fail if the object's ETag matches the given value. This is useful for
19977// getting updates only after the object has changed since the last
19978// request. Use googleapi.IsNotModified to check whether the response
19979// error from Do is the result of In-None-Match.
19980func (c *OrganizationsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsGetCall {
19981	c.ifNoneMatch_ = entityTag
19982	return c
19983}
19984
19985// Context sets the context to be used in this call's Do method. Any
19986// pending HTTP request will be aborted if the provided context is
19987// canceled.
19988func (c *OrganizationsLocationsBucketsGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsGetCall {
19989	c.ctx_ = ctx
19990	return c
19991}
19992
19993// Header returns an http.Header that can be modified by the caller to
19994// add HTTP headers to the request.
19995func (c *OrganizationsLocationsBucketsGetCall) Header() http.Header {
19996	if c.header_ == nil {
19997		c.header_ = make(http.Header)
19998	}
19999	return c.header_
20000}
20001
20002func (c *OrganizationsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
20003	reqHeaders := make(http.Header)
20004	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
20005	for k, v := range c.header_ {
20006		reqHeaders[k] = v
20007	}
20008	reqHeaders.Set("User-Agent", c.s.userAgent())
20009	if c.ifNoneMatch_ != "" {
20010		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20011	}
20012	var body io.Reader = nil
20013	c.urlParams_.Set("alt", alt)
20014	c.urlParams_.Set("prettyPrint", "false")
20015	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
20016	urls += "?" + c.urlParams_.Encode()
20017	req, err := http.NewRequest("GET", urls, body)
20018	if err != nil {
20019		return nil, err
20020	}
20021	req.Header = reqHeaders
20022	googleapi.Expand(req.URL, map[string]string{
20023		"name": c.name,
20024	})
20025	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20026}
20027
20028// Do executes the "logging.organizations.locations.buckets.get" call.
20029// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
20030// status code is an error. Response headers are in either
20031// *LogBucket.ServerResponse.Header or (if a response was returned at
20032// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20033// to check whether the returned error was because
20034// http.StatusNotModified was returned.
20035func (c *OrganizationsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
20036	gensupport.SetOptions(c.urlParams_, opts...)
20037	res, err := c.doRequest("json")
20038	if res != nil && res.StatusCode == http.StatusNotModified {
20039		if res.Body != nil {
20040			res.Body.Close()
20041		}
20042		return nil, &googleapi.Error{
20043			Code:   res.StatusCode,
20044			Header: res.Header,
20045		}
20046	}
20047	if err != nil {
20048		return nil, err
20049	}
20050	defer googleapi.CloseBody(res)
20051	if err := googleapi.CheckResponse(res); err != nil {
20052		return nil, err
20053	}
20054	ret := &LogBucket{
20055		ServerResponse: googleapi.ServerResponse{
20056			Header:         res.Header,
20057			HTTPStatusCode: res.StatusCode,
20058		},
20059	}
20060	target := &ret
20061	if err := gensupport.DecodeResponse(target, res); err != nil {
20062		return nil, err
20063	}
20064	return ret, nil
20065	// {
20066	//   "description": "Gets a log bucket.",
20067	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}",
20068	//   "httpMethod": "GET",
20069	//   "id": "logging.organizations.locations.buckets.get",
20070	//   "parameterOrder": [
20071	//     "name"
20072	//   ],
20073	//   "parameters": {
20074	//     "name": {
20075	//       "description": "Required. The resource name of the bucket: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
20076	//       "location": "path",
20077	//       "pattern": "^organizations/[^/]+/locations/[^/]+/buckets/[^/]+$",
20078	//       "required": true,
20079	//       "type": "string"
20080	//     }
20081	//   },
20082	//   "path": "v2/{+name}",
20083	//   "response": {
20084	//     "$ref": "LogBucket"
20085	//   },
20086	//   "scopes": [
20087	//     "https://www.googleapis.com/auth/cloud-platform",
20088	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
20089	//     "https://www.googleapis.com/auth/logging.admin",
20090	//     "https://www.googleapis.com/auth/logging.read"
20091	//   ]
20092	// }
20093
20094}
20095
20096// method id "logging.organizations.locations.buckets.list":
20097
20098type OrganizationsLocationsBucketsListCall struct {
20099	s            *Service
20100	parent       string
20101	urlParams_   gensupport.URLParams
20102	ifNoneMatch_ string
20103	ctx_         context.Context
20104	header_      http.Header
20105}
20106
20107// List: Lists log buckets.
20108//
20109// - parent: The parent resource whose buckets are to be listed:
20110//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
20111//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
20112//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
20113//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations
20114//   portion of the resource must be specified, but supplying the
20115//   character - in place of LOCATION_ID will return all buckets.
20116func (r *OrganizationsLocationsBucketsService) List(parent string) *OrganizationsLocationsBucketsListCall {
20117	c := &OrganizationsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20118	c.parent = parent
20119	return c
20120}
20121
20122// PageSize sets the optional parameter "pageSize": The maximum number
20123// of results to return from this request. Non-positive values are
20124// ignored. The presence of nextPageToken in the response indicates that
20125// more results might be available.
20126func (c *OrganizationsLocationsBucketsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsListCall {
20127	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
20128	return c
20129}
20130
20131// PageToken sets the optional parameter "pageToken": If present, then
20132// retrieve the next batch of results from the preceding call to this
20133// method. pageToken must be the value of nextPageToken from the
20134// previous response. The values of other method parameters should be
20135// identical to those in the previous call.
20136func (c *OrganizationsLocationsBucketsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsListCall {
20137	c.urlParams_.Set("pageToken", pageToken)
20138	return c
20139}
20140
20141// Fields allows partial responses to be retrieved. See
20142// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20143// for more information.
20144func (c *OrganizationsLocationsBucketsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsListCall {
20145	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20146	return c
20147}
20148
20149// IfNoneMatch sets the optional parameter which makes the operation
20150// fail if the object's ETag matches the given value. This is useful for
20151// getting updates only after the object has changed since the last
20152// request. Use googleapi.IsNotModified to check whether the response
20153// error from Do is the result of In-None-Match.
20154func (c *OrganizationsLocationsBucketsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsListCall {
20155	c.ifNoneMatch_ = entityTag
20156	return c
20157}
20158
20159// Context sets the context to be used in this call's Do method. Any
20160// pending HTTP request will be aborted if the provided context is
20161// canceled.
20162func (c *OrganizationsLocationsBucketsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsListCall {
20163	c.ctx_ = ctx
20164	return c
20165}
20166
20167// Header returns an http.Header that can be modified by the caller to
20168// add HTTP headers to the request.
20169func (c *OrganizationsLocationsBucketsListCall) Header() http.Header {
20170	if c.header_ == nil {
20171		c.header_ = make(http.Header)
20172	}
20173	return c.header_
20174}
20175
20176func (c *OrganizationsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
20177	reqHeaders := make(http.Header)
20178	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
20179	for k, v := range c.header_ {
20180		reqHeaders[k] = v
20181	}
20182	reqHeaders.Set("User-Agent", c.s.userAgent())
20183	if c.ifNoneMatch_ != "" {
20184		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20185	}
20186	var body io.Reader = nil
20187	c.urlParams_.Set("alt", alt)
20188	c.urlParams_.Set("prettyPrint", "false")
20189	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
20190	urls += "?" + c.urlParams_.Encode()
20191	req, err := http.NewRequest("GET", urls, body)
20192	if err != nil {
20193		return nil, err
20194	}
20195	req.Header = reqHeaders
20196	googleapi.Expand(req.URL, map[string]string{
20197		"parent": c.parent,
20198	})
20199	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20200}
20201
20202// Do executes the "logging.organizations.locations.buckets.list" call.
20203// Exactly one of *ListBucketsResponse or error will be non-nil. Any
20204// non-2xx status code is an error. Response headers are in either
20205// *ListBucketsResponse.ServerResponse.Header or (if a response was
20206// returned at all) in error.(*googleapi.Error).Header. Use
20207// googleapi.IsNotModified to check whether the returned error was
20208// because http.StatusNotModified was returned.
20209func (c *OrganizationsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
20210	gensupport.SetOptions(c.urlParams_, opts...)
20211	res, err := c.doRequest("json")
20212	if res != nil && res.StatusCode == http.StatusNotModified {
20213		if res.Body != nil {
20214			res.Body.Close()
20215		}
20216		return nil, &googleapi.Error{
20217			Code:   res.StatusCode,
20218			Header: res.Header,
20219		}
20220	}
20221	if err != nil {
20222		return nil, err
20223	}
20224	defer googleapi.CloseBody(res)
20225	if err := googleapi.CheckResponse(res); err != nil {
20226		return nil, err
20227	}
20228	ret := &ListBucketsResponse{
20229		ServerResponse: googleapi.ServerResponse{
20230			Header:         res.Header,
20231			HTTPStatusCode: res.StatusCode,
20232		},
20233	}
20234	target := &ret
20235	if err := gensupport.DecodeResponse(target, res); err != nil {
20236		return nil, err
20237	}
20238	return ret, nil
20239	// {
20240	//   "description": "Lists log buckets.",
20241	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets",
20242	//   "httpMethod": "GET",
20243	//   "id": "logging.organizations.locations.buckets.list",
20244	//   "parameterOrder": [
20245	//     "parent"
20246	//   ],
20247	//   "parameters": {
20248	//     "pageSize": {
20249	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
20250	//       "format": "int32",
20251	//       "location": "query",
20252	//       "type": "integer"
20253	//     },
20254	//     "pageToken": {
20255	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
20256	//       "location": "query",
20257	//       "type": "string"
20258	//     },
20259	//     "parent": {
20260	//       "description": "Required. The parent resource whose buckets are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]\" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets.",
20261	//       "location": "path",
20262	//       "pattern": "^organizations/[^/]+/locations/[^/]+$",
20263	//       "required": true,
20264	//       "type": "string"
20265	//     }
20266	//   },
20267	//   "path": "v2/{+parent}/buckets",
20268	//   "response": {
20269	//     "$ref": "ListBucketsResponse"
20270	//   },
20271	//   "scopes": [
20272	//     "https://www.googleapis.com/auth/cloud-platform",
20273	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
20274	//     "https://www.googleapis.com/auth/logging.admin",
20275	//     "https://www.googleapis.com/auth/logging.read"
20276	//   ]
20277	// }
20278
20279}
20280
20281// Pages invokes f for each page of results.
20282// A non-nil error returned from f will halt the iteration.
20283// The provided context supersedes any context provided to the Context method.
20284func (c *OrganizationsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
20285	c.ctx_ = ctx
20286	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20287	for {
20288		x, err := c.Do()
20289		if err != nil {
20290			return err
20291		}
20292		if err := f(x); err != nil {
20293			return err
20294		}
20295		if x.NextPageToken == "" {
20296			return nil
20297		}
20298		c.PageToken(x.NextPageToken)
20299	}
20300}
20301
20302// method id "logging.organizations.locations.buckets.patch":
20303
20304type OrganizationsLocationsBucketsPatchCall struct {
20305	s          *Service
20306	name       string
20307	logbucket  *LogBucket
20308	urlParams_ gensupport.URLParams
20309	ctx_       context.Context
20310	header_    http.Header
20311}
20312
20313// Patch: Updates a log bucket. This method replaces the following
20314// fields in the existing bucket with values from the new bucket:
20315// retention_periodIf the retention period is decreased and the bucket
20316// is locked, FAILED_PRECONDITION will be returned.If the bucket has a
20317// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be
20318// returned.After a bucket has been created, the bucket's location
20319// cannot be changed.
20320//
20321// - name: The full resource name of the bucket to update.
20322//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
20323//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
20324//   CKET_ID]"
20325//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
20326//   s/[BUCKET_ID]"
20327//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
20328//   For
20329//   example:"projects/my-project/locations/global/buckets/my-bucket".
20330func (r *OrganizationsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *OrganizationsLocationsBucketsPatchCall {
20331	c := &OrganizationsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20332	c.name = name
20333	c.logbucket = logbucket
20334	return c
20335}
20336
20337// UpdateMask sets the optional parameter "updateMask": Required. Field
20338// mask that specifies the fields in bucket that need an update. A
20339// bucket field will be overwritten if, and only if, it is in the update
20340// mask. name and output only fields cannot be updated.For a detailed
20341// FieldMask definition, see:
20342// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
20343// example: updateMask=retention_days
20344func (c *OrganizationsLocationsBucketsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsPatchCall {
20345	c.urlParams_.Set("updateMask", updateMask)
20346	return c
20347}
20348
20349// Fields allows partial responses to be retrieved. See
20350// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20351// for more information.
20352func (c *OrganizationsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsPatchCall {
20353	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20354	return c
20355}
20356
20357// Context sets the context to be used in this call's Do method. Any
20358// pending HTTP request will be aborted if the provided context is
20359// canceled.
20360func (c *OrganizationsLocationsBucketsPatchCall) Context(ctx context.Context) *OrganizationsLocationsBucketsPatchCall {
20361	c.ctx_ = ctx
20362	return c
20363}
20364
20365// Header returns an http.Header that can be modified by the caller to
20366// add HTTP headers to the request.
20367func (c *OrganizationsLocationsBucketsPatchCall) Header() http.Header {
20368	if c.header_ == nil {
20369		c.header_ = make(http.Header)
20370	}
20371	return c.header_
20372}
20373
20374func (c *OrganizationsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
20375	reqHeaders := make(http.Header)
20376	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
20377	for k, v := range c.header_ {
20378		reqHeaders[k] = v
20379	}
20380	reqHeaders.Set("User-Agent", c.s.userAgent())
20381	var body io.Reader = nil
20382	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
20383	if err != nil {
20384		return nil, err
20385	}
20386	reqHeaders.Set("Content-Type", "application/json")
20387	c.urlParams_.Set("alt", alt)
20388	c.urlParams_.Set("prettyPrint", "false")
20389	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
20390	urls += "?" + c.urlParams_.Encode()
20391	req, err := http.NewRequest("PATCH", urls, body)
20392	if err != nil {
20393		return nil, err
20394	}
20395	req.Header = reqHeaders
20396	googleapi.Expand(req.URL, map[string]string{
20397		"name": c.name,
20398	})
20399	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20400}
20401
20402// Do executes the "logging.organizations.locations.buckets.patch" call.
20403// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
20404// status code is an error. Response headers are in either
20405// *LogBucket.ServerResponse.Header or (if a response was returned at
20406// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20407// to check whether the returned error was because
20408// http.StatusNotModified was returned.
20409func (c *OrganizationsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
20410	gensupport.SetOptions(c.urlParams_, opts...)
20411	res, err := c.doRequest("json")
20412	if res != nil && res.StatusCode == http.StatusNotModified {
20413		if res.Body != nil {
20414			res.Body.Close()
20415		}
20416		return nil, &googleapi.Error{
20417			Code:   res.StatusCode,
20418			Header: res.Header,
20419		}
20420	}
20421	if err != nil {
20422		return nil, err
20423	}
20424	defer googleapi.CloseBody(res)
20425	if err := googleapi.CheckResponse(res); err != nil {
20426		return nil, err
20427	}
20428	ret := &LogBucket{
20429		ServerResponse: googleapi.ServerResponse{
20430			Header:         res.Header,
20431			HTTPStatusCode: res.StatusCode,
20432		},
20433	}
20434	target := &ret
20435	if err := gensupport.DecodeResponse(target, res); err != nil {
20436		return nil, err
20437	}
20438	return ret, nil
20439	// {
20440	//   "description": "Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed.",
20441	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}",
20442	//   "httpMethod": "PATCH",
20443	//   "id": "logging.organizations.locations.buckets.patch",
20444	//   "parameterOrder": [
20445	//     "name"
20446	//   ],
20447	//   "parameters": {
20448	//     "name": {
20449	//       "description": "Required. The full resource name of the bucket to update. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
20450	//       "location": "path",
20451	//       "pattern": "^organizations/[^/]+/locations/[^/]+/buckets/[^/]+$",
20452	//       "required": true,
20453	//       "type": "string"
20454	//     },
20455	//     "updateMask": {
20456	//       "description": "Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days",
20457	//       "format": "google-fieldmask",
20458	//       "location": "query",
20459	//       "type": "string"
20460	//     }
20461	//   },
20462	//   "path": "v2/{+name}",
20463	//   "request": {
20464	//     "$ref": "LogBucket"
20465	//   },
20466	//   "response": {
20467	//     "$ref": "LogBucket"
20468	//   },
20469	//   "scopes": [
20470	//     "https://www.googleapis.com/auth/cloud-platform",
20471	//     "https://www.googleapis.com/auth/logging.admin"
20472	//   ]
20473	// }
20474
20475}
20476
20477// method id "logging.organizations.locations.buckets.undelete":
20478
20479type OrganizationsLocationsBucketsUndeleteCall struct {
20480	s                     *Service
20481	name                  string
20482	undeletebucketrequest *UndeleteBucketRequest
20483	urlParams_            gensupport.URLParams
20484	ctx_                  context.Context
20485	header_               http.Header
20486}
20487
20488// Undelete: Undeletes a log bucket. A bucket that has been deleted can
20489// be undeleted within the grace period of 7 days.
20490//
20491// - name: The full resource name of the bucket to undelete.
20492//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
20493//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
20494//   CKET_ID]"
20495//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
20496//   s/[BUCKET_ID]"
20497//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
20498//   For
20499//   example:"projects/my-project/locations/global/buckets/my-bucket".
20500func (r *OrganizationsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *OrganizationsLocationsBucketsUndeleteCall {
20501	c := &OrganizationsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20502	c.name = name
20503	c.undeletebucketrequest = undeletebucketrequest
20504	return c
20505}
20506
20507// Fields allows partial responses to be retrieved. See
20508// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20509// for more information.
20510func (c *OrganizationsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsUndeleteCall {
20511	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20512	return c
20513}
20514
20515// Context sets the context to be used in this call's Do method. Any
20516// pending HTTP request will be aborted if the provided context is
20517// canceled.
20518func (c *OrganizationsLocationsBucketsUndeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsUndeleteCall {
20519	c.ctx_ = ctx
20520	return c
20521}
20522
20523// Header returns an http.Header that can be modified by the caller to
20524// add HTTP headers to the request.
20525func (c *OrganizationsLocationsBucketsUndeleteCall) Header() http.Header {
20526	if c.header_ == nil {
20527		c.header_ = make(http.Header)
20528	}
20529	return c.header_
20530}
20531
20532func (c *OrganizationsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
20533	reqHeaders := make(http.Header)
20534	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
20535	for k, v := range c.header_ {
20536		reqHeaders[k] = v
20537	}
20538	reqHeaders.Set("User-Agent", c.s.userAgent())
20539	var body io.Reader = nil
20540	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
20541	if err != nil {
20542		return nil, err
20543	}
20544	reqHeaders.Set("Content-Type", "application/json")
20545	c.urlParams_.Set("alt", alt)
20546	c.urlParams_.Set("prettyPrint", "false")
20547	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
20548	urls += "?" + c.urlParams_.Encode()
20549	req, err := http.NewRequest("POST", urls, body)
20550	if err != nil {
20551		return nil, err
20552	}
20553	req.Header = reqHeaders
20554	googleapi.Expand(req.URL, map[string]string{
20555		"name": c.name,
20556	})
20557	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20558}
20559
20560// Do executes the "logging.organizations.locations.buckets.undelete" call.
20561// Exactly one of *Empty or error will be non-nil. Any non-2xx status
20562// code is an error. Response headers are in either
20563// *Empty.ServerResponse.Header or (if a response was returned at all)
20564// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
20565// check whether the returned error was because http.StatusNotModified
20566// was returned.
20567func (c *OrganizationsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
20568	gensupport.SetOptions(c.urlParams_, opts...)
20569	res, err := c.doRequest("json")
20570	if res != nil && res.StatusCode == http.StatusNotModified {
20571		if res.Body != nil {
20572			res.Body.Close()
20573		}
20574		return nil, &googleapi.Error{
20575			Code:   res.StatusCode,
20576			Header: res.Header,
20577		}
20578	}
20579	if err != nil {
20580		return nil, err
20581	}
20582	defer googleapi.CloseBody(res)
20583	if err := googleapi.CheckResponse(res); err != nil {
20584		return nil, err
20585	}
20586	ret := &Empty{
20587		ServerResponse: googleapi.ServerResponse{
20588			Header:         res.Header,
20589			HTTPStatusCode: res.StatusCode,
20590		},
20591	}
20592	target := &ret
20593	if err := gensupport.DecodeResponse(target, res); err != nil {
20594		return nil, err
20595	}
20596	return ret, nil
20597	// {
20598	//   "description": "Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.",
20599	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}:undelete",
20600	//   "httpMethod": "POST",
20601	//   "id": "logging.organizations.locations.buckets.undelete",
20602	//   "parameterOrder": [
20603	//     "name"
20604	//   ],
20605	//   "parameters": {
20606	//     "name": {
20607	//       "description": "Required. The full resource name of the bucket to undelete. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
20608	//       "location": "path",
20609	//       "pattern": "^organizations/[^/]+/locations/[^/]+/buckets/[^/]+$",
20610	//       "required": true,
20611	//       "type": "string"
20612	//     }
20613	//   },
20614	//   "path": "v2/{+name}:undelete",
20615	//   "request": {
20616	//     "$ref": "UndeleteBucketRequest"
20617	//   },
20618	//   "response": {
20619	//     "$ref": "Empty"
20620	//   },
20621	//   "scopes": [
20622	//     "https://www.googleapis.com/auth/cloud-platform",
20623	//     "https://www.googleapis.com/auth/logging.admin"
20624	//   ]
20625	// }
20626
20627}
20628
20629// method id "logging.organizations.locations.buckets.views.create":
20630
20631type OrganizationsLocationsBucketsViewsCreateCall struct {
20632	s          *Service
20633	parent     string
20634	logview    *LogView
20635	urlParams_ gensupport.URLParams
20636	ctx_       context.Context
20637	header_    http.Header
20638}
20639
20640// Create: Creates a view over log entries in a log bucket. A bucket may
20641// contain a maximum of 30 views.
20642//
20643// - parent: The bucket in which to create the view
20644//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
20645//   ` For
20646//   example:"projects/my-project/locations/global/buckets/my-bucket".
20647func (r *OrganizationsLocationsBucketsViewsService) Create(parent string, logview *LogView) *OrganizationsLocationsBucketsViewsCreateCall {
20648	c := &OrganizationsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20649	c.parent = parent
20650	c.logview = logview
20651	return c
20652}
20653
20654// ViewId sets the optional parameter "viewId": Required. The id to use
20655// for this view.
20656func (c *OrganizationsLocationsBucketsViewsCreateCall) ViewId(viewId string) *OrganizationsLocationsBucketsViewsCreateCall {
20657	c.urlParams_.Set("viewId", viewId)
20658	return c
20659}
20660
20661// Fields allows partial responses to be retrieved. See
20662// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20663// for more information.
20664func (c *OrganizationsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsCreateCall {
20665	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20666	return c
20667}
20668
20669// Context sets the context to be used in this call's Do method. Any
20670// pending HTTP request will be aborted if the provided context is
20671// canceled.
20672func (c *OrganizationsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsCreateCall {
20673	c.ctx_ = ctx
20674	return c
20675}
20676
20677// Header returns an http.Header that can be modified by the caller to
20678// add HTTP headers to the request.
20679func (c *OrganizationsLocationsBucketsViewsCreateCall) Header() http.Header {
20680	if c.header_ == nil {
20681		c.header_ = make(http.Header)
20682	}
20683	return c.header_
20684}
20685
20686func (c *OrganizationsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
20687	reqHeaders := make(http.Header)
20688	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
20689	for k, v := range c.header_ {
20690		reqHeaders[k] = v
20691	}
20692	reqHeaders.Set("User-Agent", c.s.userAgent())
20693	var body io.Reader = nil
20694	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
20695	if err != nil {
20696		return nil, err
20697	}
20698	reqHeaders.Set("Content-Type", "application/json")
20699	c.urlParams_.Set("alt", alt)
20700	c.urlParams_.Set("prettyPrint", "false")
20701	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
20702	urls += "?" + c.urlParams_.Encode()
20703	req, err := http.NewRequest("POST", urls, body)
20704	if err != nil {
20705		return nil, err
20706	}
20707	req.Header = reqHeaders
20708	googleapi.Expand(req.URL, map[string]string{
20709		"parent": c.parent,
20710	})
20711	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20712}
20713
20714// Do executes the "logging.organizations.locations.buckets.views.create" call.
20715// Exactly one of *LogView or error will be non-nil. Any non-2xx status
20716// code is an error. Response headers are in either
20717// *LogView.ServerResponse.Header or (if a response was returned at all)
20718// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
20719// check whether the returned error was because http.StatusNotModified
20720// was returned.
20721func (c *OrganizationsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
20722	gensupport.SetOptions(c.urlParams_, opts...)
20723	res, err := c.doRequest("json")
20724	if res != nil && res.StatusCode == http.StatusNotModified {
20725		if res.Body != nil {
20726			res.Body.Close()
20727		}
20728		return nil, &googleapi.Error{
20729			Code:   res.StatusCode,
20730			Header: res.Header,
20731		}
20732	}
20733	if err != nil {
20734		return nil, err
20735	}
20736	defer googleapi.CloseBody(res)
20737	if err := googleapi.CheckResponse(res); err != nil {
20738		return nil, err
20739	}
20740	ret := &LogView{
20741		ServerResponse: googleapi.ServerResponse{
20742			Header:         res.Header,
20743			HTTPStatusCode: res.StatusCode,
20744		},
20745	}
20746	target := &ret
20747	if err := gensupport.DecodeResponse(target, res); err != nil {
20748		return nil, err
20749	}
20750	return ret, nil
20751	// {
20752	//   "description": "Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.",
20753	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views",
20754	//   "httpMethod": "POST",
20755	//   "id": "logging.organizations.locations.buckets.views.create",
20756	//   "parameterOrder": [
20757	//     "parent"
20758	//   ],
20759	//   "parameters": {
20760	//     "parent": {
20761	//       "description": "Required. The bucket in which to create the view `\"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\"` For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
20762	//       "location": "path",
20763	//       "pattern": "^organizations/[^/]+/locations/[^/]+/buckets/[^/]+$",
20764	//       "required": true,
20765	//       "type": "string"
20766	//     },
20767	//     "viewId": {
20768	//       "description": "Required. The id to use for this view.",
20769	//       "location": "query",
20770	//       "type": "string"
20771	//     }
20772	//   },
20773	//   "path": "v2/{+parent}/views",
20774	//   "request": {
20775	//     "$ref": "LogView"
20776	//   },
20777	//   "response": {
20778	//     "$ref": "LogView"
20779	//   },
20780	//   "scopes": [
20781	//     "https://www.googleapis.com/auth/cloud-platform",
20782	//     "https://www.googleapis.com/auth/logging.admin"
20783	//   ]
20784	// }
20785
20786}
20787
20788// method id "logging.organizations.locations.buckets.views.delete":
20789
20790type OrganizationsLocationsBucketsViewsDeleteCall struct {
20791	s          *Service
20792	name       string
20793	urlParams_ gensupport.URLParams
20794	ctx_       context.Context
20795	header_    http.Header
20796}
20797
20798// Delete: Deletes a view on a log bucket.
20799//
20800// - name: The full resource name of the view to delete:
20801//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
20802//   iews/[VIEW_ID]" For
20803//   example:"projects/my-project/locations/global/buckets/my-bucket/view
20804//   s/my-view".
20805func (r *OrganizationsLocationsBucketsViewsService) Delete(name string) *OrganizationsLocationsBucketsViewsDeleteCall {
20806	c := &OrganizationsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20807	c.name = name
20808	return c
20809}
20810
20811// Fields allows partial responses to be retrieved. See
20812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20813// for more information.
20814func (c *OrganizationsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsDeleteCall {
20815	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20816	return c
20817}
20818
20819// Context sets the context to be used in this call's Do method. Any
20820// pending HTTP request will be aborted if the provided context is
20821// canceled.
20822func (c *OrganizationsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsDeleteCall {
20823	c.ctx_ = ctx
20824	return c
20825}
20826
20827// Header returns an http.Header that can be modified by the caller to
20828// add HTTP headers to the request.
20829func (c *OrganizationsLocationsBucketsViewsDeleteCall) Header() http.Header {
20830	if c.header_ == nil {
20831		c.header_ = make(http.Header)
20832	}
20833	return c.header_
20834}
20835
20836func (c *OrganizationsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
20837	reqHeaders := make(http.Header)
20838	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
20839	for k, v := range c.header_ {
20840		reqHeaders[k] = v
20841	}
20842	reqHeaders.Set("User-Agent", c.s.userAgent())
20843	var body io.Reader = nil
20844	c.urlParams_.Set("alt", alt)
20845	c.urlParams_.Set("prettyPrint", "false")
20846	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
20847	urls += "?" + c.urlParams_.Encode()
20848	req, err := http.NewRequest("DELETE", urls, body)
20849	if err != nil {
20850		return nil, err
20851	}
20852	req.Header = reqHeaders
20853	googleapi.Expand(req.URL, map[string]string{
20854		"name": c.name,
20855	})
20856	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20857}
20858
20859// Do executes the "logging.organizations.locations.buckets.views.delete" call.
20860// Exactly one of *Empty or error will be non-nil. Any non-2xx status
20861// code is an error. Response headers are in either
20862// *Empty.ServerResponse.Header or (if a response was returned at all)
20863// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
20864// check whether the returned error was because http.StatusNotModified
20865// was returned.
20866func (c *OrganizationsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
20867	gensupport.SetOptions(c.urlParams_, opts...)
20868	res, err := c.doRequest("json")
20869	if res != nil && res.StatusCode == http.StatusNotModified {
20870		if res.Body != nil {
20871			res.Body.Close()
20872		}
20873		return nil, &googleapi.Error{
20874			Code:   res.StatusCode,
20875			Header: res.Header,
20876		}
20877	}
20878	if err != nil {
20879		return nil, err
20880	}
20881	defer googleapi.CloseBody(res)
20882	if err := googleapi.CheckResponse(res); err != nil {
20883		return nil, err
20884	}
20885	ret := &Empty{
20886		ServerResponse: googleapi.ServerResponse{
20887			Header:         res.Header,
20888			HTTPStatusCode: res.StatusCode,
20889		},
20890	}
20891	target := &ret
20892	if err := gensupport.DecodeResponse(target, res); err != nil {
20893		return nil, err
20894	}
20895	return ret, nil
20896	// {
20897	//   "description": "Deletes a view on a log bucket.",
20898	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
20899	//   "httpMethod": "DELETE",
20900	//   "id": "logging.organizations.locations.buckets.views.delete",
20901	//   "parameterOrder": [
20902	//     "name"
20903	//   ],
20904	//   "parameters": {
20905	//     "name": {
20906	//       "description": "Required. The full resource name of the view to delete: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
20907	//       "location": "path",
20908	//       "pattern": "^organizations/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
20909	//       "required": true,
20910	//       "type": "string"
20911	//     }
20912	//   },
20913	//   "path": "v2/{+name}",
20914	//   "response": {
20915	//     "$ref": "Empty"
20916	//   },
20917	//   "scopes": [
20918	//     "https://www.googleapis.com/auth/cloud-platform",
20919	//     "https://www.googleapis.com/auth/logging.admin"
20920	//   ]
20921	// }
20922
20923}
20924
20925// method id "logging.organizations.locations.buckets.views.get":
20926
20927type OrganizationsLocationsBucketsViewsGetCall struct {
20928	s            *Service
20929	name         string
20930	urlParams_   gensupport.URLParams
20931	ifNoneMatch_ string
20932	ctx_         context.Context
20933	header_      http.Header
20934}
20935
20936// Get: Gets a view on a log bucket..
20937//
20938// - name: The resource name of the policy:
20939//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
20940//   iews/[VIEW_ID]" For
20941//   example:"projects/my-project/locations/global/buckets/my-bucket/view
20942//   s/my-view".
20943func (r *OrganizationsLocationsBucketsViewsService) Get(name string) *OrganizationsLocationsBucketsViewsGetCall {
20944	c := &OrganizationsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20945	c.name = name
20946	return c
20947}
20948
20949// Fields allows partial responses to be retrieved. See
20950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20951// for more information.
20952func (c *OrganizationsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsGetCall {
20953	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20954	return c
20955}
20956
20957// IfNoneMatch sets the optional parameter which makes the operation
20958// fail if the object's ETag matches the given value. This is useful for
20959// getting updates only after the object has changed since the last
20960// request. Use googleapi.IsNotModified to check whether the response
20961// error from Do is the result of In-None-Match.
20962func (c *OrganizationsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsGetCall {
20963	c.ifNoneMatch_ = entityTag
20964	return c
20965}
20966
20967// Context sets the context to be used in this call's Do method. Any
20968// pending HTTP request will be aborted if the provided context is
20969// canceled.
20970func (c *OrganizationsLocationsBucketsViewsGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsGetCall {
20971	c.ctx_ = ctx
20972	return c
20973}
20974
20975// Header returns an http.Header that can be modified by the caller to
20976// add HTTP headers to the request.
20977func (c *OrganizationsLocationsBucketsViewsGetCall) Header() http.Header {
20978	if c.header_ == nil {
20979		c.header_ = make(http.Header)
20980	}
20981	return c.header_
20982}
20983
20984func (c *OrganizationsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
20985	reqHeaders := make(http.Header)
20986	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
20987	for k, v := range c.header_ {
20988		reqHeaders[k] = v
20989	}
20990	reqHeaders.Set("User-Agent", c.s.userAgent())
20991	if c.ifNoneMatch_ != "" {
20992		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20993	}
20994	var body io.Reader = nil
20995	c.urlParams_.Set("alt", alt)
20996	c.urlParams_.Set("prettyPrint", "false")
20997	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
20998	urls += "?" + c.urlParams_.Encode()
20999	req, err := http.NewRequest("GET", urls, body)
21000	if err != nil {
21001		return nil, err
21002	}
21003	req.Header = reqHeaders
21004	googleapi.Expand(req.URL, map[string]string{
21005		"name": c.name,
21006	})
21007	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21008}
21009
21010// Do executes the "logging.organizations.locations.buckets.views.get" call.
21011// Exactly one of *LogView or error will be non-nil. Any non-2xx status
21012// code is an error. Response headers are in either
21013// *LogView.ServerResponse.Header or (if a response was returned at all)
21014// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
21015// check whether the returned error was because http.StatusNotModified
21016// was returned.
21017func (c *OrganizationsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
21018	gensupport.SetOptions(c.urlParams_, opts...)
21019	res, err := c.doRequest("json")
21020	if res != nil && res.StatusCode == http.StatusNotModified {
21021		if res.Body != nil {
21022			res.Body.Close()
21023		}
21024		return nil, &googleapi.Error{
21025			Code:   res.StatusCode,
21026			Header: res.Header,
21027		}
21028	}
21029	if err != nil {
21030		return nil, err
21031	}
21032	defer googleapi.CloseBody(res)
21033	if err := googleapi.CheckResponse(res); err != nil {
21034		return nil, err
21035	}
21036	ret := &LogView{
21037		ServerResponse: googleapi.ServerResponse{
21038			Header:         res.Header,
21039			HTTPStatusCode: res.StatusCode,
21040		},
21041	}
21042	target := &ret
21043	if err := gensupport.DecodeResponse(target, res); err != nil {
21044		return nil, err
21045	}
21046	return ret, nil
21047	// {
21048	//   "description": "Gets a view on a log bucket..",
21049	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
21050	//   "httpMethod": "GET",
21051	//   "id": "logging.organizations.locations.buckets.views.get",
21052	//   "parameterOrder": [
21053	//     "name"
21054	//   ],
21055	//   "parameters": {
21056	//     "name": {
21057	//       "description": "Required. The resource name of the policy: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
21058	//       "location": "path",
21059	//       "pattern": "^organizations/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
21060	//       "required": true,
21061	//       "type": "string"
21062	//     }
21063	//   },
21064	//   "path": "v2/{+name}",
21065	//   "response": {
21066	//     "$ref": "LogView"
21067	//   },
21068	//   "scopes": [
21069	//     "https://www.googleapis.com/auth/cloud-platform",
21070	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
21071	//     "https://www.googleapis.com/auth/logging.admin",
21072	//     "https://www.googleapis.com/auth/logging.read"
21073	//   ]
21074	// }
21075
21076}
21077
21078// method id "logging.organizations.locations.buckets.views.list":
21079
21080type OrganizationsLocationsBucketsViewsListCall struct {
21081	s            *Service
21082	parent       string
21083	urlParams_   gensupport.URLParams
21084	ifNoneMatch_ string
21085	ctx_         context.Context
21086	header_      http.Header
21087}
21088
21089// List: Lists views on a log bucket.
21090//
21091// - parent: The bucket whose views are to be listed:
21092//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
21093func (r *OrganizationsLocationsBucketsViewsService) List(parent string) *OrganizationsLocationsBucketsViewsListCall {
21094	c := &OrganizationsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21095	c.parent = parent
21096	return c
21097}
21098
21099// PageSize sets the optional parameter "pageSize": The maximum number
21100// of results to return from this request.Non-positive values are
21101// ignored. The presence of nextPageToken in the response indicates that
21102// more results might be available.
21103func (c *OrganizationsLocationsBucketsViewsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsViewsListCall {
21104	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
21105	return c
21106}
21107
21108// PageToken sets the optional parameter "pageToken": If present, then
21109// retrieve the next batch of results from the preceding call to this
21110// method. pageToken must be the value of nextPageToken from the
21111// previous response. The values of other method parameters should be
21112// identical to those in the previous call.
21113func (c *OrganizationsLocationsBucketsViewsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsViewsListCall {
21114	c.urlParams_.Set("pageToken", pageToken)
21115	return c
21116}
21117
21118// Fields allows partial responses to be retrieved. See
21119// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21120// for more information.
21121func (c *OrganizationsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsListCall {
21122	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21123	return c
21124}
21125
21126// IfNoneMatch sets the optional parameter which makes the operation
21127// fail if the object's ETag matches the given value. This is useful for
21128// getting updates only after the object has changed since the last
21129// request. Use googleapi.IsNotModified to check whether the response
21130// error from Do is the result of In-None-Match.
21131func (c *OrganizationsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsListCall {
21132	c.ifNoneMatch_ = entityTag
21133	return c
21134}
21135
21136// Context sets the context to be used in this call's Do method. Any
21137// pending HTTP request will be aborted if the provided context is
21138// canceled.
21139func (c *OrganizationsLocationsBucketsViewsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsListCall {
21140	c.ctx_ = ctx
21141	return c
21142}
21143
21144// Header returns an http.Header that can be modified by the caller to
21145// add HTTP headers to the request.
21146func (c *OrganizationsLocationsBucketsViewsListCall) Header() http.Header {
21147	if c.header_ == nil {
21148		c.header_ = make(http.Header)
21149	}
21150	return c.header_
21151}
21152
21153func (c *OrganizationsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
21154	reqHeaders := make(http.Header)
21155	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
21156	for k, v := range c.header_ {
21157		reqHeaders[k] = v
21158	}
21159	reqHeaders.Set("User-Agent", c.s.userAgent())
21160	if c.ifNoneMatch_ != "" {
21161		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21162	}
21163	var body io.Reader = nil
21164	c.urlParams_.Set("alt", alt)
21165	c.urlParams_.Set("prettyPrint", "false")
21166	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
21167	urls += "?" + c.urlParams_.Encode()
21168	req, err := http.NewRequest("GET", urls, body)
21169	if err != nil {
21170		return nil, err
21171	}
21172	req.Header = reqHeaders
21173	googleapi.Expand(req.URL, map[string]string{
21174		"parent": c.parent,
21175	})
21176	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21177}
21178
21179// Do executes the "logging.organizations.locations.buckets.views.list" call.
21180// Exactly one of *ListViewsResponse or error will be non-nil. Any
21181// non-2xx status code is an error. Response headers are in either
21182// *ListViewsResponse.ServerResponse.Header or (if a response was
21183// returned at all) in error.(*googleapi.Error).Header. Use
21184// googleapi.IsNotModified to check whether the returned error was
21185// because http.StatusNotModified was returned.
21186func (c *OrganizationsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
21187	gensupport.SetOptions(c.urlParams_, opts...)
21188	res, err := c.doRequest("json")
21189	if res != nil && res.StatusCode == http.StatusNotModified {
21190		if res.Body != nil {
21191			res.Body.Close()
21192		}
21193		return nil, &googleapi.Error{
21194			Code:   res.StatusCode,
21195			Header: res.Header,
21196		}
21197	}
21198	if err != nil {
21199		return nil, err
21200	}
21201	defer googleapi.CloseBody(res)
21202	if err := googleapi.CheckResponse(res); err != nil {
21203		return nil, err
21204	}
21205	ret := &ListViewsResponse{
21206		ServerResponse: googleapi.ServerResponse{
21207			Header:         res.Header,
21208			HTTPStatusCode: res.StatusCode,
21209		},
21210	}
21211	target := &ret
21212	if err := gensupport.DecodeResponse(target, res); err != nil {
21213		return nil, err
21214	}
21215	return ret, nil
21216	// {
21217	//   "description": "Lists views on a log bucket.",
21218	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views",
21219	//   "httpMethod": "GET",
21220	//   "id": "logging.organizations.locations.buckets.views.list",
21221	//   "parameterOrder": [
21222	//     "parent"
21223	//   ],
21224	//   "parameters": {
21225	//     "pageSize": {
21226	//       "description": "Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
21227	//       "format": "int32",
21228	//       "location": "query",
21229	//       "type": "integer"
21230	//     },
21231	//     "pageToken": {
21232	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
21233	//       "location": "query",
21234	//       "type": "string"
21235	//     },
21236	//     "parent": {
21237	//       "description": "Required. The bucket whose views are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" ",
21238	//       "location": "path",
21239	//       "pattern": "^organizations/[^/]+/locations/[^/]+/buckets/[^/]+$",
21240	//       "required": true,
21241	//       "type": "string"
21242	//     }
21243	//   },
21244	//   "path": "v2/{+parent}/views",
21245	//   "response": {
21246	//     "$ref": "ListViewsResponse"
21247	//   },
21248	//   "scopes": [
21249	//     "https://www.googleapis.com/auth/cloud-platform",
21250	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
21251	//     "https://www.googleapis.com/auth/logging.admin",
21252	//     "https://www.googleapis.com/auth/logging.read"
21253	//   ]
21254	// }
21255
21256}
21257
21258// Pages invokes f for each page of results.
21259// A non-nil error returned from f will halt the iteration.
21260// The provided context supersedes any context provided to the Context method.
21261func (c *OrganizationsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
21262	c.ctx_ = ctx
21263	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21264	for {
21265		x, err := c.Do()
21266		if err != nil {
21267			return err
21268		}
21269		if err := f(x); err != nil {
21270			return err
21271		}
21272		if x.NextPageToken == "" {
21273			return nil
21274		}
21275		c.PageToken(x.NextPageToken)
21276	}
21277}
21278
21279// method id "logging.organizations.locations.buckets.views.patch":
21280
21281type OrganizationsLocationsBucketsViewsPatchCall struct {
21282	s          *Service
21283	name       string
21284	logview    *LogView
21285	urlParams_ gensupport.URLParams
21286	ctx_       context.Context
21287	header_    http.Header
21288}
21289
21290// Patch: Updates a view on a log bucket. This method replaces the
21291// following fields in the existing view with values from the new view:
21292// filter.
21293//
21294// - name: The full resource name of the view to update
21295//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
21296//   iews/[VIEW_ID]" For
21297//   example:"projects/my-project/locations/global/buckets/my-bucket/view
21298//   s/my-view".
21299func (r *OrganizationsLocationsBucketsViewsService) Patch(name string, logview *LogView) *OrganizationsLocationsBucketsViewsPatchCall {
21300	c := &OrganizationsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21301	c.name = name
21302	c.logview = logview
21303	return c
21304}
21305
21306// UpdateMask sets the optional parameter "updateMask": Field mask that
21307// specifies the fields in view that need an update. A field will be
21308// overwritten if, and only if, it is in the update mask. name and
21309// output only fields cannot be updated.For a detailed FieldMask
21310// definition, see
21311// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
21312// example: updateMask=filter
21313func (c *OrganizationsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsViewsPatchCall {
21314	c.urlParams_.Set("updateMask", updateMask)
21315	return c
21316}
21317
21318// Fields allows partial responses to be retrieved. See
21319// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21320// for more information.
21321func (c *OrganizationsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsPatchCall {
21322	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21323	return c
21324}
21325
21326// Context sets the context to be used in this call's Do method. Any
21327// pending HTTP request will be aborted if the provided context is
21328// canceled.
21329func (c *OrganizationsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsPatchCall {
21330	c.ctx_ = ctx
21331	return c
21332}
21333
21334// Header returns an http.Header that can be modified by the caller to
21335// add HTTP headers to the request.
21336func (c *OrganizationsLocationsBucketsViewsPatchCall) Header() http.Header {
21337	if c.header_ == nil {
21338		c.header_ = make(http.Header)
21339	}
21340	return c.header_
21341}
21342
21343func (c *OrganizationsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
21344	reqHeaders := make(http.Header)
21345	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
21346	for k, v := range c.header_ {
21347		reqHeaders[k] = v
21348	}
21349	reqHeaders.Set("User-Agent", c.s.userAgent())
21350	var body io.Reader = nil
21351	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
21352	if err != nil {
21353		return nil, err
21354	}
21355	reqHeaders.Set("Content-Type", "application/json")
21356	c.urlParams_.Set("alt", alt)
21357	c.urlParams_.Set("prettyPrint", "false")
21358	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
21359	urls += "?" + c.urlParams_.Encode()
21360	req, err := http.NewRequest("PATCH", urls, body)
21361	if err != nil {
21362		return nil, err
21363	}
21364	req.Header = reqHeaders
21365	googleapi.Expand(req.URL, map[string]string{
21366		"name": c.name,
21367	})
21368	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21369}
21370
21371// Do executes the "logging.organizations.locations.buckets.views.patch" call.
21372// Exactly one of *LogView or error will be non-nil. Any non-2xx status
21373// code is an error. Response headers are in either
21374// *LogView.ServerResponse.Header or (if a response was returned at all)
21375// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
21376// check whether the returned error was because http.StatusNotModified
21377// was returned.
21378func (c *OrganizationsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
21379	gensupport.SetOptions(c.urlParams_, opts...)
21380	res, err := c.doRequest("json")
21381	if res != nil && res.StatusCode == http.StatusNotModified {
21382		if res.Body != nil {
21383			res.Body.Close()
21384		}
21385		return nil, &googleapi.Error{
21386			Code:   res.StatusCode,
21387			Header: res.Header,
21388		}
21389	}
21390	if err != nil {
21391		return nil, err
21392	}
21393	defer googleapi.CloseBody(res)
21394	if err := googleapi.CheckResponse(res); err != nil {
21395		return nil, err
21396	}
21397	ret := &LogView{
21398		ServerResponse: googleapi.ServerResponse{
21399			Header:         res.Header,
21400			HTTPStatusCode: res.StatusCode,
21401		},
21402	}
21403	target := &ret
21404	if err := gensupport.DecodeResponse(target, res); err != nil {
21405		return nil, err
21406	}
21407	return ret, nil
21408	// {
21409	//   "description": "Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter.",
21410	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
21411	//   "httpMethod": "PATCH",
21412	//   "id": "logging.organizations.locations.buckets.views.patch",
21413	//   "parameterOrder": [
21414	//     "name"
21415	//   ],
21416	//   "parameters": {
21417	//     "name": {
21418	//       "description": "Required. The full resource name of the view to update \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
21419	//       "location": "path",
21420	//       "pattern": "^organizations/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
21421	//       "required": true,
21422	//       "type": "string"
21423	//     },
21424	//     "updateMask": {
21425	//       "description": "Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
21426	//       "format": "google-fieldmask",
21427	//       "location": "query",
21428	//       "type": "string"
21429	//     }
21430	//   },
21431	//   "path": "v2/{+name}",
21432	//   "request": {
21433	//     "$ref": "LogView"
21434	//   },
21435	//   "response": {
21436	//     "$ref": "LogView"
21437	//   },
21438	//   "scopes": [
21439	//     "https://www.googleapis.com/auth/cloud-platform",
21440	//     "https://www.googleapis.com/auth/logging.admin"
21441	//   ]
21442	// }
21443
21444}
21445
21446// method id "logging.organizations.locations.operations.cancel":
21447
21448type OrganizationsLocationsOperationsCancelCall struct {
21449	s                      *Service
21450	name                   string
21451	canceloperationrequest *CancelOperationRequest
21452	urlParams_             gensupport.URLParams
21453	ctx_                   context.Context
21454	header_                http.Header
21455}
21456
21457// Cancel: Starts asynchronous cancellation on a long-running operation.
21458// The server makes a best effort to cancel the operation, but success
21459// is not guaranteed. If the server doesn't support this method, it
21460// returns google.rpc.Code.UNIMPLEMENTED. Clients can use
21461// Operations.GetOperation or other methods to check whether the
21462// cancellation succeeded or whether the operation completed despite
21463// cancellation. On successful cancellation, the operation is not
21464// deleted; instead, it becomes an operation with an Operation.error
21465// value with a google.rpc.Status.code of 1, corresponding to
21466// Code.CANCELLED.
21467//
21468// - name: The name of the operation resource to be cancelled.
21469func (r *OrganizationsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OrganizationsLocationsOperationsCancelCall {
21470	c := &OrganizationsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21471	c.name = name
21472	c.canceloperationrequest = canceloperationrequest
21473	return c
21474}
21475
21476// Fields allows partial responses to be retrieved. See
21477// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21478// for more information.
21479func (c *OrganizationsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsCancelCall {
21480	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21481	return c
21482}
21483
21484// Context sets the context to be used in this call's Do method. Any
21485// pending HTTP request will be aborted if the provided context is
21486// canceled.
21487func (c *OrganizationsLocationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsLocationsOperationsCancelCall {
21488	c.ctx_ = ctx
21489	return c
21490}
21491
21492// Header returns an http.Header that can be modified by the caller to
21493// add HTTP headers to the request.
21494func (c *OrganizationsLocationsOperationsCancelCall) Header() http.Header {
21495	if c.header_ == nil {
21496		c.header_ = make(http.Header)
21497	}
21498	return c.header_
21499}
21500
21501func (c *OrganizationsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
21502	reqHeaders := make(http.Header)
21503	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
21504	for k, v := range c.header_ {
21505		reqHeaders[k] = v
21506	}
21507	reqHeaders.Set("User-Agent", c.s.userAgent())
21508	var body io.Reader = nil
21509	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
21510	if err != nil {
21511		return nil, err
21512	}
21513	reqHeaders.Set("Content-Type", "application/json")
21514	c.urlParams_.Set("alt", alt)
21515	c.urlParams_.Set("prettyPrint", "false")
21516	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
21517	urls += "?" + c.urlParams_.Encode()
21518	req, err := http.NewRequest("POST", urls, body)
21519	if err != nil {
21520		return nil, err
21521	}
21522	req.Header = reqHeaders
21523	googleapi.Expand(req.URL, map[string]string{
21524		"name": c.name,
21525	})
21526	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21527}
21528
21529// Do executes the "logging.organizations.locations.operations.cancel" call.
21530// Exactly one of *Empty or error will be non-nil. Any non-2xx status
21531// code is an error. Response headers are in either
21532// *Empty.ServerResponse.Header or (if a response was returned at all)
21533// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
21534// check whether the returned error was because http.StatusNotModified
21535// was returned.
21536func (c *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
21537	gensupport.SetOptions(c.urlParams_, opts...)
21538	res, err := c.doRequest("json")
21539	if res != nil && res.StatusCode == http.StatusNotModified {
21540		if res.Body != nil {
21541			res.Body.Close()
21542		}
21543		return nil, &googleapi.Error{
21544			Code:   res.StatusCode,
21545			Header: res.Header,
21546		}
21547	}
21548	if err != nil {
21549		return nil, err
21550	}
21551	defer googleapi.CloseBody(res)
21552	if err := googleapi.CheckResponse(res); err != nil {
21553		return nil, err
21554	}
21555	ret := &Empty{
21556		ServerResponse: googleapi.ServerResponse{
21557			Header:         res.Header,
21558			HTTPStatusCode: res.StatusCode,
21559		},
21560	}
21561	target := &ret
21562	if err := gensupport.DecodeResponse(target, res); err != nil {
21563		return nil, err
21564	}
21565	return ret, nil
21566	// {
21567	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.",
21568	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel",
21569	//   "httpMethod": "POST",
21570	//   "id": "logging.organizations.locations.operations.cancel",
21571	//   "parameterOrder": [
21572	//     "name"
21573	//   ],
21574	//   "parameters": {
21575	//     "name": {
21576	//       "description": "The name of the operation resource to be cancelled.",
21577	//       "location": "path",
21578	//       "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$",
21579	//       "required": true,
21580	//       "type": "string"
21581	//     }
21582	//   },
21583	//   "path": "v2/{+name}:cancel",
21584	//   "request": {
21585	//     "$ref": "CancelOperationRequest"
21586	//   },
21587	//   "response": {
21588	//     "$ref": "Empty"
21589	//   },
21590	//   "scopes": [
21591	//     "https://www.googleapis.com/auth/cloud-platform",
21592	//     "https://www.googleapis.com/auth/logging.admin"
21593	//   ]
21594	// }
21595
21596}
21597
21598// method id "logging.organizations.locations.operations.get":
21599
21600type OrganizationsLocationsOperationsGetCall struct {
21601	s            *Service
21602	name         string
21603	urlParams_   gensupport.URLParams
21604	ifNoneMatch_ string
21605	ctx_         context.Context
21606	header_      http.Header
21607}
21608
21609// Get: Gets the latest state of a long-running operation. Clients can
21610// use this method to poll the operation result at intervals as
21611// recommended by the API service.
21612//
21613// - name: The name of the operation resource.
21614func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall {
21615	c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21616	c.name = name
21617	return c
21618}
21619
21620// Fields allows partial responses to be retrieved. See
21621// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21622// for more information.
21623func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall {
21624	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21625	return c
21626}
21627
21628// IfNoneMatch sets the optional parameter which makes the operation
21629// fail if the object's ETag matches the given value. This is useful for
21630// getting updates only after the object has changed since the last
21631// request. Use googleapi.IsNotModified to check whether the response
21632// error from Do is the result of In-None-Match.
21633func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall {
21634	c.ifNoneMatch_ = entityTag
21635	return c
21636}
21637
21638// Context sets the context to be used in this call's Do method. Any
21639// pending HTTP request will be aborted if the provided context is
21640// canceled.
21641func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall {
21642	c.ctx_ = ctx
21643	return c
21644}
21645
21646// Header returns an http.Header that can be modified by the caller to
21647// add HTTP headers to the request.
21648func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header {
21649	if c.header_ == nil {
21650		c.header_ = make(http.Header)
21651	}
21652	return c.header_
21653}
21654
21655func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
21656	reqHeaders := make(http.Header)
21657	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
21658	for k, v := range c.header_ {
21659		reqHeaders[k] = v
21660	}
21661	reqHeaders.Set("User-Agent", c.s.userAgent())
21662	if c.ifNoneMatch_ != "" {
21663		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21664	}
21665	var body io.Reader = nil
21666	c.urlParams_.Set("alt", alt)
21667	c.urlParams_.Set("prettyPrint", "false")
21668	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
21669	urls += "?" + c.urlParams_.Encode()
21670	req, err := http.NewRequest("GET", urls, body)
21671	if err != nil {
21672		return nil, err
21673	}
21674	req.Header = reqHeaders
21675	googleapi.Expand(req.URL, map[string]string{
21676		"name": c.name,
21677	})
21678	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21679}
21680
21681// Do executes the "logging.organizations.locations.operations.get" call.
21682// Exactly one of *Operation or error will be non-nil. Any non-2xx
21683// status code is an error. Response headers are in either
21684// *Operation.ServerResponse.Header or (if a response was returned at
21685// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21686// to check whether the returned error was because
21687// http.StatusNotModified was returned.
21688func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21689	gensupport.SetOptions(c.urlParams_, opts...)
21690	res, err := c.doRequest("json")
21691	if res != nil && res.StatusCode == http.StatusNotModified {
21692		if res.Body != nil {
21693			res.Body.Close()
21694		}
21695		return nil, &googleapi.Error{
21696			Code:   res.StatusCode,
21697			Header: res.Header,
21698		}
21699	}
21700	if err != nil {
21701		return nil, err
21702	}
21703	defer googleapi.CloseBody(res)
21704	if err := googleapi.CheckResponse(res); err != nil {
21705		return nil, err
21706	}
21707	ret := &Operation{
21708		ServerResponse: googleapi.ServerResponse{
21709			Header:         res.Header,
21710			HTTPStatusCode: res.StatusCode,
21711		},
21712	}
21713	target := &ret
21714	if err := gensupport.DecodeResponse(target, res); err != nil {
21715		return nil, err
21716	}
21717	return ret, nil
21718	// {
21719	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
21720	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}",
21721	//   "httpMethod": "GET",
21722	//   "id": "logging.organizations.locations.operations.get",
21723	//   "parameterOrder": [
21724	//     "name"
21725	//   ],
21726	//   "parameters": {
21727	//     "name": {
21728	//       "description": "The name of the operation resource.",
21729	//       "location": "path",
21730	//       "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$",
21731	//       "required": true,
21732	//       "type": "string"
21733	//     }
21734	//   },
21735	//   "path": "v2/{+name}",
21736	//   "response": {
21737	//     "$ref": "Operation"
21738	//   },
21739	//   "scopes": [
21740	//     "https://www.googleapis.com/auth/cloud-platform",
21741	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
21742	//     "https://www.googleapis.com/auth/logging.admin",
21743	//     "https://www.googleapis.com/auth/logging.read"
21744	//   ]
21745	// }
21746
21747}
21748
21749// method id "logging.organizations.locations.operations.list":
21750
21751type OrganizationsLocationsOperationsListCall struct {
21752	s            *Service
21753	name         string
21754	urlParams_   gensupport.URLParams
21755	ifNoneMatch_ string
21756	ctx_         context.Context
21757	header_      http.Header
21758}
21759
21760// List: Lists operations that match the specified filter in the
21761// request. If the server doesn't support this method, it returns
21762// UNIMPLEMENTED.NOTE: the name binding allows API services to override
21763// the binding to use different resource name schemes, such as
21764// users/*/operations. To override the binding, API services can add a
21765// binding such as "/v1/{name=users/*}/operations" to their service
21766// configuration. For backwards compatibility, the default name includes
21767// the operations collection id, however overriding users must ensure
21768// the name binding is the parent resource, without the operations
21769// collection id.
21770//
21771// - name: The name of the operation's parent resource.
21772func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall {
21773	c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21774	c.name = name
21775	return c
21776}
21777
21778// Filter sets the optional parameter "filter": The standard list
21779// filter.
21780func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall {
21781	c.urlParams_.Set("filter", filter)
21782	return c
21783}
21784
21785// PageSize sets the optional parameter "pageSize": The standard list
21786// page size.
21787func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall {
21788	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
21789	return c
21790}
21791
21792// PageToken sets the optional parameter "pageToken": The standard list
21793// page token.
21794func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall {
21795	c.urlParams_.Set("pageToken", pageToken)
21796	return c
21797}
21798
21799// Fields allows partial responses to be retrieved. See
21800// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21801// for more information.
21802func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall {
21803	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21804	return c
21805}
21806
21807// IfNoneMatch sets the optional parameter which makes the operation
21808// fail if the object's ETag matches the given value. This is useful for
21809// getting updates only after the object has changed since the last
21810// request. Use googleapi.IsNotModified to check whether the response
21811// error from Do is the result of In-None-Match.
21812func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall {
21813	c.ifNoneMatch_ = entityTag
21814	return c
21815}
21816
21817// Context sets the context to be used in this call's Do method. Any
21818// pending HTTP request will be aborted if the provided context is
21819// canceled.
21820func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall {
21821	c.ctx_ = ctx
21822	return c
21823}
21824
21825// Header returns an http.Header that can be modified by the caller to
21826// add HTTP headers to the request.
21827func (c *OrganizationsLocationsOperationsListCall) Header() http.Header {
21828	if c.header_ == nil {
21829		c.header_ = make(http.Header)
21830	}
21831	return c.header_
21832}
21833
21834func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
21835	reqHeaders := make(http.Header)
21836	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
21837	for k, v := range c.header_ {
21838		reqHeaders[k] = v
21839	}
21840	reqHeaders.Set("User-Agent", c.s.userAgent())
21841	if c.ifNoneMatch_ != "" {
21842		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21843	}
21844	var body io.Reader = nil
21845	c.urlParams_.Set("alt", alt)
21846	c.urlParams_.Set("prettyPrint", "false")
21847	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
21848	urls += "?" + c.urlParams_.Encode()
21849	req, err := http.NewRequest("GET", urls, body)
21850	if err != nil {
21851		return nil, err
21852	}
21853	req.Header = reqHeaders
21854	googleapi.Expand(req.URL, map[string]string{
21855		"name": c.name,
21856	})
21857	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21858}
21859
21860// Do executes the "logging.organizations.locations.operations.list" call.
21861// Exactly one of *ListOperationsResponse or error will be non-nil. Any
21862// non-2xx status code is an error. Response headers are in either
21863// *ListOperationsResponse.ServerResponse.Header or (if a response was
21864// returned at all) in error.(*googleapi.Error).Header. Use
21865// googleapi.IsNotModified to check whether the returned error was
21866// because http.StatusNotModified was returned.
21867func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
21868	gensupport.SetOptions(c.urlParams_, opts...)
21869	res, err := c.doRequest("json")
21870	if res != nil && res.StatusCode == http.StatusNotModified {
21871		if res.Body != nil {
21872			res.Body.Close()
21873		}
21874		return nil, &googleapi.Error{
21875			Code:   res.StatusCode,
21876			Header: res.Header,
21877		}
21878	}
21879	if err != nil {
21880		return nil, err
21881	}
21882	defer googleapi.CloseBody(res)
21883	if err := googleapi.CheckResponse(res); err != nil {
21884		return nil, err
21885	}
21886	ret := &ListOperationsResponse{
21887		ServerResponse: googleapi.ServerResponse{
21888			Header:         res.Header,
21889			HTTPStatusCode: res.StatusCode,
21890		},
21891	}
21892	target := &ret
21893	if err := gensupport.DecodeResponse(target, res); err != nil {
21894		return nil, err
21895	}
21896	return ret, nil
21897	// {
21898	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
21899	//   "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/operations",
21900	//   "httpMethod": "GET",
21901	//   "id": "logging.organizations.locations.operations.list",
21902	//   "parameterOrder": [
21903	//     "name"
21904	//   ],
21905	//   "parameters": {
21906	//     "filter": {
21907	//       "description": "The standard list filter.",
21908	//       "location": "query",
21909	//       "type": "string"
21910	//     },
21911	//     "name": {
21912	//       "description": "The name of the operation's parent resource.",
21913	//       "location": "path",
21914	//       "pattern": "^organizations/[^/]+/locations/[^/]+$",
21915	//       "required": true,
21916	//       "type": "string"
21917	//     },
21918	//     "pageSize": {
21919	//       "description": "The standard list page size.",
21920	//       "format": "int32",
21921	//       "location": "query",
21922	//       "type": "integer"
21923	//     },
21924	//     "pageToken": {
21925	//       "description": "The standard list page token.",
21926	//       "location": "query",
21927	//       "type": "string"
21928	//     }
21929	//   },
21930	//   "path": "v2/{+name}/operations",
21931	//   "response": {
21932	//     "$ref": "ListOperationsResponse"
21933	//   },
21934	//   "scopes": [
21935	//     "https://www.googleapis.com/auth/cloud-platform",
21936	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
21937	//     "https://www.googleapis.com/auth/logging.admin",
21938	//     "https://www.googleapis.com/auth/logging.read"
21939	//   ]
21940	// }
21941
21942}
21943
21944// Pages invokes f for each page of results.
21945// A non-nil error returned from f will halt the iteration.
21946// The provided context supersedes any context provided to the Context method.
21947func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
21948	c.ctx_ = ctx
21949	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21950	for {
21951		x, err := c.Do()
21952		if err != nil {
21953			return err
21954		}
21955		if err := f(x); err != nil {
21956			return err
21957		}
21958		if x.NextPageToken == "" {
21959			return nil
21960		}
21961		c.PageToken(x.NextPageToken)
21962	}
21963}
21964
21965// method id "logging.organizations.logs.delete":
21966
21967type OrganizationsLogsDeleteCall struct {
21968	s          *Service
21969	logName    string
21970	urlParams_ gensupport.URLParams
21971	ctx_       context.Context
21972	header_    http.Header
21973}
21974
21975// Delete: Deletes all the log entries in a log for the _Default Log
21976// Bucket. The log reappears if it receives new entries. Log entries
21977// written shortly before the delete operation might not be deleted.
21978// Entries received after the delete operation with a timestamp before
21979// the operation will be deleted.
21980//
21981// - logName: The resource name of the log to delete:
21982//   projects/[PROJECT_ID]/logs/[LOG_ID]
21983//   organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
21984//   billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
21985//   folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
21986//   example, "projects/my-project-id/logs/syslog",
21987//   "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For
21988//   more information about log names, see LogEntry.
21989func (r *OrganizationsLogsService) Delete(logName string) *OrganizationsLogsDeleteCall {
21990	c := &OrganizationsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21991	c.logName = logName
21992	return c
21993}
21994
21995// Fields allows partial responses to be retrieved. See
21996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21997// for more information.
21998func (c *OrganizationsLogsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLogsDeleteCall {
21999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22000	return c
22001}
22002
22003// Context sets the context to be used in this call's Do method. Any
22004// pending HTTP request will be aborted if the provided context is
22005// canceled.
22006func (c *OrganizationsLogsDeleteCall) Context(ctx context.Context) *OrganizationsLogsDeleteCall {
22007	c.ctx_ = ctx
22008	return c
22009}
22010
22011// Header returns an http.Header that can be modified by the caller to
22012// add HTTP headers to the request.
22013func (c *OrganizationsLogsDeleteCall) Header() http.Header {
22014	if c.header_ == nil {
22015		c.header_ = make(http.Header)
22016	}
22017	return c.header_
22018}
22019
22020func (c *OrganizationsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
22021	reqHeaders := make(http.Header)
22022	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
22023	for k, v := range c.header_ {
22024		reqHeaders[k] = v
22025	}
22026	reqHeaders.Set("User-Agent", c.s.userAgent())
22027	var body io.Reader = nil
22028	c.urlParams_.Set("alt", alt)
22029	c.urlParams_.Set("prettyPrint", "false")
22030	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
22031	urls += "?" + c.urlParams_.Encode()
22032	req, err := http.NewRequest("DELETE", urls, body)
22033	if err != nil {
22034		return nil, err
22035	}
22036	req.Header = reqHeaders
22037	googleapi.Expand(req.URL, map[string]string{
22038		"logName": c.logName,
22039	})
22040	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22041}
22042
22043// Do executes the "logging.organizations.logs.delete" call.
22044// Exactly one of *Empty or error will be non-nil. Any non-2xx status
22045// code is an error. Response headers are in either
22046// *Empty.ServerResponse.Header or (if a response was returned at all)
22047// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
22048// check whether the returned error was because http.StatusNotModified
22049// was returned.
22050func (c *OrganizationsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
22051	gensupport.SetOptions(c.urlParams_, opts...)
22052	res, err := c.doRequest("json")
22053	if res != nil && res.StatusCode == http.StatusNotModified {
22054		if res.Body != nil {
22055			res.Body.Close()
22056		}
22057		return nil, &googleapi.Error{
22058			Code:   res.StatusCode,
22059			Header: res.Header,
22060		}
22061	}
22062	if err != nil {
22063		return nil, err
22064	}
22065	defer googleapi.CloseBody(res)
22066	if err := googleapi.CheckResponse(res); err != nil {
22067		return nil, err
22068	}
22069	ret := &Empty{
22070		ServerResponse: googleapi.ServerResponse{
22071			Header:         res.Header,
22072			HTTPStatusCode: res.StatusCode,
22073		},
22074	}
22075	target := &ret
22076	if err := gensupport.DecodeResponse(target, res); err != nil {
22077		return nil, err
22078	}
22079	return ret, nil
22080	// {
22081	//   "description": "Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.",
22082	//   "flatPath": "v2/organizations/{organizationsId}/logs/{logsId}",
22083	//   "httpMethod": "DELETE",
22084	//   "id": "logging.organizations.logs.delete",
22085	//   "parameterOrder": [
22086	//     "logName"
22087	//   ],
22088	//   "parameters": {
22089	//     "logName": {
22090	//       "description": "Required. The resource name of the log to delete: projects/[PROJECT_ID]/logs/[LOG_ID] organizations/[ORGANIZATION_ID]/logs/[LOG_ID] billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/123/logs/cloudaudit.googleapis.com%2Factivity\".For more information about log names, see LogEntry.",
22091	//       "location": "path",
22092	//       "pattern": "^organizations/[^/]+/logs/[^/]+$",
22093	//       "required": true,
22094	//       "type": "string"
22095	//     }
22096	//   },
22097	//   "path": "v2/{+logName}",
22098	//   "response": {
22099	//     "$ref": "Empty"
22100	//   },
22101	//   "scopes": [
22102	//     "https://www.googleapis.com/auth/cloud-platform",
22103	//     "https://www.googleapis.com/auth/logging.admin"
22104	//   ]
22105	// }
22106
22107}
22108
22109// method id "logging.organizations.logs.list":
22110
22111type OrganizationsLogsListCall struct {
22112	s            *Service
22113	parent       string
22114	urlParams_   gensupport.URLParams
22115	ifNoneMatch_ string
22116	ctx_         context.Context
22117	header_      http.Header
22118}
22119
22120// List: Lists the logs in projects, organizations, folders, or billing
22121// accounts. Only logs that have entries are listed.
22122//
22123// - parent: The resource name that owns the logs: projects/[PROJECT_ID]
22124//   organizations/[ORGANIZATION_ID]
22125//   billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID].
22126func (r *OrganizationsLogsService) List(parent string) *OrganizationsLogsListCall {
22127	c := &OrganizationsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22128	c.parent = parent
22129	return c
22130}
22131
22132// PageSize sets the optional parameter "pageSize": The maximum number
22133// of results to return from this request. Non-positive values are
22134// ignored. The presence of nextPageToken in the response indicates that
22135// more results might be available.
22136func (c *OrganizationsLogsListCall) PageSize(pageSize int64) *OrganizationsLogsListCall {
22137	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22138	return c
22139}
22140
22141// PageToken sets the optional parameter "pageToken": If present, then
22142// retrieve the next batch of results from the preceding call to this
22143// method. pageToken must be the value of nextPageToken from the
22144// previous response. The values of other method parameters should be
22145// identical to those in the previous call.
22146func (c *OrganizationsLogsListCall) PageToken(pageToken string) *OrganizationsLogsListCall {
22147	c.urlParams_.Set("pageToken", pageToken)
22148	return c
22149}
22150
22151// ResourceNames sets the optional parameter "resourceNames": The
22152// resource name that owns the logs:
22153// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/view
22154// s/[VIEW_ID]
22155// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKE
22156// T_ID]/views/[VIEW_ID]
22157// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[
22158// BUCKET_ID]/views/[VIEW_ID]
22159// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/
22160// [VIEW_ID]To support legacy queries, it could also be:
22161// projects/[PROJECT_ID] organizations/[ORGANIZATION_ID]
22162// billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]
22163func (c *OrganizationsLogsListCall) ResourceNames(resourceNames ...string) *OrganizationsLogsListCall {
22164	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
22165	return c
22166}
22167
22168// Fields allows partial responses to be retrieved. See
22169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22170// for more information.
22171func (c *OrganizationsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsLogsListCall {
22172	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22173	return c
22174}
22175
22176// IfNoneMatch sets the optional parameter which makes the operation
22177// fail if the object's ETag matches the given value. This is useful for
22178// getting updates only after the object has changed since the last
22179// request. Use googleapi.IsNotModified to check whether the response
22180// error from Do is the result of In-None-Match.
22181func (c *OrganizationsLogsListCall) IfNoneMatch(entityTag string) *OrganizationsLogsListCall {
22182	c.ifNoneMatch_ = entityTag
22183	return c
22184}
22185
22186// Context sets the context to be used in this call's Do method. Any
22187// pending HTTP request will be aborted if the provided context is
22188// canceled.
22189func (c *OrganizationsLogsListCall) Context(ctx context.Context) *OrganizationsLogsListCall {
22190	c.ctx_ = ctx
22191	return c
22192}
22193
22194// Header returns an http.Header that can be modified by the caller to
22195// add HTTP headers to the request.
22196func (c *OrganizationsLogsListCall) Header() http.Header {
22197	if c.header_ == nil {
22198		c.header_ = make(http.Header)
22199	}
22200	return c.header_
22201}
22202
22203func (c *OrganizationsLogsListCall) doRequest(alt string) (*http.Response, error) {
22204	reqHeaders := make(http.Header)
22205	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
22206	for k, v := range c.header_ {
22207		reqHeaders[k] = v
22208	}
22209	reqHeaders.Set("User-Agent", c.s.userAgent())
22210	if c.ifNoneMatch_ != "" {
22211		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22212	}
22213	var body io.Reader = nil
22214	c.urlParams_.Set("alt", alt)
22215	c.urlParams_.Set("prettyPrint", "false")
22216	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
22217	urls += "?" + c.urlParams_.Encode()
22218	req, err := http.NewRequest("GET", urls, body)
22219	if err != nil {
22220		return nil, err
22221	}
22222	req.Header = reqHeaders
22223	googleapi.Expand(req.URL, map[string]string{
22224		"parent": c.parent,
22225	})
22226	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22227}
22228
22229// Do executes the "logging.organizations.logs.list" call.
22230// Exactly one of *ListLogsResponse or error will be non-nil. Any
22231// non-2xx status code is an error. Response headers are in either
22232// *ListLogsResponse.ServerResponse.Header or (if a response was
22233// returned at all) in error.(*googleapi.Error).Header. Use
22234// googleapi.IsNotModified to check whether the returned error was
22235// because http.StatusNotModified was returned.
22236func (c *OrganizationsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
22237	gensupport.SetOptions(c.urlParams_, opts...)
22238	res, err := c.doRequest("json")
22239	if res != nil && res.StatusCode == http.StatusNotModified {
22240		if res.Body != nil {
22241			res.Body.Close()
22242		}
22243		return nil, &googleapi.Error{
22244			Code:   res.StatusCode,
22245			Header: res.Header,
22246		}
22247	}
22248	if err != nil {
22249		return nil, err
22250	}
22251	defer googleapi.CloseBody(res)
22252	if err := googleapi.CheckResponse(res); err != nil {
22253		return nil, err
22254	}
22255	ret := &ListLogsResponse{
22256		ServerResponse: googleapi.ServerResponse{
22257			Header:         res.Header,
22258			HTTPStatusCode: res.StatusCode,
22259		},
22260	}
22261	target := &ret
22262	if err := gensupport.DecodeResponse(target, res); err != nil {
22263		return nil, err
22264	}
22265	return ret, nil
22266	// {
22267	//   "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.",
22268	//   "flatPath": "v2/organizations/{organizationsId}/logs",
22269	//   "httpMethod": "GET",
22270	//   "id": "logging.organizations.logs.list",
22271	//   "parameterOrder": [
22272	//     "parent"
22273	//   ],
22274	//   "parameters": {
22275	//     "pageSize": {
22276	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
22277	//       "format": "int32",
22278	//       "location": "query",
22279	//       "type": "integer"
22280	//     },
22281	//     "pageToken": {
22282	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
22283	//       "location": "query",
22284	//       "type": "string"
22285	//     },
22286	//     "parent": {
22287	//       "description": "Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]",
22288	//       "location": "path",
22289	//       "pattern": "^organizations/[^/]+$",
22290	//       "required": true,
22291	//       "type": "string"
22292	//     },
22293	//     "resourceNames": {
22294	//       "description": "Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]",
22295	//       "location": "query",
22296	//       "repeated": true,
22297	//       "type": "string"
22298	//     }
22299	//   },
22300	//   "path": "v2/{+parent}/logs",
22301	//   "response": {
22302	//     "$ref": "ListLogsResponse"
22303	//   },
22304	//   "scopes": [
22305	//     "https://www.googleapis.com/auth/cloud-platform",
22306	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
22307	//     "https://www.googleapis.com/auth/logging.admin",
22308	//     "https://www.googleapis.com/auth/logging.read"
22309	//   ]
22310	// }
22311
22312}
22313
22314// Pages invokes f for each page of results.
22315// A non-nil error returned from f will halt the iteration.
22316// The provided context supersedes any context provided to the Context method.
22317func (c *OrganizationsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
22318	c.ctx_ = ctx
22319	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22320	for {
22321		x, err := c.Do()
22322		if err != nil {
22323			return err
22324		}
22325		if err := f(x); err != nil {
22326			return err
22327		}
22328		if x.NextPageToken == "" {
22329			return nil
22330		}
22331		c.PageToken(x.NextPageToken)
22332	}
22333}
22334
22335// method id "logging.organizations.sinks.create":
22336
22337type OrganizationsSinksCreateCall struct {
22338	s          *Service
22339	parent     string
22340	logsink    *LogSink
22341	urlParams_ gensupport.URLParams
22342	ctx_       context.Context
22343	header_    http.Header
22344}
22345
22346// Create: Creates a sink that exports specified log entries to a
22347// destination. The export of newly-ingested log entries begins
22348// immediately, unless the sink's writer_identity is not permitted to
22349// write to the destination. A sink can export log entries only from the
22350// resource owning the sink.
22351//
22352// - parent: The resource in which to create the sink:
22353//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
22354//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
22355//   examples:"projects/my-project" "organizations/123456789".
22356func (r *OrganizationsSinksService) Create(parent string, logsink *LogSink) *OrganizationsSinksCreateCall {
22357	c := &OrganizationsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22358	c.parent = parent
22359	c.logsink = logsink
22360	return c
22361}
22362
22363// UniqueWriterIdentity sets the optional parameter
22364// "uniqueWriterIdentity": Determines the kind of IAM identity returned
22365// as writer_identity in the new sink. If this value is omitted or set
22366// to false, and if the sink's parent is a project, then the value
22367// returned as writer_identity is the same group or service account used
22368// by Cloud Logging before the addition of writer identities to this
22369// API. The sink's destination must be in the same project as the sink
22370// itself.If this field is set to true, or if the sink is owned by a
22371// non-project resource such as an organization, then the value of
22372// writer_identity will be a unique service account used only for
22373// exports from the new sink. For more information, see writer_identity
22374// in LogSink.
22375func (c *OrganizationsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksCreateCall {
22376	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
22377	return c
22378}
22379
22380// Fields allows partial responses to be retrieved. See
22381// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22382// for more information.
22383func (c *OrganizationsSinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsSinksCreateCall {
22384	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22385	return c
22386}
22387
22388// Context sets the context to be used in this call's Do method. Any
22389// pending HTTP request will be aborted if the provided context is
22390// canceled.
22391func (c *OrganizationsSinksCreateCall) Context(ctx context.Context) *OrganizationsSinksCreateCall {
22392	c.ctx_ = ctx
22393	return c
22394}
22395
22396// Header returns an http.Header that can be modified by the caller to
22397// add HTTP headers to the request.
22398func (c *OrganizationsSinksCreateCall) Header() http.Header {
22399	if c.header_ == nil {
22400		c.header_ = make(http.Header)
22401	}
22402	return c.header_
22403}
22404
22405func (c *OrganizationsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
22406	reqHeaders := make(http.Header)
22407	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
22408	for k, v := range c.header_ {
22409		reqHeaders[k] = v
22410	}
22411	reqHeaders.Set("User-Agent", c.s.userAgent())
22412	var body io.Reader = nil
22413	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
22414	if err != nil {
22415		return nil, err
22416	}
22417	reqHeaders.Set("Content-Type", "application/json")
22418	c.urlParams_.Set("alt", alt)
22419	c.urlParams_.Set("prettyPrint", "false")
22420	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
22421	urls += "?" + c.urlParams_.Encode()
22422	req, err := http.NewRequest("POST", urls, body)
22423	if err != nil {
22424		return nil, err
22425	}
22426	req.Header = reqHeaders
22427	googleapi.Expand(req.URL, map[string]string{
22428		"parent": c.parent,
22429	})
22430	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22431}
22432
22433// Do executes the "logging.organizations.sinks.create" call.
22434// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
22435// code is an error. Response headers are in either
22436// *LogSink.ServerResponse.Header or (if a response was returned at all)
22437// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
22438// check whether the returned error was because http.StatusNotModified
22439// was returned.
22440func (c *OrganizationsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
22441	gensupport.SetOptions(c.urlParams_, opts...)
22442	res, err := c.doRequest("json")
22443	if res != nil && res.StatusCode == http.StatusNotModified {
22444		if res.Body != nil {
22445			res.Body.Close()
22446		}
22447		return nil, &googleapi.Error{
22448			Code:   res.StatusCode,
22449			Header: res.Header,
22450		}
22451	}
22452	if err != nil {
22453		return nil, err
22454	}
22455	defer googleapi.CloseBody(res)
22456	if err := googleapi.CheckResponse(res); err != nil {
22457		return nil, err
22458	}
22459	ret := &LogSink{
22460		ServerResponse: googleapi.ServerResponse{
22461			Header:         res.Header,
22462			HTTPStatusCode: res.StatusCode,
22463		},
22464	}
22465	target := &ret
22466	if err := gensupport.DecodeResponse(target, res); err != nil {
22467		return nil, err
22468	}
22469	return ret, nil
22470	// {
22471	//   "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.",
22472	//   "flatPath": "v2/organizations/{organizationsId}/sinks",
22473	//   "httpMethod": "POST",
22474	//   "id": "logging.organizations.sinks.create",
22475	//   "parameterOrder": [
22476	//     "parent"
22477	//   ],
22478	//   "parameters": {
22479	//     "parent": {
22480	//       "description": "Required. The resource in which to create the sink: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" For examples:\"projects/my-project\" \"organizations/123456789\"",
22481	//       "location": "path",
22482	//       "pattern": "^organizations/[^/]+$",
22483	//       "required": true,
22484	//       "type": "string"
22485	//     },
22486	//     "uniqueWriterIdentity": {
22487	//       "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.",
22488	//       "location": "query",
22489	//       "type": "boolean"
22490	//     }
22491	//   },
22492	//   "path": "v2/{+parent}/sinks",
22493	//   "request": {
22494	//     "$ref": "LogSink"
22495	//   },
22496	//   "response": {
22497	//     "$ref": "LogSink"
22498	//   },
22499	//   "scopes": [
22500	//     "https://www.googleapis.com/auth/cloud-platform",
22501	//     "https://www.googleapis.com/auth/logging.admin"
22502	//   ]
22503	// }
22504
22505}
22506
22507// method id "logging.organizations.sinks.delete":
22508
22509type OrganizationsSinksDeleteCall struct {
22510	s          *Service
22511	sinkNameid string
22512	urlParams_ gensupport.URLParams
22513	ctx_       context.Context
22514	header_    http.Header
22515}
22516
22517// Delete: Deletes a sink. If the sink has a unique writer_identity,
22518// then that service account is also deleted.
22519//
22520// - sinkName: The full resource name of the sink to delete, including
22521//   the parent resource and the sink identifier:
22522//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
22523//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
22524//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
22525//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
22526//   example:"projects/my-project/sinks/my-sink".
22527func (r *OrganizationsSinksService) Delete(sinkNameid string) *OrganizationsSinksDeleteCall {
22528	c := &OrganizationsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22529	c.sinkNameid = sinkNameid
22530	return c
22531}
22532
22533// Fields allows partial responses to be retrieved. See
22534// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22535// for more information.
22536func (c *OrganizationsSinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsSinksDeleteCall {
22537	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22538	return c
22539}
22540
22541// Context sets the context to be used in this call's Do method. Any
22542// pending HTTP request will be aborted if the provided context is
22543// canceled.
22544func (c *OrganizationsSinksDeleteCall) Context(ctx context.Context) *OrganizationsSinksDeleteCall {
22545	c.ctx_ = ctx
22546	return c
22547}
22548
22549// Header returns an http.Header that can be modified by the caller to
22550// add HTTP headers to the request.
22551func (c *OrganizationsSinksDeleteCall) Header() http.Header {
22552	if c.header_ == nil {
22553		c.header_ = make(http.Header)
22554	}
22555	return c.header_
22556}
22557
22558func (c *OrganizationsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
22559	reqHeaders := make(http.Header)
22560	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
22561	for k, v := range c.header_ {
22562		reqHeaders[k] = v
22563	}
22564	reqHeaders.Set("User-Agent", c.s.userAgent())
22565	var body io.Reader = nil
22566	c.urlParams_.Set("alt", alt)
22567	c.urlParams_.Set("prettyPrint", "false")
22568	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
22569	urls += "?" + c.urlParams_.Encode()
22570	req, err := http.NewRequest("DELETE", urls, body)
22571	if err != nil {
22572		return nil, err
22573	}
22574	req.Header = reqHeaders
22575	googleapi.Expand(req.URL, map[string]string{
22576		"sinkName": c.sinkNameid,
22577	})
22578	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22579}
22580
22581// Do executes the "logging.organizations.sinks.delete" call.
22582// Exactly one of *Empty or error will be non-nil. Any non-2xx status
22583// code is an error. Response headers are in either
22584// *Empty.ServerResponse.Header or (if a response was returned at all)
22585// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
22586// check whether the returned error was because http.StatusNotModified
22587// was returned.
22588func (c *OrganizationsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
22589	gensupport.SetOptions(c.urlParams_, opts...)
22590	res, err := c.doRequest("json")
22591	if res != nil && res.StatusCode == http.StatusNotModified {
22592		if res.Body != nil {
22593			res.Body.Close()
22594		}
22595		return nil, &googleapi.Error{
22596			Code:   res.StatusCode,
22597			Header: res.Header,
22598		}
22599	}
22600	if err != nil {
22601		return nil, err
22602	}
22603	defer googleapi.CloseBody(res)
22604	if err := googleapi.CheckResponse(res); err != nil {
22605		return nil, err
22606	}
22607	ret := &Empty{
22608		ServerResponse: googleapi.ServerResponse{
22609			Header:         res.Header,
22610			HTTPStatusCode: res.StatusCode,
22611		},
22612	}
22613	target := &ret
22614	if err := gensupport.DecodeResponse(target, res); err != nil {
22615		return nil, err
22616	}
22617	return ret, nil
22618	// {
22619	//   "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.",
22620	//   "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}",
22621	//   "httpMethod": "DELETE",
22622	//   "id": "logging.organizations.sinks.delete",
22623	//   "parameterOrder": [
22624	//     "sinkName"
22625	//   ],
22626	//   "parameters": {
22627	//     "sinkName": {
22628	//       "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
22629	//       "location": "path",
22630	//       "pattern": "^organizations/[^/]+/sinks/[^/]+$",
22631	//       "required": true,
22632	//       "type": "string"
22633	//     }
22634	//   },
22635	//   "path": "v2/{+sinkName}",
22636	//   "response": {
22637	//     "$ref": "Empty"
22638	//   },
22639	//   "scopes": [
22640	//     "https://www.googleapis.com/auth/cloud-platform",
22641	//     "https://www.googleapis.com/auth/logging.admin"
22642	//   ]
22643	// }
22644
22645}
22646
22647// method id "logging.organizations.sinks.get":
22648
22649type OrganizationsSinksGetCall struct {
22650	s            *Service
22651	sinkName     string
22652	urlParams_   gensupport.URLParams
22653	ifNoneMatch_ string
22654	ctx_         context.Context
22655	header_      http.Header
22656}
22657
22658// Get: Gets a sink.
22659//
22660// - sinkName: The resource name of the sink:
22661//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
22662//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
22663//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
22664//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
22665//   example:"projects/my-project/sinks/my-sink".
22666func (r *OrganizationsSinksService) Get(sinkName string) *OrganizationsSinksGetCall {
22667	c := &OrganizationsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22668	c.sinkName = sinkName
22669	return c
22670}
22671
22672// Fields allows partial responses to be retrieved. See
22673// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22674// for more information.
22675func (c *OrganizationsSinksGetCall) Fields(s ...googleapi.Field) *OrganizationsSinksGetCall {
22676	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22677	return c
22678}
22679
22680// IfNoneMatch sets the optional parameter which makes the operation
22681// fail if the object's ETag matches the given value. This is useful for
22682// getting updates only after the object has changed since the last
22683// request. Use googleapi.IsNotModified to check whether the response
22684// error from Do is the result of In-None-Match.
22685func (c *OrganizationsSinksGetCall) IfNoneMatch(entityTag string) *OrganizationsSinksGetCall {
22686	c.ifNoneMatch_ = entityTag
22687	return c
22688}
22689
22690// Context sets the context to be used in this call's Do method. Any
22691// pending HTTP request will be aborted if the provided context is
22692// canceled.
22693func (c *OrganizationsSinksGetCall) Context(ctx context.Context) *OrganizationsSinksGetCall {
22694	c.ctx_ = ctx
22695	return c
22696}
22697
22698// Header returns an http.Header that can be modified by the caller to
22699// add HTTP headers to the request.
22700func (c *OrganizationsSinksGetCall) Header() http.Header {
22701	if c.header_ == nil {
22702		c.header_ = make(http.Header)
22703	}
22704	return c.header_
22705}
22706
22707func (c *OrganizationsSinksGetCall) doRequest(alt string) (*http.Response, error) {
22708	reqHeaders := make(http.Header)
22709	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
22710	for k, v := range c.header_ {
22711		reqHeaders[k] = v
22712	}
22713	reqHeaders.Set("User-Agent", c.s.userAgent())
22714	if c.ifNoneMatch_ != "" {
22715		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22716	}
22717	var body io.Reader = nil
22718	c.urlParams_.Set("alt", alt)
22719	c.urlParams_.Set("prettyPrint", "false")
22720	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
22721	urls += "?" + c.urlParams_.Encode()
22722	req, err := http.NewRequest("GET", urls, body)
22723	if err != nil {
22724		return nil, err
22725	}
22726	req.Header = reqHeaders
22727	googleapi.Expand(req.URL, map[string]string{
22728		"sinkName": c.sinkName,
22729	})
22730	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22731}
22732
22733// Do executes the "logging.organizations.sinks.get" call.
22734// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
22735// code is an error. Response headers are in either
22736// *LogSink.ServerResponse.Header or (if a response was returned at all)
22737// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
22738// check whether the returned error was because http.StatusNotModified
22739// was returned.
22740func (c *OrganizationsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
22741	gensupport.SetOptions(c.urlParams_, opts...)
22742	res, err := c.doRequest("json")
22743	if res != nil && res.StatusCode == http.StatusNotModified {
22744		if res.Body != nil {
22745			res.Body.Close()
22746		}
22747		return nil, &googleapi.Error{
22748			Code:   res.StatusCode,
22749			Header: res.Header,
22750		}
22751	}
22752	if err != nil {
22753		return nil, err
22754	}
22755	defer googleapi.CloseBody(res)
22756	if err := googleapi.CheckResponse(res); err != nil {
22757		return nil, err
22758	}
22759	ret := &LogSink{
22760		ServerResponse: googleapi.ServerResponse{
22761			Header:         res.Header,
22762			HTTPStatusCode: res.StatusCode,
22763		},
22764	}
22765	target := &ret
22766	if err := gensupport.DecodeResponse(target, res); err != nil {
22767		return nil, err
22768	}
22769	return ret, nil
22770	// {
22771	//   "description": "Gets a sink.",
22772	//   "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}",
22773	//   "httpMethod": "GET",
22774	//   "id": "logging.organizations.sinks.get",
22775	//   "parameterOrder": [
22776	//     "sinkName"
22777	//   ],
22778	//   "parameters": {
22779	//     "sinkName": {
22780	//       "description": "Required. The resource name of the sink: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
22781	//       "location": "path",
22782	//       "pattern": "^organizations/[^/]+/sinks/[^/]+$",
22783	//       "required": true,
22784	//       "type": "string"
22785	//     }
22786	//   },
22787	//   "path": "v2/{+sinkName}",
22788	//   "response": {
22789	//     "$ref": "LogSink"
22790	//   },
22791	//   "scopes": [
22792	//     "https://www.googleapis.com/auth/cloud-platform",
22793	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
22794	//     "https://www.googleapis.com/auth/logging.admin",
22795	//     "https://www.googleapis.com/auth/logging.read"
22796	//   ]
22797	// }
22798
22799}
22800
22801// method id "logging.organizations.sinks.list":
22802
22803type OrganizationsSinksListCall struct {
22804	s            *Service
22805	parent       string
22806	urlParams_   gensupport.URLParams
22807	ifNoneMatch_ string
22808	ctx_         context.Context
22809	header_      http.Header
22810}
22811
22812// List: Lists sinks.
22813//
22814// - parent: The parent resource whose sinks are to be listed:
22815//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
22816//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
22817func (r *OrganizationsSinksService) List(parent string) *OrganizationsSinksListCall {
22818	c := &OrganizationsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22819	c.parent = parent
22820	return c
22821}
22822
22823// PageSize sets the optional parameter "pageSize": The maximum number
22824// of results to return from this request. Non-positive values are
22825// ignored. The presence of nextPageToken in the response indicates that
22826// more results might be available.
22827func (c *OrganizationsSinksListCall) PageSize(pageSize int64) *OrganizationsSinksListCall {
22828	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22829	return c
22830}
22831
22832// PageToken sets the optional parameter "pageToken": If present, then
22833// retrieve the next batch of results from the preceding call to this
22834// method. pageToken must be the value of nextPageToken from the
22835// previous response. The values of other method parameters should be
22836// identical to those in the previous call.
22837func (c *OrganizationsSinksListCall) PageToken(pageToken string) *OrganizationsSinksListCall {
22838	c.urlParams_.Set("pageToken", pageToken)
22839	return c
22840}
22841
22842// Fields allows partial responses to be retrieved. See
22843// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22844// for more information.
22845func (c *OrganizationsSinksListCall) Fields(s ...googleapi.Field) *OrganizationsSinksListCall {
22846	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22847	return c
22848}
22849
22850// IfNoneMatch sets the optional parameter which makes the operation
22851// fail if the object's ETag matches the given value. This is useful for
22852// getting updates only after the object has changed since the last
22853// request. Use googleapi.IsNotModified to check whether the response
22854// error from Do is the result of In-None-Match.
22855func (c *OrganizationsSinksListCall) IfNoneMatch(entityTag string) *OrganizationsSinksListCall {
22856	c.ifNoneMatch_ = entityTag
22857	return c
22858}
22859
22860// Context sets the context to be used in this call's Do method. Any
22861// pending HTTP request will be aborted if the provided context is
22862// canceled.
22863func (c *OrganizationsSinksListCall) Context(ctx context.Context) *OrganizationsSinksListCall {
22864	c.ctx_ = ctx
22865	return c
22866}
22867
22868// Header returns an http.Header that can be modified by the caller to
22869// add HTTP headers to the request.
22870func (c *OrganizationsSinksListCall) Header() http.Header {
22871	if c.header_ == nil {
22872		c.header_ = make(http.Header)
22873	}
22874	return c.header_
22875}
22876
22877func (c *OrganizationsSinksListCall) doRequest(alt string) (*http.Response, error) {
22878	reqHeaders := make(http.Header)
22879	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
22880	for k, v := range c.header_ {
22881		reqHeaders[k] = v
22882	}
22883	reqHeaders.Set("User-Agent", c.s.userAgent())
22884	if c.ifNoneMatch_ != "" {
22885		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22886	}
22887	var body io.Reader = nil
22888	c.urlParams_.Set("alt", alt)
22889	c.urlParams_.Set("prettyPrint", "false")
22890	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
22891	urls += "?" + c.urlParams_.Encode()
22892	req, err := http.NewRequest("GET", urls, body)
22893	if err != nil {
22894		return nil, err
22895	}
22896	req.Header = reqHeaders
22897	googleapi.Expand(req.URL, map[string]string{
22898		"parent": c.parent,
22899	})
22900	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22901}
22902
22903// Do executes the "logging.organizations.sinks.list" call.
22904// Exactly one of *ListSinksResponse or error will be non-nil. Any
22905// non-2xx status code is an error. Response headers are in either
22906// *ListSinksResponse.ServerResponse.Header or (if a response was
22907// returned at all) in error.(*googleapi.Error).Header. Use
22908// googleapi.IsNotModified to check whether the returned error was
22909// because http.StatusNotModified was returned.
22910func (c *OrganizationsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
22911	gensupport.SetOptions(c.urlParams_, opts...)
22912	res, err := c.doRequest("json")
22913	if res != nil && res.StatusCode == http.StatusNotModified {
22914		if res.Body != nil {
22915			res.Body.Close()
22916		}
22917		return nil, &googleapi.Error{
22918			Code:   res.StatusCode,
22919			Header: res.Header,
22920		}
22921	}
22922	if err != nil {
22923		return nil, err
22924	}
22925	defer googleapi.CloseBody(res)
22926	if err := googleapi.CheckResponse(res); err != nil {
22927		return nil, err
22928	}
22929	ret := &ListSinksResponse{
22930		ServerResponse: googleapi.ServerResponse{
22931			Header:         res.Header,
22932			HTTPStatusCode: res.StatusCode,
22933		},
22934	}
22935	target := &ret
22936	if err := gensupport.DecodeResponse(target, res); err != nil {
22937		return nil, err
22938	}
22939	return ret, nil
22940	// {
22941	//   "description": "Lists sinks.",
22942	//   "flatPath": "v2/organizations/{organizationsId}/sinks",
22943	//   "httpMethod": "GET",
22944	//   "id": "logging.organizations.sinks.list",
22945	//   "parameterOrder": [
22946	//     "parent"
22947	//   ],
22948	//   "parameters": {
22949	//     "pageSize": {
22950	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
22951	//       "format": "int32",
22952	//       "location": "query",
22953	//       "type": "integer"
22954	//     },
22955	//     "pageToken": {
22956	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
22957	//       "location": "query",
22958	//       "type": "string"
22959	//     },
22960	//     "parent": {
22961	//       "description": "Required. The parent resource whose sinks are to be listed: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" ",
22962	//       "location": "path",
22963	//       "pattern": "^organizations/[^/]+$",
22964	//       "required": true,
22965	//       "type": "string"
22966	//     }
22967	//   },
22968	//   "path": "v2/{+parent}/sinks",
22969	//   "response": {
22970	//     "$ref": "ListSinksResponse"
22971	//   },
22972	//   "scopes": [
22973	//     "https://www.googleapis.com/auth/cloud-platform",
22974	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
22975	//     "https://www.googleapis.com/auth/logging.admin",
22976	//     "https://www.googleapis.com/auth/logging.read"
22977	//   ]
22978	// }
22979
22980}
22981
22982// Pages invokes f for each page of results.
22983// A non-nil error returned from f will halt the iteration.
22984// The provided context supersedes any context provided to the Context method.
22985func (c *OrganizationsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
22986	c.ctx_ = ctx
22987	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22988	for {
22989		x, err := c.Do()
22990		if err != nil {
22991			return err
22992		}
22993		if err := f(x); err != nil {
22994			return err
22995		}
22996		if x.NextPageToken == "" {
22997			return nil
22998		}
22999		c.PageToken(x.NextPageToken)
23000	}
23001}
23002
23003// method id "logging.organizations.sinks.patch":
23004
23005type OrganizationsSinksPatchCall struct {
23006	s          *Service
23007	sinkNameid string
23008	logsink    *LogSink
23009	urlParams_ gensupport.URLParams
23010	ctx_       context.Context
23011	header_    http.Header
23012}
23013
23014// Patch: Updates a sink. This method replaces the following fields in
23015// the existing sink with values from the new sink: destination, and
23016// filter.The updated sink might also have a new writer_identity; see
23017// the unique_writer_identity field.
23018//
23019// - sinkName: The full resource name of the sink to update, including
23020//   the parent resource and the sink identifier:
23021//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
23022//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
23023//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
23024//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
23025//   example:"projects/my-project/sinks/my-sink".
23026func (r *OrganizationsSinksService) Patch(sinkNameid string, logsink *LogSink) *OrganizationsSinksPatchCall {
23027	c := &OrganizationsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23028	c.sinkNameid = sinkNameid
23029	c.logsink = logsink
23030	return c
23031}
23032
23033// UniqueWriterIdentity sets the optional parameter
23034// "uniqueWriterIdentity": See sinks.create for a description of this
23035// field. When updating a sink, the effect of this field on the value of
23036// writer_identity in the updated sink depends on both the old and new
23037// values of this field: If the old and new values of this field are
23038// both false or both true, then there is no change to the sink's
23039// writer_identity. If the old value is false and the new value is true,
23040// then writer_identity is changed to a unique service account. It is an
23041// error if the old value is true and the new value is set to false or
23042// defaulted to false.
23043func (c *OrganizationsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksPatchCall {
23044	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
23045	return c
23046}
23047
23048// UpdateMask sets the optional parameter "updateMask": Field mask that
23049// specifies the fields in sink that need an update. A sink field will
23050// be overwritten if, and only if, it is in the update mask. name and
23051// output only fields cannot be updated.An empty updateMask is
23052// temporarily treated as using the following mask for backwards
23053// compatibility purposes:destination,filter,includeChildrenAt some
23054// point in the future, behavior will be removed and specifying an empty
23055// updateMask will be an error.For a detailed FieldMask definition, see
23056// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
23057// example: updateMask=filter
23058func (c *OrganizationsSinksPatchCall) UpdateMask(updateMask string) *OrganizationsSinksPatchCall {
23059	c.urlParams_.Set("updateMask", updateMask)
23060	return c
23061}
23062
23063// Fields allows partial responses to be retrieved. See
23064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23065// for more information.
23066func (c *OrganizationsSinksPatchCall) Fields(s ...googleapi.Field) *OrganizationsSinksPatchCall {
23067	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23068	return c
23069}
23070
23071// Context sets the context to be used in this call's Do method. Any
23072// pending HTTP request will be aborted if the provided context is
23073// canceled.
23074func (c *OrganizationsSinksPatchCall) Context(ctx context.Context) *OrganizationsSinksPatchCall {
23075	c.ctx_ = ctx
23076	return c
23077}
23078
23079// Header returns an http.Header that can be modified by the caller to
23080// add HTTP headers to the request.
23081func (c *OrganizationsSinksPatchCall) Header() http.Header {
23082	if c.header_ == nil {
23083		c.header_ = make(http.Header)
23084	}
23085	return c.header_
23086}
23087
23088func (c *OrganizationsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
23089	reqHeaders := make(http.Header)
23090	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
23091	for k, v := range c.header_ {
23092		reqHeaders[k] = v
23093	}
23094	reqHeaders.Set("User-Agent", c.s.userAgent())
23095	var body io.Reader = nil
23096	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
23097	if err != nil {
23098		return nil, err
23099	}
23100	reqHeaders.Set("Content-Type", "application/json")
23101	c.urlParams_.Set("alt", alt)
23102	c.urlParams_.Set("prettyPrint", "false")
23103	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
23104	urls += "?" + c.urlParams_.Encode()
23105	req, err := http.NewRequest("PATCH", urls, body)
23106	if err != nil {
23107		return nil, err
23108	}
23109	req.Header = reqHeaders
23110	googleapi.Expand(req.URL, map[string]string{
23111		"sinkName": c.sinkNameid,
23112	})
23113	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23114}
23115
23116// Do executes the "logging.organizations.sinks.patch" call.
23117// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
23118// code is an error. Response headers are in either
23119// *LogSink.ServerResponse.Header or (if a response was returned at all)
23120// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
23121// check whether the returned error was because http.StatusNotModified
23122// was returned.
23123func (c *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
23124	gensupport.SetOptions(c.urlParams_, opts...)
23125	res, err := c.doRequest("json")
23126	if res != nil && res.StatusCode == http.StatusNotModified {
23127		if res.Body != nil {
23128			res.Body.Close()
23129		}
23130		return nil, &googleapi.Error{
23131			Code:   res.StatusCode,
23132			Header: res.Header,
23133		}
23134	}
23135	if err != nil {
23136		return nil, err
23137	}
23138	defer googleapi.CloseBody(res)
23139	if err := googleapi.CheckResponse(res); err != nil {
23140		return nil, err
23141	}
23142	ret := &LogSink{
23143		ServerResponse: googleapi.ServerResponse{
23144			Header:         res.Header,
23145			HTTPStatusCode: res.StatusCode,
23146		},
23147	}
23148	target := &ret
23149	if err := gensupport.DecodeResponse(target, res); err != nil {
23150		return nil, err
23151	}
23152	return ret, nil
23153	// {
23154	//   "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
23155	//   "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}",
23156	//   "httpMethod": "PATCH",
23157	//   "id": "logging.organizations.sinks.patch",
23158	//   "parameterOrder": [
23159	//     "sinkName"
23160	//   ],
23161	//   "parameters": {
23162	//     "sinkName": {
23163	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
23164	//       "location": "path",
23165	//       "pattern": "^organizations/[^/]+/sinks/[^/]+$",
23166	//       "required": true,
23167	//       "type": "string"
23168	//     },
23169	//     "uniqueWriterIdentity": {
23170	//       "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false.",
23171	//       "location": "query",
23172	//       "type": "boolean"
23173	//     },
23174	//     "updateMask": {
23175	//       "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
23176	//       "format": "google-fieldmask",
23177	//       "location": "query",
23178	//       "type": "string"
23179	//     }
23180	//   },
23181	//   "path": "v2/{+sinkName}",
23182	//   "request": {
23183	//     "$ref": "LogSink"
23184	//   },
23185	//   "response": {
23186	//     "$ref": "LogSink"
23187	//   },
23188	//   "scopes": [
23189	//     "https://www.googleapis.com/auth/cloud-platform",
23190	//     "https://www.googleapis.com/auth/logging.admin"
23191	//   ]
23192	// }
23193
23194}
23195
23196// method id "logging.organizations.sinks.update":
23197
23198type OrganizationsSinksUpdateCall struct {
23199	s          *Service
23200	sinkNameid string
23201	logsink    *LogSink
23202	urlParams_ gensupport.URLParams
23203	ctx_       context.Context
23204	header_    http.Header
23205}
23206
23207// Update: Updates a sink. This method replaces the following fields in
23208// the existing sink with values from the new sink: destination, and
23209// filter.The updated sink might also have a new writer_identity; see
23210// the unique_writer_identity field.
23211//
23212// - sinkName: The full resource name of the sink to update, including
23213//   the parent resource and the sink identifier:
23214//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
23215//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
23216//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
23217//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
23218//   example:"projects/my-project/sinks/my-sink".
23219func (r *OrganizationsSinksService) Update(sinkNameid string, logsink *LogSink) *OrganizationsSinksUpdateCall {
23220	c := &OrganizationsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23221	c.sinkNameid = sinkNameid
23222	c.logsink = logsink
23223	return c
23224}
23225
23226// UniqueWriterIdentity sets the optional parameter
23227// "uniqueWriterIdentity": See sinks.create for a description of this
23228// field. When updating a sink, the effect of this field on the value of
23229// writer_identity in the updated sink depends on both the old and new
23230// values of this field: If the old and new values of this field are
23231// both false or both true, then there is no change to the sink's
23232// writer_identity. If the old value is false and the new value is true,
23233// then writer_identity is changed to a unique service account. It is an
23234// error if the old value is true and the new value is set to false or
23235// defaulted to false.
23236func (c *OrganizationsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksUpdateCall {
23237	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
23238	return c
23239}
23240
23241// UpdateMask sets the optional parameter "updateMask": Field mask that
23242// specifies the fields in sink that need an update. A sink field will
23243// be overwritten if, and only if, it is in the update mask. name and
23244// output only fields cannot be updated.An empty updateMask is
23245// temporarily treated as using the following mask for backwards
23246// compatibility purposes:destination,filter,includeChildrenAt some
23247// point in the future, behavior will be removed and specifying an empty
23248// updateMask will be an error.For a detailed FieldMask definition, see
23249// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
23250// example: updateMask=filter
23251func (c *OrganizationsSinksUpdateCall) UpdateMask(updateMask string) *OrganizationsSinksUpdateCall {
23252	c.urlParams_.Set("updateMask", updateMask)
23253	return c
23254}
23255
23256// Fields allows partial responses to be retrieved. See
23257// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23258// for more information.
23259func (c *OrganizationsSinksUpdateCall) Fields(s ...googleapi.Field) *OrganizationsSinksUpdateCall {
23260	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23261	return c
23262}
23263
23264// Context sets the context to be used in this call's Do method. Any
23265// pending HTTP request will be aborted if the provided context is
23266// canceled.
23267func (c *OrganizationsSinksUpdateCall) Context(ctx context.Context) *OrganizationsSinksUpdateCall {
23268	c.ctx_ = ctx
23269	return c
23270}
23271
23272// Header returns an http.Header that can be modified by the caller to
23273// add HTTP headers to the request.
23274func (c *OrganizationsSinksUpdateCall) Header() http.Header {
23275	if c.header_ == nil {
23276		c.header_ = make(http.Header)
23277	}
23278	return c.header_
23279}
23280
23281func (c *OrganizationsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
23282	reqHeaders := make(http.Header)
23283	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
23284	for k, v := range c.header_ {
23285		reqHeaders[k] = v
23286	}
23287	reqHeaders.Set("User-Agent", c.s.userAgent())
23288	var body io.Reader = nil
23289	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
23290	if err != nil {
23291		return nil, err
23292	}
23293	reqHeaders.Set("Content-Type", "application/json")
23294	c.urlParams_.Set("alt", alt)
23295	c.urlParams_.Set("prettyPrint", "false")
23296	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
23297	urls += "?" + c.urlParams_.Encode()
23298	req, err := http.NewRequest("PUT", urls, body)
23299	if err != nil {
23300		return nil, err
23301	}
23302	req.Header = reqHeaders
23303	googleapi.Expand(req.URL, map[string]string{
23304		"sinkName": c.sinkNameid,
23305	})
23306	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23307}
23308
23309// Do executes the "logging.organizations.sinks.update" call.
23310// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
23311// code is an error. Response headers are in either
23312// *LogSink.ServerResponse.Header or (if a response was returned at all)
23313// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
23314// check whether the returned error was because http.StatusNotModified
23315// was returned.
23316func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
23317	gensupport.SetOptions(c.urlParams_, opts...)
23318	res, err := c.doRequest("json")
23319	if res != nil && res.StatusCode == http.StatusNotModified {
23320		if res.Body != nil {
23321			res.Body.Close()
23322		}
23323		return nil, &googleapi.Error{
23324			Code:   res.StatusCode,
23325			Header: res.Header,
23326		}
23327	}
23328	if err != nil {
23329		return nil, err
23330	}
23331	defer googleapi.CloseBody(res)
23332	if err := googleapi.CheckResponse(res); err != nil {
23333		return nil, err
23334	}
23335	ret := &LogSink{
23336		ServerResponse: googleapi.ServerResponse{
23337			Header:         res.Header,
23338			HTTPStatusCode: res.StatusCode,
23339		},
23340	}
23341	target := &ret
23342	if err := gensupport.DecodeResponse(target, res); err != nil {
23343		return nil, err
23344	}
23345	return ret, nil
23346	// {
23347	//   "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
23348	//   "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}",
23349	//   "httpMethod": "PUT",
23350	//   "id": "logging.organizations.sinks.update",
23351	//   "parameterOrder": [
23352	//     "sinkName"
23353	//   ],
23354	//   "parameters": {
23355	//     "sinkName": {
23356	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
23357	//       "location": "path",
23358	//       "pattern": "^organizations/[^/]+/sinks/[^/]+$",
23359	//       "required": true,
23360	//       "type": "string"
23361	//     },
23362	//     "uniqueWriterIdentity": {
23363	//       "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false.",
23364	//       "location": "query",
23365	//       "type": "boolean"
23366	//     },
23367	//     "updateMask": {
23368	//       "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
23369	//       "format": "google-fieldmask",
23370	//       "location": "query",
23371	//       "type": "string"
23372	//     }
23373	//   },
23374	//   "path": "v2/{+sinkName}",
23375	//   "request": {
23376	//     "$ref": "LogSink"
23377	//   },
23378	//   "response": {
23379	//     "$ref": "LogSink"
23380	//   },
23381	//   "scopes": [
23382	//     "https://www.googleapis.com/auth/cloud-platform",
23383	//     "https://www.googleapis.com/auth/logging.admin"
23384	//   ]
23385	// }
23386
23387}
23388
23389// method id "logging.projects.exclusions.create":
23390
23391type ProjectsExclusionsCreateCall struct {
23392	s            *Service
23393	parent       string
23394	logexclusion *LogExclusion
23395	urlParams_   gensupport.URLParams
23396	ctx_         context.Context
23397	header_      http.Header
23398}
23399
23400// Create: Creates a new exclusion in a specified parent resource. Only
23401// log entries belonging to that resource can be excluded. You can have
23402// up to 10 exclusions in a resource.
23403//
23404// - parent: The parent resource in which to create the exclusion:
23405//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
23406//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
23407//   examples:"projects/my-logging-project" "organizations/123456789".
23408func (r *ProjectsExclusionsService) Create(parent string, logexclusion *LogExclusion) *ProjectsExclusionsCreateCall {
23409	c := &ProjectsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23410	c.parent = parent
23411	c.logexclusion = logexclusion
23412	return c
23413}
23414
23415// Fields allows partial responses to be retrieved. See
23416// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23417// for more information.
23418func (c *ProjectsExclusionsCreateCall) Fields(s ...googleapi.Field) *ProjectsExclusionsCreateCall {
23419	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23420	return c
23421}
23422
23423// Context sets the context to be used in this call's Do method. Any
23424// pending HTTP request will be aborted if the provided context is
23425// canceled.
23426func (c *ProjectsExclusionsCreateCall) Context(ctx context.Context) *ProjectsExclusionsCreateCall {
23427	c.ctx_ = ctx
23428	return c
23429}
23430
23431// Header returns an http.Header that can be modified by the caller to
23432// add HTTP headers to the request.
23433func (c *ProjectsExclusionsCreateCall) Header() http.Header {
23434	if c.header_ == nil {
23435		c.header_ = make(http.Header)
23436	}
23437	return c.header_
23438}
23439
23440func (c *ProjectsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
23441	reqHeaders := make(http.Header)
23442	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
23443	for k, v := range c.header_ {
23444		reqHeaders[k] = v
23445	}
23446	reqHeaders.Set("User-Agent", c.s.userAgent())
23447	var body io.Reader = nil
23448	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
23449	if err != nil {
23450		return nil, err
23451	}
23452	reqHeaders.Set("Content-Type", "application/json")
23453	c.urlParams_.Set("alt", alt)
23454	c.urlParams_.Set("prettyPrint", "false")
23455	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
23456	urls += "?" + c.urlParams_.Encode()
23457	req, err := http.NewRequest("POST", urls, body)
23458	if err != nil {
23459		return nil, err
23460	}
23461	req.Header = reqHeaders
23462	googleapi.Expand(req.URL, map[string]string{
23463		"parent": c.parent,
23464	})
23465	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23466}
23467
23468// Do executes the "logging.projects.exclusions.create" call.
23469// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
23470// status code is an error. Response headers are in either
23471// *LogExclusion.ServerResponse.Header or (if a response was returned at
23472// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23473// to check whether the returned error was because
23474// http.StatusNotModified was returned.
23475func (c *ProjectsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
23476	gensupport.SetOptions(c.urlParams_, opts...)
23477	res, err := c.doRequest("json")
23478	if res != nil && res.StatusCode == http.StatusNotModified {
23479		if res.Body != nil {
23480			res.Body.Close()
23481		}
23482		return nil, &googleapi.Error{
23483			Code:   res.StatusCode,
23484			Header: res.Header,
23485		}
23486	}
23487	if err != nil {
23488		return nil, err
23489	}
23490	defer googleapi.CloseBody(res)
23491	if err := googleapi.CheckResponse(res); err != nil {
23492		return nil, err
23493	}
23494	ret := &LogExclusion{
23495		ServerResponse: googleapi.ServerResponse{
23496			Header:         res.Header,
23497			HTTPStatusCode: res.StatusCode,
23498		},
23499	}
23500	target := &ret
23501	if err := gensupport.DecodeResponse(target, res); err != nil {
23502		return nil, err
23503	}
23504	return ret, nil
23505	// {
23506	//   "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.",
23507	//   "flatPath": "v2/projects/{projectsId}/exclusions",
23508	//   "httpMethod": "POST",
23509	//   "id": "logging.projects.exclusions.create",
23510	//   "parameterOrder": [
23511	//     "parent"
23512	//   ],
23513	//   "parameters": {
23514	//     "parent": {
23515	//       "description": "Required. The parent resource in which to create the exclusion: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" For examples:\"projects/my-logging-project\" \"organizations/123456789\"",
23516	//       "location": "path",
23517	//       "pattern": "^projects/[^/]+$",
23518	//       "required": true,
23519	//       "type": "string"
23520	//     }
23521	//   },
23522	//   "path": "v2/{+parent}/exclusions",
23523	//   "request": {
23524	//     "$ref": "LogExclusion"
23525	//   },
23526	//   "response": {
23527	//     "$ref": "LogExclusion"
23528	//   },
23529	//   "scopes": [
23530	//     "https://www.googleapis.com/auth/cloud-platform",
23531	//     "https://www.googleapis.com/auth/logging.admin"
23532	//   ]
23533	// }
23534
23535}
23536
23537// method id "logging.projects.exclusions.delete":
23538
23539type ProjectsExclusionsDeleteCall struct {
23540	s          *Service
23541	name       string
23542	urlParams_ gensupport.URLParams
23543	ctx_       context.Context
23544	header_    http.Header
23545}
23546
23547// Delete: Deletes an exclusion.
23548//
23549// - name: The resource name of an existing exclusion to delete:
23550//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
23551//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
23552//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
23553//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
23554//   example:"projects/my-project/exclusions/my-exclusion".
23555func (r *ProjectsExclusionsService) Delete(name string) *ProjectsExclusionsDeleteCall {
23556	c := &ProjectsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23557	c.name = name
23558	return c
23559}
23560
23561// Fields allows partial responses to be retrieved. See
23562// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23563// for more information.
23564func (c *ProjectsExclusionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsExclusionsDeleteCall {
23565	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23566	return c
23567}
23568
23569// Context sets the context to be used in this call's Do method. Any
23570// pending HTTP request will be aborted if the provided context is
23571// canceled.
23572func (c *ProjectsExclusionsDeleteCall) Context(ctx context.Context) *ProjectsExclusionsDeleteCall {
23573	c.ctx_ = ctx
23574	return c
23575}
23576
23577// Header returns an http.Header that can be modified by the caller to
23578// add HTTP headers to the request.
23579func (c *ProjectsExclusionsDeleteCall) Header() http.Header {
23580	if c.header_ == nil {
23581		c.header_ = make(http.Header)
23582	}
23583	return c.header_
23584}
23585
23586func (c *ProjectsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
23587	reqHeaders := make(http.Header)
23588	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
23589	for k, v := range c.header_ {
23590		reqHeaders[k] = v
23591	}
23592	reqHeaders.Set("User-Agent", c.s.userAgent())
23593	var body io.Reader = nil
23594	c.urlParams_.Set("alt", alt)
23595	c.urlParams_.Set("prettyPrint", "false")
23596	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
23597	urls += "?" + c.urlParams_.Encode()
23598	req, err := http.NewRequest("DELETE", urls, body)
23599	if err != nil {
23600		return nil, err
23601	}
23602	req.Header = reqHeaders
23603	googleapi.Expand(req.URL, map[string]string{
23604		"name": c.name,
23605	})
23606	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23607}
23608
23609// Do executes the "logging.projects.exclusions.delete" call.
23610// Exactly one of *Empty or error will be non-nil. Any non-2xx status
23611// code is an error. Response headers are in either
23612// *Empty.ServerResponse.Header or (if a response was returned at all)
23613// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
23614// check whether the returned error was because http.StatusNotModified
23615// was returned.
23616func (c *ProjectsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
23617	gensupport.SetOptions(c.urlParams_, opts...)
23618	res, err := c.doRequest("json")
23619	if res != nil && res.StatusCode == http.StatusNotModified {
23620		if res.Body != nil {
23621			res.Body.Close()
23622		}
23623		return nil, &googleapi.Error{
23624			Code:   res.StatusCode,
23625			Header: res.Header,
23626		}
23627	}
23628	if err != nil {
23629		return nil, err
23630	}
23631	defer googleapi.CloseBody(res)
23632	if err := googleapi.CheckResponse(res); err != nil {
23633		return nil, err
23634	}
23635	ret := &Empty{
23636		ServerResponse: googleapi.ServerResponse{
23637			Header:         res.Header,
23638			HTTPStatusCode: res.StatusCode,
23639		},
23640	}
23641	target := &ret
23642	if err := gensupport.DecodeResponse(target, res); err != nil {
23643		return nil, err
23644	}
23645	return ret, nil
23646	// {
23647	//   "description": "Deletes an exclusion.",
23648	//   "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}",
23649	//   "httpMethod": "DELETE",
23650	//   "id": "logging.projects.exclusions.delete",
23651	//   "parameterOrder": [
23652	//     "name"
23653	//   ],
23654	//   "parameters": {
23655	//     "name": {
23656	//       "description": "Required. The resource name of an existing exclusion to delete: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
23657	//       "location": "path",
23658	//       "pattern": "^projects/[^/]+/exclusions/[^/]+$",
23659	//       "required": true,
23660	//       "type": "string"
23661	//     }
23662	//   },
23663	//   "path": "v2/{+name}",
23664	//   "response": {
23665	//     "$ref": "Empty"
23666	//   },
23667	//   "scopes": [
23668	//     "https://www.googleapis.com/auth/cloud-platform",
23669	//     "https://www.googleapis.com/auth/logging.admin"
23670	//   ]
23671	// }
23672
23673}
23674
23675// method id "logging.projects.exclusions.get":
23676
23677type ProjectsExclusionsGetCall struct {
23678	s            *Service
23679	name         string
23680	urlParams_   gensupport.URLParams
23681	ifNoneMatch_ string
23682	ctx_         context.Context
23683	header_      http.Header
23684}
23685
23686// Get: Gets the description of an exclusion.
23687//
23688// - name: The resource name of an existing exclusion:
23689//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
23690//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
23691//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
23692//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
23693//   example:"projects/my-project/exclusions/my-exclusion".
23694func (r *ProjectsExclusionsService) Get(name string) *ProjectsExclusionsGetCall {
23695	c := &ProjectsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23696	c.name = name
23697	return c
23698}
23699
23700// Fields allows partial responses to be retrieved. See
23701// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23702// for more information.
23703func (c *ProjectsExclusionsGetCall) Fields(s ...googleapi.Field) *ProjectsExclusionsGetCall {
23704	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23705	return c
23706}
23707
23708// IfNoneMatch sets the optional parameter which makes the operation
23709// fail if the object's ETag matches the given value. This is useful for
23710// getting updates only after the object has changed since the last
23711// request. Use googleapi.IsNotModified to check whether the response
23712// error from Do is the result of In-None-Match.
23713func (c *ProjectsExclusionsGetCall) IfNoneMatch(entityTag string) *ProjectsExclusionsGetCall {
23714	c.ifNoneMatch_ = entityTag
23715	return c
23716}
23717
23718// Context sets the context to be used in this call's Do method. Any
23719// pending HTTP request will be aborted if the provided context is
23720// canceled.
23721func (c *ProjectsExclusionsGetCall) Context(ctx context.Context) *ProjectsExclusionsGetCall {
23722	c.ctx_ = ctx
23723	return c
23724}
23725
23726// Header returns an http.Header that can be modified by the caller to
23727// add HTTP headers to the request.
23728func (c *ProjectsExclusionsGetCall) Header() http.Header {
23729	if c.header_ == nil {
23730		c.header_ = make(http.Header)
23731	}
23732	return c.header_
23733}
23734
23735func (c *ProjectsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
23736	reqHeaders := make(http.Header)
23737	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
23738	for k, v := range c.header_ {
23739		reqHeaders[k] = v
23740	}
23741	reqHeaders.Set("User-Agent", c.s.userAgent())
23742	if c.ifNoneMatch_ != "" {
23743		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23744	}
23745	var body io.Reader = nil
23746	c.urlParams_.Set("alt", alt)
23747	c.urlParams_.Set("prettyPrint", "false")
23748	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
23749	urls += "?" + c.urlParams_.Encode()
23750	req, err := http.NewRequest("GET", urls, body)
23751	if err != nil {
23752		return nil, err
23753	}
23754	req.Header = reqHeaders
23755	googleapi.Expand(req.URL, map[string]string{
23756		"name": c.name,
23757	})
23758	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23759}
23760
23761// Do executes the "logging.projects.exclusions.get" call.
23762// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
23763// status code is an error. Response headers are in either
23764// *LogExclusion.ServerResponse.Header or (if a response was returned at
23765// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23766// to check whether the returned error was because
23767// http.StatusNotModified was returned.
23768func (c *ProjectsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
23769	gensupport.SetOptions(c.urlParams_, opts...)
23770	res, err := c.doRequest("json")
23771	if res != nil && res.StatusCode == http.StatusNotModified {
23772		if res.Body != nil {
23773			res.Body.Close()
23774		}
23775		return nil, &googleapi.Error{
23776			Code:   res.StatusCode,
23777			Header: res.Header,
23778		}
23779	}
23780	if err != nil {
23781		return nil, err
23782	}
23783	defer googleapi.CloseBody(res)
23784	if err := googleapi.CheckResponse(res); err != nil {
23785		return nil, err
23786	}
23787	ret := &LogExclusion{
23788		ServerResponse: googleapi.ServerResponse{
23789			Header:         res.Header,
23790			HTTPStatusCode: res.StatusCode,
23791		},
23792	}
23793	target := &ret
23794	if err := gensupport.DecodeResponse(target, res); err != nil {
23795		return nil, err
23796	}
23797	return ret, nil
23798	// {
23799	//   "description": "Gets the description of an exclusion.",
23800	//   "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}",
23801	//   "httpMethod": "GET",
23802	//   "id": "logging.projects.exclusions.get",
23803	//   "parameterOrder": [
23804	//     "name"
23805	//   ],
23806	//   "parameters": {
23807	//     "name": {
23808	//       "description": "Required. The resource name of an existing exclusion: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
23809	//       "location": "path",
23810	//       "pattern": "^projects/[^/]+/exclusions/[^/]+$",
23811	//       "required": true,
23812	//       "type": "string"
23813	//     }
23814	//   },
23815	//   "path": "v2/{+name}",
23816	//   "response": {
23817	//     "$ref": "LogExclusion"
23818	//   },
23819	//   "scopes": [
23820	//     "https://www.googleapis.com/auth/cloud-platform",
23821	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
23822	//     "https://www.googleapis.com/auth/logging.admin",
23823	//     "https://www.googleapis.com/auth/logging.read"
23824	//   ]
23825	// }
23826
23827}
23828
23829// method id "logging.projects.exclusions.list":
23830
23831type ProjectsExclusionsListCall struct {
23832	s            *Service
23833	parent       string
23834	urlParams_   gensupport.URLParams
23835	ifNoneMatch_ string
23836	ctx_         context.Context
23837	header_      http.Header
23838}
23839
23840// List: Lists all the exclusions in a parent resource.
23841//
23842// - parent: The parent resource whose exclusions are to be listed.
23843//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
23844//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
23845func (r *ProjectsExclusionsService) List(parent string) *ProjectsExclusionsListCall {
23846	c := &ProjectsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23847	c.parent = parent
23848	return c
23849}
23850
23851// PageSize sets the optional parameter "pageSize": The maximum number
23852// of results to return from this request. Non-positive values are
23853// ignored. The presence of nextPageToken in the response indicates that
23854// more results might be available.
23855func (c *ProjectsExclusionsListCall) PageSize(pageSize int64) *ProjectsExclusionsListCall {
23856	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23857	return c
23858}
23859
23860// PageToken sets the optional parameter "pageToken": If present, then
23861// retrieve the next batch of results from the preceding call to this
23862// method. pageToken must be the value of nextPageToken from the
23863// previous response. The values of other method parameters should be
23864// identical to those in the previous call.
23865func (c *ProjectsExclusionsListCall) PageToken(pageToken string) *ProjectsExclusionsListCall {
23866	c.urlParams_.Set("pageToken", pageToken)
23867	return c
23868}
23869
23870// Fields allows partial responses to be retrieved. See
23871// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23872// for more information.
23873func (c *ProjectsExclusionsListCall) Fields(s ...googleapi.Field) *ProjectsExclusionsListCall {
23874	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23875	return c
23876}
23877
23878// IfNoneMatch sets the optional parameter which makes the operation
23879// fail if the object's ETag matches the given value. This is useful for
23880// getting updates only after the object has changed since the last
23881// request. Use googleapi.IsNotModified to check whether the response
23882// error from Do is the result of In-None-Match.
23883func (c *ProjectsExclusionsListCall) IfNoneMatch(entityTag string) *ProjectsExclusionsListCall {
23884	c.ifNoneMatch_ = entityTag
23885	return c
23886}
23887
23888// Context sets the context to be used in this call's Do method. Any
23889// pending HTTP request will be aborted if the provided context is
23890// canceled.
23891func (c *ProjectsExclusionsListCall) Context(ctx context.Context) *ProjectsExclusionsListCall {
23892	c.ctx_ = ctx
23893	return c
23894}
23895
23896// Header returns an http.Header that can be modified by the caller to
23897// add HTTP headers to the request.
23898func (c *ProjectsExclusionsListCall) Header() http.Header {
23899	if c.header_ == nil {
23900		c.header_ = make(http.Header)
23901	}
23902	return c.header_
23903}
23904
23905func (c *ProjectsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
23906	reqHeaders := make(http.Header)
23907	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
23908	for k, v := range c.header_ {
23909		reqHeaders[k] = v
23910	}
23911	reqHeaders.Set("User-Agent", c.s.userAgent())
23912	if c.ifNoneMatch_ != "" {
23913		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23914	}
23915	var body io.Reader = nil
23916	c.urlParams_.Set("alt", alt)
23917	c.urlParams_.Set("prettyPrint", "false")
23918	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
23919	urls += "?" + c.urlParams_.Encode()
23920	req, err := http.NewRequest("GET", urls, body)
23921	if err != nil {
23922		return nil, err
23923	}
23924	req.Header = reqHeaders
23925	googleapi.Expand(req.URL, map[string]string{
23926		"parent": c.parent,
23927	})
23928	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23929}
23930
23931// Do executes the "logging.projects.exclusions.list" call.
23932// Exactly one of *ListExclusionsResponse or error will be non-nil. Any
23933// non-2xx status code is an error. Response headers are in either
23934// *ListExclusionsResponse.ServerResponse.Header or (if a response was
23935// returned at all) in error.(*googleapi.Error).Header. Use
23936// googleapi.IsNotModified to check whether the returned error was
23937// because http.StatusNotModified was returned.
23938func (c *ProjectsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
23939	gensupport.SetOptions(c.urlParams_, opts...)
23940	res, err := c.doRequest("json")
23941	if res != nil && res.StatusCode == http.StatusNotModified {
23942		if res.Body != nil {
23943			res.Body.Close()
23944		}
23945		return nil, &googleapi.Error{
23946			Code:   res.StatusCode,
23947			Header: res.Header,
23948		}
23949	}
23950	if err != nil {
23951		return nil, err
23952	}
23953	defer googleapi.CloseBody(res)
23954	if err := googleapi.CheckResponse(res); err != nil {
23955		return nil, err
23956	}
23957	ret := &ListExclusionsResponse{
23958		ServerResponse: googleapi.ServerResponse{
23959			Header:         res.Header,
23960			HTTPStatusCode: res.StatusCode,
23961		},
23962	}
23963	target := &ret
23964	if err := gensupport.DecodeResponse(target, res); err != nil {
23965		return nil, err
23966	}
23967	return ret, nil
23968	// {
23969	//   "description": "Lists all the exclusions in a parent resource.",
23970	//   "flatPath": "v2/projects/{projectsId}/exclusions",
23971	//   "httpMethod": "GET",
23972	//   "id": "logging.projects.exclusions.list",
23973	//   "parameterOrder": [
23974	//     "parent"
23975	//   ],
23976	//   "parameters": {
23977	//     "pageSize": {
23978	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
23979	//       "format": "int32",
23980	//       "location": "query",
23981	//       "type": "integer"
23982	//     },
23983	//     "pageToken": {
23984	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
23985	//       "location": "query",
23986	//       "type": "string"
23987	//     },
23988	//     "parent": {
23989	//       "description": "Required. The parent resource whose exclusions are to be listed. \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" ",
23990	//       "location": "path",
23991	//       "pattern": "^projects/[^/]+$",
23992	//       "required": true,
23993	//       "type": "string"
23994	//     }
23995	//   },
23996	//   "path": "v2/{+parent}/exclusions",
23997	//   "response": {
23998	//     "$ref": "ListExclusionsResponse"
23999	//   },
24000	//   "scopes": [
24001	//     "https://www.googleapis.com/auth/cloud-platform",
24002	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
24003	//     "https://www.googleapis.com/auth/logging.admin",
24004	//     "https://www.googleapis.com/auth/logging.read"
24005	//   ]
24006	// }
24007
24008}
24009
24010// Pages invokes f for each page of results.
24011// A non-nil error returned from f will halt the iteration.
24012// The provided context supersedes any context provided to the Context method.
24013func (c *ProjectsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
24014	c.ctx_ = ctx
24015	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24016	for {
24017		x, err := c.Do()
24018		if err != nil {
24019			return err
24020		}
24021		if err := f(x); err != nil {
24022			return err
24023		}
24024		if x.NextPageToken == "" {
24025			return nil
24026		}
24027		c.PageToken(x.NextPageToken)
24028	}
24029}
24030
24031// method id "logging.projects.exclusions.patch":
24032
24033type ProjectsExclusionsPatchCall struct {
24034	s            *Service
24035	name         string
24036	logexclusion *LogExclusion
24037	urlParams_   gensupport.URLParams
24038	ctx_         context.Context
24039	header_      http.Header
24040}
24041
24042// Patch: Changes one or more properties of an existing exclusion.
24043//
24044// - name: The resource name of the exclusion to update:
24045//   "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
24046//   "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
24047//   "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
24048//   "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
24049//   example:"projects/my-project/exclusions/my-exclusion".
24050func (r *ProjectsExclusionsService) Patch(name string, logexclusion *LogExclusion) *ProjectsExclusionsPatchCall {
24051	c := &ProjectsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24052	c.name = name
24053	c.logexclusion = logexclusion
24054	return c
24055}
24056
24057// UpdateMask sets the optional parameter "updateMask": Required. A
24058// non-empty list of fields to change in the existing exclusion. New
24059// values for the fields are taken from the corresponding fields in the
24060// LogExclusion included in this request. Fields not mentioned in
24061// update_mask are not changed and are ignored in the request.For
24062// example, to change the filter and description of an exclusion,
24063// specify an update_mask of "filter,description".
24064func (c *ProjectsExclusionsPatchCall) UpdateMask(updateMask string) *ProjectsExclusionsPatchCall {
24065	c.urlParams_.Set("updateMask", updateMask)
24066	return c
24067}
24068
24069// Fields allows partial responses to be retrieved. See
24070// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24071// for more information.
24072func (c *ProjectsExclusionsPatchCall) Fields(s ...googleapi.Field) *ProjectsExclusionsPatchCall {
24073	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24074	return c
24075}
24076
24077// Context sets the context to be used in this call's Do method. Any
24078// pending HTTP request will be aborted if the provided context is
24079// canceled.
24080func (c *ProjectsExclusionsPatchCall) Context(ctx context.Context) *ProjectsExclusionsPatchCall {
24081	c.ctx_ = ctx
24082	return c
24083}
24084
24085// Header returns an http.Header that can be modified by the caller to
24086// add HTTP headers to the request.
24087func (c *ProjectsExclusionsPatchCall) Header() http.Header {
24088	if c.header_ == nil {
24089		c.header_ = make(http.Header)
24090	}
24091	return c.header_
24092}
24093
24094func (c *ProjectsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
24095	reqHeaders := make(http.Header)
24096	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
24097	for k, v := range c.header_ {
24098		reqHeaders[k] = v
24099	}
24100	reqHeaders.Set("User-Agent", c.s.userAgent())
24101	var body io.Reader = nil
24102	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
24103	if err != nil {
24104		return nil, err
24105	}
24106	reqHeaders.Set("Content-Type", "application/json")
24107	c.urlParams_.Set("alt", alt)
24108	c.urlParams_.Set("prettyPrint", "false")
24109	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
24110	urls += "?" + c.urlParams_.Encode()
24111	req, err := http.NewRequest("PATCH", urls, body)
24112	if err != nil {
24113		return nil, err
24114	}
24115	req.Header = reqHeaders
24116	googleapi.Expand(req.URL, map[string]string{
24117		"name": c.name,
24118	})
24119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24120}
24121
24122// Do executes the "logging.projects.exclusions.patch" call.
24123// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
24124// status code is an error. Response headers are in either
24125// *LogExclusion.ServerResponse.Header or (if a response was returned at
24126// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24127// to check whether the returned error was because
24128// http.StatusNotModified was returned.
24129func (c *ProjectsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
24130	gensupport.SetOptions(c.urlParams_, opts...)
24131	res, err := c.doRequest("json")
24132	if res != nil && res.StatusCode == http.StatusNotModified {
24133		if res.Body != nil {
24134			res.Body.Close()
24135		}
24136		return nil, &googleapi.Error{
24137			Code:   res.StatusCode,
24138			Header: res.Header,
24139		}
24140	}
24141	if err != nil {
24142		return nil, err
24143	}
24144	defer googleapi.CloseBody(res)
24145	if err := googleapi.CheckResponse(res); err != nil {
24146		return nil, err
24147	}
24148	ret := &LogExclusion{
24149		ServerResponse: googleapi.ServerResponse{
24150			Header:         res.Header,
24151			HTTPStatusCode: res.StatusCode,
24152		},
24153	}
24154	target := &ret
24155	if err := gensupport.DecodeResponse(target, res); err != nil {
24156		return nil, err
24157	}
24158	return ret, nil
24159	// {
24160	//   "description": "Changes one or more properties of an existing exclusion.",
24161	//   "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}",
24162	//   "httpMethod": "PATCH",
24163	//   "id": "logging.projects.exclusions.patch",
24164	//   "parameterOrder": [
24165	//     "name"
24166	//   ],
24167	//   "parameters": {
24168	//     "name": {
24169	//       "description": "Required. The resource name of the exclusion to update: \"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\" \"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\" \"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\" For example:\"projects/my-project/exclusions/my-exclusion\"",
24170	//       "location": "path",
24171	//       "pattern": "^projects/[^/]+/exclusions/[^/]+$",
24172	//       "required": true,
24173	//       "type": "string"
24174	//     },
24175	//     "updateMask": {
24176	//       "description": "Required. A non-empty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".",
24177	//       "format": "google-fieldmask",
24178	//       "location": "query",
24179	//       "type": "string"
24180	//     }
24181	//   },
24182	//   "path": "v2/{+name}",
24183	//   "request": {
24184	//     "$ref": "LogExclusion"
24185	//   },
24186	//   "response": {
24187	//     "$ref": "LogExclusion"
24188	//   },
24189	//   "scopes": [
24190	//     "https://www.googleapis.com/auth/cloud-platform",
24191	//     "https://www.googleapis.com/auth/logging.admin"
24192	//   ]
24193	// }
24194
24195}
24196
24197// method id "logging.projects.locations.get":
24198
24199type ProjectsLocationsGetCall struct {
24200	s            *Service
24201	name         string
24202	urlParams_   gensupport.URLParams
24203	ifNoneMatch_ string
24204	ctx_         context.Context
24205	header_      http.Header
24206}
24207
24208// Get: Gets information about a location.
24209//
24210// - name: Resource name for the location.
24211func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
24212	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24213	c.name = name
24214	return c
24215}
24216
24217// Fields allows partial responses to be retrieved. See
24218// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24219// for more information.
24220func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
24221	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24222	return c
24223}
24224
24225// IfNoneMatch sets the optional parameter which makes the operation
24226// fail if the object's ETag matches the given value. This is useful for
24227// getting updates only after the object has changed since the last
24228// request. Use googleapi.IsNotModified to check whether the response
24229// error from Do is the result of In-None-Match.
24230func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
24231	c.ifNoneMatch_ = entityTag
24232	return c
24233}
24234
24235// Context sets the context to be used in this call's Do method. Any
24236// pending HTTP request will be aborted if the provided context is
24237// canceled.
24238func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
24239	c.ctx_ = ctx
24240	return c
24241}
24242
24243// Header returns an http.Header that can be modified by the caller to
24244// add HTTP headers to the request.
24245func (c *ProjectsLocationsGetCall) Header() http.Header {
24246	if c.header_ == nil {
24247		c.header_ = make(http.Header)
24248	}
24249	return c.header_
24250}
24251
24252func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
24253	reqHeaders := make(http.Header)
24254	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
24255	for k, v := range c.header_ {
24256		reqHeaders[k] = v
24257	}
24258	reqHeaders.Set("User-Agent", c.s.userAgent())
24259	if c.ifNoneMatch_ != "" {
24260		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24261	}
24262	var body io.Reader = nil
24263	c.urlParams_.Set("alt", alt)
24264	c.urlParams_.Set("prettyPrint", "false")
24265	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
24266	urls += "?" + c.urlParams_.Encode()
24267	req, err := http.NewRequest("GET", urls, body)
24268	if err != nil {
24269		return nil, err
24270	}
24271	req.Header = reqHeaders
24272	googleapi.Expand(req.URL, map[string]string{
24273		"name": c.name,
24274	})
24275	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24276}
24277
24278// Do executes the "logging.projects.locations.get" call.
24279// Exactly one of *Location or error will be non-nil. Any non-2xx status
24280// code is an error. Response headers are in either
24281// *Location.ServerResponse.Header or (if a response was returned at
24282// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24283// to check whether the returned error was because
24284// http.StatusNotModified was returned.
24285func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
24286	gensupport.SetOptions(c.urlParams_, opts...)
24287	res, err := c.doRequest("json")
24288	if res != nil && res.StatusCode == http.StatusNotModified {
24289		if res.Body != nil {
24290			res.Body.Close()
24291		}
24292		return nil, &googleapi.Error{
24293			Code:   res.StatusCode,
24294			Header: res.Header,
24295		}
24296	}
24297	if err != nil {
24298		return nil, err
24299	}
24300	defer googleapi.CloseBody(res)
24301	if err := googleapi.CheckResponse(res); err != nil {
24302		return nil, err
24303	}
24304	ret := &Location{
24305		ServerResponse: googleapi.ServerResponse{
24306			Header:         res.Header,
24307			HTTPStatusCode: res.StatusCode,
24308		},
24309	}
24310	target := &ret
24311	if err := gensupport.DecodeResponse(target, res); err != nil {
24312		return nil, err
24313	}
24314	return ret, nil
24315	// {
24316	//   "description": "Gets information about a location.",
24317	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}",
24318	//   "httpMethod": "GET",
24319	//   "id": "logging.projects.locations.get",
24320	//   "parameterOrder": [
24321	//     "name"
24322	//   ],
24323	//   "parameters": {
24324	//     "name": {
24325	//       "description": "Resource name for the location.",
24326	//       "location": "path",
24327	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
24328	//       "required": true,
24329	//       "type": "string"
24330	//     }
24331	//   },
24332	//   "path": "v2/{+name}",
24333	//   "response": {
24334	//     "$ref": "Location"
24335	//   },
24336	//   "scopes": [
24337	//     "https://www.googleapis.com/auth/cloud-platform",
24338	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
24339	//     "https://www.googleapis.com/auth/logging.admin",
24340	//     "https://www.googleapis.com/auth/logging.read"
24341	//   ]
24342	// }
24343
24344}
24345
24346// method id "logging.projects.locations.list":
24347
24348type ProjectsLocationsListCall struct {
24349	s            *Service
24350	name         string
24351	urlParams_   gensupport.URLParams
24352	ifNoneMatch_ string
24353	ctx_         context.Context
24354	header_      http.Header
24355}
24356
24357// List: Lists information about the supported locations for this
24358// service.
24359//
24360// - name: The resource that owns the locations collection, if
24361//   applicable.
24362func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
24363	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24364	c.name = name
24365	return c
24366}
24367
24368// Filter sets the optional parameter "filter": A filter to narrow down
24369// results to a preferred subset. The filtering language accepts strings
24370// like "displayName=tokyo", and is documented in more detail in AIP-160
24371// (https://google.aip.dev/160).
24372func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
24373	c.urlParams_.Set("filter", filter)
24374	return c
24375}
24376
24377// PageSize sets the optional parameter "pageSize": The maximum number
24378// of results to return. If not set, the service selects a default.
24379func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
24380	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24381	return c
24382}
24383
24384// PageToken sets the optional parameter "pageToken": A page token
24385// received from the next_page_token field in the response. Send that
24386// page token to receive the subsequent page.
24387func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
24388	c.urlParams_.Set("pageToken", pageToken)
24389	return c
24390}
24391
24392// Fields allows partial responses to be retrieved. See
24393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24394// for more information.
24395func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
24396	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24397	return c
24398}
24399
24400// IfNoneMatch sets the optional parameter which makes the operation
24401// fail if the object's ETag matches the given value. This is useful for
24402// getting updates only after the object has changed since the last
24403// request. Use googleapi.IsNotModified to check whether the response
24404// error from Do is the result of In-None-Match.
24405func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
24406	c.ifNoneMatch_ = entityTag
24407	return c
24408}
24409
24410// Context sets the context to be used in this call's Do method. Any
24411// pending HTTP request will be aborted if the provided context is
24412// canceled.
24413func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
24414	c.ctx_ = ctx
24415	return c
24416}
24417
24418// Header returns an http.Header that can be modified by the caller to
24419// add HTTP headers to the request.
24420func (c *ProjectsLocationsListCall) Header() http.Header {
24421	if c.header_ == nil {
24422		c.header_ = make(http.Header)
24423	}
24424	return c.header_
24425}
24426
24427func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
24428	reqHeaders := make(http.Header)
24429	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
24430	for k, v := range c.header_ {
24431		reqHeaders[k] = v
24432	}
24433	reqHeaders.Set("User-Agent", c.s.userAgent())
24434	if c.ifNoneMatch_ != "" {
24435		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24436	}
24437	var body io.Reader = nil
24438	c.urlParams_.Set("alt", alt)
24439	c.urlParams_.Set("prettyPrint", "false")
24440	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
24441	urls += "?" + c.urlParams_.Encode()
24442	req, err := http.NewRequest("GET", urls, body)
24443	if err != nil {
24444		return nil, err
24445	}
24446	req.Header = reqHeaders
24447	googleapi.Expand(req.URL, map[string]string{
24448		"name": c.name,
24449	})
24450	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24451}
24452
24453// Do executes the "logging.projects.locations.list" call.
24454// Exactly one of *ListLocationsResponse or error will be non-nil. Any
24455// non-2xx status code is an error. Response headers are in either
24456// *ListLocationsResponse.ServerResponse.Header or (if a response was
24457// returned at all) in error.(*googleapi.Error).Header. Use
24458// googleapi.IsNotModified to check whether the returned error was
24459// because http.StatusNotModified was returned.
24460func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
24461	gensupport.SetOptions(c.urlParams_, opts...)
24462	res, err := c.doRequest("json")
24463	if res != nil && res.StatusCode == http.StatusNotModified {
24464		if res.Body != nil {
24465			res.Body.Close()
24466		}
24467		return nil, &googleapi.Error{
24468			Code:   res.StatusCode,
24469			Header: res.Header,
24470		}
24471	}
24472	if err != nil {
24473		return nil, err
24474	}
24475	defer googleapi.CloseBody(res)
24476	if err := googleapi.CheckResponse(res); err != nil {
24477		return nil, err
24478	}
24479	ret := &ListLocationsResponse{
24480		ServerResponse: googleapi.ServerResponse{
24481			Header:         res.Header,
24482			HTTPStatusCode: res.StatusCode,
24483		},
24484	}
24485	target := &ret
24486	if err := gensupport.DecodeResponse(target, res); err != nil {
24487		return nil, err
24488	}
24489	return ret, nil
24490	// {
24491	//   "description": "Lists information about the supported locations for this service.",
24492	//   "flatPath": "v2/projects/{projectsId}/locations",
24493	//   "httpMethod": "GET",
24494	//   "id": "logging.projects.locations.list",
24495	//   "parameterOrder": [
24496	//     "name"
24497	//   ],
24498	//   "parameters": {
24499	//     "filter": {
24500	//       "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in AIP-160 (https://google.aip.dev/160).",
24501	//       "location": "query",
24502	//       "type": "string"
24503	//     },
24504	//     "name": {
24505	//       "description": "The resource that owns the locations collection, if applicable.",
24506	//       "location": "path",
24507	//       "pattern": "^projects/[^/]+$",
24508	//       "required": true,
24509	//       "type": "string"
24510	//     },
24511	//     "pageSize": {
24512	//       "description": "The maximum number of results to return. If not set, the service selects a default.",
24513	//       "format": "int32",
24514	//       "location": "query",
24515	//       "type": "integer"
24516	//     },
24517	//     "pageToken": {
24518	//       "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.",
24519	//       "location": "query",
24520	//       "type": "string"
24521	//     }
24522	//   },
24523	//   "path": "v2/{+name}/locations",
24524	//   "response": {
24525	//     "$ref": "ListLocationsResponse"
24526	//   },
24527	//   "scopes": [
24528	//     "https://www.googleapis.com/auth/cloud-platform",
24529	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
24530	//     "https://www.googleapis.com/auth/logging.admin",
24531	//     "https://www.googleapis.com/auth/logging.read"
24532	//   ]
24533	// }
24534
24535}
24536
24537// Pages invokes f for each page of results.
24538// A non-nil error returned from f will halt the iteration.
24539// The provided context supersedes any context provided to the Context method.
24540func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
24541	c.ctx_ = ctx
24542	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24543	for {
24544		x, err := c.Do()
24545		if err != nil {
24546			return err
24547		}
24548		if err := f(x); err != nil {
24549			return err
24550		}
24551		if x.NextPageToken == "" {
24552			return nil
24553		}
24554		c.PageToken(x.NextPageToken)
24555	}
24556}
24557
24558// method id "logging.projects.locations.buckets.create":
24559
24560type ProjectsLocationsBucketsCreateCall struct {
24561	s          *Service
24562	parent     string
24563	logbucket  *LogBucket
24564	urlParams_ gensupport.URLParams
24565	ctx_       context.Context
24566	header_    http.Header
24567}
24568
24569// Create: Creates a log bucket that can be used to store log entries.
24570// After a bucket has been created, the bucket's location cannot be
24571// changed.
24572//
24573// - parent: The resource in which to create the log bucket:
24574//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
24575//   example:"projects/my-project/locations/global".
24576func (r *ProjectsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *ProjectsLocationsBucketsCreateCall {
24577	c := &ProjectsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24578	c.parent = parent
24579	c.logbucket = logbucket
24580	return c
24581}
24582
24583// BucketId sets the optional parameter "bucketId": Required. A
24584// client-assigned identifier such as "my-bucket". Identifiers are
24585// limited to 100 characters and can include only letters, digits,
24586// underscores, hyphens, and periods.
24587func (c *ProjectsLocationsBucketsCreateCall) BucketId(bucketId string) *ProjectsLocationsBucketsCreateCall {
24588	c.urlParams_.Set("bucketId", bucketId)
24589	return c
24590}
24591
24592// Fields allows partial responses to be retrieved. See
24593// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24594// for more information.
24595func (c *ProjectsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsCreateCall {
24596	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24597	return c
24598}
24599
24600// Context sets the context to be used in this call's Do method. Any
24601// pending HTTP request will be aborted if the provided context is
24602// canceled.
24603func (c *ProjectsLocationsBucketsCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsCreateCall {
24604	c.ctx_ = ctx
24605	return c
24606}
24607
24608// Header returns an http.Header that can be modified by the caller to
24609// add HTTP headers to the request.
24610func (c *ProjectsLocationsBucketsCreateCall) Header() http.Header {
24611	if c.header_ == nil {
24612		c.header_ = make(http.Header)
24613	}
24614	return c.header_
24615}
24616
24617func (c *ProjectsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
24618	reqHeaders := make(http.Header)
24619	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
24620	for k, v := range c.header_ {
24621		reqHeaders[k] = v
24622	}
24623	reqHeaders.Set("User-Agent", c.s.userAgent())
24624	var body io.Reader = nil
24625	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
24626	if err != nil {
24627		return nil, err
24628	}
24629	reqHeaders.Set("Content-Type", "application/json")
24630	c.urlParams_.Set("alt", alt)
24631	c.urlParams_.Set("prettyPrint", "false")
24632	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
24633	urls += "?" + c.urlParams_.Encode()
24634	req, err := http.NewRequest("POST", urls, body)
24635	if err != nil {
24636		return nil, err
24637	}
24638	req.Header = reqHeaders
24639	googleapi.Expand(req.URL, map[string]string{
24640		"parent": c.parent,
24641	})
24642	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24643}
24644
24645// Do executes the "logging.projects.locations.buckets.create" call.
24646// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
24647// status code is an error. Response headers are in either
24648// *LogBucket.ServerResponse.Header or (if a response was returned at
24649// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24650// to check whether the returned error was because
24651// http.StatusNotModified was returned.
24652func (c *ProjectsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
24653	gensupport.SetOptions(c.urlParams_, opts...)
24654	res, err := c.doRequest("json")
24655	if res != nil && res.StatusCode == http.StatusNotModified {
24656		if res.Body != nil {
24657			res.Body.Close()
24658		}
24659		return nil, &googleapi.Error{
24660			Code:   res.StatusCode,
24661			Header: res.Header,
24662		}
24663	}
24664	if err != nil {
24665		return nil, err
24666	}
24667	defer googleapi.CloseBody(res)
24668	if err := googleapi.CheckResponse(res); err != nil {
24669		return nil, err
24670	}
24671	ret := &LogBucket{
24672		ServerResponse: googleapi.ServerResponse{
24673			Header:         res.Header,
24674			HTTPStatusCode: res.StatusCode,
24675		},
24676	}
24677	target := &ret
24678	if err := gensupport.DecodeResponse(target, res); err != nil {
24679		return nil, err
24680	}
24681	return ret, nil
24682	// {
24683	//   "description": "Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.",
24684	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets",
24685	//   "httpMethod": "POST",
24686	//   "id": "logging.projects.locations.buckets.create",
24687	//   "parameterOrder": [
24688	//     "parent"
24689	//   ],
24690	//   "parameters": {
24691	//     "bucketId": {
24692	//       "description": "Required. A client-assigned identifier such as \"my-bucket\". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.",
24693	//       "location": "query",
24694	//       "type": "string"
24695	//     },
24696	//     "parent": {
24697	//       "description": "Required. The resource in which to create the log bucket: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" For example:\"projects/my-project/locations/global\"",
24698	//       "location": "path",
24699	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
24700	//       "required": true,
24701	//       "type": "string"
24702	//     }
24703	//   },
24704	//   "path": "v2/{+parent}/buckets",
24705	//   "request": {
24706	//     "$ref": "LogBucket"
24707	//   },
24708	//   "response": {
24709	//     "$ref": "LogBucket"
24710	//   },
24711	//   "scopes": [
24712	//     "https://www.googleapis.com/auth/cloud-platform",
24713	//     "https://www.googleapis.com/auth/logging.admin"
24714	//   ]
24715	// }
24716
24717}
24718
24719// method id "logging.projects.locations.buckets.delete":
24720
24721type ProjectsLocationsBucketsDeleteCall struct {
24722	s          *Service
24723	name       string
24724	urlParams_ gensupport.URLParams
24725	ctx_       context.Context
24726	header_    http.Header
24727}
24728
24729// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to
24730// the DELETE_REQUESTED state. After 7 days, the bucket will be purged
24731// and all log entries in the bucket will be permanently deleted.
24732//
24733// - name: The full resource name of the bucket to delete.
24734//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
24735//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
24736//   CKET_ID]"
24737//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
24738//   s/[BUCKET_ID]"
24739//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
24740//   For
24741//   example:"projects/my-project/locations/global/buckets/my-bucket".
24742func (r *ProjectsLocationsBucketsService) Delete(name string) *ProjectsLocationsBucketsDeleteCall {
24743	c := &ProjectsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24744	c.name = name
24745	return c
24746}
24747
24748// Fields allows partial responses to be retrieved. See
24749// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24750// for more information.
24751func (c *ProjectsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsDeleteCall {
24752	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24753	return c
24754}
24755
24756// Context sets the context to be used in this call's Do method. Any
24757// pending HTTP request will be aborted if the provided context is
24758// canceled.
24759func (c *ProjectsLocationsBucketsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsDeleteCall {
24760	c.ctx_ = ctx
24761	return c
24762}
24763
24764// Header returns an http.Header that can be modified by the caller to
24765// add HTTP headers to the request.
24766func (c *ProjectsLocationsBucketsDeleteCall) Header() http.Header {
24767	if c.header_ == nil {
24768		c.header_ = make(http.Header)
24769	}
24770	return c.header_
24771}
24772
24773func (c *ProjectsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
24774	reqHeaders := make(http.Header)
24775	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
24776	for k, v := range c.header_ {
24777		reqHeaders[k] = v
24778	}
24779	reqHeaders.Set("User-Agent", c.s.userAgent())
24780	var body io.Reader = nil
24781	c.urlParams_.Set("alt", alt)
24782	c.urlParams_.Set("prettyPrint", "false")
24783	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
24784	urls += "?" + c.urlParams_.Encode()
24785	req, err := http.NewRequest("DELETE", urls, body)
24786	if err != nil {
24787		return nil, err
24788	}
24789	req.Header = reqHeaders
24790	googleapi.Expand(req.URL, map[string]string{
24791		"name": c.name,
24792	})
24793	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24794}
24795
24796// Do executes the "logging.projects.locations.buckets.delete" call.
24797// Exactly one of *Empty or error will be non-nil. Any non-2xx status
24798// code is an error. Response headers are in either
24799// *Empty.ServerResponse.Header or (if a response was returned at all)
24800// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
24801// check whether the returned error was because http.StatusNotModified
24802// was returned.
24803func (c *ProjectsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
24804	gensupport.SetOptions(c.urlParams_, opts...)
24805	res, err := c.doRequest("json")
24806	if res != nil && res.StatusCode == http.StatusNotModified {
24807		if res.Body != nil {
24808			res.Body.Close()
24809		}
24810		return nil, &googleapi.Error{
24811			Code:   res.StatusCode,
24812			Header: res.Header,
24813		}
24814	}
24815	if err != nil {
24816		return nil, err
24817	}
24818	defer googleapi.CloseBody(res)
24819	if err := googleapi.CheckResponse(res); err != nil {
24820		return nil, err
24821	}
24822	ret := &Empty{
24823		ServerResponse: googleapi.ServerResponse{
24824			Header:         res.Header,
24825			HTTPStatusCode: res.StatusCode,
24826		},
24827	}
24828	target := &ret
24829	if err := gensupport.DecodeResponse(target, res); err != nil {
24830		return nil, err
24831	}
24832	return ret, nil
24833	// {
24834	//   "description": "Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.",
24835	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}",
24836	//   "httpMethod": "DELETE",
24837	//   "id": "logging.projects.locations.buckets.delete",
24838	//   "parameterOrder": [
24839	//     "name"
24840	//   ],
24841	//   "parameters": {
24842	//     "name": {
24843	//       "description": "Required. The full resource name of the bucket to delete. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
24844	//       "location": "path",
24845	//       "pattern": "^projects/[^/]+/locations/[^/]+/buckets/[^/]+$",
24846	//       "required": true,
24847	//       "type": "string"
24848	//     }
24849	//   },
24850	//   "path": "v2/{+name}",
24851	//   "response": {
24852	//     "$ref": "Empty"
24853	//   },
24854	//   "scopes": [
24855	//     "https://www.googleapis.com/auth/cloud-platform",
24856	//     "https://www.googleapis.com/auth/logging.admin"
24857	//   ]
24858	// }
24859
24860}
24861
24862// method id "logging.projects.locations.buckets.get":
24863
24864type ProjectsLocationsBucketsGetCall struct {
24865	s            *Service
24866	name         string
24867	urlParams_   gensupport.URLParams
24868	ifNoneMatch_ string
24869	ctx_         context.Context
24870	header_      http.Header
24871}
24872
24873// Get: Gets a log bucket.
24874//
24875// - name: The resource name of the bucket:
24876//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
24877//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
24878//   CKET_ID]"
24879//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
24880//   s/[BUCKET_ID]"
24881//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
24882//   For
24883//   example:"projects/my-project/locations/global/buckets/my-bucket".
24884func (r *ProjectsLocationsBucketsService) Get(name string) *ProjectsLocationsBucketsGetCall {
24885	c := &ProjectsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24886	c.name = name
24887	return c
24888}
24889
24890// Fields allows partial responses to be retrieved. See
24891// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24892// for more information.
24893func (c *ProjectsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsGetCall {
24894	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24895	return c
24896}
24897
24898// IfNoneMatch sets the optional parameter which makes the operation
24899// fail if the object's ETag matches the given value. This is useful for
24900// getting updates only after the object has changed since the last
24901// request. Use googleapi.IsNotModified to check whether the response
24902// error from Do is the result of In-None-Match.
24903func (c *ProjectsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsGetCall {
24904	c.ifNoneMatch_ = entityTag
24905	return c
24906}
24907
24908// Context sets the context to be used in this call's Do method. Any
24909// pending HTTP request will be aborted if the provided context is
24910// canceled.
24911func (c *ProjectsLocationsBucketsGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsGetCall {
24912	c.ctx_ = ctx
24913	return c
24914}
24915
24916// Header returns an http.Header that can be modified by the caller to
24917// add HTTP headers to the request.
24918func (c *ProjectsLocationsBucketsGetCall) Header() http.Header {
24919	if c.header_ == nil {
24920		c.header_ = make(http.Header)
24921	}
24922	return c.header_
24923}
24924
24925func (c *ProjectsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
24926	reqHeaders := make(http.Header)
24927	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
24928	for k, v := range c.header_ {
24929		reqHeaders[k] = v
24930	}
24931	reqHeaders.Set("User-Agent", c.s.userAgent())
24932	if c.ifNoneMatch_ != "" {
24933		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24934	}
24935	var body io.Reader = nil
24936	c.urlParams_.Set("alt", alt)
24937	c.urlParams_.Set("prettyPrint", "false")
24938	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
24939	urls += "?" + c.urlParams_.Encode()
24940	req, err := http.NewRequest("GET", urls, body)
24941	if err != nil {
24942		return nil, err
24943	}
24944	req.Header = reqHeaders
24945	googleapi.Expand(req.URL, map[string]string{
24946		"name": c.name,
24947	})
24948	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24949}
24950
24951// Do executes the "logging.projects.locations.buckets.get" call.
24952// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
24953// status code is an error. Response headers are in either
24954// *LogBucket.ServerResponse.Header or (if a response was returned at
24955// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24956// to check whether the returned error was because
24957// http.StatusNotModified was returned.
24958func (c *ProjectsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
24959	gensupport.SetOptions(c.urlParams_, opts...)
24960	res, err := c.doRequest("json")
24961	if res != nil && res.StatusCode == http.StatusNotModified {
24962		if res.Body != nil {
24963			res.Body.Close()
24964		}
24965		return nil, &googleapi.Error{
24966			Code:   res.StatusCode,
24967			Header: res.Header,
24968		}
24969	}
24970	if err != nil {
24971		return nil, err
24972	}
24973	defer googleapi.CloseBody(res)
24974	if err := googleapi.CheckResponse(res); err != nil {
24975		return nil, err
24976	}
24977	ret := &LogBucket{
24978		ServerResponse: googleapi.ServerResponse{
24979			Header:         res.Header,
24980			HTTPStatusCode: res.StatusCode,
24981		},
24982	}
24983	target := &ret
24984	if err := gensupport.DecodeResponse(target, res); err != nil {
24985		return nil, err
24986	}
24987	return ret, nil
24988	// {
24989	//   "description": "Gets a log bucket.",
24990	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}",
24991	//   "httpMethod": "GET",
24992	//   "id": "logging.projects.locations.buckets.get",
24993	//   "parameterOrder": [
24994	//     "name"
24995	//   ],
24996	//   "parameters": {
24997	//     "name": {
24998	//       "description": "Required. The resource name of the bucket: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
24999	//       "location": "path",
25000	//       "pattern": "^projects/[^/]+/locations/[^/]+/buckets/[^/]+$",
25001	//       "required": true,
25002	//       "type": "string"
25003	//     }
25004	//   },
25005	//   "path": "v2/{+name}",
25006	//   "response": {
25007	//     "$ref": "LogBucket"
25008	//   },
25009	//   "scopes": [
25010	//     "https://www.googleapis.com/auth/cloud-platform",
25011	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
25012	//     "https://www.googleapis.com/auth/logging.admin",
25013	//     "https://www.googleapis.com/auth/logging.read"
25014	//   ]
25015	// }
25016
25017}
25018
25019// method id "logging.projects.locations.buckets.list":
25020
25021type ProjectsLocationsBucketsListCall struct {
25022	s            *Service
25023	parent       string
25024	urlParams_   gensupport.URLParams
25025	ifNoneMatch_ string
25026	ctx_         context.Context
25027	header_      http.Header
25028}
25029
25030// List: Lists log buckets.
25031//
25032// - parent: The parent resource whose buckets are to be listed:
25033//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
25034//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
25035//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
25036//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations
25037//   portion of the resource must be specified, but supplying the
25038//   character - in place of LOCATION_ID will return all buckets.
25039func (r *ProjectsLocationsBucketsService) List(parent string) *ProjectsLocationsBucketsListCall {
25040	c := &ProjectsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25041	c.parent = parent
25042	return c
25043}
25044
25045// PageSize sets the optional parameter "pageSize": The maximum number
25046// of results to return from this request. Non-positive values are
25047// ignored. The presence of nextPageToken in the response indicates that
25048// more results might be available.
25049func (c *ProjectsLocationsBucketsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsListCall {
25050	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
25051	return c
25052}
25053
25054// PageToken sets the optional parameter "pageToken": If present, then
25055// retrieve the next batch of results from the preceding call to this
25056// method. pageToken must be the value of nextPageToken from the
25057// previous response. The values of other method parameters should be
25058// identical to those in the previous call.
25059func (c *ProjectsLocationsBucketsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsListCall {
25060	c.urlParams_.Set("pageToken", pageToken)
25061	return c
25062}
25063
25064// Fields allows partial responses to be retrieved. See
25065// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25066// for more information.
25067func (c *ProjectsLocationsBucketsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsListCall {
25068	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25069	return c
25070}
25071
25072// IfNoneMatch sets the optional parameter which makes the operation
25073// fail if the object's ETag matches the given value. This is useful for
25074// getting updates only after the object has changed since the last
25075// request. Use googleapi.IsNotModified to check whether the response
25076// error from Do is the result of In-None-Match.
25077func (c *ProjectsLocationsBucketsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsListCall {
25078	c.ifNoneMatch_ = entityTag
25079	return c
25080}
25081
25082// Context sets the context to be used in this call's Do method. Any
25083// pending HTTP request will be aborted if the provided context is
25084// canceled.
25085func (c *ProjectsLocationsBucketsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsListCall {
25086	c.ctx_ = ctx
25087	return c
25088}
25089
25090// Header returns an http.Header that can be modified by the caller to
25091// add HTTP headers to the request.
25092func (c *ProjectsLocationsBucketsListCall) Header() http.Header {
25093	if c.header_ == nil {
25094		c.header_ = make(http.Header)
25095	}
25096	return c.header_
25097}
25098
25099func (c *ProjectsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
25100	reqHeaders := make(http.Header)
25101	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
25102	for k, v := range c.header_ {
25103		reqHeaders[k] = v
25104	}
25105	reqHeaders.Set("User-Agent", c.s.userAgent())
25106	if c.ifNoneMatch_ != "" {
25107		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25108	}
25109	var body io.Reader = nil
25110	c.urlParams_.Set("alt", alt)
25111	c.urlParams_.Set("prettyPrint", "false")
25112	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
25113	urls += "?" + c.urlParams_.Encode()
25114	req, err := http.NewRequest("GET", urls, body)
25115	if err != nil {
25116		return nil, err
25117	}
25118	req.Header = reqHeaders
25119	googleapi.Expand(req.URL, map[string]string{
25120		"parent": c.parent,
25121	})
25122	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25123}
25124
25125// Do executes the "logging.projects.locations.buckets.list" call.
25126// Exactly one of *ListBucketsResponse or error will be non-nil. Any
25127// non-2xx status code is an error. Response headers are in either
25128// *ListBucketsResponse.ServerResponse.Header or (if a response was
25129// returned at all) in error.(*googleapi.Error).Header. Use
25130// googleapi.IsNotModified to check whether the returned error was
25131// because http.StatusNotModified was returned.
25132func (c *ProjectsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
25133	gensupport.SetOptions(c.urlParams_, opts...)
25134	res, err := c.doRequest("json")
25135	if res != nil && res.StatusCode == http.StatusNotModified {
25136		if res.Body != nil {
25137			res.Body.Close()
25138		}
25139		return nil, &googleapi.Error{
25140			Code:   res.StatusCode,
25141			Header: res.Header,
25142		}
25143	}
25144	if err != nil {
25145		return nil, err
25146	}
25147	defer googleapi.CloseBody(res)
25148	if err := googleapi.CheckResponse(res); err != nil {
25149		return nil, err
25150	}
25151	ret := &ListBucketsResponse{
25152		ServerResponse: googleapi.ServerResponse{
25153			Header:         res.Header,
25154			HTTPStatusCode: res.StatusCode,
25155		},
25156	}
25157	target := &ret
25158	if err := gensupport.DecodeResponse(target, res); err != nil {
25159		return nil, err
25160	}
25161	return ret, nil
25162	// {
25163	//   "description": "Lists log buckets.",
25164	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets",
25165	//   "httpMethod": "GET",
25166	//   "id": "logging.projects.locations.buckets.list",
25167	//   "parameterOrder": [
25168	//     "parent"
25169	//   ],
25170	//   "parameters": {
25171	//     "pageSize": {
25172	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
25173	//       "format": "int32",
25174	//       "location": "query",
25175	//       "type": "integer"
25176	//     },
25177	//     "pageToken": {
25178	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
25179	//       "location": "query",
25180	//       "type": "string"
25181	//     },
25182	//     "parent": {
25183	//       "description": "Required. The parent resource whose buckets are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]\" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets.",
25184	//       "location": "path",
25185	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
25186	//       "required": true,
25187	//       "type": "string"
25188	//     }
25189	//   },
25190	//   "path": "v2/{+parent}/buckets",
25191	//   "response": {
25192	//     "$ref": "ListBucketsResponse"
25193	//   },
25194	//   "scopes": [
25195	//     "https://www.googleapis.com/auth/cloud-platform",
25196	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
25197	//     "https://www.googleapis.com/auth/logging.admin",
25198	//     "https://www.googleapis.com/auth/logging.read"
25199	//   ]
25200	// }
25201
25202}
25203
25204// Pages invokes f for each page of results.
25205// A non-nil error returned from f will halt the iteration.
25206// The provided context supersedes any context provided to the Context method.
25207func (c *ProjectsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
25208	c.ctx_ = ctx
25209	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25210	for {
25211		x, err := c.Do()
25212		if err != nil {
25213			return err
25214		}
25215		if err := f(x); err != nil {
25216			return err
25217		}
25218		if x.NextPageToken == "" {
25219			return nil
25220		}
25221		c.PageToken(x.NextPageToken)
25222	}
25223}
25224
25225// method id "logging.projects.locations.buckets.patch":
25226
25227type ProjectsLocationsBucketsPatchCall struct {
25228	s          *Service
25229	name       string
25230	logbucket  *LogBucket
25231	urlParams_ gensupport.URLParams
25232	ctx_       context.Context
25233	header_    http.Header
25234}
25235
25236// Patch: Updates a log bucket. This method replaces the following
25237// fields in the existing bucket with values from the new bucket:
25238// retention_periodIf the retention period is decreased and the bucket
25239// is locked, FAILED_PRECONDITION will be returned.If the bucket has a
25240// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be
25241// returned.After a bucket has been created, the bucket's location
25242// cannot be changed.
25243//
25244// - name: The full resource name of the bucket to update.
25245//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
25246//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
25247//   CKET_ID]"
25248//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
25249//   s/[BUCKET_ID]"
25250//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
25251//   For
25252//   example:"projects/my-project/locations/global/buckets/my-bucket".
25253func (r *ProjectsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *ProjectsLocationsBucketsPatchCall {
25254	c := &ProjectsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25255	c.name = name
25256	c.logbucket = logbucket
25257	return c
25258}
25259
25260// UpdateMask sets the optional parameter "updateMask": Required. Field
25261// mask that specifies the fields in bucket that need an update. A
25262// bucket field will be overwritten if, and only if, it is in the update
25263// mask. name and output only fields cannot be updated.For a detailed
25264// FieldMask definition, see:
25265// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
25266// example: updateMask=retention_days
25267func (c *ProjectsLocationsBucketsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsPatchCall {
25268	c.urlParams_.Set("updateMask", updateMask)
25269	return c
25270}
25271
25272// Fields allows partial responses to be retrieved. See
25273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25274// for more information.
25275func (c *ProjectsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsPatchCall {
25276	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25277	return c
25278}
25279
25280// Context sets the context to be used in this call's Do method. Any
25281// pending HTTP request will be aborted if the provided context is
25282// canceled.
25283func (c *ProjectsLocationsBucketsPatchCall) Context(ctx context.Context) *ProjectsLocationsBucketsPatchCall {
25284	c.ctx_ = ctx
25285	return c
25286}
25287
25288// Header returns an http.Header that can be modified by the caller to
25289// add HTTP headers to the request.
25290func (c *ProjectsLocationsBucketsPatchCall) Header() http.Header {
25291	if c.header_ == nil {
25292		c.header_ = make(http.Header)
25293	}
25294	return c.header_
25295}
25296
25297func (c *ProjectsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
25298	reqHeaders := make(http.Header)
25299	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
25300	for k, v := range c.header_ {
25301		reqHeaders[k] = v
25302	}
25303	reqHeaders.Set("User-Agent", c.s.userAgent())
25304	var body io.Reader = nil
25305	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
25306	if err != nil {
25307		return nil, err
25308	}
25309	reqHeaders.Set("Content-Type", "application/json")
25310	c.urlParams_.Set("alt", alt)
25311	c.urlParams_.Set("prettyPrint", "false")
25312	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
25313	urls += "?" + c.urlParams_.Encode()
25314	req, err := http.NewRequest("PATCH", urls, body)
25315	if err != nil {
25316		return nil, err
25317	}
25318	req.Header = reqHeaders
25319	googleapi.Expand(req.URL, map[string]string{
25320		"name": c.name,
25321	})
25322	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25323}
25324
25325// Do executes the "logging.projects.locations.buckets.patch" call.
25326// Exactly one of *LogBucket or error will be non-nil. Any non-2xx
25327// status code is an error. Response headers are in either
25328// *LogBucket.ServerResponse.Header or (if a response was returned at
25329// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25330// to check whether the returned error was because
25331// http.StatusNotModified was returned.
25332func (c *ProjectsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
25333	gensupport.SetOptions(c.urlParams_, opts...)
25334	res, err := c.doRequest("json")
25335	if res != nil && res.StatusCode == http.StatusNotModified {
25336		if res.Body != nil {
25337			res.Body.Close()
25338		}
25339		return nil, &googleapi.Error{
25340			Code:   res.StatusCode,
25341			Header: res.Header,
25342		}
25343	}
25344	if err != nil {
25345		return nil, err
25346	}
25347	defer googleapi.CloseBody(res)
25348	if err := googleapi.CheckResponse(res); err != nil {
25349		return nil, err
25350	}
25351	ret := &LogBucket{
25352		ServerResponse: googleapi.ServerResponse{
25353			Header:         res.Header,
25354			HTTPStatusCode: res.StatusCode,
25355		},
25356	}
25357	target := &ret
25358	if err := gensupport.DecodeResponse(target, res); err != nil {
25359		return nil, err
25360	}
25361	return ret, nil
25362	// {
25363	//   "description": "Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed.",
25364	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}",
25365	//   "httpMethod": "PATCH",
25366	//   "id": "logging.projects.locations.buckets.patch",
25367	//   "parameterOrder": [
25368	//     "name"
25369	//   ],
25370	//   "parameters": {
25371	//     "name": {
25372	//       "description": "Required. The full resource name of the bucket to update. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
25373	//       "location": "path",
25374	//       "pattern": "^projects/[^/]+/locations/[^/]+/buckets/[^/]+$",
25375	//       "required": true,
25376	//       "type": "string"
25377	//     },
25378	//     "updateMask": {
25379	//       "description": "Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days",
25380	//       "format": "google-fieldmask",
25381	//       "location": "query",
25382	//       "type": "string"
25383	//     }
25384	//   },
25385	//   "path": "v2/{+name}",
25386	//   "request": {
25387	//     "$ref": "LogBucket"
25388	//   },
25389	//   "response": {
25390	//     "$ref": "LogBucket"
25391	//   },
25392	//   "scopes": [
25393	//     "https://www.googleapis.com/auth/cloud-platform",
25394	//     "https://www.googleapis.com/auth/logging.admin"
25395	//   ]
25396	// }
25397
25398}
25399
25400// method id "logging.projects.locations.buckets.undelete":
25401
25402type ProjectsLocationsBucketsUndeleteCall struct {
25403	s                     *Service
25404	name                  string
25405	undeletebucketrequest *UndeleteBucketRequest
25406	urlParams_            gensupport.URLParams
25407	ctx_                  context.Context
25408	header_               http.Header
25409}
25410
25411// Undelete: Undeletes a log bucket. A bucket that has been deleted can
25412// be undeleted within the grace period of 7 days.
25413//
25414// - name: The full resource name of the bucket to undelete.
25415//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
25416//   "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BU
25417//   CKET_ID]"
25418//   "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/bucket
25419//   s/[BUCKET_ID]"
25420//   "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
25421//   For
25422//   example:"projects/my-project/locations/global/buckets/my-bucket".
25423func (r *ProjectsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *ProjectsLocationsBucketsUndeleteCall {
25424	c := &ProjectsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25425	c.name = name
25426	c.undeletebucketrequest = undeletebucketrequest
25427	return c
25428}
25429
25430// Fields allows partial responses to be retrieved. See
25431// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25432// for more information.
25433func (c *ProjectsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsUndeleteCall {
25434	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25435	return c
25436}
25437
25438// Context sets the context to be used in this call's Do method. Any
25439// pending HTTP request will be aborted if the provided context is
25440// canceled.
25441func (c *ProjectsLocationsBucketsUndeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsUndeleteCall {
25442	c.ctx_ = ctx
25443	return c
25444}
25445
25446// Header returns an http.Header that can be modified by the caller to
25447// add HTTP headers to the request.
25448func (c *ProjectsLocationsBucketsUndeleteCall) Header() http.Header {
25449	if c.header_ == nil {
25450		c.header_ = make(http.Header)
25451	}
25452	return c.header_
25453}
25454
25455func (c *ProjectsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
25456	reqHeaders := make(http.Header)
25457	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
25458	for k, v := range c.header_ {
25459		reqHeaders[k] = v
25460	}
25461	reqHeaders.Set("User-Agent", c.s.userAgent())
25462	var body io.Reader = nil
25463	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
25464	if err != nil {
25465		return nil, err
25466	}
25467	reqHeaders.Set("Content-Type", "application/json")
25468	c.urlParams_.Set("alt", alt)
25469	c.urlParams_.Set("prettyPrint", "false")
25470	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
25471	urls += "?" + c.urlParams_.Encode()
25472	req, err := http.NewRequest("POST", urls, body)
25473	if err != nil {
25474		return nil, err
25475	}
25476	req.Header = reqHeaders
25477	googleapi.Expand(req.URL, map[string]string{
25478		"name": c.name,
25479	})
25480	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25481}
25482
25483// Do executes the "logging.projects.locations.buckets.undelete" call.
25484// Exactly one of *Empty or error will be non-nil. Any non-2xx status
25485// code is an error. Response headers are in either
25486// *Empty.ServerResponse.Header or (if a response was returned at all)
25487// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
25488// check whether the returned error was because http.StatusNotModified
25489// was returned.
25490func (c *ProjectsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
25491	gensupport.SetOptions(c.urlParams_, opts...)
25492	res, err := c.doRequest("json")
25493	if res != nil && res.StatusCode == http.StatusNotModified {
25494		if res.Body != nil {
25495			res.Body.Close()
25496		}
25497		return nil, &googleapi.Error{
25498			Code:   res.StatusCode,
25499			Header: res.Header,
25500		}
25501	}
25502	if err != nil {
25503		return nil, err
25504	}
25505	defer googleapi.CloseBody(res)
25506	if err := googleapi.CheckResponse(res); err != nil {
25507		return nil, err
25508	}
25509	ret := &Empty{
25510		ServerResponse: googleapi.ServerResponse{
25511			Header:         res.Header,
25512			HTTPStatusCode: res.StatusCode,
25513		},
25514	}
25515	target := &ret
25516	if err := gensupport.DecodeResponse(target, res); err != nil {
25517		return nil, err
25518	}
25519	return ret, nil
25520	// {
25521	//   "description": "Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.",
25522	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}:undelete",
25523	//   "httpMethod": "POST",
25524	//   "id": "logging.projects.locations.buckets.undelete",
25525	//   "parameterOrder": [
25526	//     "name"
25527	//   ],
25528	//   "parameters": {
25529	//     "name": {
25530	//       "description": "Required. The full resource name of the bucket to undelete. \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" \"folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
25531	//       "location": "path",
25532	//       "pattern": "^projects/[^/]+/locations/[^/]+/buckets/[^/]+$",
25533	//       "required": true,
25534	//       "type": "string"
25535	//     }
25536	//   },
25537	//   "path": "v2/{+name}:undelete",
25538	//   "request": {
25539	//     "$ref": "UndeleteBucketRequest"
25540	//   },
25541	//   "response": {
25542	//     "$ref": "Empty"
25543	//   },
25544	//   "scopes": [
25545	//     "https://www.googleapis.com/auth/cloud-platform",
25546	//     "https://www.googleapis.com/auth/logging.admin"
25547	//   ]
25548	// }
25549
25550}
25551
25552// method id "logging.projects.locations.buckets.views.create":
25553
25554type ProjectsLocationsBucketsViewsCreateCall struct {
25555	s          *Service
25556	parent     string
25557	logview    *LogView
25558	urlParams_ gensupport.URLParams
25559	ctx_       context.Context
25560	header_    http.Header
25561}
25562
25563// Create: Creates a view over log entries in a log bucket. A bucket may
25564// contain a maximum of 30 views.
25565//
25566// - parent: The bucket in which to create the view
25567//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
25568//   ` For
25569//   example:"projects/my-project/locations/global/buckets/my-bucket".
25570func (r *ProjectsLocationsBucketsViewsService) Create(parent string, logview *LogView) *ProjectsLocationsBucketsViewsCreateCall {
25571	c := &ProjectsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25572	c.parent = parent
25573	c.logview = logview
25574	return c
25575}
25576
25577// ViewId sets the optional parameter "viewId": Required. The id to use
25578// for this view.
25579func (c *ProjectsLocationsBucketsViewsCreateCall) ViewId(viewId string) *ProjectsLocationsBucketsViewsCreateCall {
25580	c.urlParams_.Set("viewId", viewId)
25581	return c
25582}
25583
25584// Fields allows partial responses to be retrieved. See
25585// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25586// for more information.
25587func (c *ProjectsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsCreateCall {
25588	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25589	return c
25590}
25591
25592// Context sets the context to be used in this call's Do method. Any
25593// pending HTTP request will be aborted if the provided context is
25594// canceled.
25595func (c *ProjectsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsCreateCall {
25596	c.ctx_ = ctx
25597	return c
25598}
25599
25600// Header returns an http.Header that can be modified by the caller to
25601// add HTTP headers to the request.
25602func (c *ProjectsLocationsBucketsViewsCreateCall) Header() http.Header {
25603	if c.header_ == nil {
25604		c.header_ = make(http.Header)
25605	}
25606	return c.header_
25607}
25608
25609func (c *ProjectsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
25610	reqHeaders := make(http.Header)
25611	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
25612	for k, v := range c.header_ {
25613		reqHeaders[k] = v
25614	}
25615	reqHeaders.Set("User-Agent", c.s.userAgent())
25616	var body io.Reader = nil
25617	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
25618	if err != nil {
25619		return nil, err
25620	}
25621	reqHeaders.Set("Content-Type", "application/json")
25622	c.urlParams_.Set("alt", alt)
25623	c.urlParams_.Set("prettyPrint", "false")
25624	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
25625	urls += "?" + c.urlParams_.Encode()
25626	req, err := http.NewRequest("POST", urls, body)
25627	if err != nil {
25628		return nil, err
25629	}
25630	req.Header = reqHeaders
25631	googleapi.Expand(req.URL, map[string]string{
25632		"parent": c.parent,
25633	})
25634	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25635}
25636
25637// Do executes the "logging.projects.locations.buckets.views.create" call.
25638// Exactly one of *LogView or error will be non-nil. Any non-2xx status
25639// code is an error. Response headers are in either
25640// *LogView.ServerResponse.Header or (if a response was returned at all)
25641// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
25642// check whether the returned error was because http.StatusNotModified
25643// was returned.
25644func (c *ProjectsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
25645	gensupport.SetOptions(c.urlParams_, opts...)
25646	res, err := c.doRequest("json")
25647	if res != nil && res.StatusCode == http.StatusNotModified {
25648		if res.Body != nil {
25649			res.Body.Close()
25650		}
25651		return nil, &googleapi.Error{
25652			Code:   res.StatusCode,
25653			Header: res.Header,
25654		}
25655	}
25656	if err != nil {
25657		return nil, err
25658	}
25659	defer googleapi.CloseBody(res)
25660	if err := googleapi.CheckResponse(res); err != nil {
25661		return nil, err
25662	}
25663	ret := &LogView{
25664		ServerResponse: googleapi.ServerResponse{
25665			Header:         res.Header,
25666			HTTPStatusCode: res.StatusCode,
25667		},
25668	}
25669	target := &ret
25670	if err := gensupport.DecodeResponse(target, res); err != nil {
25671		return nil, err
25672	}
25673	return ret, nil
25674	// {
25675	//   "description": "Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.",
25676	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views",
25677	//   "httpMethod": "POST",
25678	//   "id": "logging.projects.locations.buckets.views.create",
25679	//   "parameterOrder": [
25680	//     "parent"
25681	//   ],
25682	//   "parameters": {
25683	//     "parent": {
25684	//       "description": "Required. The bucket in which to create the view `\"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\"` For example:\"projects/my-project/locations/global/buckets/my-bucket\"",
25685	//       "location": "path",
25686	//       "pattern": "^projects/[^/]+/locations/[^/]+/buckets/[^/]+$",
25687	//       "required": true,
25688	//       "type": "string"
25689	//     },
25690	//     "viewId": {
25691	//       "description": "Required. The id to use for this view.",
25692	//       "location": "query",
25693	//       "type": "string"
25694	//     }
25695	//   },
25696	//   "path": "v2/{+parent}/views",
25697	//   "request": {
25698	//     "$ref": "LogView"
25699	//   },
25700	//   "response": {
25701	//     "$ref": "LogView"
25702	//   },
25703	//   "scopes": [
25704	//     "https://www.googleapis.com/auth/cloud-platform",
25705	//     "https://www.googleapis.com/auth/logging.admin"
25706	//   ]
25707	// }
25708
25709}
25710
25711// method id "logging.projects.locations.buckets.views.delete":
25712
25713type ProjectsLocationsBucketsViewsDeleteCall struct {
25714	s          *Service
25715	name       string
25716	urlParams_ gensupport.URLParams
25717	ctx_       context.Context
25718	header_    http.Header
25719}
25720
25721// Delete: Deletes a view on a log bucket.
25722//
25723// - name: The full resource name of the view to delete:
25724//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
25725//   iews/[VIEW_ID]" For
25726//   example:"projects/my-project/locations/global/buckets/my-bucket/view
25727//   s/my-view".
25728func (r *ProjectsLocationsBucketsViewsService) Delete(name string) *ProjectsLocationsBucketsViewsDeleteCall {
25729	c := &ProjectsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25730	c.name = name
25731	return c
25732}
25733
25734// Fields allows partial responses to be retrieved. See
25735// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25736// for more information.
25737func (c *ProjectsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsDeleteCall {
25738	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25739	return c
25740}
25741
25742// Context sets the context to be used in this call's Do method. Any
25743// pending HTTP request will be aborted if the provided context is
25744// canceled.
25745func (c *ProjectsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsDeleteCall {
25746	c.ctx_ = ctx
25747	return c
25748}
25749
25750// Header returns an http.Header that can be modified by the caller to
25751// add HTTP headers to the request.
25752func (c *ProjectsLocationsBucketsViewsDeleteCall) Header() http.Header {
25753	if c.header_ == nil {
25754		c.header_ = make(http.Header)
25755	}
25756	return c.header_
25757}
25758
25759func (c *ProjectsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
25760	reqHeaders := make(http.Header)
25761	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
25762	for k, v := range c.header_ {
25763		reqHeaders[k] = v
25764	}
25765	reqHeaders.Set("User-Agent", c.s.userAgent())
25766	var body io.Reader = nil
25767	c.urlParams_.Set("alt", alt)
25768	c.urlParams_.Set("prettyPrint", "false")
25769	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
25770	urls += "?" + c.urlParams_.Encode()
25771	req, err := http.NewRequest("DELETE", urls, body)
25772	if err != nil {
25773		return nil, err
25774	}
25775	req.Header = reqHeaders
25776	googleapi.Expand(req.URL, map[string]string{
25777		"name": c.name,
25778	})
25779	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25780}
25781
25782// Do executes the "logging.projects.locations.buckets.views.delete" call.
25783// Exactly one of *Empty or error will be non-nil. Any non-2xx status
25784// code is an error. Response headers are in either
25785// *Empty.ServerResponse.Header or (if a response was returned at all)
25786// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
25787// check whether the returned error was because http.StatusNotModified
25788// was returned.
25789func (c *ProjectsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
25790	gensupport.SetOptions(c.urlParams_, opts...)
25791	res, err := c.doRequest("json")
25792	if res != nil && res.StatusCode == http.StatusNotModified {
25793		if res.Body != nil {
25794			res.Body.Close()
25795		}
25796		return nil, &googleapi.Error{
25797			Code:   res.StatusCode,
25798			Header: res.Header,
25799		}
25800	}
25801	if err != nil {
25802		return nil, err
25803	}
25804	defer googleapi.CloseBody(res)
25805	if err := googleapi.CheckResponse(res); err != nil {
25806		return nil, err
25807	}
25808	ret := &Empty{
25809		ServerResponse: googleapi.ServerResponse{
25810			Header:         res.Header,
25811			HTTPStatusCode: res.StatusCode,
25812		},
25813	}
25814	target := &ret
25815	if err := gensupport.DecodeResponse(target, res); err != nil {
25816		return nil, err
25817	}
25818	return ret, nil
25819	// {
25820	//   "description": "Deletes a view on a log bucket.",
25821	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
25822	//   "httpMethod": "DELETE",
25823	//   "id": "logging.projects.locations.buckets.views.delete",
25824	//   "parameterOrder": [
25825	//     "name"
25826	//   ],
25827	//   "parameters": {
25828	//     "name": {
25829	//       "description": "Required. The full resource name of the view to delete: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
25830	//       "location": "path",
25831	//       "pattern": "^projects/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
25832	//       "required": true,
25833	//       "type": "string"
25834	//     }
25835	//   },
25836	//   "path": "v2/{+name}",
25837	//   "response": {
25838	//     "$ref": "Empty"
25839	//   },
25840	//   "scopes": [
25841	//     "https://www.googleapis.com/auth/cloud-platform",
25842	//     "https://www.googleapis.com/auth/logging.admin"
25843	//   ]
25844	// }
25845
25846}
25847
25848// method id "logging.projects.locations.buckets.views.get":
25849
25850type ProjectsLocationsBucketsViewsGetCall struct {
25851	s            *Service
25852	name         string
25853	urlParams_   gensupport.URLParams
25854	ifNoneMatch_ string
25855	ctx_         context.Context
25856	header_      http.Header
25857}
25858
25859// Get: Gets a view on a log bucket..
25860//
25861// - name: The resource name of the policy:
25862//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
25863//   iews/[VIEW_ID]" For
25864//   example:"projects/my-project/locations/global/buckets/my-bucket/view
25865//   s/my-view".
25866func (r *ProjectsLocationsBucketsViewsService) Get(name string) *ProjectsLocationsBucketsViewsGetCall {
25867	c := &ProjectsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25868	c.name = name
25869	return c
25870}
25871
25872// Fields allows partial responses to be retrieved. See
25873// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25874// for more information.
25875func (c *ProjectsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsGetCall {
25876	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25877	return c
25878}
25879
25880// IfNoneMatch sets the optional parameter which makes the operation
25881// fail if the object's ETag matches the given value. This is useful for
25882// getting updates only after the object has changed since the last
25883// request. Use googleapi.IsNotModified to check whether the response
25884// error from Do is the result of In-None-Match.
25885func (c *ProjectsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsGetCall {
25886	c.ifNoneMatch_ = entityTag
25887	return c
25888}
25889
25890// Context sets the context to be used in this call's Do method. Any
25891// pending HTTP request will be aborted if the provided context is
25892// canceled.
25893func (c *ProjectsLocationsBucketsViewsGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsGetCall {
25894	c.ctx_ = ctx
25895	return c
25896}
25897
25898// Header returns an http.Header that can be modified by the caller to
25899// add HTTP headers to the request.
25900func (c *ProjectsLocationsBucketsViewsGetCall) Header() http.Header {
25901	if c.header_ == nil {
25902		c.header_ = make(http.Header)
25903	}
25904	return c.header_
25905}
25906
25907func (c *ProjectsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
25908	reqHeaders := make(http.Header)
25909	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
25910	for k, v := range c.header_ {
25911		reqHeaders[k] = v
25912	}
25913	reqHeaders.Set("User-Agent", c.s.userAgent())
25914	if c.ifNoneMatch_ != "" {
25915		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25916	}
25917	var body io.Reader = nil
25918	c.urlParams_.Set("alt", alt)
25919	c.urlParams_.Set("prettyPrint", "false")
25920	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
25921	urls += "?" + c.urlParams_.Encode()
25922	req, err := http.NewRequest("GET", urls, body)
25923	if err != nil {
25924		return nil, err
25925	}
25926	req.Header = reqHeaders
25927	googleapi.Expand(req.URL, map[string]string{
25928		"name": c.name,
25929	})
25930	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25931}
25932
25933// Do executes the "logging.projects.locations.buckets.views.get" call.
25934// Exactly one of *LogView or error will be non-nil. Any non-2xx status
25935// code is an error. Response headers are in either
25936// *LogView.ServerResponse.Header or (if a response was returned at all)
25937// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
25938// check whether the returned error was because http.StatusNotModified
25939// was returned.
25940func (c *ProjectsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
25941	gensupport.SetOptions(c.urlParams_, opts...)
25942	res, err := c.doRequest("json")
25943	if res != nil && res.StatusCode == http.StatusNotModified {
25944		if res.Body != nil {
25945			res.Body.Close()
25946		}
25947		return nil, &googleapi.Error{
25948			Code:   res.StatusCode,
25949			Header: res.Header,
25950		}
25951	}
25952	if err != nil {
25953		return nil, err
25954	}
25955	defer googleapi.CloseBody(res)
25956	if err := googleapi.CheckResponse(res); err != nil {
25957		return nil, err
25958	}
25959	ret := &LogView{
25960		ServerResponse: googleapi.ServerResponse{
25961			Header:         res.Header,
25962			HTTPStatusCode: res.StatusCode,
25963		},
25964	}
25965	target := &ret
25966	if err := gensupport.DecodeResponse(target, res); err != nil {
25967		return nil, err
25968	}
25969	return ret, nil
25970	// {
25971	//   "description": "Gets a view on a log bucket..",
25972	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
25973	//   "httpMethod": "GET",
25974	//   "id": "logging.projects.locations.buckets.views.get",
25975	//   "parameterOrder": [
25976	//     "name"
25977	//   ],
25978	//   "parameters": {
25979	//     "name": {
25980	//       "description": "Required. The resource name of the policy: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
25981	//       "location": "path",
25982	//       "pattern": "^projects/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
25983	//       "required": true,
25984	//       "type": "string"
25985	//     }
25986	//   },
25987	//   "path": "v2/{+name}",
25988	//   "response": {
25989	//     "$ref": "LogView"
25990	//   },
25991	//   "scopes": [
25992	//     "https://www.googleapis.com/auth/cloud-platform",
25993	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
25994	//     "https://www.googleapis.com/auth/logging.admin",
25995	//     "https://www.googleapis.com/auth/logging.read"
25996	//   ]
25997	// }
25998
25999}
26000
26001// method id "logging.projects.locations.buckets.views.list":
26002
26003type ProjectsLocationsBucketsViewsListCall struct {
26004	s            *Service
26005	parent       string
26006	urlParams_   gensupport.URLParams
26007	ifNoneMatch_ string
26008	ctx_         context.Context
26009	header_      http.Header
26010}
26011
26012// List: Lists views on a log bucket.
26013//
26014// - parent: The bucket whose views are to be listed:
26015//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
26016func (r *ProjectsLocationsBucketsViewsService) List(parent string) *ProjectsLocationsBucketsViewsListCall {
26017	c := &ProjectsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26018	c.parent = parent
26019	return c
26020}
26021
26022// PageSize sets the optional parameter "pageSize": The maximum number
26023// of results to return from this request.Non-positive values are
26024// ignored. The presence of nextPageToken in the response indicates that
26025// more results might be available.
26026func (c *ProjectsLocationsBucketsViewsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsViewsListCall {
26027	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26028	return c
26029}
26030
26031// PageToken sets the optional parameter "pageToken": If present, then
26032// retrieve the next batch of results from the preceding call to this
26033// method. pageToken must be the value of nextPageToken from the
26034// previous response. The values of other method parameters should be
26035// identical to those in the previous call.
26036func (c *ProjectsLocationsBucketsViewsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsViewsListCall {
26037	c.urlParams_.Set("pageToken", pageToken)
26038	return c
26039}
26040
26041// Fields allows partial responses to be retrieved. See
26042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26043// for more information.
26044func (c *ProjectsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsListCall {
26045	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26046	return c
26047}
26048
26049// IfNoneMatch sets the optional parameter which makes the operation
26050// fail if the object's ETag matches the given value. This is useful for
26051// getting updates only after the object has changed since the last
26052// request. Use googleapi.IsNotModified to check whether the response
26053// error from Do is the result of In-None-Match.
26054func (c *ProjectsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsListCall {
26055	c.ifNoneMatch_ = entityTag
26056	return c
26057}
26058
26059// Context sets the context to be used in this call's Do method. Any
26060// pending HTTP request will be aborted if the provided context is
26061// canceled.
26062func (c *ProjectsLocationsBucketsViewsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsListCall {
26063	c.ctx_ = ctx
26064	return c
26065}
26066
26067// Header returns an http.Header that can be modified by the caller to
26068// add HTTP headers to the request.
26069func (c *ProjectsLocationsBucketsViewsListCall) Header() http.Header {
26070	if c.header_ == nil {
26071		c.header_ = make(http.Header)
26072	}
26073	return c.header_
26074}
26075
26076func (c *ProjectsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
26077	reqHeaders := make(http.Header)
26078	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
26079	for k, v := range c.header_ {
26080		reqHeaders[k] = v
26081	}
26082	reqHeaders.Set("User-Agent", c.s.userAgent())
26083	if c.ifNoneMatch_ != "" {
26084		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26085	}
26086	var body io.Reader = nil
26087	c.urlParams_.Set("alt", alt)
26088	c.urlParams_.Set("prettyPrint", "false")
26089	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
26090	urls += "?" + c.urlParams_.Encode()
26091	req, err := http.NewRequest("GET", urls, body)
26092	if err != nil {
26093		return nil, err
26094	}
26095	req.Header = reqHeaders
26096	googleapi.Expand(req.URL, map[string]string{
26097		"parent": c.parent,
26098	})
26099	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26100}
26101
26102// Do executes the "logging.projects.locations.buckets.views.list" call.
26103// Exactly one of *ListViewsResponse or error will be non-nil. Any
26104// non-2xx status code is an error. Response headers are in either
26105// *ListViewsResponse.ServerResponse.Header or (if a response was
26106// returned at all) in error.(*googleapi.Error).Header. Use
26107// googleapi.IsNotModified to check whether the returned error was
26108// because http.StatusNotModified was returned.
26109func (c *ProjectsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
26110	gensupport.SetOptions(c.urlParams_, opts...)
26111	res, err := c.doRequest("json")
26112	if res != nil && res.StatusCode == http.StatusNotModified {
26113		if res.Body != nil {
26114			res.Body.Close()
26115		}
26116		return nil, &googleapi.Error{
26117			Code:   res.StatusCode,
26118			Header: res.Header,
26119		}
26120	}
26121	if err != nil {
26122		return nil, err
26123	}
26124	defer googleapi.CloseBody(res)
26125	if err := googleapi.CheckResponse(res); err != nil {
26126		return nil, err
26127	}
26128	ret := &ListViewsResponse{
26129		ServerResponse: googleapi.ServerResponse{
26130			Header:         res.Header,
26131			HTTPStatusCode: res.StatusCode,
26132		},
26133	}
26134	target := &ret
26135	if err := gensupport.DecodeResponse(target, res); err != nil {
26136		return nil, err
26137	}
26138	return ret, nil
26139	// {
26140	//   "description": "Lists views on a log bucket.",
26141	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views",
26142	//   "httpMethod": "GET",
26143	//   "id": "logging.projects.locations.buckets.views.list",
26144	//   "parameterOrder": [
26145	//     "parent"
26146	//   ],
26147	//   "parameters": {
26148	//     "pageSize": {
26149	//       "description": "Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
26150	//       "format": "int32",
26151	//       "location": "query",
26152	//       "type": "integer"
26153	//     },
26154	//     "pageToken": {
26155	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
26156	//       "location": "query",
26157	//       "type": "string"
26158	//     },
26159	//     "parent": {
26160	//       "description": "Required. The bucket whose views are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]\" ",
26161	//       "location": "path",
26162	//       "pattern": "^projects/[^/]+/locations/[^/]+/buckets/[^/]+$",
26163	//       "required": true,
26164	//       "type": "string"
26165	//     }
26166	//   },
26167	//   "path": "v2/{+parent}/views",
26168	//   "response": {
26169	//     "$ref": "ListViewsResponse"
26170	//   },
26171	//   "scopes": [
26172	//     "https://www.googleapis.com/auth/cloud-platform",
26173	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
26174	//     "https://www.googleapis.com/auth/logging.admin",
26175	//     "https://www.googleapis.com/auth/logging.read"
26176	//   ]
26177	// }
26178
26179}
26180
26181// Pages invokes f for each page of results.
26182// A non-nil error returned from f will halt the iteration.
26183// The provided context supersedes any context provided to the Context method.
26184func (c *ProjectsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
26185	c.ctx_ = ctx
26186	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26187	for {
26188		x, err := c.Do()
26189		if err != nil {
26190			return err
26191		}
26192		if err := f(x); err != nil {
26193			return err
26194		}
26195		if x.NextPageToken == "" {
26196			return nil
26197		}
26198		c.PageToken(x.NextPageToken)
26199	}
26200}
26201
26202// method id "logging.projects.locations.buckets.views.patch":
26203
26204type ProjectsLocationsBucketsViewsPatchCall struct {
26205	s          *Service
26206	name       string
26207	logview    *LogView
26208	urlParams_ gensupport.URLParams
26209	ctx_       context.Context
26210	header_    http.Header
26211}
26212
26213// Patch: Updates a view on a log bucket. This method replaces the
26214// following fields in the existing view with values from the new view:
26215// filter.
26216//
26217// - name: The full resource name of the view to update
26218//   "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
26219//   iews/[VIEW_ID]" For
26220//   example:"projects/my-project/locations/global/buckets/my-bucket/view
26221//   s/my-view".
26222func (r *ProjectsLocationsBucketsViewsService) Patch(name string, logview *LogView) *ProjectsLocationsBucketsViewsPatchCall {
26223	c := &ProjectsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26224	c.name = name
26225	c.logview = logview
26226	return c
26227}
26228
26229// UpdateMask sets the optional parameter "updateMask": Field mask that
26230// specifies the fields in view that need an update. A field will be
26231// overwritten if, and only if, it is in the update mask. name and
26232// output only fields cannot be updated.For a detailed FieldMask
26233// definition, see
26234// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
26235// example: updateMask=filter
26236func (c *ProjectsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsViewsPatchCall {
26237	c.urlParams_.Set("updateMask", updateMask)
26238	return c
26239}
26240
26241// Fields allows partial responses to be retrieved. See
26242// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26243// for more information.
26244func (c *ProjectsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsPatchCall {
26245	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26246	return c
26247}
26248
26249// Context sets the context to be used in this call's Do method. Any
26250// pending HTTP request will be aborted if the provided context is
26251// canceled.
26252func (c *ProjectsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsPatchCall {
26253	c.ctx_ = ctx
26254	return c
26255}
26256
26257// Header returns an http.Header that can be modified by the caller to
26258// add HTTP headers to the request.
26259func (c *ProjectsLocationsBucketsViewsPatchCall) Header() http.Header {
26260	if c.header_ == nil {
26261		c.header_ = make(http.Header)
26262	}
26263	return c.header_
26264}
26265
26266func (c *ProjectsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
26267	reqHeaders := make(http.Header)
26268	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
26269	for k, v := range c.header_ {
26270		reqHeaders[k] = v
26271	}
26272	reqHeaders.Set("User-Agent", c.s.userAgent())
26273	var body io.Reader = nil
26274	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
26275	if err != nil {
26276		return nil, err
26277	}
26278	reqHeaders.Set("Content-Type", "application/json")
26279	c.urlParams_.Set("alt", alt)
26280	c.urlParams_.Set("prettyPrint", "false")
26281	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
26282	urls += "?" + c.urlParams_.Encode()
26283	req, err := http.NewRequest("PATCH", urls, body)
26284	if err != nil {
26285		return nil, err
26286	}
26287	req.Header = reqHeaders
26288	googleapi.Expand(req.URL, map[string]string{
26289		"name": c.name,
26290	})
26291	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26292}
26293
26294// Do executes the "logging.projects.locations.buckets.views.patch" call.
26295// Exactly one of *LogView or error will be non-nil. Any non-2xx status
26296// code is an error. Response headers are in either
26297// *LogView.ServerResponse.Header or (if a response was returned at all)
26298// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
26299// check whether the returned error was because http.StatusNotModified
26300// was returned.
26301func (c *ProjectsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
26302	gensupport.SetOptions(c.urlParams_, opts...)
26303	res, err := c.doRequest("json")
26304	if res != nil && res.StatusCode == http.StatusNotModified {
26305		if res.Body != nil {
26306			res.Body.Close()
26307		}
26308		return nil, &googleapi.Error{
26309			Code:   res.StatusCode,
26310			Header: res.Header,
26311		}
26312	}
26313	if err != nil {
26314		return nil, err
26315	}
26316	defer googleapi.CloseBody(res)
26317	if err := googleapi.CheckResponse(res); err != nil {
26318		return nil, err
26319	}
26320	ret := &LogView{
26321		ServerResponse: googleapi.ServerResponse{
26322			Header:         res.Header,
26323			HTTPStatusCode: res.StatusCode,
26324		},
26325	}
26326	target := &ret
26327	if err := gensupport.DecodeResponse(target, res); err != nil {
26328		return nil, err
26329	}
26330	return ret, nil
26331	// {
26332	//   "description": "Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter.",
26333	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}",
26334	//   "httpMethod": "PATCH",
26335	//   "id": "logging.projects.locations.buckets.views.patch",
26336	//   "parameterOrder": [
26337	//     "name"
26338	//   ],
26339	//   "parameters": {
26340	//     "name": {
26341	//       "description": "Required. The full resource name of the view to update \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\" For example:\"projects/my-project/locations/global/buckets/my-bucket/views/my-view\"",
26342	//       "location": "path",
26343	//       "pattern": "^projects/[^/]+/locations/[^/]+/buckets/[^/]+/views/[^/]+$",
26344	//       "required": true,
26345	//       "type": "string"
26346	//     },
26347	//     "updateMask": {
26348	//       "description": "Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
26349	//       "format": "google-fieldmask",
26350	//       "location": "query",
26351	//       "type": "string"
26352	//     }
26353	//   },
26354	//   "path": "v2/{+name}",
26355	//   "request": {
26356	//     "$ref": "LogView"
26357	//   },
26358	//   "response": {
26359	//     "$ref": "LogView"
26360	//   },
26361	//   "scopes": [
26362	//     "https://www.googleapis.com/auth/cloud-platform",
26363	//     "https://www.googleapis.com/auth/logging.admin"
26364	//   ]
26365	// }
26366
26367}
26368
26369// method id "logging.projects.locations.operations.cancel":
26370
26371type ProjectsLocationsOperationsCancelCall struct {
26372	s                      *Service
26373	name                   string
26374	canceloperationrequest *CancelOperationRequest
26375	urlParams_             gensupport.URLParams
26376	ctx_                   context.Context
26377	header_                http.Header
26378}
26379
26380// Cancel: Starts asynchronous cancellation on a long-running operation.
26381// The server makes a best effort to cancel the operation, but success
26382// is not guaranteed. If the server doesn't support this method, it
26383// returns google.rpc.Code.UNIMPLEMENTED. Clients can use
26384// Operations.GetOperation or other methods to check whether the
26385// cancellation succeeded or whether the operation completed despite
26386// cancellation. On successful cancellation, the operation is not
26387// deleted; instead, it becomes an operation with an Operation.error
26388// value with a google.rpc.Status.code of 1, corresponding to
26389// Code.CANCELLED.
26390//
26391// - name: The name of the operation resource to be cancelled.
26392func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
26393	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26394	c.name = name
26395	c.canceloperationrequest = canceloperationrequest
26396	return c
26397}
26398
26399// Fields allows partial responses to be retrieved. See
26400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26401// for more information.
26402func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
26403	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26404	return c
26405}
26406
26407// Context sets the context to be used in this call's Do method. Any
26408// pending HTTP request will be aborted if the provided context is
26409// canceled.
26410func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
26411	c.ctx_ = ctx
26412	return c
26413}
26414
26415// Header returns an http.Header that can be modified by the caller to
26416// add HTTP headers to the request.
26417func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
26418	if c.header_ == nil {
26419		c.header_ = make(http.Header)
26420	}
26421	return c.header_
26422}
26423
26424func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
26425	reqHeaders := make(http.Header)
26426	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
26427	for k, v := range c.header_ {
26428		reqHeaders[k] = v
26429	}
26430	reqHeaders.Set("User-Agent", c.s.userAgent())
26431	var body io.Reader = nil
26432	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
26433	if err != nil {
26434		return nil, err
26435	}
26436	reqHeaders.Set("Content-Type", "application/json")
26437	c.urlParams_.Set("alt", alt)
26438	c.urlParams_.Set("prettyPrint", "false")
26439	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
26440	urls += "?" + c.urlParams_.Encode()
26441	req, err := http.NewRequest("POST", urls, body)
26442	if err != nil {
26443		return nil, err
26444	}
26445	req.Header = reqHeaders
26446	googleapi.Expand(req.URL, map[string]string{
26447		"name": c.name,
26448	})
26449	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26450}
26451
26452// Do executes the "logging.projects.locations.operations.cancel" call.
26453// Exactly one of *Empty or error will be non-nil. Any non-2xx status
26454// code is an error. Response headers are in either
26455// *Empty.ServerResponse.Header or (if a response was returned at all)
26456// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
26457// check whether the returned error was because http.StatusNotModified
26458// was returned.
26459func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
26460	gensupport.SetOptions(c.urlParams_, opts...)
26461	res, err := c.doRequest("json")
26462	if res != nil && res.StatusCode == http.StatusNotModified {
26463		if res.Body != nil {
26464			res.Body.Close()
26465		}
26466		return nil, &googleapi.Error{
26467			Code:   res.StatusCode,
26468			Header: res.Header,
26469		}
26470	}
26471	if err != nil {
26472		return nil, err
26473	}
26474	defer googleapi.CloseBody(res)
26475	if err := googleapi.CheckResponse(res); err != nil {
26476		return nil, err
26477	}
26478	ret := &Empty{
26479		ServerResponse: googleapi.ServerResponse{
26480			Header:         res.Header,
26481			HTTPStatusCode: res.StatusCode,
26482		},
26483	}
26484	target := &ret
26485	if err := gensupport.DecodeResponse(target, res); err != nil {
26486		return nil, err
26487	}
26488	return ret, nil
26489	// {
26490	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.",
26491	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
26492	//   "httpMethod": "POST",
26493	//   "id": "logging.projects.locations.operations.cancel",
26494	//   "parameterOrder": [
26495	//     "name"
26496	//   ],
26497	//   "parameters": {
26498	//     "name": {
26499	//       "description": "The name of the operation resource to be cancelled.",
26500	//       "location": "path",
26501	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
26502	//       "required": true,
26503	//       "type": "string"
26504	//     }
26505	//   },
26506	//   "path": "v2/{+name}:cancel",
26507	//   "request": {
26508	//     "$ref": "CancelOperationRequest"
26509	//   },
26510	//   "response": {
26511	//     "$ref": "Empty"
26512	//   },
26513	//   "scopes": [
26514	//     "https://www.googleapis.com/auth/cloud-platform",
26515	//     "https://www.googleapis.com/auth/logging.admin"
26516	//   ]
26517	// }
26518
26519}
26520
26521// method id "logging.projects.locations.operations.get":
26522
26523type ProjectsLocationsOperationsGetCall struct {
26524	s            *Service
26525	name         string
26526	urlParams_   gensupport.URLParams
26527	ifNoneMatch_ string
26528	ctx_         context.Context
26529	header_      http.Header
26530}
26531
26532// Get: Gets the latest state of a long-running operation. Clients can
26533// use this method to poll the operation result at intervals as
26534// recommended by the API service.
26535//
26536// - name: The name of the operation resource.
26537func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
26538	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26539	c.name = name
26540	return c
26541}
26542
26543// Fields allows partial responses to be retrieved. See
26544// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26545// for more information.
26546func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
26547	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26548	return c
26549}
26550
26551// IfNoneMatch sets the optional parameter which makes the operation
26552// fail if the object's ETag matches the given value. This is useful for
26553// getting updates only after the object has changed since the last
26554// request. Use googleapi.IsNotModified to check whether the response
26555// error from Do is the result of In-None-Match.
26556func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
26557	c.ifNoneMatch_ = entityTag
26558	return c
26559}
26560
26561// Context sets the context to be used in this call's Do method. Any
26562// pending HTTP request will be aborted if the provided context is
26563// canceled.
26564func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
26565	c.ctx_ = ctx
26566	return c
26567}
26568
26569// Header returns an http.Header that can be modified by the caller to
26570// add HTTP headers to the request.
26571func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
26572	if c.header_ == nil {
26573		c.header_ = make(http.Header)
26574	}
26575	return c.header_
26576}
26577
26578func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
26579	reqHeaders := make(http.Header)
26580	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
26581	for k, v := range c.header_ {
26582		reqHeaders[k] = v
26583	}
26584	reqHeaders.Set("User-Agent", c.s.userAgent())
26585	if c.ifNoneMatch_ != "" {
26586		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26587	}
26588	var body io.Reader = nil
26589	c.urlParams_.Set("alt", alt)
26590	c.urlParams_.Set("prettyPrint", "false")
26591	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
26592	urls += "?" + c.urlParams_.Encode()
26593	req, err := http.NewRequest("GET", urls, body)
26594	if err != nil {
26595		return nil, err
26596	}
26597	req.Header = reqHeaders
26598	googleapi.Expand(req.URL, map[string]string{
26599		"name": c.name,
26600	})
26601	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26602}
26603
26604// Do executes the "logging.projects.locations.operations.get" call.
26605// Exactly one of *Operation or error will be non-nil. Any non-2xx
26606// status code is an error. Response headers are in either
26607// *Operation.ServerResponse.Header or (if a response was returned at
26608// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26609// to check whether the returned error was because
26610// http.StatusNotModified was returned.
26611func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26612	gensupport.SetOptions(c.urlParams_, opts...)
26613	res, err := c.doRequest("json")
26614	if res != nil && res.StatusCode == http.StatusNotModified {
26615		if res.Body != nil {
26616			res.Body.Close()
26617		}
26618		return nil, &googleapi.Error{
26619			Code:   res.StatusCode,
26620			Header: res.Header,
26621		}
26622	}
26623	if err != nil {
26624		return nil, err
26625	}
26626	defer googleapi.CloseBody(res)
26627	if err := googleapi.CheckResponse(res); err != nil {
26628		return nil, err
26629	}
26630	ret := &Operation{
26631		ServerResponse: googleapi.ServerResponse{
26632			Header:         res.Header,
26633			HTTPStatusCode: res.StatusCode,
26634		},
26635	}
26636	target := &ret
26637	if err := gensupport.DecodeResponse(target, res); err != nil {
26638		return nil, err
26639	}
26640	return ret, nil
26641	// {
26642	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
26643	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
26644	//   "httpMethod": "GET",
26645	//   "id": "logging.projects.locations.operations.get",
26646	//   "parameterOrder": [
26647	//     "name"
26648	//   ],
26649	//   "parameters": {
26650	//     "name": {
26651	//       "description": "The name of the operation resource.",
26652	//       "location": "path",
26653	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
26654	//       "required": true,
26655	//       "type": "string"
26656	//     }
26657	//   },
26658	//   "path": "v2/{+name}",
26659	//   "response": {
26660	//     "$ref": "Operation"
26661	//   },
26662	//   "scopes": [
26663	//     "https://www.googleapis.com/auth/cloud-platform",
26664	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
26665	//     "https://www.googleapis.com/auth/logging.admin",
26666	//     "https://www.googleapis.com/auth/logging.read"
26667	//   ]
26668	// }
26669
26670}
26671
26672// method id "logging.projects.locations.operations.list":
26673
26674type ProjectsLocationsOperationsListCall struct {
26675	s            *Service
26676	name         string
26677	urlParams_   gensupport.URLParams
26678	ifNoneMatch_ string
26679	ctx_         context.Context
26680	header_      http.Header
26681}
26682
26683// List: Lists operations that match the specified filter in the
26684// request. If the server doesn't support this method, it returns
26685// UNIMPLEMENTED.NOTE: the name binding allows API services to override
26686// the binding to use different resource name schemes, such as
26687// users/*/operations. To override the binding, API services can add a
26688// binding such as "/v1/{name=users/*}/operations" to their service
26689// configuration. For backwards compatibility, the default name includes
26690// the operations collection id, however overriding users must ensure
26691// the name binding is the parent resource, without the operations
26692// collection id.
26693//
26694// - name: The name of the operation's parent resource.
26695func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
26696	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26697	c.name = name
26698	return c
26699}
26700
26701// Filter sets the optional parameter "filter": The standard list
26702// filter.
26703func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
26704	c.urlParams_.Set("filter", filter)
26705	return c
26706}
26707
26708// PageSize sets the optional parameter "pageSize": The standard list
26709// page size.
26710func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
26711	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26712	return c
26713}
26714
26715// PageToken sets the optional parameter "pageToken": The standard list
26716// page token.
26717func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
26718	c.urlParams_.Set("pageToken", pageToken)
26719	return c
26720}
26721
26722// Fields allows partial responses to be retrieved. See
26723// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26724// for more information.
26725func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
26726	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26727	return c
26728}
26729
26730// IfNoneMatch sets the optional parameter which makes the operation
26731// fail if the object's ETag matches the given value. This is useful for
26732// getting updates only after the object has changed since the last
26733// request. Use googleapi.IsNotModified to check whether the response
26734// error from Do is the result of In-None-Match.
26735func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
26736	c.ifNoneMatch_ = entityTag
26737	return c
26738}
26739
26740// Context sets the context to be used in this call's Do method. Any
26741// pending HTTP request will be aborted if the provided context is
26742// canceled.
26743func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
26744	c.ctx_ = ctx
26745	return c
26746}
26747
26748// Header returns an http.Header that can be modified by the caller to
26749// add HTTP headers to the request.
26750func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
26751	if c.header_ == nil {
26752		c.header_ = make(http.Header)
26753	}
26754	return c.header_
26755}
26756
26757func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
26758	reqHeaders := make(http.Header)
26759	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
26760	for k, v := range c.header_ {
26761		reqHeaders[k] = v
26762	}
26763	reqHeaders.Set("User-Agent", c.s.userAgent())
26764	if c.ifNoneMatch_ != "" {
26765		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26766	}
26767	var body io.Reader = nil
26768	c.urlParams_.Set("alt", alt)
26769	c.urlParams_.Set("prettyPrint", "false")
26770	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
26771	urls += "?" + c.urlParams_.Encode()
26772	req, err := http.NewRequest("GET", urls, body)
26773	if err != nil {
26774		return nil, err
26775	}
26776	req.Header = reqHeaders
26777	googleapi.Expand(req.URL, map[string]string{
26778		"name": c.name,
26779	})
26780	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26781}
26782
26783// Do executes the "logging.projects.locations.operations.list" call.
26784// Exactly one of *ListOperationsResponse or error will be non-nil. Any
26785// non-2xx status code is an error. Response headers are in either
26786// *ListOperationsResponse.ServerResponse.Header or (if a response was
26787// returned at all) in error.(*googleapi.Error).Header. Use
26788// googleapi.IsNotModified to check whether the returned error was
26789// because http.StatusNotModified was returned.
26790func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
26791	gensupport.SetOptions(c.urlParams_, opts...)
26792	res, err := c.doRequest("json")
26793	if res != nil && res.StatusCode == http.StatusNotModified {
26794		if res.Body != nil {
26795			res.Body.Close()
26796		}
26797		return nil, &googleapi.Error{
26798			Code:   res.StatusCode,
26799			Header: res.Header,
26800		}
26801	}
26802	if err != nil {
26803		return nil, err
26804	}
26805	defer googleapi.CloseBody(res)
26806	if err := googleapi.CheckResponse(res); err != nil {
26807		return nil, err
26808	}
26809	ret := &ListOperationsResponse{
26810		ServerResponse: googleapi.ServerResponse{
26811			Header:         res.Header,
26812			HTTPStatusCode: res.StatusCode,
26813		},
26814	}
26815	target := &ret
26816	if err := gensupport.DecodeResponse(target, res); err != nil {
26817		return nil, err
26818	}
26819	return ret, nil
26820	// {
26821	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
26822	//   "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations",
26823	//   "httpMethod": "GET",
26824	//   "id": "logging.projects.locations.operations.list",
26825	//   "parameterOrder": [
26826	//     "name"
26827	//   ],
26828	//   "parameters": {
26829	//     "filter": {
26830	//       "description": "The standard list filter.",
26831	//       "location": "query",
26832	//       "type": "string"
26833	//     },
26834	//     "name": {
26835	//       "description": "The name of the operation's parent resource.",
26836	//       "location": "path",
26837	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
26838	//       "required": true,
26839	//       "type": "string"
26840	//     },
26841	//     "pageSize": {
26842	//       "description": "The standard list page size.",
26843	//       "format": "int32",
26844	//       "location": "query",
26845	//       "type": "integer"
26846	//     },
26847	//     "pageToken": {
26848	//       "description": "The standard list page token.",
26849	//       "location": "query",
26850	//       "type": "string"
26851	//     }
26852	//   },
26853	//   "path": "v2/{+name}/operations",
26854	//   "response": {
26855	//     "$ref": "ListOperationsResponse"
26856	//   },
26857	//   "scopes": [
26858	//     "https://www.googleapis.com/auth/cloud-platform",
26859	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
26860	//     "https://www.googleapis.com/auth/logging.admin",
26861	//     "https://www.googleapis.com/auth/logging.read"
26862	//   ]
26863	// }
26864
26865}
26866
26867// Pages invokes f for each page of results.
26868// A non-nil error returned from f will halt the iteration.
26869// The provided context supersedes any context provided to the Context method.
26870func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
26871	c.ctx_ = ctx
26872	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26873	for {
26874		x, err := c.Do()
26875		if err != nil {
26876			return err
26877		}
26878		if err := f(x); err != nil {
26879			return err
26880		}
26881		if x.NextPageToken == "" {
26882			return nil
26883		}
26884		c.PageToken(x.NextPageToken)
26885	}
26886}
26887
26888// method id "logging.projects.logs.delete":
26889
26890type ProjectsLogsDeleteCall struct {
26891	s          *Service
26892	logName    string
26893	urlParams_ gensupport.URLParams
26894	ctx_       context.Context
26895	header_    http.Header
26896}
26897
26898// Delete: Deletes all the log entries in a log for the _Default Log
26899// Bucket. The log reappears if it receives new entries. Log entries
26900// written shortly before the delete operation might not be deleted.
26901// Entries received after the delete operation with a timestamp before
26902// the operation will be deleted.
26903//
26904// - logName: The resource name of the log to delete:
26905//   projects/[PROJECT_ID]/logs/[LOG_ID]
26906//   organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
26907//   billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
26908//   folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
26909//   example, "projects/my-project-id/logs/syslog",
26910//   "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For
26911//   more information about log names, see LogEntry.
26912func (r *ProjectsLogsService) Delete(logName string) *ProjectsLogsDeleteCall {
26913	c := &ProjectsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26914	c.logName = logName
26915	return c
26916}
26917
26918// Fields allows partial responses to be retrieved. See
26919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26920// for more information.
26921func (c *ProjectsLogsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLogsDeleteCall {
26922	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26923	return c
26924}
26925
26926// Context sets the context to be used in this call's Do method. Any
26927// pending HTTP request will be aborted if the provided context is
26928// canceled.
26929func (c *ProjectsLogsDeleteCall) Context(ctx context.Context) *ProjectsLogsDeleteCall {
26930	c.ctx_ = ctx
26931	return c
26932}
26933
26934// Header returns an http.Header that can be modified by the caller to
26935// add HTTP headers to the request.
26936func (c *ProjectsLogsDeleteCall) Header() http.Header {
26937	if c.header_ == nil {
26938		c.header_ = make(http.Header)
26939	}
26940	return c.header_
26941}
26942
26943func (c *ProjectsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
26944	reqHeaders := make(http.Header)
26945	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
26946	for k, v := range c.header_ {
26947		reqHeaders[k] = v
26948	}
26949	reqHeaders.Set("User-Agent", c.s.userAgent())
26950	var body io.Reader = nil
26951	c.urlParams_.Set("alt", alt)
26952	c.urlParams_.Set("prettyPrint", "false")
26953	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
26954	urls += "?" + c.urlParams_.Encode()
26955	req, err := http.NewRequest("DELETE", urls, body)
26956	if err != nil {
26957		return nil, err
26958	}
26959	req.Header = reqHeaders
26960	googleapi.Expand(req.URL, map[string]string{
26961		"logName": c.logName,
26962	})
26963	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26964}
26965
26966// Do executes the "logging.projects.logs.delete" call.
26967// Exactly one of *Empty or error will be non-nil. Any non-2xx status
26968// code is an error. Response headers are in either
26969// *Empty.ServerResponse.Header or (if a response was returned at all)
26970// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
26971// check whether the returned error was because http.StatusNotModified
26972// was returned.
26973func (c *ProjectsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
26974	gensupport.SetOptions(c.urlParams_, opts...)
26975	res, err := c.doRequest("json")
26976	if res != nil && res.StatusCode == http.StatusNotModified {
26977		if res.Body != nil {
26978			res.Body.Close()
26979		}
26980		return nil, &googleapi.Error{
26981			Code:   res.StatusCode,
26982			Header: res.Header,
26983		}
26984	}
26985	if err != nil {
26986		return nil, err
26987	}
26988	defer googleapi.CloseBody(res)
26989	if err := googleapi.CheckResponse(res); err != nil {
26990		return nil, err
26991	}
26992	ret := &Empty{
26993		ServerResponse: googleapi.ServerResponse{
26994			Header:         res.Header,
26995			HTTPStatusCode: res.StatusCode,
26996		},
26997	}
26998	target := &ret
26999	if err := gensupport.DecodeResponse(target, res); err != nil {
27000		return nil, err
27001	}
27002	return ret, nil
27003	// {
27004	//   "description": "Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.",
27005	//   "flatPath": "v2/projects/{projectsId}/logs/{logsId}",
27006	//   "httpMethod": "DELETE",
27007	//   "id": "logging.projects.logs.delete",
27008	//   "parameterOrder": [
27009	//     "logName"
27010	//   ],
27011	//   "parameters": {
27012	//     "logName": {
27013	//       "description": "Required. The resource name of the log to delete: projects/[PROJECT_ID]/logs/[LOG_ID] organizations/[ORGANIZATION_ID]/logs/[LOG_ID] billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/123/logs/cloudaudit.googleapis.com%2Factivity\".For more information about log names, see LogEntry.",
27014	//       "location": "path",
27015	//       "pattern": "^projects/[^/]+/logs/[^/]+$",
27016	//       "required": true,
27017	//       "type": "string"
27018	//     }
27019	//   },
27020	//   "path": "v2/{+logName}",
27021	//   "response": {
27022	//     "$ref": "Empty"
27023	//   },
27024	//   "scopes": [
27025	//     "https://www.googleapis.com/auth/cloud-platform",
27026	//     "https://www.googleapis.com/auth/logging.admin"
27027	//   ]
27028	// }
27029
27030}
27031
27032// method id "logging.projects.logs.list":
27033
27034type ProjectsLogsListCall struct {
27035	s            *Service
27036	parent       string
27037	urlParams_   gensupport.URLParams
27038	ifNoneMatch_ string
27039	ctx_         context.Context
27040	header_      http.Header
27041}
27042
27043// List: Lists the logs in projects, organizations, folders, or billing
27044// accounts. Only logs that have entries are listed.
27045//
27046// - parent: The resource name that owns the logs: projects/[PROJECT_ID]
27047//   organizations/[ORGANIZATION_ID]
27048//   billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID].
27049func (r *ProjectsLogsService) List(parent string) *ProjectsLogsListCall {
27050	c := &ProjectsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27051	c.parent = parent
27052	return c
27053}
27054
27055// PageSize sets the optional parameter "pageSize": The maximum number
27056// of results to return from this request. Non-positive values are
27057// ignored. The presence of nextPageToken in the response indicates that
27058// more results might be available.
27059func (c *ProjectsLogsListCall) PageSize(pageSize int64) *ProjectsLogsListCall {
27060	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27061	return c
27062}
27063
27064// PageToken sets the optional parameter "pageToken": If present, then
27065// retrieve the next batch of results from the preceding call to this
27066// method. pageToken must be the value of nextPageToken from the
27067// previous response. The values of other method parameters should be
27068// identical to those in the previous call.
27069func (c *ProjectsLogsListCall) PageToken(pageToken string) *ProjectsLogsListCall {
27070	c.urlParams_.Set("pageToken", pageToken)
27071	return c
27072}
27073
27074// ResourceNames sets the optional parameter "resourceNames": The
27075// resource name that owns the logs:
27076// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/view
27077// s/[VIEW_ID]
27078// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKE
27079// T_ID]/views/[VIEW_ID]
27080// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[
27081// BUCKET_ID]/views/[VIEW_ID]
27082// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/
27083// [VIEW_ID]To support legacy queries, it could also be:
27084// projects/[PROJECT_ID] organizations/[ORGANIZATION_ID]
27085// billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]
27086func (c *ProjectsLogsListCall) ResourceNames(resourceNames ...string) *ProjectsLogsListCall {
27087	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
27088	return c
27089}
27090
27091// Fields allows partial responses to be retrieved. See
27092// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27093// for more information.
27094func (c *ProjectsLogsListCall) Fields(s ...googleapi.Field) *ProjectsLogsListCall {
27095	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27096	return c
27097}
27098
27099// IfNoneMatch sets the optional parameter which makes the operation
27100// fail if the object's ETag matches the given value. This is useful for
27101// getting updates only after the object has changed since the last
27102// request. Use googleapi.IsNotModified to check whether the response
27103// error from Do is the result of In-None-Match.
27104func (c *ProjectsLogsListCall) IfNoneMatch(entityTag string) *ProjectsLogsListCall {
27105	c.ifNoneMatch_ = entityTag
27106	return c
27107}
27108
27109// Context sets the context to be used in this call's Do method. Any
27110// pending HTTP request will be aborted if the provided context is
27111// canceled.
27112func (c *ProjectsLogsListCall) Context(ctx context.Context) *ProjectsLogsListCall {
27113	c.ctx_ = ctx
27114	return c
27115}
27116
27117// Header returns an http.Header that can be modified by the caller to
27118// add HTTP headers to the request.
27119func (c *ProjectsLogsListCall) Header() http.Header {
27120	if c.header_ == nil {
27121		c.header_ = make(http.Header)
27122	}
27123	return c.header_
27124}
27125
27126func (c *ProjectsLogsListCall) doRequest(alt string) (*http.Response, error) {
27127	reqHeaders := make(http.Header)
27128	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
27129	for k, v := range c.header_ {
27130		reqHeaders[k] = v
27131	}
27132	reqHeaders.Set("User-Agent", c.s.userAgent())
27133	if c.ifNoneMatch_ != "" {
27134		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27135	}
27136	var body io.Reader = nil
27137	c.urlParams_.Set("alt", alt)
27138	c.urlParams_.Set("prettyPrint", "false")
27139	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
27140	urls += "?" + c.urlParams_.Encode()
27141	req, err := http.NewRequest("GET", urls, body)
27142	if err != nil {
27143		return nil, err
27144	}
27145	req.Header = reqHeaders
27146	googleapi.Expand(req.URL, map[string]string{
27147		"parent": c.parent,
27148	})
27149	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27150}
27151
27152// Do executes the "logging.projects.logs.list" call.
27153// Exactly one of *ListLogsResponse or error will be non-nil. Any
27154// non-2xx status code is an error. Response headers are in either
27155// *ListLogsResponse.ServerResponse.Header or (if a response was
27156// returned at all) in error.(*googleapi.Error).Header. Use
27157// googleapi.IsNotModified to check whether the returned error was
27158// because http.StatusNotModified was returned.
27159func (c *ProjectsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
27160	gensupport.SetOptions(c.urlParams_, opts...)
27161	res, err := c.doRequest("json")
27162	if res != nil && res.StatusCode == http.StatusNotModified {
27163		if res.Body != nil {
27164			res.Body.Close()
27165		}
27166		return nil, &googleapi.Error{
27167			Code:   res.StatusCode,
27168			Header: res.Header,
27169		}
27170	}
27171	if err != nil {
27172		return nil, err
27173	}
27174	defer googleapi.CloseBody(res)
27175	if err := googleapi.CheckResponse(res); err != nil {
27176		return nil, err
27177	}
27178	ret := &ListLogsResponse{
27179		ServerResponse: googleapi.ServerResponse{
27180			Header:         res.Header,
27181			HTTPStatusCode: res.StatusCode,
27182		},
27183	}
27184	target := &ret
27185	if err := gensupport.DecodeResponse(target, res); err != nil {
27186		return nil, err
27187	}
27188	return ret, nil
27189	// {
27190	//   "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.",
27191	//   "flatPath": "v2/projects/{projectsId}/logs",
27192	//   "httpMethod": "GET",
27193	//   "id": "logging.projects.logs.list",
27194	//   "parameterOrder": [
27195	//     "parent"
27196	//   ],
27197	//   "parameters": {
27198	//     "pageSize": {
27199	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
27200	//       "format": "int32",
27201	//       "location": "query",
27202	//       "type": "integer"
27203	//     },
27204	//     "pageToken": {
27205	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
27206	//       "location": "query",
27207	//       "type": "string"
27208	//     },
27209	//     "parent": {
27210	//       "description": "Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]",
27211	//       "location": "path",
27212	//       "pattern": "^projects/[^/]+$",
27213	//       "required": true,
27214	//       "type": "string"
27215	//     },
27216	//     "resourceNames": {
27217	//       "description": "Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]",
27218	//       "location": "query",
27219	//       "repeated": true,
27220	//       "type": "string"
27221	//     }
27222	//   },
27223	//   "path": "v2/{+parent}/logs",
27224	//   "response": {
27225	//     "$ref": "ListLogsResponse"
27226	//   },
27227	//   "scopes": [
27228	//     "https://www.googleapis.com/auth/cloud-platform",
27229	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
27230	//     "https://www.googleapis.com/auth/logging.admin",
27231	//     "https://www.googleapis.com/auth/logging.read"
27232	//   ]
27233	// }
27234
27235}
27236
27237// Pages invokes f for each page of results.
27238// A non-nil error returned from f will halt the iteration.
27239// The provided context supersedes any context provided to the Context method.
27240func (c *ProjectsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
27241	c.ctx_ = ctx
27242	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27243	for {
27244		x, err := c.Do()
27245		if err != nil {
27246			return err
27247		}
27248		if err := f(x); err != nil {
27249			return err
27250		}
27251		if x.NextPageToken == "" {
27252			return nil
27253		}
27254		c.PageToken(x.NextPageToken)
27255	}
27256}
27257
27258// method id "logging.projects.metrics.create":
27259
27260type ProjectsMetricsCreateCall struct {
27261	s          *Service
27262	parent     string
27263	logmetric  *LogMetric
27264	urlParams_ gensupport.URLParams
27265	ctx_       context.Context
27266	header_    http.Header
27267}
27268
27269// Create: Creates a logs-based metric.
27270//
27271// - parent: The resource name of the project in which to create the
27272//   metric: "projects/[PROJECT_ID]" The new metric must be provided in
27273//   the request.
27274func (r *ProjectsMetricsService) Create(parent string, logmetric *LogMetric) *ProjectsMetricsCreateCall {
27275	c := &ProjectsMetricsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27276	c.parent = parent
27277	c.logmetric = logmetric
27278	return c
27279}
27280
27281// Fields allows partial responses to be retrieved. See
27282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27283// for more information.
27284func (c *ProjectsMetricsCreateCall) Fields(s ...googleapi.Field) *ProjectsMetricsCreateCall {
27285	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27286	return c
27287}
27288
27289// Context sets the context to be used in this call's Do method. Any
27290// pending HTTP request will be aborted if the provided context is
27291// canceled.
27292func (c *ProjectsMetricsCreateCall) Context(ctx context.Context) *ProjectsMetricsCreateCall {
27293	c.ctx_ = ctx
27294	return c
27295}
27296
27297// Header returns an http.Header that can be modified by the caller to
27298// add HTTP headers to the request.
27299func (c *ProjectsMetricsCreateCall) Header() http.Header {
27300	if c.header_ == nil {
27301		c.header_ = make(http.Header)
27302	}
27303	return c.header_
27304}
27305
27306func (c *ProjectsMetricsCreateCall) doRequest(alt string) (*http.Response, error) {
27307	reqHeaders := make(http.Header)
27308	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
27309	for k, v := range c.header_ {
27310		reqHeaders[k] = v
27311	}
27312	reqHeaders.Set("User-Agent", c.s.userAgent())
27313	var body io.Reader = nil
27314	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logmetric)
27315	if err != nil {
27316		return nil, err
27317	}
27318	reqHeaders.Set("Content-Type", "application/json")
27319	c.urlParams_.Set("alt", alt)
27320	c.urlParams_.Set("prettyPrint", "false")
27321	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/metrics")
27322	urls += "?" + c.urlParams_.Encode()
27323	req, err := http.NewRequest("POST", urls, body)
27324	if err != nil {
27325		return nil, err
27326	}
27327	req.Header = reqHeaders
27328	googleapi.Expand(req.URL, map[string]string{
27329		"parent": c.parent,
27330	})
27331	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27332}
27333
27334// Do executes the "logging.projects.metrics.create" call.
27335// Exactly one of *LogMetric or error will be non-nil. Any non-2xx
27336// status code is an error. Response headers are in either
27337// *LogMetric.ServerResponse.Header or (if a response was returned at
27338// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27339// to check whether the returned error was because
27340// http.StatusNotModified was returned.
27341func (c *ProjectsMetricsCreateCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
27342	gensupport.SetOptions(c.urlParams_, opts...)
27343	res, err := c.doRequest("json")
27344	if res != nil && res.StatusCode == http.StatusNotModified {
27345		if res.Body != nil {
27346			res.Body.Close()
27347		}
27348		return nil, &googleapi.Error{
27349			Code:   res.StatusCode,
27350			Header: res.Header,
27351		}
27352	}
27353	if err != nil {
27354		return nil, err
27355	}
27356	defer googleapi.CloseBody(res)
27357	if err := googleapi.CheckResponse(res); err != nil {
27358		return nil, err
27359	}
27360	ret := &LogMetric{
27361		ServerResponse: googleapi.ServerResponse{
27362			Header:         res.Header,
27363			HTTPStatusCode: res.StatusCode,
27364		},
27365	}
27366	target := &ret
27367	if err := gensupport.DecodeResponse(target, res); err != nil {
27368		return nil, err
27369	}
27370	return ret, nil
27371	// {
27372	//   "description": "Creates a logs-based metric.",
27373	//   "flatPath": "v2/projects/{projectsId}/metrics",
27374	//   "httpMethod": "POST",
27375	//   "id": "logging.projects.metrics.create",
27376	//   "parameterOrder": [
27377	//     "parent"
27378	//   ],
27379	//   "parameters": {
27380	//     "parent": {
27381	//       "description": "Required. The resource name of the project in which to create the metric: \"projects/[PROJECT_ID]\" The new metric must be provided in the request.",
27382	//       "location": "path",
27383	//       "pattern": "^projects/[^/]+$",
27384	//       "required": true,
27385	//       "type": "string"
27386	//     }
27387	//   },
27388	//   "path": "v2/{+parent}/metrics",
27389	//   "request": {
27390	//     "$ref": "LogMetric"
27391	//   },
27392	//   "response": {
27393	//     "$ref": "LogMetric"
27394	//   },
27395	//   "scopes": [
27396	//     "https://www.googleapis.com/auth/cloud-platform",
27397	//     "https://www.googleapis.com/auth/logging.admin",
27398	//     "https://www.googleapis.com/auth/logging.write"
27399	//   ]
27400	// }
27401
27402}
27403
27404// method id "logging.projects.metrics.delete":
27405
27406type ProjectsMetricsDeleteCall struct {
27407	s          *Service
27408	metricName string
27409	urlParams_ gensupport.URLParams
27410	ctx_       context.Context
27411	header_    http.Header
27412}
27413
27414// Delete: Deletes a logs-based metric.
27415//
27416// - metricName: The resource name of the metric to delete:
27417//   "projects/[PROJECT_ID]/metrics/[METRIC_ID]".
27418func (r *ProjectsMetricsService) Delete(metricName string) *ProjectsMetricsDeleteCall {
27419	c := &ProjectsMetricsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27420	c.metricName = metricName
27421	return c
27422}
27423
27424// Fields allows partial responses to be retrieved. See
27425// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27426// for more information.
27427func (c *ProjectsMetricsDeleteCall) Fields(s ...googleapi.Field) *ProjectsMetricsDeleteCall {
27428	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27429	return c
27430}
27431
27432// Context sets the context to be used in this call's Do method. Any
27433// pending HTTP request will be aborted if the provided context is
27434// canceled.
27435func (c *ProjectsMetricsDeleteCall) Context(ctx context.Context) *ProjectsMetricsDeleteCall {
27436	c.ctx_ = ctx
27437	return c
27438}
27439
27440// Header returns an http.Header that can be modified by the caller to
27441// add HTTP headers to the request.
27442func (c *ProjectsMetricsDeleteCall) Header() http.Header {
27443	if c.header_ == nil {
27444		c.header_ = make(http.Header)
27445	}
27446	return c.header_
27447}
27448
27449func (c *ProjectsMetricsDeleteCall) doRequest(alt string) (*http.Response, error) {
27450	reqHeaders := make(http.Header)
27451	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
27452	for k, v := range c.header_ {
27453		reqHeaders[k] = v
27454	}
27455	reqHeaders.Set("User-Agent", c.s.userAgent())
27456	var body io.Reader = nil
27457	c.urlParams_.Set("alt", alt)
27458	c.urlParams_.Set("prettyPrint", "false")
27459	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
27460	urls += "?" + c.urlParams_.Encode()
27461	req, err := http.NewRequest("DELETE", urls, body)
27462	if err != nil {
27463		return nil, err
27464	}
27465	req.Header = reqHeaders
27466	googleapi.Expand(req.URL, map[string]string{
27467		"metricName": c.metricName,
27468	})
27469	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27470}
27471
27472// Do executes the "logging.projects.metrics.delete" call.
27473// Exactly one of *Empty or error will be non-nil. Any non-2xx status
27474// code is an error. Response headers are in either
27475// *Empty.ServerResponse.Header or (if a response was returned at all)
27476// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
27477// check whether the returned error was because http.StatusNotModified
27478// was returned.
27479func (c *ProjectsMetricsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
27480	gensupport.SetOptions(c.urlParams_, opts...)
27481	res, err := c.doRequest("json")
27482	if res != nil && res.StatusCode == http.StatusNotModified {
27483		if res.Body != nil {
27484			res.Body.Close()
27485		}
27486		return nil, &googleapi.Error{
27487			Code:   res.StatusCode,
27488			Header: res.Header,
27489		}
27490	}
27491	if err != nil {
27492		return nil, err
27493	}
27494	defer googleapi.CloseBody(res)
27495	if err := googleapi.CheckResponse(res); err != nil {
27496		return nil, err
27497	}
27498	ret := &Empty{
27499		ServerResponse: googleapi.ServerResponse{
27500			Header:         res.Header,
27501			HTTPStatusCode: res.StatusCode,
27502		},
27503	}
27504	target := &ret
27505	if err := gensupport.DecodeResponse(target, res); err != nil {
27506		return nil, err
27507	}
27508	return ret, nil
27509	// {
27510	//   "description": "Deletes a logs-based metric.",
27511	//   "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}",
27512	//   "httpMethod": "DELETE",
27513	//   "id": "logging.projects.metrics.delete",
27514	//   "parameterOrder": [
27515	//     "metricName"
27516	//   ],
27517	//   "parameters": {
27518	//     "metricName": {
27519	//       "description": "Required. The resource name of the metric to delete: \"projects/[PROJECT_ID]/metrics/[METRIC_ID]\" ",
27520	//       "location": "path",
27521	//       "pattern": "^projects/[^/]+/metrics/[^/]+$",
27522	//       "required": true,
27523	//       "type": "string"
27524	//     }
27525	//   },
27526	//   "path": "v2/{+metricName}",
27527	//   "response": {
27528	//     "$ref": "Empty"
27529	//   },
27530	//   "scopes": [
27531	//     "https://www.googleapis.com/auth/cloud-platform",
27532	//     "https://www.googleapis.com/auth/logging.admin",
27533	//     "https://www.googleapis.com/auth/logging.write"
27534	//   ]
27535	// }
27536
27537}
27538
27539// method id "logging.projects.metrics.get":
27540
27541type ProjectsMetricsGetCall struct {
27542	s            *Service
27543	metricName   string
27544	urlParams_   gensupport.URLParams
27545	ifNoneMatch_ string
27546	ctx_         context.Context
27547	header_      http.Header
27548}
27549
27550// Get: Gets a logs-based metric.
27551//
27552// - metricName: The resource name of the desired metric:
27553//   "projects/[PROJECT_ID]/metrics/[METRIC_ID]".
27554func (r *ProjectsMetricsService) Get(metricName string) *ProjectsMetricsGetCall {
27555	c := &ProjectsMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27556	c.metricName = metricName
27557	return c
27558}
27559
27560// Fields allows partial responses to be retrieved. See
27561// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27562// for more information.
27563func (c *ProjectsMetricsGetCall) Fields(s ...googleapi.Field) *ProjectsMetricsGetCall {
27564	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27565	return c
27566}
27567
27568// IfNoneMatch sets the optional parameter which makes the operation
27569// fail if the object's ETag matches the given value. This is useful for
27570// getting updates only after the object has changed since the last
27571// request. Use googleapi.IsNotModified to check whether the response
27572// error from Do is the result of In-None-Match.
27573func (c *ProjectsMetricsGetCall) IfNoneMatch(entityTag string) *ProjectsMetricsGetCall {
27574	c.ifNoneMatch_ = entityTag
27575	return c
27576}
27577
27578// Context sets the context to be used in this call's Do method. Any
27579// pending HTTP request will be aborted if the provided context is
27580// canceled.
27581func (c *ProjectsMetricsGetCall) Context(ctx context.Context) *ProjectsMetricsGetCall {
27582	c.ctx_ = ctx
27583	return c
27584}
27585
27586// Header returns an http.Header that can be modified by the caller to
27587// add HTTP headers to the request.
27588func (c *ProjectsMetricsGetCall) Header() http.Header {
27589	if c.header_ == nil {
27590		c.header_ = make(http.Header)
27591	}
27592	return c.header_
27593}
27594
27595func (c *ProjectsMetricsGetCall) doRequest(alt string) (*http.Response, error) {
27596	reqHeaders := make(http.Header)
27597	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
27598	for k, v := range c.header_ {
27599		reqHeaders[k] = v
27600	}
27601	reqHeaders.Set("User-Agent", c.s.userAgent())
27602	if c.ifNoneMatch_ != "" {
27603		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27604	}
27605	var body io.Reader = nil
27606	c.urlParams_.Set("alt", alt)
27607	c.urlParams_.Set("prettyPrint", "false")
27608	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
27609	urls += "?" + c.urlParams_.Encode()
27610	req, err := http.NewRequest("GET", urls, body)
27611	if err != nil {
27612		return nil, err
27613	}
27614	req.Header = reqHeaders
27615	googleapi.Expand(req.URL, map[string]string{
27616		"metricName": c.metricName,
27617	})
27618	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27619}
27620
27621// Do executes the "logging.projects.metrics.get" call.
27622// Exactly one of *LogMetric or error will be non-nil. Any non-2xx
27623// status code is an error. Response headers are in either
27624// *LogMetric.ServerResponse.Header or (if a response was returned at
27625// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27626// to check whether the returned error was because
27627// http.StatusNotModified was returned.
27628func (c *ProjectsMetricsGetCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
27629	gensupport.SetOptions(c.urlParams_, opts...)
27630	res, err := c.doRequest("json")
27631	if res != nil && res.StatusCode == http.StatusNotModified {
27632		if res.Body != nil {
27633			res.Body.Close()
27634		}
27635		return nil, &googleapi.Error{
27636			Code:   res.StatusCode,
27637			Header: res.Header,
27638		}
27639	}
27640	if err != nil {
27641		return nil, err
27642	}
27643	defer googleapi.CloseBody(res)
27644	if err := googleapi.CheckResponse(res); err != nil {
27645		return nil, err
27646	}
27647	ret := &LogMetric{
27648		ServerResponse: googleapi.ServerResponse{
27649			Header:         res.Header,
27650			HTTPStatusCode: res.StatusCode,
27651		},
27652	}
27653	target := &ret
27654	if err := gensupport.DecodeResponse(target, res); err != nil {
27655		return nil, err
27656	}
27657	return ret, nil
27658	// {
27659	//   "description": "Gets a logs-based metric.",
27660	//   "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}",
27661	//   "httpMethod": "GET",
27662	//   "id": "logging.projects.metrics.get",
27663	//   "parameterOrder": [
27664	//     "metricName"
27665	//   ],
27666	//   "parameters": {
27667	//     "metricName": {
27668	//       "description": "Required. The resource name of the desired metric: \"projects/[PROJECT_ID]/metrics/[METRIC_ID]\" ",
27669	//       "location": "path",
27670	//       "pattern": "^projects/[^/]+/metrics/[^/]+$",
27671	//       "required": true,
27672	//       "type": "string"
27673	//     }
27674	//   },
27675	//   "path": "v2/{+metricName}",
27676	//   "response": {
27677	//     "$ref": "LogMetric"
27678	//   },
27679	//   "scopes": [
27680	//     "https://www.googleapis.com/auth/cloud-platform",
27681	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
27682	//     "https://www.googleapis.com/auth/logging.admin",
27683	//     "https://www.googleapis.com/auth/logging.read"
27684	//   ]
27685	// }
27686
27687}
27688
27689// method id "logging.projects.metrics.list":
27690
27691type ProjectsMetricsListCall struct {
27692	s            *Service
27693	parent       string
27694	urlParams_   gensupport.URLParams
27695	ifNoneMatch_ string
27696	ctx_         context.Context
27697	header_      http.Header
27698}
27699
27700// List: Lists logs-based metrics.
27701//
27702// - parent: The name of the project containing the metrics:
27703//   "projects/[PROJECT_ID]".
27704func (r *ProjectsMetricsService) List(parent string) *ProjectsMetricsListCall {
27705	c := &ProjectsMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27706	c.parent = parent
27707	return c
27708}
27709
27710// PageSize sets the optional parameter "pageSize": The maximum number
27711// of results to return from this request. Non-positive values are
27712// ignored. The presence of nextPageToken in the response indicates that
27713// more results might be available.
27714func (c *ProjectsMetricsListCall) PageSize(pageSize int64) *ProjectsMetricsListCall {
27715	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27716	return c
27717}
27718
27719// PageToken sets the optional parameter "pageToken": If present, then
27720// retrieve the next batch of results from the preceding call to this
27721// method. pageToken must be the value of nextPageToken from the
27722// previous response. The values of other method parameters should be
27723// identical to those in the previous call.
27724func (c *ProjectsMetricsListCall) PageToken(pageToken string) *ProjectsMetricsListCall {
27725	c.urlParams_.Set("pageToken", pageToken)
27726	return c
27727}
27728
27729// Fields allows partial responses to be retrieved. See
27730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27731// for more information.
27732func (c *ProjectsMetricsListCall) Fields(s ...googleapi.Field) *ProjectsMetricsListCall {
27733	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27734	return c
27735}
27736
27737// IfNoneMatch sets the optional parameter which makes the operation
27738// fail if the object's ETag matches the given value. This is useful for
27739// getting updates only after the object has changed since the last
27740// request. Use googleapi.IsNotModified to check whether the response
27741// error from Do is the result of In-None-Match.
27742func (c *ProjectsMetricsListCall) IfNoneMatch(entityTag string) *ProjectsMetricsListCall {
27743	c.ifNoneMatch_ = entityTag
27744	return c
27745}
27746
27747// Context sets the context to be used in this call's Do method. Any
27748// pending HTTP request will be aborted if the provided context is
27749// canceled.
27750func (c *ProjectsMetricsListCall) Context(ctx context.Context) *ProjectsMetricsListCall {
27751	c.ctx_ = ctx
27752	return c
27753}
27754
27755// Header returns an http.Header that can be modified by the caller to
27756// add HTTP headers to the request.
27757func (c *ProjectsMetricsListCall) Header() http.Header {
27758	if c.header_ == nil {
27759		c.header_ = make(http.Header)
27760	}
27761	return c.header_
27762}
27763
27764func (c *ProjectsMetricsListCall) doRequest(alt string) (*http.Response, error) {
27765	reqHeaders := make(http.Header)
27766	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
27767	for k, v := range c.header_ {
27768		reqHeaders[k] = v
27769	}
27770	reqHeaders.Set("User-Agent", c.s.userAgent())
27771	if c.ifNoneMatch_ != "" {
27772		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27773	}
27774	var body io.Reader = nil
27775	c.urlParams_.Set("alt", alt)
27776	c.urlParams_.Set("prettyPrint", "false")
27777	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/metrics")
27778	urls += "?" + c.urlParams_.Encode()
27779	req, err := http.NewRequest("GET", urls, body)
27780	if err != nil {
27781		return nil, err
27782	}
27783	req.Header = reqHeaders
27784	googleapi.Expand(req.URL, map[string]string{
27785		"parent": c.parent,
27786	})
27787	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27788}
27789
27790// Do executes the "logging.projects.metrics.list" call.
27791// Exactly one of *ListLogMetricsResponse or error will be non-nil. Any
27792// non-2xx status code is an error. Response headers are in either
27793// *ListLogMetricsResponse.ServerResponse.Header or (if a response was
27794// returned at all) in error.(*googleapi.Error).Header. Use
27795// googleapi.IsNotModified to check whether the returned error was
27796// because http.StatusNotModified was returned.
27797func (c *ProjectsMetricsListCall) Do(opts ...googleapi.CallOption) (*ListLogMetricsResponse, error) {
27798	gensupport.SetOptions(c.urlParams_, opts...)
27799	res, err := c.doRequest("json")
27800	if res != nil && res.StatusCode == http.StatusNotModified {
27801		if res.Body != nil {
27802			res.Body.Close()
27803		}
27804		return nil, &googleapi.Error{
27805			Code:   res.StatusCode,
27806			Header: res.Header,
27807		}
27808	}
27809	if err != nil {
27810		return nil, err
27811	}
27812	defer googleapi.CloseBody(res)
27813	if err := googleapi.CheckResponse(res); err != nil {
27814		return nil, err
27815	}
27816	ret := &ListLogMetricsResponse{
27817		ServerResponse: googleapi.ServerResponse{
27818			Header:         res.Header,
27819			HTTPStatusCode: res.StatusCode,
27820		},
27821	}
27822	target := &ret
27823	if err := gensupport.DecodeResponse(target, res); err != nil {
27824		return nil, err
27825	}
27826	return ret, nil
27827	// {
27828	//   "description": "Lists logs-based metrics.",
27829	//   "flatPath": "v2/projects/{projectsId}/metrics",
27830	//   "httpMethod": "GET",
27831	//   "id": "logging.projects.metrics.list",
27832	//   "parameterOrder": [
27833	//     "parent"
27834	//   ],
27835	//   "parameters": {
27836	//     "pageSize": {
27837	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
27838	//       "format": "int32",
27839	//       "location": "query",
27840	//       "type": "integer"
27841	//     },
27842	//     "pageToken": {
27843	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
27844	//       "location": "query",
27845	//       "type": "string"
27846	//     },
27847	//     "parent": {
27848	//       "description": "Required. The name of the project containing the metrics: \"projects/[PROJECT_ID]\" ",
27849	//       "location": "path",
27850	//       "pattern": "^projects/[^/]+$",
27851	//       "required": true,
27852	//       "type": "string"
27853	//     }
27854	//   },
27855	//   "path": "v2/{+parent}/metrics",
27856	//   "response": {
27857	//     "$ref": "ListLogMetricsResponse"
27858	//   },
27859	//   "scopes": [
27860	//     "https://www.googleapis.com/auth/cloud-platform",
27861	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
27862	//     "https://www.googleapis.com/auth/logging.admin",
27863	//     "https://www.googleapis.com/auth/logging.read"
27864	//   ]
27865	// }
27866
27867}
27868
27869// Pages invokes f for each page of results.
27870// A non-nil error returned from f will halt the iteration.
27871// The provided context supersedes any context provided to the Context method.
27872func (c *ProjectsMetricsListCall) Pages(ctx context.Context, f func(*ListLogMetricsResponse) error) error {
27873	c.ctx_ = ctx
27874	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27875	for {
27876		x, err := c.Do()
27877		if err != nil {
27878			return err
27879		}
27880		if err := f(x); err != nil {
27881			return err
27882		}
27883		if x.NextPageToken == "" {
27884			return nil
27885		}
27886		c.PageToken(x.NextPageToken)
27887	}
27888}
27889
27890// method id "logging.projects.metrics.update":
27891
27892type ProjectsMetricsUpdateCall struct {
27893	s          *Service
27894	metricName string
27895	logmetric  *LogMetric
27896	urlParams_ gensupport.URLParams
27897	ctx_       context.Context
27898	header_    http.Header
27899}
27900
27901// Update: Creates or updates a logs-based metric.
27902//
27903// - metricName: The resource name of the metric to update:
27904//   "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must
27905//   be provided in the request and it's name field must be the same as
27906//   [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
27907//   new metric is created.
27908func (r *ProjectsMetricsService) Update(metricName string, logmetric *LogMetric) *ProjectsMetricsUpdateCall {
27909	c := &ProjectsMetricsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27910	c.metricName = metricName
27911	c.logmetric = logmetric
27912	return c
27913}
27914
27915// Fields allows partial responses to be retrieved. See
27916// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27917// for more information.
27918func (c *ProjectsMetricsUpdateCall) Fields(s ...googleapi.Field) *ProjectsMetricsUpdateCall {
27919	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27920	return c
27921}
27922
27923// Context sets the context to be used in this call's Do method. Any
27924// pending HTTP request will be aborted if the provided context is
27925// canceled.
27926func (c *ProjectsMetricsUpdateCall) Context(ctx context.Context) *ProjectsMetricsUpdateCall {
27927	c.ctx_ = ctx
27928	return c
27929}
27930
27931// Header returns an http.Header that can be modified by the caller to
27932// add HTTP headers to the request.
27933func (c *ProjectsMetricsUpdateCall) Header() http.Header {
27934	if c.header_ == nil {
27935		c.header_ = make(http.Header)
27936	}
27937	return c.header_
27938}
27939
27940func (c *ProjectsMetricsUpdateCall) doRequest(alt string) (*http.Response, error) {
27941	reqHeaders := make(http.Header)
27942	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
27943	for k, v := range c.header_ {
27944		reqHeaders[k] = v
27945	}
27946	reqHeaders.Set("User-Agent", c.s.userAgent())
27947	var body io.Reader = nil
27948	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logmetric)
27949	if err != nil {
27950		return nil, err
27951	}
27952	reqHeaders.Set("Content-Type", "application/json")
27953	c.urlParams_.Set("alt", alt)
27954	c.urlParams_.Set("prettyPrint", "false")
27955	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
27956	urls += "?" + c.urlParams_.Encode()
27957	req, err := http.NewRequest("PUT", urls, body)
27958	if err != nil {
27959		return nil, err
27960	}
27961	req.Header = reqHeaders
27962	googleapi.Expand(req.URL, map[string]string{
27963		"metricName": c.metricName,
27964	})
27965	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27966}
27967
27968// Do executes the "logging.projects.metrics.update" call.
27969// Exactly one of *LogMetric or error will be non-nil. Any non-2xx
27970// status code is an error. Response headers are in either
27971// *LogMetric.ServerResponse.Header or (if a response was returned at
27972// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27973// to check whether the returned error was because
27974// http.StatusNotModified was returned.
27975func (c *ProjectsMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
27976	gensupport.SetOptions(c.urlParams_, opts...)
27977	res, err := c.doRequest("json")
27978	if res != nil && res.StatusCode == http.StatusNotModified {
27979		if res.Body != nil {
27980			res.Body.Close()
27981		}
27982		return nil, &googleapi.Error{
27983			Code:   res.StatusCode,
27984			Header: res.Header,
27985		}
27986	}
27987	if err != nil {
27988		return nil, err
27989	}
27990	defer googleapi.CloseBody(res)
27991	if err := googleapi.CheckResponse(res); err != nil {
27992		return nil, err
27993	}
27994	ret := &LogMetric{
27995		ServerResponse: googleapi.ServerResponse{
27996			Header:         res.Header,
27997			HTTPStatusCode: res.StatusCode,
27998		},
27999	}
28000	target := &ret
28001	if err := gensupport.DecodeResponse(target, res); err != nil {
28002		return nil, err
28003	}
28004	return ret, nil
28005	// {
28006	//   "description": "Creates or updates a logs-based metric.",
28007	//   "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}",
28008	//   "httpMethod": "PUT",
28009	//   "id": "logging.projects.metrics.update",
28010	//   "parameterOrder": [
28011	//     "metricName"
28012	//   ],
28013	//   "parameters": {
28014	//     "metricName": {
28015	//       "description": "Required. The resource name of the metric to update: \"projects/[PROJECT_ID]/metrics/[METRIC_ID]\" The updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created.",
28016	//       "location": "path",
28017	//       "pattern": "^projects/[^/]+/metrics/[^/]+$",
28018	//       "required": true,
28019	//       "type": "string"
28020	//     }
28021	//   },
28022	//   "path": "v2/{+metricName}",
28023	//   "request": {
28024	//     "$ref": "LogMetric"
28025	//   },
28026	//   "response": {
28027	//     "$ref": "LogMetric"
28028	//   },
28029	//   "scopes": [
28030	//     "https://www.googleapis.com/auth/cloud-platform",
28031	//     "https://www.googleapis.com/auth/logging.admin",
28032	//     "https://www.googleapis.com/auth/logging.write"
28033	//   ]
28034	// }
28035
28036}
28037
28038// method id "logging.projects.sinks.create":
28039
28040type ProjectsSinksCreateCall struct {
28041	s          *Service
28042	parent     string
28043	logsink    *LogSink
28044	urlParams_ gensupport.URLParams
28045	ctx_       context.Context
28046	header_    http.Header
28047}
28048
28049// Create: Creates a sink that exports specified log entries to a
28050// destination. The export of newly-ingested log entries begins
28051// immediately, unless the sink's writer_identity is not permitted to
28052// write to the destination. A sink can export log entries only from the
28053// resource owning the sink.
28054//
28055// - parent: The resource in which to create the sink:
28056//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
28057//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
28058//   examples:"projects/my-project" "organizations/123456789".
28059func (r *ProjectsSinksService) Create(parent string, logsink *LogSink) *ProjectsSinksCreateCall {
28060	c := &ProjectsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28061	c.parent = parent
28062	c.logsink = logsink
28063	return c
28064}
28065
28066// UniqueWriterIdentity sets the optional parameter
28067// "uniqueWriterIdentity": Determines the kind of IAM identity returned
28068// as writer_identity in the new sink. If this value is omitted or set
28069// to false, and if the sink's parent is a project, then the value
28070// returned as writer_identity is the same group or service account used
28071// by Cloud Logging before the addition of writer identities to this
28072// API. The sink's destination must be in the same project as the sink
28073// itself.If this field is set to true, or if the sink is owned by a
28074// non-project resource such as an organization, then the value of
28075// writer_identity will be a unique service account used only for
28076// exports from the new sink. For more information, see writer_identity
28077// in LogSink.
28078func (c *ProjectsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksCreateCall {
28079	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
28080	return c
28081}
28082
28083// Fields allows partial responses to be retrieved. See
28084// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28085// for more information.
28086func (c *ProjectsSinksCreateCall) Fields(s ...googleapi.Field) *ProjectsSinksCreateCall {
28087	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28088	return c
28089}
28090
28091// Context sets the context to be used in this call's Do method. Any
28092// pending HTTP request will be aborted if the provided context is
28093// canceled.
28094func (c *ProjectsSinksCreateCall) Context(ctx context.Context) *ProjectsSinksCreateCall {
28095	c.ctx_ = ctx
28096	return c
28097}
28098
28099// Header returns an http.Header that can be modified by the caller to
28100// add HTTP headers to the request.
28101func (c *ProjectsSinksCreateCall) Header() http.Header {
28102	if c.header_ == nil {
28103		c.header_ = make(http.Header)
28104	}
28105	return c.header_
28106}
28107
28108func (c *ProjectsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
28109	reqHeaders := make(http.Header)
28110	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
28111	for k, v := range c.header_ {
28112		reqHeaders[k] = v
28113	}
28114	reqHeaders.Set("User-Agent", c.s.userAgent())
28115	var body io.Reader = nil
28116	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
28117	if err != nil {
28118		return nil, err
28119	}
28120	reqHeaders.Set("Content-Type", "application/json")
28121	c.urlParams_.Set("alt", alt)
28122	c.urlParams_.Set("prettyPrint", "false")
28123	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
28124	urls += "?" + c.urlParams_.Encode()
28125	req, err := http.NewRequest("POST", urls, body)
28126	if err != nil {
28127		return nil, err
28128	}
28129	req.Header = reqHeaders
28130	googleapi.Expand(req.URL, map[string]string{
28131		"parent": c.parent,
28132	})
28133	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28134}
28135
28136// Do executes the "logging.projects.sinks.create" call.
28137// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
28138// code is an error. Response headers are in either
28139// *LogSink.ServerResponse.Header or (if a response was returned at all)
28140// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
28141// check whether the returned error was because http.StatusNotModified
28142// was returned.
28143func (c *ProjectsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
28144	gensupport.SetOptions(c.urlParams_, opts...)
28145	res, err := c.doRequest("json")
28146	if res != nil && res.StatusCode == http.StatusNotModified {
28147		if res.Body != nil {
28148			res.Body.Close()
28149		}
28150		return nil, &googleapi.Error{
28151			Code:   res.StatusCode,
28152			Header: res.Header,
28153		}
28154	}
28155	if err != nil {
28156		return nil, err
28157	}
28158	defer googleapi.CloseBody(res)
28159	if err := googleapi.CheckResponse(res); err != nil {
28160		return nil, err
28161	}
28162	ret := &LogSink{
28163		ServerResponse: googleapi.ServerResponse{
28164			Header:         res.Header,
28165			HTTPStatusCode: res.StatusCode,
28166		},
28167	}
28168	target := &ret
28169	if err := gensupport.DecodeResponse(target, res); err != nil {
28170		return nil, err
28171	}
28172	return ret, nil
28173	// {
28174	//   "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.",
28175	//   "flatPath": "v2/projects/{projectsId}/sinks",
28176	//   "httpMethod": "POST",
28177	//   "id": "logging.projects.sinks.create",
28178	//   "parameterOrder": [
28179	//     "parent"
28180	//   ],
28181	//   "parameters": {
28182	//     "parent": {
28183	//       "description": "Required. The resource in which to create the sink: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" For examples:\"projects/my-project\" \"organizations/123456789\"",
28184	//       "location": "path",
28185	//       "pattern": "^projects/[^/]+$",
28186	//       "required": true,
28187	//       "type": "string"
28188	//     },
28189	//     "uniqueWriterIdentity": {
28190	//       "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.",
28191	//       "location": "query",
28192	//       "type": "boolean"
28193	//     }
28194	//   },
28195	//   "path": "v2/{+parent}/sinks",
28196	//   "request": {
28197	//     "$ref": "LogSink"
28198	//   },
28199	//   "response": {
28200	//     "$ref": "LogSink"
28201	//   },
28202	//   "scopes": [
28203	//     "https://www.googleapis.com/auth/cloud-platform",
28204	//     "https://www.googleapis.com/auth/logging.admin"
28205	//   ]
28206	// }
28207
28208}
28209
28210// method id "logging.projects.sinks.delete":
28211
28212type ProjectsSinksDeleteCall struct {
28213	s          *Service
28214	sinkNameid string
28215	urlParams_ gensupport.URLParams
28216	ctx_       context.Context
28217	header_    http.Header
28218}
28219
28220// Delete: Deletes a sink. If the sink has a unique writer_identity,
28221// then that service account is also deleted.
28222//
28223// - sinkName: The full resource name of the sink to delete, including
28224//   the parent resource and the sink identifier:
28225//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
28226//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
28227//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
28228//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
28229//   example:"projects/my-project/sinks/my-sink".
28230func (r *ProjectsSinksService) Delete(sinkNameid string) *ProjectsSinksDeleteCall {
28231	c := &ProjectsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28232	c.sinkNameid = sinkNameid
28233	return c
28234}
28235
28236// Fields allows partial responses to be retrieved. See
28237// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28238// for more information.
28239func (c *ProjectsSinksDeleteCall) Fields(s ...googleapi.Field) *ProjectsSinksDeleteCall {
28240	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28241	return c
28242}
28243
28244// Context sets the context to be used in this call's Do method. Any
28245// pending HTTP request will be aborted if the provided context is
28246// canceled.
28247func (c *ProjectsSinksDeleteCall) Context(ctx context.Context) *ProjectsSinksDeleteCall {
28248	c.ctx_ = ctx
28249	return c
28250}
28251
28252// Header returns an http.Header that can be modified by the caller to
28253// add HTTP headers to the request.
28254func (c *ProjectsSinksDeleteCall) Header() http.Header {
28255	if c.header_ == nil {
28256		c.header_ = make(http.Header)
28257	}
28258	return c.header_
28259}
28260
28261func (c *ProjectsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
28262	reqHeaders := make(http.Header)
28263	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
28264	for k, v := range c.header_ {
28265		reqHeaders[k] = v
28266	}
28267	reqHeaders.Set("User-Agent", c.s.userAgent())
28268	var body io.Reader = nil
28269	c.urlParams_.Set("alt", alt)
28270	c.urlParams_.Set("prettyPrint", "false")
28271	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
28272	urls += "?" + c.urlParams_.Encode()
28273	req, err := http.NewRequest("DELETE", urls, body)
28274	if err != nil {
28275		return nil, err
28276	}
28277	req.Header = reqHeaders
28278	googleapi.Expand(req.URL, map[string]string{
28279		"sinkName": c.sinkNameid,
28280	})
28281	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28282}
28283
28284// Do executes the "logging.projects.sinks.delete" call.
28285// Exactly one of *Empty or error will be non-nil. Any non-2xx status
28286// code is an error. Response headers are in either
28287// *Empty.ServerResponse.Header or (if a response was returned at all)
28288// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
28289// check whether the returned error was because http.StatusNotModified
28290// was returned.
28291func (c *ProjectsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
28292	gensupport.SetOptions(c.urlParams_, opts...)
28293	res, err := c.doRequest("json")
28294	if res != nil && res.StatusCode == http.StatusNotModified {
28295		if res.Body != nil {
28296			res.Body.Close()
28297		}
28298		return nil, &googleapi.Error{
28299			Code:   res.StatusCode,
28300			Header: res.Header,
28301		}
28302	}
28303	if err != nil {
28304		return nil, err
28305	}
28306	defer googleapi.CloseBody(res)
28307	if err := googleapi.CheckResponse(res); err != nil {
28308		return nil, err
28309	}
28310	ret := &Empty{
28311		ServerResponse: googleapi.ServerResponse{
28312			Header:         res.Header,
28313			HTTPStatusCode: res.StatusCode,
28314		},
28315	}
28316	target := &ret
28317	if err := gensupport.DecodeResponse(target, res); err != nil {
28318		return nil, err
28319	}
28320	return ret, nil
28321	// {
28322	//   "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.",
28323	//   "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}",
28324	//   "httpMethod": "DELETE",
28325	//   "id": "logging.projects.sinks.delete",
28326	//   "parameterOrder": [
28327	//     "sinkName"
28328	//   ],
28329	//   "parameters": {
28330	//     "sinkName": {
28331	//       "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
28332	//       "location": "path",
28333	//       "pattern": "^projects/[^/]+/sinks/[^/]+$",
28334	//       "required": true,
28335	//       "type": "string"
28336	//     }
28337	//   },
28338	//   "path": "v2/{+sinkName}",
28339	//   "response": {
28340	//     "$ref": "Empty"
28341	//   },
28342	//   "scopes": [
28343	//     "https://www.googleapis.com/auth/cloud-platform",
28344	//     "https://www.googleapis.com/auth/logging.admin"
28345	//   ]
28346	// }
28347
28348}
28349
28350// method id "logging.projects.sinks.get":
28351
28352type ProjectsSinksGetCall struct {
28353	s            *Service
28354	sinkName     string
28355	urlParams_   gensupport.URLParams
28356	ifNoneMatch_ string
28357	ctx_         context.Context
28358	header_      http.Header
28359}
28360
28361// Get: Gets a sink.
28362//
28363// - sinkName: The resource name of the sink:
28364//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
28365//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
28366//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
28367//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
28368//   example:"projects/my-project/sinks/my-sink".
28369func (r *ProjectsSinksService) Get(sinkName string) *ProjectsSinksGetCall {
28370	c := &ProjectsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28371	c.sinkName = sinkName
28372	return c
28373}
28374
28375// Fields allows partial responses to be retrieved. See
28376// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28377// for more information.
28378func (c *ProjectsSinksGetCall) Fields(s ...googleapi.Field) *ProjectsSinksGetCall {
28379	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28380	return c
28381}
28382
28383// IfNoneMatch sets the optional parameter which makes the operation
28384// fail if the object's ETag matches the given value. This is useful for
28385// getting updates only after the object has changed since the last
28386// request. Use googleapi.IsNotModified to check whether the response
28387// error from Do is the result of In-None-Match.
28388func (c *ProjectsSinksGetCall) IfNoneMatch(entityTag string) *ProjectsSinksGetCall {
28389	c.ifNoneMatch_ = entityTag
28390	return c
28391}
28392
28393// Context sets the context to be used in this call's Do method. Any
28394// pending HTTP request will be aborted if the provided context is
28395// canceled.
28396func (c *ProjectsSinksGetCall) Context(ctx context.Context) *ProjectsSinksGetCall {
28397	c.ctx_ = ctx
28398	return c
28399}
28400
28401// Header returns an http.Header that can be modified by the caller to
28402// add HTTP headers to the request.
28403func (c *ProjectsSinksGetCall) Header() http.Header {
28404	if c.header_ == nil {
28405		c.header_ = make(http.Header)
28406	}
28407	return c.header_
28408}
28409
28410func (c *ProjectsSinksGetCall) doRequest(alt string) (*http.Response, error) {
28411	reqHeaders := make(http.Header)
28412	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
28413	for k, v := range c.header_ {
28414		reqHeaders[k] = v
28415	}
28416	reqHeaders.Set("User-Agent", c.s.userAgent())
28417	if c.ifNoneMatch_ != "" {
28418		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28419	}
28420	var body io.Reader = nil
28421	c.urlParams_.Set("alt", alt)
28422	c.urlParams_.Set("prettyPrint", "false")
28423	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
28424	urls += "?" + c.urlParams_.Encode()
28425	req, err := http.NewRequest("GET", urls, body)
28426	if err != nil {
28427		return nil, err
28428	}
28429	req.Header = reqHeaders
28430	googleapi.Expand(req.URL, map[string]string{
28431		"sinkName": c.sinkName,
28432	})
28433	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28434}
28435
28436// Do executes the "logging.projects.sinks.get" call.
28437// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
28438// code is an error. Response headers are in either
28439// *LogSink.ServerResponse.Header or (if a response was returned at all)
28440// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
28441// check whether the returned error was because http.StatusNotModified
28442// was returned.
28443func (c *ProjectsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
28444	gensupport.SetOptions(c.urlParams_, opts...)
28445	res, err := c.doRequest("json")
28446	if res != nil && res.StatusCode == http.StatusNotModified {
28447		if res.Body != nil {
28448			res.Body.Close()
28449		}
28450		return nil, &googleapi.Error{
28451			Code:   res.StatusCode,
28452			Header: res.Header,
28453		}
28454	}
28455	if err != nil {
28456		return nil, err
28457	}
28458	defer googleapi.CloseBody(res)
28459	if err := googleapi.CheckResponse(res); err != nil {
28460		return nil, err
28461	}
28462	ret := &LogSink{
28463		ServerResponse: googleapi.ServerResponse{
28464			Header:         res.Header,
28465			HTTPStatusCode: res.StatusCode,
28466		},
28467	}
28468	target := &ret
28469	if err := gensupport.DecodeResponse(target, res); err != nil {
28470		return nil, err
28471	}
28472	return ret, nil
28473	// {
28474	//   "description": "Gets a sink.",
28475	//   "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}",
28476	//   "httpMethod": "GET",
28477	//   "id": "logging.projects.sinks.get",
28478	//   "parameterOrder": [
28479	//     "sinkName"
28480	//   ],
28481	//   "parameters": {
28482	//     "sinkName": {
28483	//       "description": "Required. The resource name of the sink: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
28484	//       "location": "path",
28485	//       "pattern": "^projects/[^/]+/sinks/[^/]+$",
28486	//       "required": true,
28487	//       "type": "string"
28488	//     }
28489	//   },
28490	//   "path": "v2/{+sinkName}",
28491	//   "response": {
28492	//     "$ref": "LogSink"
28493	//   },
28494	//   "scopes": [
28495	//     "https://www.googleapis.com/auth/cloud-platform",
28496	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
28497	//     "https://www.googleapis.com/auth/logging.admin",
28498	//     "https://www.googleapis.com/auth/logging.read"
28499	//   ]
28500	// }
28501
28502}
28503
28504// method id "logging.projects.sinks.list":
28505
28506type ProjectsSinksListCall struct {
28507	s            *Service
28508	parent       string
28509	urlParams_   gensupport.URLParams
28510	ifNoneMatch_ string
28511	ctx_         context.Context
28512	header_      http.Header
28513}
28514
28515// List: Lists sinks.
28516//
28517// - parent: The parent resource whose sinks are to be listed:
28518//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
28519//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
28520func (r *ProjectsSinksService) List(parent string) *ProjectsSinksListCall {
28521	c := &ProjectsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28522	c.parent = parent
28523	return c
28524}
28525
28526// PageSize sets the optional parameter "pageSize": The maximum number
28527// of results to return from this request. Non-positive values are
28528// ignored. The presence of nextPageToken in the response indicates that
28529// more results might be available.
28530func (c *ProjectsSinksListCall) PageSize(pageSize int64) *ProjectsSinksListCall {
28531	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28532	return c
28533}
28534
28535// PageToken sets the optional parameter "pageToken": If present, then
28536// retrieve the next batch of results from the preceding call to this
28537// method. pageToken must be the value of nextPageToken from the
28538// previous response. The values of other method parameters should be
28539// identical to those in the previous call.
28540func (c *ProjectsSinksListCall) PageToken(pageToken string) *ProjectsSinksListCall {
28541	c.urlParams_.Set("pageToken", pageToken)
28542	return c
28543}
28544
28545// Fields allows partial responses to be retrieved. See
28546// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28547// for more information.
28548func (c *ProjectsSinksListCall) Fields(s ...googleapi.Field) *ProjectsSinksListCall {
28549	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28550	return c
28551}
28552
28553// IfNoneMatch sets the optional parameter which makes the operation
28554// fail if the object's ETag matches the given value. This is useful for
28555// getting updates only after the object has changed since the last
28556// request. Use googleapi.IsNotModified to check whether the response
28557// error from Do is the result of In-None-Match.
28558func (c *ProjectsSinksListCall) IfNoneMatch(entityTag string) *ProjectsSinksListCall {
28559	c.ifNoneMatch_ = entityTag
28560	return c
28561}
28562
28563// Context sets the context to be used in this call's Do method. Any
28564// pending HTTP request will be aborted if the provided context is
28565// canceled.
28566func (c *ProjectsSinksListCall) Context(ctx context.Context) *ProjectsSinksListCall {
28567	c.ctx_ = ctx
28568	return c
28569}
28570
28571// Header returns an http.Header that can be modified by the caller to
28572// add HTTP headers to the request.
28573func (c *ProjectsSinksListCall) Header() http.Header {
28574	if c.header_ == nil {
28575		c.header_ = make(http.Header)
28576	}
28577	return c.header_
28578}
28579
28580func (c *ProjectsSinksListCall) doRequest(alt string) (*http.Response, error) {
28581	reqHeaders := make(http.Header)
28582	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
28583	for k, v := range c.header_ {
28584		reqHeaders[k] = v
28585	}
28586	reqHeaders.Set("User-Agent", c.s.userAgent())
28587	if c.ifNoneMatch_ != "" {
28588		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28589	}
28590	var body io.Reader = nil
28591	c.urlParams_.Set("alt", alt)
28592	c.urlParams_.Set("prettyPrint", "false")
28593	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
28594	urls += "?" + c.urlParams_.Encode()
28595	req, err := http.NewRequest("GET", urls, body)
28596	if err != nil {
28597		return nil, err
28598	}
28599	req.Header = reqHeaders
28600	googleapi.Expand(req.URL, map[string]string{
28601		"parent": c.parent,
28602	})
28603	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28604}
28605
28606// Do executes the "logging.projects.sinks.list" call.
28607// Exactly one of *ListSinksResponse or error will be non-nil. Any
28608// non-2xx status code is an error. Response headers are in either
28609// *ListSinksResponse.ServerResponse.Header or (if a response was
28610// returned at all) in error.(*googleapi.Error).Header. Use
28611// googleapi.IsNotModified to check whether the returned error was
28612// because http.StatusNotModified was returned.
28613func (c *ProjectsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
28614	gensupport.SetOptions(c.urlParams_, opts...)
28615	res, err := c.doRequest("json")
28616	if res != nil && res.StatusCode == http.StatusNotModified {
28617		if res.Body != nil {
28618			res.Body.Close()
28619		}
28620		return nil, &googleapi.Error{
28621			Code:   res.StatusCode,
28622			Header: res.Header,
28623		}
28624	}
28625	if err != nil {
28626		return nil, err
28627	}
28628	defer googleapi.CloseBody(res)
28629	if err := googleapi.CheckResponse(res); err != nil {
28630		return nil, err
28631	}
28632	ret := &ListSinksResponse{
28633		ServerResponse: googleapi.ServerResponse{
28634			Header:         res.Header,
28635			HTTPStatusCode: res.StatusCode,
28636		},
28637	}
28638	target := &ret
28639	if err := gensupport.DecodeResponse(target, res); err != nil {
28640		return nil, err
28641	}
28642	return ret, nil
28643	// {
28644	//   "description": "Lists sinks.",
28645	//   "flatPath": "v2/projects/{projectsId}/sinks",
28646	//   "httpMethod": "GET",
28647	//   "id": "logging.projects.sinks.list",
28648	//   "parameterOrder": [
28649	//     "parent"
28650	//   ],
28651	//   "parameters": {
28652	//     "pageSize": {
28653	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
28654	//       "format": "int32",
28655	//       "location": "query",
28656	//       "type": "integer"
28657	//     },
28658	//     "pageToken": {
28659	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
28660	//       "location": "query",
28661	//       "type": "string"
28662	//     },
28663	//     "parent": {
28664	//       "description": "Required. The parent resource whose sinks are to be listed: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" ",
28665	//       "location": "path",
28666	//       "pattern": "^projects/[^/]+$",
28667	//       "required": true,
28668	//       "type": "string"
28669	//     }
28670	//   },
28671	//   "path": "v2/{+parent}/sinks",
28672	//   "response": {
28673	//     "$ref": "ListSinksResponse"
28674	//   },
28675	//   "scopes": [
28676	//     "https://www.googleapis.com/auth/cloud-platform",
28677	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
28678	//     "https://www.googleapis.com/auth/logging.admin",
28679	//     "https://www.googleapis.com/auth/logging.read"
28680	//   ]
28681	// }
28682
28683}
28684
28685// Pages invokes f for each page of results.
28686// A non-nil error returned from f will halt the iteration.
28687// The provided context supersedes any context provided to the Context method.
28688func (c *ProjectsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
28689	c.ctx_ = ctx
28690	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28691	for {
28692		x, err := c.Do()
28693		if err != nil {
28694			return err
28695		}
28696		if err := f(x); err != nil {
28697			return err
28698		}
28699		if x.NextPageToken == "" {
28700			return nil
28701		}
28702		c.PageToken(x.NextPageToken)
28703	}
28704}
28705
28706// method id "logging.projects.sinks.patch":
28707
28708type ProjectsSinksPatchCall struct {
28709	s          *Service
28710	sinkNameid string
28711	logsink    *LogSink
28712	urlParams_ gensupport.URLParams
28713	ctx_       context.Context
28714	header_    http.Header
28715}
28716
28717// Patch: Updates a sink. This method replaces the following fields in
28718// the existing sink with values from the new sink: destination, and
28719// filter.The updated sink might also have a new writer_identity; see
28720// the unique_writer_identity field.
28721//
28722// - sinkName: The full resource name of the sink to update, including
28723//   the parent resource and the sink identifier:
28724//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
28725//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
28726//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
28727//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
28728//   example:"projects/my-project/sinks/my-sink".
28729func (r *ProjectsSinksService) Patch(sinkNameid string, logsink *LogSink) *ProjectsSinksPatchCall {
28730	c := &ProjectsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28731	c.sinkNameid = sinkNameid
28732	c.logsink = logsink
28733	return c
28734}
28735
28736// UniqueWriterIdentity sets the optional parameter
28737// "uniqueWriterIdentity": See sinks.create for a description of this
28738// field. When updating a sink, the effect of this field on the value of
28739// writer_identity in the updated sink depends on both the old and new
28740// values of this field: If the old and new values of this field are
28741// both false or both true, then there is no change to the sink's
28742// writer_identity. If the old value is false and the new value is true,
28743// then writer_identity is changed to a unique service account. It is an
28744// error if the old value is true and the new value is set to false or
28745// defaulted to false.
28746func (c *ProjectsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksPatchCall {
28747	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
28748	return c
28749}
28750
28751// UpdateMask sets the optional parameter "updateMask": Field mask that
28752// specifies the fields in sink that need an update. A sink field will
28753// be overwritten if, and only if, it is in the update mask. name and
28754// output only fields cannot be updated.An empty updateMask is
28755// temporarily treated as using the following mask for backwards
28756// compatibility purposes:destination,filter,includeChildrenAt some
28757// point in the future, behavior will be removed and specifying an empty
28758// updateMask will be an error.For a detailed FieldMask definition, see
28759// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
28760// example: updateMask=filter
28761func (c *ProjectsSinksPatchCall) UpdateMask(updateMask string) *ProjectsSinksPatchCall {
28762	c.urlParams_.Set("updateMask", updateMask)
28763	return c
28764}
28765
28766// Fields allows partial responses to be retrieved. See
28767// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28768// for more information.
28769func (c *ProjectsSinksPatchCall) Fields(s ...googleapi.Field) *ProjectsSinksPatchCall {
28770	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28771	return c
28772}
28773
28774// Context sets the context to be used in this call's Do method. Any
28775// pending HTTP request will be aborted if the provided context is
28776// canceled.
28777func (c *ProjectsSinksPatchCall) Context(ctx context.Context) *ProjectsSinksPatchCall {
28778	c.ctx_ = ctx
28779	return c
28780}
28781
28782// Header returns an http.Header that can be modified by the caller to
28783// add HTTP headers to the request.
28784func (c *ProjectsSinksPatchCall) Header() http.Header {
28785	if c.header_ == nil {
28786		c.header_ = make(http.Header)
28787	}
28788	return c.header_
28789}
28790
28791func (c *ProjectsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
28792	reqHeaders := make(http.Header)
28793	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
28794	for k, v := range c.header_ {
28795		reqHeaders[k] = v
28796	}
28797	reqHeaders.Set("User-Agent", c.s.userAgent())
28798	var body io.Reader = nil
28799	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
28800	if err != nil {
28801		return nil, err
28802	}
28803	reqHeaders.Set("Content-Type", "application/json")
28804	c.urlParams_.Set("alt", alt)
28805	c.urlParams_.Set("prettyPrint", "false")
28806	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
28807	urls += "?" + c.urlParams_.Encode()
28808	req, err := http.NewRequest("PATCH", urls, body)
28809	if err != nil {
28810		return nil, err
28811	}
28812	req.Header = reqHeaders
28813	googleapi.Expand(req.URL, map[string]string{
28814		"sinkName": c.sinkNameid,
28815	})
28816	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28817}
28818
28819// Do executes the "logging.projects.sinks.patch" call.
28820// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
28821// code is an error. Response headers are in either
28822// *LogSink.ServerResponse.Header or (if a response was returned at all)
28823// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
28824// check whether the returned error was because http.StatusNotModified
28825// was returned.
28826func (c *ProjectsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
28827	gensupport.SetOptions(c.urlParams_, opts...)
28828	res, err := c.doRequest("json")
28829	if res != nil && res.StatusCode == http.StatusNotModified {
28830		if res.Body != nil {
28831			res.Body.Close()
28832		}
28833		return nil, &googleapi.Error{
28834			Code:   res.StatusCode,
28835			Header: res.Header,
28836		}
28837	}
28838	if err != nil {
28839		return nil, err
28840	}
28841	defer googleapi.CloseBody(res)
28842	if err := googleapi.CheckResponse(res); err != nil {
28843		return nil, err
28844	}
28845	ret := &LogSink{
28846		ServerResponse: googleapi.ServerResponse{
28847			Header:         res.Header,
28848			HTTPStatusCode: res.StatusCode,
28849		},
28850	}
28851	target := &ret
28852	if err := gensupport.DecodeResponse(target, res); err != nil {
28853		return nil, err
28854	}
28855	return ret, nil
28856	// {
28857	//   "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
28858	//   "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}",
28859	//   "httpMethod": "PATCH",
28860	//   "id": "logging.projects.sinks.patch",
28861	//   "parameterOrder": [
28862	//     "sinkName"
28863	//   ],
28864	//   "parameters": {
28865	//     "sinkName": {
28866	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
28867	//       "location": "path",
28868	//       "pattern": "^projects/[^/]+/sinks/[^/]+$",
28869	//       "required": true,
28870	//       "type": "string"
28871	//     },
28872	//     "uniqueWriterIdentity": {
28873	//       "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false.",
28874	//       "location": "query",
28875	//       "type": "boolean"
28876	//     },
28877	//     "updateMask": {
28878	//       "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
28879	//       "format": "google-fieldmask",
28880	//       "location": "query",
28881	//       "type": "string"
28882	//     }
28883	//   },
28884	//   "path": "v2/{+sinkName}",
28885	//   "request": {
28886	//     "$ref": "LogSink"
28887	//   },
28888	//   "response": {
28889	//     "$ref": "LogSink"
28890	//   },
28891	//   "scopes": [
28892	//     "https://www.googleapis.com/auth/cloud-platform",
28893	//     "https://www.googleapis.com/auth/logging.admin"
28894	//   ]
28895	// }
28896
28897}
28898
28899// method id "logging.projects.sinks.update":
28900
28901type ProjectsSinksUpdateCall struct {
28902	s          *Service
28903	sinkNameid string
28904	logsink    *LogSink
28905	urlParams_ gensupport.URLParams
28906	ctx_       context.Context
28907	header_    http.Header
28908}
28909
28910// Update: Updates a sink. This method replaces the following fields in
28911// the existing sink with values from the new sink: destination, and
28912// filter.The updated sink might also have a new writer_identity; see
28913// the unique_writer_identity field.
28914//
28915// - sinkName: The full resource name of the sink to update, including
28916//   the parent resource and the sink identifier:
28917//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
28918//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
28919//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
28920//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
28921//   example:"projects/my-project/sinks/my-sink".
28922func (r *ProjectsSinksService) Update(sinkNameid string, logsink *LogSink) *ProjectsSinksUpdateCall {
28923	c := &ProjectsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28924	c.sinkNameid = sinkNameid
28925	c.logsink = logsink
28926	return c
28927}
28928
28929// UniqueWriterIdentity sets the optional parameter
28930// "uniqueWriterIdentity": See sinks.create for a description of this
28931// field. When updating a sink, the effect of this field on the value of
28932// writer_identity in the updated sink depends on both the old and new
28933// values of this field: If the old and new values of this field are
28934// both false or both true, then there is no change to the sink's
28935// writer_identity. If the old value is false and the new value is true,
28936// then writer_identity is changed to a unique service account. It is an
28937// error if the old value is true and the new value is set to false or
28938// defaulted to false.
28939func (c *ProjectsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksUpdateCall {
28940	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
28941	return c
28942}
28943
28944// UpdateMask sets the optional parameter "updateMask": Field mask that
28945// specifies the fields in sink that need an update. A sink field will
28946// be overwritten if, and only if, it is in the update mask. name and
28947// output only fields cannot be updated.An empty updateMask is
28948// temporarily treated as using the following mask for backwards
28949// compatibility purposes:destination,filter,includeChildrenAt some
28950// point in the future, behavior will be removed and specifying an empty
28951// updateMask will be an error.For a detailed FieldMask definition, see
28952// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
28953// example: updateMask=filter
28954func (c *ProjectsSinksUpdateCall) UpdateMask(updateMask string) *ProjectsSinksUpdateCall {
28955	c.urlParams_.Set("updateMask", updateMask)
28956	return c
28957}
28958
28959// Fields allows partial responses to be retrieved. See
28960// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28961// for more information.
28962func (c *ProjectsSinksUpdateCall) Fields(s ...googleapi.Field) *ProjectsSinksUpdateCall {
28963	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28964	return c
28965}
28966
28967// Context sets the context to be used in this call's Do method. Any
28968// pending HTTP request will be aborted if the provided context is
28969// canceled.
28970func (c *ProjectsSinksUpdateCall) Context(ctx context.Context) *ProjectsSinksUpdateCall {
28971	c.ctx_ = ctx
28972	return c
28973}
28974
28975// Header returns an http.Header that can be modified by the caller to
28976// add HTTP headers to the request.
28977func (c *ProjectsSinksUpdateCall) Header() http.Header {
28978	if c.header_ == nil {
28979		c.header_ = make(http.Header)
28980	}
28981	return c.header_
28982}
28983
28984func (c *ProjectsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
28985	reqHeaders := make(http.Header)
28986	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
28987	for k, v := range c.header_ {
28988		reqHeaders[k] = v
28989	}
28990	reqHeaders.Set("User-Agent", c.s.userAgent())
28991	var body io.Reader = nil
28992	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
28993	if err != nil {
28994		return nil, err
28995	}
28996	reqHeaders.Set("Content-Type", "application/json")
28997	c.urlParams_.Set("alt", alt)
28998	c.urlParams_.Set("prettyPrint", "false")
28999	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
29000	urls += "?" + c.urlParams_.Encode()
29001	req, err := http.NewRequest("PUT", urls, body)
29002	if err != nil {
29003		return nil, err
29004	}
29005	req.Header = reqHeaders
29006	googleapi.Expand(req.URL, map[string]string{
29007		"sinkName": c.sinkNameid,
29008	})
29009	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29010}
29011
29012// Do executes the "logging.projects.sinks.update" call.
29013// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
29014// code is an error. Response headers are in either
29015// *LogSink.ServerResponse.Header or (if a response was returned at all)
29016// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
29017// check whether the returned error was because http.StatusNotModified
29018// was returned.
29019func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
29020	gensupport.SetOptions(c.urlParams_, opts...)
29021	res, err := c.doRequest("json")
29022	if res != nil && res.StatusCode == http.StatusNotModified {
29023		if res.Body != nil {
29024			res.Body.Close()
29025		}
29026		return nil, &googleapi.Error{
29027			Code:   res.StatusCode,
29028			Header: res.Header,
29029		}
29030	}
29031	if err != nil {
29032		return nil, err
29033	}
29034	defer googleapi.CloseBody(res)
29035	if err := googleapi.CheckResponse(res); err != nil {
29036		return nil, err
29037	}
29038	ret := &LogSink{
29039		ServerResponse: googleapi.ServerResponse{
29040			Header:         res.Header,
29041			HTTPStatusCode: res.StatusCode,
29042		},
29043	}
29044	target := &ret
29045	if err := gensupport.DecodeResponse(target, res); err != nil {
29046		return nil, err
29047	}
29048	return ret, nil
29049	// {
29050	//   "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
29051	//   "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}",
29052	//   "httpMethod": "PUT",
29053	//   "id": "logging.projects.sinks.update",
29054	//   "parameterOrder": [
29055	//     "sinkName"
29056	//   ],
29057	//   "parameters": {
29058	//     "sinkName": {
29059	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
29060	//       "location": "path",
29061	//       "pattern": "^projects/[^/]+/sinks/[^/]+$",
29062	//       "required": true,
29063	//       "type": "string"
29064	//     },
29065	//     "uniqueWriterIdentity": {
29066	//       "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false.",
29067	//       "location": "query",
29068	//       "type": "boolean"
29069	//     },
29070	//     "updateMask": {
29071	//       "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
29072	//       "format": "google-fieldmask",
29073	//       "location": "query",
29074	//       "type": "string"
29075	//     }
29076	//   },
29077	//   "path": "v2/{+sinkName}",
29078	//   "request": {
29079	//     "$ref": "LogSink"
29080	//   },
29081	//   "response": {
29082	//     "$ref": "LogSink"
29083	//   },
29084	//   "scopes": [
29085	//     "https://www.googleapis.com/auth/cloud-platform",
29086	//     "https://www.googleapis.com/auth/logging.admin"
29087	//   ]
29088	// }
29089
29090}
29091
29092// method id "logging.sinks.create":
29093
29094type SinksCreateCall struct {
29095	s          *Service
29096	parent     string
29097	logsink    *LogSink
29098	urlParams_ gensupport.URLParams
29099	ctx_       context.Context
29100	header_    http.Header
29101}
29102
29103// Create: Creates a sink that exports specified log entries to a
29104// destination. The export of newly-ingested log entries begins
29105// immediately, unless the sink's writer_identity is not permitted to
29106// write to the destination. A sink can export log entries only from the
29107// resource owning the sink.
29108//
29109// - parent: The resource in which to create the sink:
29110//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
29111//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
29112//   examples:"projects/my-project" "organizations/123456789".
29113func (r *SinksService) Create(parent string, logsink *LogSink) *SinksCreateCall {
29114	c := &SinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29115	c.parent = parent
29116	c.logsink = logsink
29117	return c
29118}
29119
29120// UniqueWriterIdentity sets the optional parameter
29121// "uniqueWriterIdentity": Determines the kind of IAM identity returned
29122// as writer_identity in the new sink. If this value is omitted or set
29123// to false, and if the sink's parent is a project, then the value
29124// returned as writer_identity is the same group or service account used
29125// by Cloud Logging before the addition of writer identities to this
29126// API. The sink's destination must be in the same project as the sink
29127// itself.If this field is set to true, or if the sink is owned by a
29128// non-project resource such as an organization, then the value of
29129// writer_identity will be a unique service account used only for
29130// exports from the new sink. For more information, see writer_identity
29131// in LogSink.
29132func (c *SinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *SinksCreateCall {
29133	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
29134	return c
29135}
29136
29137// Fields allows partial responses to be retrieved. See
29138// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29139// for more information.
29140func (c *SinksCreateCall) Fields(s ...googleapi.Field) *SinksCreateCall {
29141	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29142	return c
29143}
29144
29145// Context sets the context to be used in this call's Do method. Any
29146// pending HTTP request will be aborted if the provided context is
29147// canceled.
29148func (c *SinksCreateCall) Context(ctx context.Context) *SinksCreateCall {
29149	c.ctx_ = ctx
29150	return c
29151}
29152
29153// Header returns an http.Header that can be modified by the caller to
29154// add HTTP headers to the request.
29155func (c *SinksCreateCall) Header() http.Header {
29156	if c.header_ == nil {
29157		c.header_ = make(http.Header)
29158	}
29159	return c.header_
29160}
29161
29162func (c *SinksCreateCall) doRequest(alt string) (*http.Response, error) {
29163	reqHeaders := make(http.Header)
29164	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
29165	for k, v := range c.header_ {
29166		reqHeaders[k] = v
29167	}
29168	reqHeaders.Set("User-Agent", c.s.userAgent())
29169	var body io.Reader = nil
29170	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
29171	if err != nil {
29172		return nil, err
29173	}
29174	reqHeaders.Set("Content-Type", "application/json")
29175	c.urlParams_.Set("alt", alt)
29176	c.urlParams_.Set("prettyPrint", "false")
29177	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
29178	urls += "?" + c.urlParams_.Encode()
29179	req, err := http.NewRequest("POST", urls, body)
29180	if err != nil {
29181		return nil, err
29182	}
29183	req.Header = reqHeaders
29184	googleapi.Expand(req.URL, map[string]string{
29185		"parent": c.parent,
29186	})
29187	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29188}
29189
29190// Do executes the "logging.sinks.create" call.
29191// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
29192// code is an error. Response headers are in either
29193// *LogSink.ServerResponse.Header or (if a response was returned at all)
29194// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
29195// check whether the returned error was because http.StatusNotModified
29196// was returned.
29197func (c *SinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
29198	gensupport.SetOptions(c.urlParams_, opts...)
29199	res, err := c.doRequest("json")
29200	if res != nil && res.StatusCode == http.StatusNotModified {
29201		if res.Body != nil {
29202			res.Body.Close()
29203		}
29204		return nil, &googleapi.Error{
29205			Code:   res.StatusCode,
29206			Header: res.Header,
29207		}
29208	}
29209	if err != nil {
29210		return nil, err
29211	}
29212	defer googleapi.CloseBody(res)
29213	if err := googleapi.CheckResponse(res); err != nil {
29214		return nil, err
29215	}
29216	ret := &LogSink{
29217		ServerResponse: googleapi.ServerResponse{
29218			Header:         res.Header,
29219			HTTPStatusCode: res.StatusCode,
29220		},
29221	}
29222	target := &ret
29223	if err := gensupport.DecodeResponse(target, res); err != nil {
29224		return nil, err
29225	}
29226	return ret, nil
29227	// {
29228	//   "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.",
29229	//   "flatPath": "v2/{v2Id}/{v2Id1}/sinks",
29230	//   "httpMethod": "POST",
29231	//   "id": "logging.sinks.create",
29232	//   "parameterOrder": [
29233	//     "parent"
29234	//   ],
29235	//   "parameters": {
29236	//     "parent": {
29237	//       "description": "Required. The resource in which to create the sink: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" For examples:\"projects/my-project\" \"organizations/123456789\"",
29238	//       "location": "path",
29239	//       "pattern": "^[^/]+/[^/]+$",
29240	//       "required": true,
29241	//       "type": "string"
29242	//     },
29243	//     "uniqueWriterIdentity": {
29244	//       "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.",
29245	//       "location": "query",
29246	//       "type": "boolean"
29247	//     }
29248	//   },
29249	//   "path": "v2/{+parent}/sinks",
29250	//   "request": {
29251	//     "$ref": "LogSink"
29252	//   },
29253	//   "response": {
29254	//     "$ref": "LogSink"
29255	//   },
29256	//   "scopes": [
29257	//     "https://www.googleapis.com/auth/cloud-platform",
29258	//     "https://www.googleapis.com/auth/logging.admin"
29259	//   ]
29260	// }
29261
29262}
29263
29264// method id "logging.sinks.delete":
29265
29266type SinksDeleteCall struct {
29267	s          *Service
29268	sinkNameid string
29269	urlParams_ gensupport.URLParams
29270	ctx_       context.Context
29271	header_    http.Header
29272}
29273
29274// Delete: Deletes a sink. If the sink has a unique writer_identity,
29275// then that service account is also deleted.
29276//
29277// - sinkName: The full resource name of the sink to delete, including
29278//   the parent resource and the sink identifier:
29279//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
29280//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
29281//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
29282//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
29283//   example:"projects/my-project/sinks/my-sink".
29284func (r *SinksService) Delete(sinkNameid string) *SinksDeleteCall {
29285	c := &SinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29286	c.sinkNameid = sinkNameid
29287	return c
29288}
29289
29290// Fields allows partial responses to be retrieved. See
29291// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29292// for more information.
29293func (c *SinksDeleteCall) Fields(s ...googleapi.Field) *SinksDeleteCall {
29294	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29295	return c
29296}
29297
29298// Context sets the context to be used in this call's Do method. Any
29299// pending HTTP request will be aborted if the provided context is
29300// canceled.
29301func (c *SinksDeleteCall) Context(ctx context.Context) *SinksDeleteCall {
29302	c.ctx_ = ctx
29303	return c
29304}
29305
29306// Header returns an http.Header that can be modified by the caller to
29307// add HTTP headers to the request.
29308func (c *SinksDeleteCall) Header() http.Header {
29309	if c.header_ == nil {
29310		c.header_ = make(http.Header)
29311	}
29312	return c.header_
29313}
29314
29315func (c *SinksDeleteCall) doRequest(alt string) (*http.Response, error) {
29316	reqHeaders := make(http.Header)
29317	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
29318	for k, v := range c.header_ {
29319		reqHeaders[k] = v
29320	}
29321	reqHeaders.Set("User-Agent", c.s.userAgent())
29322	var body io.Reader = nil
29323	c.urlParams_.Set("alt", alt)
29324	c.urlParams_.Set("prettyPrint", "false")
29325	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
29326	urls += "?" + c.urlParams_.Encode()
29327	req, err := http.NewRequest("DELETE", urls, body)
29328	if err != nil {
29329		return nil, err
29330	}
29331	req.Header = reqHeaders
29332	googleapi.Expand(req.URL, map[string]string{
29333		"sinkName": c.sinkNameid,
29334	})
29335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29336}
29337
29338// Do executes the "logging.sinks.delete" call.
29339// Exactly one of *Empty or error will be non-nil. Any non-2xx status
29340// code is an error. Response headers are in either
29341// *Empty.ServerResponse.Header or (if a response was returned at all)
29342// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
29343// check whether the returned error was because http.StatusNotModified
29344// was returned.
29345func (c *SinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
29346	gensupport.SetOptions(c.urlParams_, opts...)
29347	res, err := c.doRequest("json")
29348	if res != nil && res.StatusCode == http.StatusNotModified {
29349		if res.Body != nil {
29350			res.Body.Close()
29351		}
29352		return nil, &googleapi.Error{
29353			Code:   res.StatusCode,
29354			Header: res.Header,
29355		}
29356	}
29357	if err != nil {
29358		return nil, err
29359	}
29360	defer googleapi.CloseBody(res)
29361	if err := googleapi.CheckResponse(res); err != nil {
29362		return nil, err
29363	}
29364	ret := &Empty{
29365		ServerResponse: googleapi.ServerResponse{
29366			Header:         res.Header,
29367			HTTPStatusCode: res.StatusCode,
29368		},
29369	}
29370	target := &ret
29371	if err := gensupport.DecodeResponse(target, res); err != nil {
29372		return nil, err
29373	}
29374	return ret, nil
29375	// {
29376	//   "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.",
29377	//   "flatPath": "v2/{v2Id}/{v2Id1}/sinks/{sinksId}",
29378	//   "httpMethod": "DELETE",
29379	//   "id": "logging.sinks.delete",
29380	//   "parameterOrder": [
29381	//     "sinkName"
29382	//   ],
29383	//   "parameters": {
29384	//     "sinkName": {
29385	//       "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
29386	//       "location": "path",
29387	//       "pattern": "^[^/]+/[^/]+/sinks/[^/]+$",
29388	//       "required": true,
29389	//       "type": "string"
29390	//     }
29391	//   },
29392	//   "path": "v2/{+sinkName}",
29393	//   "response": {
29394	//     "$ref": "Empty"
29395	//   },
29396	//   "scopes": [
29397	//     "https://www.googleapis.com/auth/cloud-platform",
29398	//     "https://www.googleapis.com/auth/logging.admin"
29399	//   ]
29400	// }
29401
29402}
29403
29404// method id "logging.sinks.get":
29405
29406type SinksGetCall struct {
29407	s            *Service
29408	sinkName     string
29409	urlParams_   gensupport.URLParams
29410	ifNoneMatch_ string
29411	ctx_         context.Context
29412	header_      http.Header
29413}
29414
29415// Get: Gets a sink.
29416//
29417// - sinkName: The resource name of the sink:
29418//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
29419//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
29420//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
29421//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
29422//   example:"projects/my-project/sinks/my-sink".
29423func (r *SinksService) Get(sinkName string) *SinksGetCall {
29424	c := &SinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29425	c.sinkName = sinkName
29426	return c
29427}
29428
29429// Fields allows partial responses to be retrieved. See
29430// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29431// for more information.
29432func (c *SinksGetCall) Fields(s ...googleapi.Field) *SinksGetCall {
29433	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29434	return c
29435}
29436
29437// IfNoneMatch sets the optional parameter which makes the operation
29438// fail if the object's ETag matches the given value. This is useful for
29439// getting updates only after the object has changed since the last
29440// request. Use googleapi.IsNotModified to check whether the response
29441// error from Do is the result of In-None-Match.
29442func (c *SinksGetCall) IfNoneMatch(entityTag string) *SinksGetCall {
29443	c.ifNoneMatch_ = entityTag
29444	return c
29445}
29446
29447// Context sets the context to be used in this call's Do method. Any
29448// pending HTTP request will be aborted if the provided context is
29449// canceled.
29450func (c *SinksGetCall) Context(ctx context.Context) *SinksGetCall {
29451	c.ctx_ = ctx
29452	return c
29453}
29454
29455// Header returns an http.Header that can be modified by the caller to
29456// add HTTP headers to the request.
29457func (c *SinksGetCall) Header() http.Header {
29458	if c.header_ == nil {
29459		c.header_ = make(http.Header)
29460	}
29461	return c.header_
29462}
29463
29464func (c *SinksGetCall) doRequest(alt string) (*http.Response, error) {
29465	reqHeaders := make(http.Header)
29466	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
29467	for k, v := range c.header_ {
29468		reqHeaders[k] = v
29469	}
29470	reqHeaders.Set("User-Agent", c.s.userAgent())
29471	if c.ifNoneMatch_ != "" {
29472		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29473	}
29474	var body io.Reader = nil
29475	c.urlParams_.Set("alt", alt)
29476	c.urlParams_.Set("prettyPrint", "false")
29477	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
29478	urls += "?" + c.urlParams_.Encode()
29479	req, err := http.NewRequest("GET", urls, body)
29480	if err != nil {
29481		return nil, err
29482	}
29483	req.Header = reqHeaders
29484	googleapi.Expand(req.URL, map[string]string{
29485		"sinkName": c.sinkName,
29486	})
29487	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29488}
29489
29490// Do executes the "logging.sinks.get" call.
29491// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
29492// code is an error. Response headers are in either
29493// *LogSink.ServerResponse.Header or (if a response was returned at all)
29494// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
29495// check whether the returned error was because http.StatusNotModified
29496// was returned.
29497func (c *SinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
29498	gensupport.SetOptions(c.urlParams_, opts...)
29499	res, err := c.doRequest("json")
29500	if res != nil && res.StatusCode == http.StatusNotModified {
29501		if res.Body != nil {
29502			res.Body.Close()
29503		}
29504		return nil, &googleapi.Error{
29505			Code:   res.StatusCode,
29506			Header: res.Header,
29507		}
29508	}
29509	if err != nil {
29510		return nil, err
29511	}
29512	defer googleapi.CloseBody(res)
29513	if err := googleapi.CheckResponse(res); err != nil {
29514		return nil, err
29515	}
29516	ret := &LogSink{
29517		ServerResponse: googleapi.ServerResponse{
29518			Header:         res.Header,
29519			HTTPStatusCode: res.StatusCode,
29520		},
29521	}
29522	target := &ret
29523	if err := gensupport.DecodeResponse(target, res); err != nil {
29524		return nil, err
29525	}
29526	return ret, nil
29527	// {
29528	//   "description": "Gets a sink.",
29529	//   "flatPath": "v2/{v2Id}/{v2Id1}/sinks/{sinksId}",
29530	//   "httpMethod": "GET",
29531	//   "id": "logging.sinks.get",
29532	//   "parameterOrder": [
29533	//     "sinkName"
29534	//   ],
29535	//   "parameters": {
29536	//     "sinkName": {
29537	//       "description": "Required. The resource name of the sink: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
29538	//       "location": "path",
29539	//       "pattern": "^[^/]+/[^/]+/sinks/[^/]+$",
29540	//       "required": true,
29541	//       "type": "string"
29542	//     }
29543	//   },
29544	//   "path": "v2/{+sinkName}",
29545	//   "response": {
29546	//     "$ref": "LogSink"
29547	//   },
29548	//   "scopes": [
29549	//     "https://www.googleapis.com/auth/cloud-platform",
29550	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
29551	//     "https://www.googleapis.com/auth/logging.admin",
29552	//     "https://www.googleapis.com/auth/logging.read"
29553	//   ]
29554	// }
29555
29556}
29557
29558// method id "logging.sinks.list":
29559
29560type SinksListCall struct {
29561	s            *Service
29562	parent       string
29563	urlParams_   gensupport.URLParams
29564	ifNoneMatch_ string
29565	ctx_         context.Context
29566	header_      http.Header
29567}
29568
29569// List: Lists sinks.
29570//
29571// - parent: The parent resource whose sinks are to be listed:
29572//   "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
29573//   "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
29574func (r *SinksService) List(parent string) *SinksListCall {
29575	c := &SinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29576	c.parent = parent
29577	return c
29578}
29579
29580// PageSize sets the optional parameter "pageSize": The maximum number
29581// of results to return from this request. Non-positive values are
29582// ignored. The presence of nextPageToken in the response indicates that
29583// more results might be available.
29584func (c *SinksListCall) PageSize(pageSize int64) *SinksListCall {
29585	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29586	return c
29587}
29588
29589// PageToken sets the optional parameter "pageToken": If present, then
29590// retrieve the next batch of results from the preceding call to this
29591// method. pageToken must be the value of nextPageToken from the
29592// previous response. The values of other method parameters should be
29593// identical to those in the previous call.
29594func (c *SinksListCall) PageToken(pageToken string) *SinksListCall {
29595	c.urlParams_.Set("pageToken", pageToken)
29596	return c
29597}
29598
29599// Fields allows partial responses to be retrieved. See
29600// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29601// for more information.
29602func (c *SinksListCall) Fields(s ...googleapi.Field) *SinksListCall {
29603	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29604	return c
29605}
29606
29607// IfNoneMatch sets the optional parameter which makes the operation
29608// fail if the object's ETag matches the given value. This is useful for
29609// getting updates only after the object has changed since the last
29610// request. Use googleapi.IsNotModified to check whether the response
29611// error from Do is the result of In-None-Match.
29612func (c *SinksListCall) IfNoneMatch(entityTag string) *SinksListCall {
29613	c.ifNoneMatch_ = entityTag
29614	return c
29615}
29616
29617// Context sets the context to be used in this call's Do method. Any
29618// pending HTTP request will be aborted if the provided context is
29619// canceled.
29620func (c *SinksListCall) Context(ctx context.Context) *SinksListCall {
29621	c.ctx_ = ctx
29622	return c
29623}
29624
29625// Header returns an http.Header that can be modified by the caller to
29626// add HTTP headers to the request.
29627func (c *SinksListCall) Header() http.Header {
29628	if c.header_ == nil {
29629		c.header_ = make(http.Header)
29630	}
29631	return c.header_
29632}
29633
29634func (c *SinksListCall) doRequest(alt string) (*http.Response, error) {
29635	reqHeaders := make(http.Header)
29636	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
29637	for k, v := range c.header_ {
29638		reqHeaders[k] = v
29639	}
29640	reqHeaders.Set("User-Agent", c.s.userAgent())
29641	if c.ifNoneMatch_ != "" {
29642		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29643	}
29644	var body io.Reader = nil
29645	c.urlParams_.Set("alt", alt)
29646	c.urlParams_.Set("prettyPrint", "false")
29647	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
29648	urls += "?" + c.urlParams_.Encode()
29649	req, err := http.NewRequest("GET", urls, body)
29650	if err != nil {
29651		return nil, err
29652	}
29653	req.Header = reqHeaders
29654	googleapi.Expand(req.URL, map[string]string{
29655		"parent": c.parent,
29656	})
29657	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29658}
29659
29660// Do executes the "logging.sinks.list" call.
29661// Exactly one of *ListSinksResponse or error will be non-nil. Any
29662// non-2xx status code is an error. Response headers are in either
29663// *ListSinksResponse.ServerResponse.Header or (if a response was
29664// returned at all) in error.(*googleapi.Error).Header. Use
29665// googleapi.IsNotModified to check whether the returned error was
29666// because http.StatusNotModified was returned.
29667func (c *SinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
29668	gensupport.SetOptions(c.urlParams_, opts...)
29669	res, err := c.doRequest("json")
29670	if res != nil && res.StatusCode == http.StatusNotModified {
29671		if res.Body != nil {
29672			res.Body.Close()
29673		}
29674		return nil, &googleapi.Error{
29675			Code:   res.StatusCode,
29676			Header: res.Header,
29677		}
29678	}
29679	if err != nil {
29680		return nil, err
29681	}
29682	defer googleapi.CloseBody(res)
29683	if err := googleapi.CheckResponse(res); err != nil {
29684		return nil, err
29685	}
29686	ret := &ListSinksResponse{
29687		ServerResponse: googleapi.ServerResponse{
29688			Header:         res.Header,
29689			HTTPStatusCode: res.StatusCode,
29690		},
29691	}
29692	target := &ret
29693	if err := gensupport.DecodeResponse(target, res); err != nil {
29694		return nil, err
29695	}
29696	return ret, nil
29697	// {
29698	//   "description": "Lists sinks.",
29699	//   "flatPath": "v2/{v2Id}/{v2Id1}/sinks",
29700	//   "httpMethod": "GET",
29701	//   "id": "logging.sinks.list",
29702	//   "parameterOrder": [
29703	//     "parent"
29704	//   ],
29705	//   "parameters": {
29706	//     "pageSize": {
29707	//       "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
29708	//       "format": "int32",
29709	//       "location": "query",
29710	//       "type": "integer"
29711	//     },
29712	//     "pageToken": {
29713	//       "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
29714	//       "location": "query",
29715	//       "type": "string"
29716	//     },
29717	//     "parent": {
29718	//       "description": "Required. The parent resource whose sinks are to be listed: \"projects/[PROJECT_ID]\" \"organizations/[ORGANIZATION_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]\" \"folders/[FOLDER_ID]\" ",
29719	//       "location": "path",
29720	//       "pattern": "^[^/]+/[^/]+$",
29721	//       "required": true,
29722	//       "type": "string"
29723	//     }
29724	//   },
29725	//   "path": "v2/{+parent}/sinks",
29726	//   "response": {
29727	//     "$ref": "ListSinksResponse"
29728	//   },
29729	//   "scopes": [
29730	//     "https://www.googleapis.com/auth/cloud-platform",
29731	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
29732	//     "https://www.googleapis.com/auth/logging.admin",
29733	//     "https://www.googleapis.com/auth/logging.read"
29734	//   ]
29735	// }
29736
29737}
29738
29739// Pages invokes f for each page of results.
29740// A non-nil error returned from f will halt the iteration.
29741// The provided context supersedes any context provided to the Context method.
29742func (c *SinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
29743	c.ctx_ = ctx
29744	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29745	for {
29746		x, err := c.Do()
29747		if err != nil {
29748			return err
29749		}
29750		if err := f(x); err != nil {
29751			return err
29752		}
29753		if x.NextPageToken == "" {
29754			return nil
29755		}
29756		c.PageToken(x.NextPageToken)
29757	}
29758}
29759
29760// method id "logging.sinks.update":
29761
29762type SinksUpdateCall struct {
29763	s          *Service
29764	sinkNameid string
29765	logsink    *LogSink
29766	urlParams_ gensupport.URLParams
29767	ctx_       context.Context
29768	header_    http.Header
29769}
29770
29771// Update: Updates a sink. This method replaces the following fields in
29772// the existing sink with values from the new sink: destination, and
29773// filter.The updated sink might also have a new writer_identity; see
29774// the unique_writer_identity field.
29775//
29776// - sinkName: The full resource name of the sink to update, including
29777//   the parent resource and the sink identifier:
29778//   "projects/[PROJECT_ID]/sinks/[SINK_ID]"
29779//   "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
29780//   "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
29781//   "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
29782//   example:"projects/my-project/sinks/my-sink".
29783func (r *SinksService) Update(sinkNameid string, logsink *LogSink) *SinksUpdateCall {
29784	c := &SinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29785	c.sinkNameid = sinkNameid
29786	c.logsink = logsink
29787	return c
29788}
29789
29790// UniqueWriterIdentity sets the optional parameter
29791// "uniqueWriterIdentity": See sinks.create for a description of this
29792// field. When updating a sink, the effect of this field on the value of
29793// writer_identity in the updated sink depends on both the old and new
29794// values of this field: If the old and new values of this field are
29795// both false or both true, then there is no change to the sink's
29796// writer_identity. If the old value is false and the new value is true,
29797// then writer_identity is changed to a unique service account. It is an
29798// error if the old value is true and the new value is set to false or
29799// defaulted to false.
29800func (c *SinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *SinksUpdateCall {
29801	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
29802	return c
29803}
29804
29805// UpdateMask sets the optional parameter "updateMask": Field mask that
29806// specifies the fields in sink that need an update. A sink field will
29807// be overwritten if, and only if, it is in the update mask. name and
29808// output only fields cannot be updated.An empty updateMask is
29809// temporarily treated as using the following mask for backwards
29810// compatibility purposes:destination,filter,includeChildrenAt some
29811// point in the future, behavior will be removed and specifying an empty
29812// updateMask will be an error.For a detailed FieldMask definition, see
29813// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
29814// example: updateMask=filter
29815func (c *SinksUpdateCall) UpdateMask(updateMask string) *SinksUpdateCall {
29816	c.urlParams_.Set("updateMask", updateMask)
29817	return c
29818}
29819
29820// Fields allows partial responses to be retrieved. See
29821// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29822// for more information.
29823func (c *SinksUpdateCall) Fields(s ...googleapi.Field) *SinksUpdateCall {
29824	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29825	return c
29826}
29827
29828// Context sets the context to be used in this call's Do method. Any
29829// pending HTTP request will be aborted if the provided context is
29830// canceled.
29831func (c *SinksUpdateCall) Context(ctx context.Context) *SinksUpdateCall {
29832	c.ctx_ = ctx
29833	return c
29834}
29835
29836// Header returns an http.Header that can be modified by the caller to
29837// add HTTP headers to the request.
29838func (c *SinksUpdateCall) Header() http.Header {
29839	if c.header_ == nil {
29840		c.header_ = make(http.Header)
29841	}
29842	return c.header_
29843}
29844
29845func (c *SinksUpdateCall) doRequest(alt string) (*http.Response, error) {
29846	reqHeaders := make(http.Header)
29847	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
29848	for k, v := range c.header_ {
29849		reqHeaders[k] = v
29850	}
29851	reqHeaders.Set("User-Agent", c.s.userAgent())
29852	var body io.Reader = nil
29853	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
29854	if err != nil {
29855		return nil, err
29856	}
29857	reqHeaders.Set("Content-Type", "application/json")
29858	c.urlParams_.Set("alt", alt)
29859	c.urlParams_.Set("prettyPrint", "false")
29860	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
29861	urls += "?" + c.urlParams_.Encode()
29862	req, err := http.NewRequest("PUT", urls, body)
29863	if err != nil {
29864		return nil, err
29865	}
29866	req.Header = reqHeaders
29867	googleapi.Expand(req.URL, map[string]string{
29868		"sinkName": c.sinkNameid,
29869	})
29870	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29871}
29872
29873// Do executes the "logging.sinks.update" call.
29874// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
29875// code is an error. Response headers are in either
29876// *LogSink.ServerResponse.Header or (if a response was returned at all)
29877// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
29878// check whether the returned error was because http.StatusNotModified
29879// was returned.
29880func (c *SinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
29881	gensupport.SetOptions(c.urlParams_, opts...)
29882	res, err := c.doRequest("json")
29883	if res != nil && res.StatusCode == http.StatusNotModified {
29884		if res.Body != nil {
29885			res.Body.Close()
29886		}
29887		return nil, &googleapi.Error{
29888			Code:   res.StatusCode,
29889			Header: res.Header,
29890		}
29891	}
29892	if err != nil {
29893		return nil, err
29894	}
29895	defer googleapi.CloseBody(res)
29896	if err := googleapi.CheckResponse(res); err != nil {
29897		return nil, err
29898	}
29899	ret := &LogSink{
29900		ServerResponse: googleapi.ServerResponse{
29901			Header:         res.Header,
29902			HTTPStatusCode: res.StatusCode,
29903		},
29904	}
29905	target := &ret
29906	if err := gensupport.DecodeResponse(target, res); err != nil {
29907		return nil, err
29908	}
29909	return ret, nil
29910	// {
29911	//   "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
29912	//   "flatPath": "v2/{v2Id}/{v2Id1}/sinks/{sinksId}",
29913	//   "httpMethod": "PUT",
29914	//   "id": "logging.sinks.update",
29915	//   "parameterOrder": [
29916	//     "sinkName"
29917	//   ],
29918	//   "parameters": {
29919	//     "sinkName": {
29920	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier: \"projects/[PROJECT_ID]/sinks/[SINK_ID]\" \"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\" \"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\" \"folders/[FOLDER_ID]/sinks/[SINK_ID]\" For example:\"projects/my-project/sinks/my-sink\"",
29921	//       "location": "path",
29922	//       "pattern": "^[^/]+/[^/]+/sinks/[^/]+$",
29923	//       "required": true,
29924	//       "type": "string"
29925	//     },
29926	//     "uniqueWriterIdentity": {
29927	//       "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false.",
29928	//       "location": "query",
29929	//       "type": "boolean"
29930	//     },
29931	//     "updateMask": {
29932	//       "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter",
29933	//       "format": "google-fieldmask",
29934	//       "location": "query",
29935	//       "type": "string"
29936	//     }
29937	//   },
29938	//   "path": "v2/{+sinkName}",
29939	//   "request": {
29940	//     "$ref": "LogSink"
29941	//   },
29942	//   "response": {
29943	//     "$ref": "LogSink"
29944	//   },
29945	//   "scopes": [
29946	//     "https://www.googleapis.com/auth/cloud-platform",
29947	//     "https://www.googleapis.com/auth/logging.admin"
29948	//   ]
29949	// }
29950
29951}
29952
29953// method id "logging.getCmekSettings":
29954
29955type V2GetCmekSettingsCall struct {
29956	s            *Service
29957	name         string
29958	urlParams_   gensupport.URLParams
29959	ifNoneMatch_ string
29960	ctx_         context.Context
29961	header_      http.Header
29962}
29963
29964// GetCmekSettings: Gets the Logs Router CMEK settings for the given
29965// resource.Note: CMEK for the Logs Router can currently only be
29966// configured for GCP organizations. Once configured, it applies to all
29967// projects and folders in the GCP organization.See Enabling CMEK for
29968// Logs Router
29969// (https://cloud.google.com/logging/docs/routing/managed-encryption)
29970// for more information.
29971//
29972// - name: The resource for which to retrieve CMEK settings.
29973//   "projects/[PROJECT_ID]/cmekSettings"
29974//   "organizations/[ORGANIZATION_ID]/cmekSettings"
29975//   "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
29976//   "folders/[FOLDER_ID]/cmekSettings" For
29977//   example:"organizations/12345/cmekSettings"Note: CMEK for the Logs
29978//   Router can currently only be configured for GCP organizations. Once
29979//   configured, it applies to all projects and folders in the GCP
29980//   organization.
29981func (r *V2Service) GetCmekSettings(name string) *V2GetCmekSettingsCall {
29982	c := &V2GetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29983	c.name = name
29984	return c
29985}
29986
29987// Fields allows partial responses to be retrieved. See
29988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29989// for more information.
29990func (c *V2GetCmekSettingsCall) Fields(s ...googleapi.Field) *V2GetCmekSettingsCall {
29991	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29992	return c
29993}
29994
29995// IfNoneMatch sets the optional parameter which makes the operation
29996// fail if the object's ETag matches the given value. This is useful for
29997// getting updates only after the object has changed since the last
29998// request. Use googleapi.IsNotModified to check whether the response
29999// error from Do is the result of In-None-Match.
30000func (c *V2GetCmekSettingsCall) IfNoneMatch(entityTag string) *V2GetCmekSettingsCall {
30001	c.ifNoneMatch_ = entityTag
30002	return c
30003}
30004
30005// Context sets the context to be used in this call's Do method. Any
30006// pending HTTP request will be aborted if the provided context is
30007// canceled.
30008func (c *V2GetCmekSettingsCall) Context(ctx context.Context) *V2GetCmekSettingsCall {
30009	c.ctx_ = ctx
30010	return c
30011}
30012
30013// Header returns an http.Header that can be modified by the caller to
30014// add HTTP headers to the request.
30015func (c *V2GetCmekSettingsCall) Header() http.Header {
30016	if c.header_ == nil {
30017		c.header_ = make(http.Header)
30018	}
30019	return c.header_
30020}
30021
30022func (c *V2GetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
30023	reqHeaders := make(http.Header)
30024	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
30025	for k, v := range c.header_ {
30026		reqHeaders[k] = v
30027	}
30028	reqHeaders.Set("User-Agent", c.s.userAgent())
30029	if c.ifNoneMatch_ != "" {
30030		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30031	}
30032	var body io.Reader = nil
30033	c.urlParams_.Set("alt", alt)
30034	c.urlParams_.Set("prettyPrint", "false")
30035	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
30036	urls += "?" + c.urlParams_.Encode()
30037	req, err := http.NewRequest("GET", urls, body)
30038	if err != nil {
30039		return nil, err
30040	}
30041	req.Header = reqHeaders
30042	googleapi.Expand(req.URL, map[string]string{
30043		"name": c.name,
30044	})
30045	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30046}
30047
30048// Do executes the "logging.getCmekSettings" call.
30049// Exactly one of *CmekSettings or error will be non-nil. Any non-2xx
30050// status code is an error. Response headers are in either
30051// *CmekSettings.ServerResponse.Header or (if a response was returned at
30052// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30053// to check whether the returned error was because
30054// http.StatusNotModified was returned.
30055func (c *V2GetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
30056	gensupport.SetOptions(c.urlParams_, opts...)
30057	res, err := c.doRequest("json")
30058	if res != nil && res.StatusCode == http.StatusNotModified {
30059		if res.Body != nil {
30060			res.Body.Close()
30061		}
30062		return nil, &googleapi.Error{
30063			Code:   res.StatusCode,
30064			Header: res.Header,
30065		}
30066	}
30067	if err != nil {
30068		return nil, err
30069	}
30070	defer googleapi.CloseBody(res)
30071	if err := googleapi.CheckResponse(res); err != nil {
30072		return nil, err
30073	}
30074	ret := &CmekSettings{
30075		ServerResponse: googleapi.ServerResponse{
30076			Header:         res.Header,
30077			HTTPStatusCode: res.StatusCode,
30078		},
30079	}
30080	target := &ret
30081	if err := gensupport.DecodeResponse(target, res); err != nil {
30082		return nil, err
30083	}
30084	return ret, nil
30085	// {
30086	//   "description": "Gets the Logs Router CMEK settings for the given resource.Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.See Enabling CMEK for Logs Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.",
30087	//   "flatPath": "v2/{v2Id}/{v2Id1}/cmekSettings",
30088	//   "httpMethod": "GET",
30089	//   "id": "logging.getCmekSettings",
30090	//   "parameterOrder": [
30091	//     "name"
30092	//   ],
30093	//   "parameters": {
30094	//     "name": {
30095	//       "description": "Required. The resource for which to retrieve CMEK settings. \"projects/[PROJECT_ID]/cmekSettings\" \"organizations/[ORGANIZATION_ID]/cmekSettings\" \"billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings\" \"folders/[FOLDER_ID]/cmekSettings\" For example:\"organizations/12345/cmekSettings\"Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.",
30096	//       "location": "path",
30097	//       "pattern": "^[^/]+/[^/]+$",
30098	//       "required": true,
30099	//       "type": "string"
30100	//     }
30101	//   },
30102	//   "path": "v2/{+name}/cmekSettings",
30103	//   "response": {
30104	//     "$ref": "CmekSettings"
30105	//   },
30106	//   "scopes": [
30107	//     "https://www.googleapis.com/auth/cloud-platform",
30108	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
30109	//     "https://www.googleapis.com/auth/logging.admin",
30110	//     "https://www.googleapis.com/auth/logging.read"
30111	//   ]
30112	// }
30113
30114}
30115
30116// method id "logging.updateCmekSettings":
30117
30118type V2UpdateCmekSettingsCall struct {
30119	s            *Service
30120	name         string
30121	cmeksettings *CmekSettings
30122	urlParams_   gensupport.URLParams
30123	ctx_         context.Context
30124	header_      http.Header
30125}
30126
30127// UpdateCmekSettings: Updates the Logs Router CMEK settings for the
30128// given resource.Note: CMEK for the Logs Router can currently only be
30129// configured for GCP organizations. Once configured, it applies to all
30130// projects and folders in the GCP organization.UpdateCmekSettings will
30131// fail if 1) kms_key_name is invalid, or 2) the associated service
30132// account does not have the required
30133// roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key,
30134// or 3) access to the key is disabled.See Enabling CMEK for Logs Router
30135// (https://cloud.google.com/logging/docs/routing/managed-encryption)
30136// for more information.
30137//
30138// - name: The resource name for the CMEK settings to update.
30139//   "projects/[PROJECT_ID]/cmekSettings"
30140//   "organizations/[ORGANIZATION_ID]/cmekSettings"
30141//   "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
30142//   "folders/[FOLDER_ID]/cmekSettings" For
30143//   example:"organizations/12345/cmekSettings"Note: CMEK for the Logs
30144//   Router can currently only be configured for GCP organizations. Once
30145//   configured, it applies to all projects and folders in the GCP
30146//   organization.
30147func (r *V2Service) UpdateCmekSettings(name string, cmeksettings *CmekSettings) *V2UpdateCmekSettingsCall {
30148	c := &V2UpdateCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30149	c.name = name
30150	c.cmeksettings = cmeksettings
30151	return c
30152}
30153
30154// UpdateMask sets the optional parameter "updateMask": Field mask
30155// identifying which fields from cmek_settings should be updated. A
30156// field will be overwritten if and only if it is in the update mask.
30157// Output only fields cannot be updated.See FieldMask for more
30158// information.For example: "updateMask=kmsKeyName"
30159func (c *V2UpdateCmekSettingsCall) UpdateMask(updateMask string) *V2UpdateCmekSettingsCall {
30160	c.urlParams_.Set("updateMask", updateMask)
30161	return c
30162}
30163
30164// Fields allows partial responses to be retrieved. See
30165// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30166// for more information.
30167func (c *V2UpdateCmekSettingsCall) Fields(s ...googleapi.Field) *V2UpdateCmekSettingsCall {
30168	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30169	return c
30170}
30171
30172// Context sets the context to be used in this call's Do method. Any
30173// pending HTTP request will be aborted if the provided context is
30174// canceled.
30175func (c *V2UpdateCmekSettingsCall) Context(ctx context.Context) *V2UpdateCmekSettingsCall {
30176	c.ctx_ = ctx
30177	return c
30178}
30179
30180// Header returns an http.Header that can be modified by the caller to
30181// add HTTP headers to the request.
30182func (c *V2UpdateCmekSettingsCall) Header() http.Header {
30183	if c.header_ == nil {
30184		c.header_ = make(http.Header)
30185	}
30186	return c.header_
30187}
30188
30189func (c *V2UpdateCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
30190	reqHeaders := make(http.Header)
30191	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
30192	for k, v := range c.header_ {
30193		reqHeaders[k] = v
30194	}
30195	reqHeaders.Set("User-Agent", c.s.userAgent())
30196	var body io.Reader = nil
30197	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cmeksettings)
30198	if err != nil {
30199		return nil, err
30200	}
30201	reqHeaders.Set("Content-Type", "application/json")
30202	c.urlParams_.Set("alt", alt)
30203	c.urlParams_.Set("prettyPrint", "false")
30204	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
30205	urls += "?" + c.urlParams_.Encode()
30206	req, err := http.NewRequest("PATCH", urls, body)
30207	if err != nil {
30208		return nil, err
30209	}
30210	req.Header = reqHeaders
30211	googleapi.Expand(req.URL, map[string]string{
30212		"name": c.name,
30213	})
30214	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30215}
30216
30217// Do executes the "logging.updateCmekSettings" call.
30218// Exactly one of *CmekSettings or error will be non-nil. Any non-2xx
30219// status code is an error. Response headers are in either
30220// *CmekSettings.ServerResponse.Header or (if a response was returned at
30221// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30222// to check whether the returned error was because
30223// http.StatusNotModified was returned.
30224func (c *V2UpdateCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
30225	gensupport.SetOptions(c.urlParams_, opts...)
30226	res, err := c.doRequest("json")
30227	if res != nil && res.StatusCode == http.StatusNotModified {
30228		if res.Body != nil {
30229			res.Body.Close()
30230		}
30231		return nil, &googleapi.Error{
30232			Code:   res.StatusCode,
30233			Header: res.Header,
30234		}
30235	}
30236	if err != nil {
30237		return nil, err
30238	}
30239	defer googleapi.CloseBody(res)
30240	if err := googleapi.CheckResponse(res); err != nil {
30241		return nil, err
30242	}
30243	ret := &CmekSettings{
30244		ServerResponse: googleapi.ServerResponse{
30245			Header:         res.Header,
30246			HTTPStatusCode: res.StatusCode,
30247		},
30248	}
30249	target := &ret
30250	if err := gensupport.DecodeResponse(target, res); err != nil {
30251		return nil, err
30252	}
30253	return ret, nil
30254	// {
30255	//   "description": "Updates the Logs Router CMEK settings for the given resource.Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.UpdateCmekSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled.See Enabling CMEK for Logs Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.",
30256	//   "flatPath": "v2/{v2Id}/{v2Id1}/cmekSettings",
30257	//   "httpMethod": "PATCH",
30258	//   "id": "logging.updateCmekSettings",
30259	//   "parameterOrder": [
30260	//     "name"
30261	//   ],
30262	//   "parameters": {
30263	//     "name": {
30264	//       "description": "Required. The resource name for the CMEK settings to update. \"projects/[PROJECT_ID]/cmekSettings\" \"organizations/[ORGANIZATION_ID]/cmekSettings\" \"billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings\" \"folders/[FOLDER_ID]/cmekSettings\" For example:\"organizations/12345/cmekSettings\"Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.",
30265	//       "location": "path",
30266	//       "pattern": "^[^/]+/[^/]+$",
30267	//       "required": true,
30268	//       "type": "string"
30269	//     },
30270	//     "updateMask": {
30271	//       "description": "Optional. Field mask identifying which fields from cmek_settings should be updated. A field will be overwritten if and only if it is in the update mask. Output only fields cannot be updated.See FieldMask for more information.For example: \"updateMask=kmsKeyName\"",
30272	//       "format": "google-fieldmask",
30273	//       "location": "query",
30274	//       "type": "string"
30275	//     }
30276	//   },
30277	//   "path": "v2/{+name}/cmekSettings",
30278	//   "request": {
30279	//     "$ref": "CmekSettings"
30280	//   },
30281	//   "response": {
30282	//     "$ref": "CmekSettings"
30283	//   },
30284	//   "scopes": [
30285	//     "https://www.googleapis.com/auth/cloud-platform",
30286	//     "https://www.googleapis.com/auth/logging.admin"
30287	//   ]
30288	// }
30289
30290}
30291