1// Copyright 2019 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 Stackdriver 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	htransport "google.golang.org/api/transport/http"
62)
63
64// Always reference these packages, just in case the auto-generated code
65// below doesn't.
66var _ = bytes.NewBuffer
67var _ = strconv.Itoa
68var _ = fmt.Sprintf
69var _ = json.NewDecoder
70var _ = io.Copy
71var _ = url.Parse
72var _ = gensupport.MarshalJSON
73var _ = googleapi.Version
74var _ = errors.New
75var _ = strings.Replace
76var _ = context.Canceled
77
78const apiId = "logging:v2"
79const apiName = "logging"
80const apiVersion = "v2"
81const basePath = "https://logging.googleapis.com/"
82
83// OAuth2 scopes used by this API.
84const (
85	// View and manage your data across Google Cloud Platform services
86	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
87
88	// View your data across Google Cloud Platform services
89	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
90
91	// Administrate log data for your projects
92	LoggingAdminScope = "https://www.googleapis.com/auth/logging.admin"
93
94	// View log data for your projects
95	LoggingReadScope = "https://www.googleapis.com/auth/logging.read"
96
97	// Submit log data for your projects
98	LoggingWriteScope = "https://www.googleapis.com/auth/logging.write"
99)
100
101// NewService creates a new Service.
102func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
103	scopesOption := option.WithScopes(
104		"https://www.googleapis.com/auth/cloud-platform",
105		"https://www.googleapis.com/auth/cloud-platform.read-only",
106		"https://www.googleapis.com/auth/logging.admin",
107		"https://www.googleapis.com/auth/logging.read",
108		"https://www.googleapis.com/auth/logging.write",
109	)
110	// NOTE: prepend, so we don't override user-specified scopes.
111	opts = append([]option.ClientOption{scopesOption}, opts...)
112	client, endpoint, err := htransport.NewClient(ctx, opts...)
113	if err != nil {
114		return nil, err
115	}
116	s, err := New(client)
117	if err != nil {
118		return nil, err
119	}
120	if endpoint != "" {
121		s.BasePath = endpoint
122	}
123	return s, nil
124}
125
126// New creates a new Service. It uses the provided http.Client for requests.
127//
128// Deprecated: please use NewService instead.
129// To provide a custom HTTP client, use option.WithHTTPClient.
130// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
131func New(client *http.Client) (*Service, error) {
132	if client == nil {
133		return nil, errors.New("client is nil")
134	}
135	s := &Service{client: client, BasePath: basePath}
136	s.BillingAccounts = NewBillingAccountsService(s)
137	s.Entries = NewEntriesService(s)
138	s.Exclusions = NewExclusionsService(s)
139	s.Folders = NewFoldersService(s)
140	s.Logs = NewLogsService(s)
141	s.MonitoredResourceDescriptors = NewMonitoredResourceDescriptorsService(s)
142	s.Organizations = NewOrganizationsService(s)
143	s.Projects = NewProjectsService(s)
144	s.Sinks = NewSinksService(s)
145	return s, nil
146}
147
148type Service struct {
149	client    *http.Client
150	BasePath  string // API endpoint base URL
151	UserAgent string // optional additional User-Agent fragment
152
153	BillingAccounts *BillingAccountsService
154
155	Entries *EntriesService
156
157	Exclusions *ExclusionsService
158
159	Folders *FoldersService
160
161	Logs *LogsService
162
163	MonitoredResourceDescriptors *MonitoredResourceDescriptorsService
164
165	Organizations *OrganizationsService
166
167	Projects *ProjectsService
168
169	Sinks *SinksService
170}
171
172func (s *Service) userAgent() string {
173	if s.UserAgent == "" {
174		return googleapi.UserAgent
175	}
176	return googleapi.UserAgent + " " + s.UserAgent
177}
178
179func NewBillingAccountsService(s *Service) *BillingAccountsService {
180	rs := &BillingAccountsService{s: s}
181	rs.Exclusions = NewBillingAccountsExclusionsService(s)
182	rs.Logs = NewBillingAccountsLogsService(s)
183	rs.Sinks = NewBillingAccountsSinksService(s)
184	return rs
185}
186
187type BillingAccountsService struct {
188	s *Service
189
190	Exclusions *BillingAccountsExclusionsService
191
192	Logs *BillingAccountsLogsService
193
194	Sinks *BillingAccountsSinksService
195}
196
197func NewBillingAccountsExclusionsService(s *Service) *BillingAccountsExclusionsService {
198	rs := &BillingAccountsExclusionsService{s: s}
199	return rs
200}
201
202type BillingAccountsExclusionsService struct {
203	s *Service
204}
205
206func NewBillingAccountsLogsService(s *Service) *BillingAccountsLogsService {
207	rs := &BillingAccountsLogsService{s: s}
208	return rs
209}
210
211type BillingAccountsLogsService struct {
212	s *Service
213}
214
215func NewBillingAccountsSinksService(s *Service) *BillingAccountsSinksService {
216	rs := &BillingAccountsSinksService{s: s}
217	return rs
218}
219
220type BillingAccountsSinksService struct {
221	s *Service
222}
223
224func NewEntriesService(s *Service) *EntriesService {
225	rs := &EntriesService{s: s}
226	return rs
227}
228
229type EntriesService struct {
230	s *Service
231}
232
233func NewExclusionsService(s *Service) *ExclusionsService {
234	rs := &ExclusionsService{s: s}
235	return rs
236}
237
238type ExclusionsService struct {
239	s *Service
240}
241
242func NewFoldersService(s *Service) *FoldersService {
243	rs := &FoldersService{s: s}
244	rs.Exclusions = NewFoldersExclusionsService(s)
245	rs.Logs = NewFoldersLogsService(s)
246	rs.Sinks = NewFoldersSinksService(s)
247	return rs
248}
249
250type FoldersService struct {
251	s *Service
252
253	Exclusions *FoldersExclusionsService
254
255	Logs *FoldersLogsService
256
257	Sinks *FoldersSinksService
258}
259
260func NewFoldersExclusionsService(s *Service) *FoldersExclusionsService {
261	rs := &FoldersExclusionsService{s: s}
262	return rs
263}
264
265type FoldersExclusionsService struct {
266	s *Service
267}
268
269func NewFoldersLogsService(s *Service) *FoldersLogsService {
270	rs := &FoldersLogsService{s: s}
271	return rs
272}
273
274type FoldersLogsService struct {
275	s *Service
276}
277
278func NewFoldersSinksService(s *Service) *FoldersSinksService {
279	rs := &FoldersSinksService{s: s}
280	return rs
281}
282
283type FoldersSinksService struct {
284	s *Service
285}
286
287func NewLogsService(s *Service) *LogsService {
288	rs := &LogsService{s: s}
289	return rs
290}
291
292type LogsService struct {
293	s *Service
294}
295
296func NewMonitoredResourceDescriptorsService(s *Service) *MonitoredResourceDescriptorsService {
297	rs := &MonitoredResourceDescriptorsService{s: s}
298	return rs
299}
300
301type MonitoredResourceDescriptorsService struct {
302	s *Service
303}
304
305func NewOrganizationsService(s *Service) *OrganizationsService {
306	rs := &OrganizationsService{s: s}
307	rs.Exclusions = NewOrganizationsExclusionsService(s)
308	rs.Logs = NewOrganizationsLogsService(s)
309	rs.Sinks = NewOrganizationsSinksService(s)
310	return rs
311}
312
313type OrganizationsService struct {
314	s *Service
315
316	Exclusions *OrganizationsExclusionsService
317
318	Logs *OrganizationsLogsService
319
320	Sinks *OrganizationsSinksService
321}
322
323func NewOrganizationsExclusionsService(s *Service) *OrganizationsExclusionsService {
324	rs := &OrganizationsExclusionsService{s: s}
325	return rs
326}
327
328type OrganizationsExclusionsService struct {
329	s *Service
330}
331
332func NewOrganizationsLogsService(s *Service) *OrganizationsLogsService {
333	rs := &OrganizationsLogsService{s: s}
334	return rs
335}
336
337type OrganizationsLogsService struct {
338	s *Service
339}
340
341func NewOrganizationsSinksService(s *Service) *OrganizationsSinksService {
342	rs := &OrganizationsSinksService{s: s}
343	return rs
344}
345
346type OrganizationsSinksService struct {
347	s *Service
348}
349
350func NewProjectsService(s *Service) *ProjectsService {
351	rs := &ProjectsService{s: s}
352	rs.Exclusions = NewProjectsExclusionsService(s)
353	rs.Logs = NewProjectsLogsService(s)
354	rs.Metrics = NewProjectsMetricsService(s)
355	rs.Sinks = NewProjectsSinksService(s)
356	return rs
357}
358
359type ProjectsService struct {
360	s *Service
361
362	Exclusions *ProjectsExclusionsService
363
364	Logs *ProjectsLogsService
365
366	Metrics *ProjectsMetricsService
367
368	Sinks *ProjectsSinksService
369}
370
371func NewProjectsExclusionsService(s *Service) *ProjectsExclusionsService {
372	rs := &ProjectsExclusionsService{s: s}
373	return rs
374}
375
376type ProjectsExclusionsService struct {
377	s *Service
378}
379
380func NewProjectsLogsService(s *Service) *ProjectsLogsService {
381	rs := &ProjectsLogsService{s: s}
382	return rs
383}
384
385type ProjectsLogsService struct {
386	s *Service
387}
388
389func NewProjectsMetricsService(s *Service) *ProjectsMetricsService {
390	rs := &ProjectsMetricsService{s: s}
391	return rs
392}
393
394type ProjectsMetricsService struct {
395	s *Service
396}
397
398func NewProjectsSinksService(s *Service) *ProjectsSinksService {
399	rs := &ProjectsSinksService{s: s}
400	return rs
401}
402
403type ProjectsSinksService struct {
404	s *Service
405}
406
407func NewSinksService(s *Service) *SinksService {
408	rs := &SinksService{s: s}
409	return rs
410}
411
412type SinksService struct {
413	s *Service
414}
415
416// BigQueryOptions: Options that change functionality of a sink
417// exporting data to BigQuery.
418type BigQueryOptions struct {
419	// UsePartitionedTables: Optional. Whether to use BigQuery's partition
420	// tables. By default, Logging creates dated tables based on the log
421	// entries' timestamps, e.g. syslog_20170523. With partitioned tables
422	// the date suffix is no longer present and special query syntax has to
423	// be used instead. In both cases, tables are sharded based on UTC
424	// timezone.
425	UsePartitionedTables bool `json:"usePartitionedTables,omitempty"`
426
427	// ForceSendFields is a list of field names (e.g.
428	// "UsePartitionedTables") to unconditionally include in API requests.
429	// By default, fields with empty values are omitted from API requests.
430	// However, any non-pointer, non-interface field appearing in
431	// ForceSendFields will be sent to the server regardless of whether the
432	// field is empty or not. This may be used to include empty fields in
433	// Patch requests.
434	ForceSendFields []string `json:"-"`
435
436	// NullFields is a list of field names (e.g. "UsePartitionedTables") to
437	// include in API requests with the JSON null value. By default, fields
438	// with empty values are omitted from API requests. However, any field
439	// with an empty value appearing in NullFields will be sent to the
440	// server as null. It is an error if a field in this list has a
441	// non-empty value. This may be used to include null fields in Patch
442	// requests.
443	NullFields []string `json:"-"`
444}
445
446func (s *BigQueryOptions) MarshalJSON() ([]byte, error) {
447	type NoMethod BigQueryOptions
448	raw := NoMethod(*s)
449	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
450}
451
452// BucketOptions: BucketOptions describes the bucket boundaries used to
453// create a histogram for the distribution. The buckets can be in a
454// linear sequence, an exponential sequence, or each bucket can be
455// specified explicitly. BucketOptions does not include the number of
456// values in each bucket.A bucket has an inclusive lower bound and
457// exclusive upper bound for the values that are counted for that
458// bucket. The upper bound of a bucket must be strictly greater than the
459// lower bound. The sequence of N buckets for a distribution consists of
460// an underflow bucket (number 0), zero or more finite buckets (number 1
461// through N - 2) and an overflow bucket (number N - 1). The buckets are
462// contiguous: the lower bound of bucket i (i > 0) is the same as the
463// upper bound of bucket i - 1. The buckets span the whole range of
464// finite values: lower bound of the underflow bucket is -infinity and
465// the upper bound of the overflow bucket is +infinity. The finite
466// buckets are so-called because both bounds are finite.
467type BucketOptions struct {
468	// ExplicitBuckets: The explicit buckets.
469	ExplicitBuckets *Explicit `json:"explicitBuckets,omitempty"`
470
471	// ExponentialBuckets: The exponential buckets.
472	ExponentialBuckets *Exponential `json:"exponentialBuckets,omitempty"`
473
474	// LinearBuckets: The linear bucket.
475	LinearBuckets *Linear `json:"linearBuckets,omitempty"`
476
477	// ForceSendFields is a list of field names (e.g. "ExplicitBuckets") to
478	// unconditionally include in API requests. By default, fields with
479	// empty values are omitted from API requests. However, any non-pointer,
480	// non-interface field appearing in ForceSendFields will be sent to the
481	// server regardless of whether the field is empty or not. This may be
482	// used to include empty fields in Patch requests.
483	ForceSendFields []string `json:"-"`
484
485	// NullFields is a list of field names (e.g. "ExplicitBuckets") to
486	// include in API requests with the JSON null value. By default, fields
487	// with empty values are omitted from API requests. However, any field
488	// with an empty value appearing in NullFields will be sent to the
489	// server as null. It is an error if a field in this list has a
490	// non-empty value. This may be used to include null fields in Patch
491	// requests.
492	NullFields []string `json:"-"`
493}
494
495func (s *BucketOptions) MarshalJSON() ([]byte, error) {
496	type NoMethod BucketOptions
497	raw := NoMethod(*s)
498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
499}
500
501// Empty: A generic empty message that you can re-use to avoid defining
502// duplicated empty messages in your APIs. A typical example is to use
503// it as the request or the response type of an API method. For
504// instance:
505// service Foo {
506//   rpc Bar(google.protobuf.Empty) returns
507// (google.protobuf.Empty);
508// }
509// The JSON representation for Empty is empty JSON object {}.
510type Empty struct {
511	// ServerResponse contains the HTTP response code and headers from the
512	// server.
513	googleapi.ServerResponse `json:"-"`
514}
515
516// Explicit: Specifies a set of buckets with arbitrary widths.There are
517// size(bounds) + 1 (= N) buckets. Bucket i has the following
518// boundaries:Upper bound (0 <= i < N-1): boundsi  Lower bound (1 <= i <
519// N); boundsi - 1The bounds field must contain at least one element. If
520// bounds has only one element, then there are no finite buckets, and
521// that single element is the common boundary of the overflow and
522// underflow buckets.
523type Explicit struct {
524	// Bounds: The values must be monotonically increasing.
525	Bounds []float64 `json:"bounds,omitempty"`
526
527	// ForceSendFields is a list of field names (e.g. "Bounds") to
528	// unconditionally include in API requests. By default, fields with
529	// empty values are omitted from API requests. However, any non-pointer,
530	// non-interface field appearing in ForceSendFields will be sent to the
531	// server regardless of whether the field is empty or not. This may be
532	// used to include empty fields in Patch requests.
533	ForceSendFields []string `json:"-"`
534
535	// NullFields is a list of field names (e.g. "Bounds") to include in API
536	// requests with the JSON null value. By default, fields with empty
537	// values are omitted from API requests. However, any field with an
538	// empty value appearing in NullFields will be sent to the server as
539	// null. It is an error if a field in this list has a non-empty value.
540	// This may be used to include null fields in Patch requests.
541	NullFields []string `json:"-"`
542}
543
544func (s *Explicit) MarshalJSON() ([]byte, error) {
545	type NoMethod Explicit
546	raw := NoMethod(*s)
547	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
548}
549
550// Exponential: Specifies an exponential sequence of buckets that have a
551// width that is proportional to the value of the lower bound. Each
552// bucket represents a constant relative uncertainty on a specific value
553// in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket
554// i has the following boundaries:Upper bound (0 <= i < N-1): scale *
555// (growth_factor ^ i).  Lower bound (1 <= i < N): scale *
556// (growth_factor ^ (i - 1)).
557type Exponential struct {
558	// GrowthFactor: Must be greater than 1.
559	GrowthFactor float64 `json:"growthFactor,omitempty"`
560
561	// NumFiniteBuckets: Must be greater than 0.
562	NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
563
564	// Scale: Must be greater than 0.
565	Scale float64 `json:"scale,omitempty"`
566
567	// ForceSendFields is a list of field names (e.g. "GrowthFactor") to
568	// unconditionally include in API requests. By default, fields with
569	// empty values are omitted from API requests. However, any non-pointer,
570	// non-interface field appearing in ForceSendFields will be sent to the
571	// server regardless of whether the field is empty or not. This may be
572	// used to include empty fields in Patch requests.
573	ForceSendFields []string `json:"-"`
574
575	// NullFields is a list of field names (e.g. "GrowthFactor") to include
576	// in API requests with the JSON null value. By default, fields with
577	// empty values are omitted from API requests. However, any field with
578	// an empty value appearing in NullFields will be sent to the server as
579	// null. It is an error if a field in this list has a non-empty value.
580	// This may be used to include null fields in Patch requests.
581	NullFields []string `json:"-"`
582}
583
584func (s *Exponential) MarshalJSON() ([]byte, error) {
585	type NoMethod Exponential
586	raw := NoMethod(*s)
587	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
588}
589
590func (s *Exponential) UnmarshalJSON(data []byte) error {
591	type NoMethod Exponential
592	var s1 struct {
593		GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"`
594		Scale        gensupport.JSONFloat64 `json:"scale"`
595		*NoMethod
596	}
597	s1.NoMethod = (*NoMethod)(s)
598	if err := json.Unmarshal(data, &s1); err != nil {
599		return err
600	}
601	s.GrowthFactor = float64(s1.GrowthFactor)
602	s.Scale = float64(s1.Scale)
603	return nil
604}
605
606// HttpRequest: A common proto for logging HTTP requests. Only contains
607// semantics defined by the HTTP specification. Product-specific logging
608// information MUST be defined in a separate message.
609type HttpRequest struct {
610	// CacheFillBytes: The number of HTTP response bytes inserted into
611	// cache. Set only when a cache fill was attempted.
612	CacheFillBytes int64 `json:"cacheFillBytes,omitempty,string"`
613
614	// CacheHit: Whether or not an entity was served from cache (with or
615	// without validation).
616	CacheHit bool `json:"cacheHit,omitempty"`
617
618	// CacheLookup: Whether or not a cache lookup was attempted.
619	CacheLookup bool `json:"cacheLookup,omitempty"`
620
621	// CacheValidatedWithOriginServer: Whether or not the response was
622	// validated with the origin server before being served from cache. This
623	// field is only meaningful if cache_hit is True.
624	CacheValidatedWithOriginServer bool `json:"cacheValidatedWithOriginServer,omitempty"`
625
626	// Latency: The request processing latency on the server, from the time
627	// the request was received until the response was sent.
628	Latency string `json:"latency,omitempty"`
629
630	// Protocol: Protocol used for the request. Examples: "HTTP/1.1",
631	// "HTTP/2", "websocket"
632	Protocol string `json:"protocol,omitempty"`
633
634	// Referer: The referer URL of the request, as defined in HTTP/1.1
635	// Header Field Definitions
636	// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
637	Referer string `json:"referer,omitempty"`
638
639	// RemoteIp: The IP address (IPv4 or IPv6) of the client that issued the
640	// HTTP request. Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329".
641	RemoteIp string `json:"remoteIp,omitempty"`
642
643	// RequestMethod: The request method. Examples: "GET", "HEAD", "PUT",
644	// "POST".
645	RequestMethod string `json:"requestMethod,omitempty"`
646
647	// RequestSize: The size of the HTTP request message in bytes, including
648	// the request headers and the request body.
649	RequestSize int64 `json:"requestSize,omitempty,string"`
650
651	// RequestUrl: The scheme (http, https), the host name, the path and the
652	// query portion of the URL that was requested. Example:
653	// "http://example.com/some/info?color=red".
654	RequestUrl string `json:"requestUrl,omitempty"`
655
656	// ResponseSize: The size of the HTTP response message sent back to the
657	// client, in bytes, including the response headers and the response
658	// body.
659	ResponseSize int64 `json:"responseSize,omitempty,string"`
660
661	// ServerIp: The IP address (IPv4 or IPv6) of the origin server that the
662	// request was sent to.
663	ServerIp string `json:"serverIp,omitempty"`
664
665	// Status: The response code indicating the status of response.
666	// Examples: 200, 404.
667	Status int64 `json:"status,omitempty"`
668
669	// UserAgent: The user agent sent by the client. Example: "Mozilla/4.0
670	// (compatible; MSIE 6.0; Windows 98; Q312461; .NET
671	// CLR 1.0.3705)".
672	UserAgent string `json:"userAgent,omitempty"`
673
674	// ForceSendFields is a list of field names (e.g. "CacheFillBytes") to
675	// unconditionally include in API requests. By default, fields with
676	// empty values are omitted from API requests. However, any non-pointer,
677	// non-interface field appearing in ForceSendFields will be sent to the
678	// server regardless of whether the field is empty or not. This may be
679	// used to include empty fields in Patch requests.
680	ForceSendFields []string `json:"-"`
681
682	// NullFields is a list of field names (e.g. "CacheFillBytes") to
683	// include in API requests with the JSON null value. By default, fields
684	// with empty values are omitted from API requests. However, any field
685	// with an empty value appearing in NullFields will be sent to the
686	// server as null. It is an error if a field in this list has a
687	// non-empty value. This may be used to include null fields in Patch
688	// requests.
689	NullFields []string `json:"-"`
690}
691
692func (s *HttpRequest) MarshalJSON() ([]byte, error) {
693	type NoMethod HttpRequest
694	raw := NoMethod(*s)
695	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
696}
697
698// LabelDescriptor: A description of a label.
699type LabelDescriptor struct {
700	// Description: A human-readable description for the label.
701	Description string `json:"description,omitempty"`
702
703	// Key: The label key.
704	Key string `json:"key,omitempty"`
705
706	// ValueType: The type of data that can be assigned to the label.
707	//
708	// Possible values:
709	//   "STRING" - A variable-length string. This is the default.
710	//   "BOOL" - Boolean; true or false.
711	//   "INT64" - A 64-bit signed integer.
712	ValueType string `json:"valueType,omitempty"`
713
714	// ForceSendFields is a list of field names (e.g. "Description") to
715	// unconditionally include in API requests. By default, fields with
716	// empty values are omitted from API requests. However, any non-pointer,
717	// non-interface field appearing in ForceSendFields will be sent to the
718	// server regardless of whether the field is empty or not. This may be
719	// used to include empty fields in Patch requests.
720	ForceSendFields []string `json:"-"`
721
722	// NullFields is a list of field names (e.g. "Description") to include
723	// in API requests with the JSON null value. By default, fields with
724	// empty values are omitted from API requests. However, any field with
725	// an empty value appearing in NullFields will be sent to the server as
726	// null. It is an error if a field in this list has a non-empty value.
727	// This may be used to include null fields in Patch requests.
728	NullFields []string `json:"-"`
729}
730
731func (s *LabelDescriptor) MarshalJSON() ([]byte, error) {
732	type NoMethod LabelDescriptor
733	raw := NoMethod(*s)
734	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
735}
736
737// Linear: Specifies a linear sequence of buckets that all have the same
738// width (except overflow and underflow). Each bucket represents a
739// constant absolute uncertainty on the specific value in the
740// bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has
741// the following boundaries:Upper bound (0 <= i < N-1): offset + (width
742// * i).  Lower bound (1 <= i < N): offset + (width * (i - 1)).
743type Linear struct {
744	// NumFiniteBuckets: Must be greater than 0.
745	NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
746
747	// Offset: Lower bound of the first bucket.
748	Offset float64 `json:"offset,omitempty"`
749
750	// Width: Must be greater than 0.
751	Width float64 `json:"width,omitempty"`
752
753	// ForceSendFields is a list of field names (e.g. "NumFiniteBuckets") to
754	// unconditionally include in API requests. By default, fields with
755	// empty values are omitted from API requests. However, any non-pointer,
756	// non-interface field appearing in ForceSendFields will be sent to the
757	// server regardless of whether the field is empty or not. This may be
758	// used to include empty fields in Patch requests.
759	ForceSendFields []string `json:"-"`
760
761	// NullFields is a list of field names (e.g. "NumFiniteBuckets") to
762	// include in API requests with the JSON null value. By default, fields
763	// with empty values are omitted from API requests. However, any field
764	// with an empty value appearing in NullFields will be sent to the
765	// server as null. It is an error if a field in this list has a
766	// non-empty value. This may be used to include null fields in Patch
767	// requests.
768	NullFields []string `json:"-"`
769}
770
771func (s *Linear) MarshalJSON() ([]byte, error) {
772	type NoMethod Linear
773	raw := NoMethod(*s)
774	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
775}
776
777func (s *Linear) UnmarshalJSON(data []byte) error {
778	type NoMethod Linear
779	var s1 struct {
780		Offset gensupport.JSONFloat64 `json:"offset"`
781		Width  gensupport.JSONFloat64 `json:"width"`
782		*NoMethod
783	}
784	s1.NoMethod = (*NoMethod)(s)
785	if err := json.Unmarshal(data, &s1); err != nil {
786		return err
787	}
788	s.Offset = float64(s1.Offset)
789	s.Width = float64(s1.Width)
790	return nil
791}
792
793// ListExclusionsResponse: Result returned from ListExclusions.
794type ListExclusionsResponse struct {
795	// Exclusions: A list of exclusions.
796	Exclusions []*LogExclusion `json:"exclusions,omitempty"`
797
798	// NextPageToken: If there might be more results than appear in this
799	// response, then nextPageToken is included. To get the next set of
800	// results, call the same method again using the value of nextPageToken
801	// as pageToken.
802	NextPageToken string `json:"nextPageToken,omitempty"`
803
804	// ServerResponse contains the HTTP response code and headers from the
805	// server.
806	googleapi.ServerResponse `json:"-"`
807
808	// ForceSendFields is a list of field names (e.g. "Exclusions") to
809	// unconditionally include in API requests. By default, fields with
810	// empty values are omitted from API requests. However, any non-pointer,
811	// non-interface field appearing in ForceSendFields will be sent to the
812	// server regardless of whether the field is empty or not. This may be
813	// used to include empty fields in Patch requests.
814	ForceSendFields []string `json:"-"`
815
816	// NullFields is a list of field names (e.g. "Exclusions") to include in
817	// API requests with the JSON null value. By default, fields with empty
818	// values are omitted from API requests. However, any field with an
819	// empty value appearing in NullFields will be sent to the server as
820	// null. It is an error if a field in this list has a non-empty value.
821	// This may be used to include null fields in Patch requests.
822	NullFields []string `json:"-"`
823}
824
825func (s *ListExclusionsResponse) MarshalJSON() ([]byte, error) {
826	type NoMethod ListExclusionsResponse
827	raw := NoMethod(*s)
828	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
829}
830
831// ListLogEntriesRequest: The parameters to ListLogEntries.
832type ListLogEntriesRequest struct {
833	// Filter: Optional. A filter that chooses which log entries to return.
834	// See Advanced Logs Queries. Only log entries that match the filter are
835	// returned. An empty filter matches all log entries in the resources
836	// listed in resource_names. Referencing a parent resource that is not
837	// listed in resource_names will cause the filter to return no results.
838	// The maximum length of the filter is 20000 characters.
839	Filter string `json:"filter,omitempty"`
840
841	// OrderBy: Optional. How the results should be sorted. Presently, the
842	// only permitted values are "timestamp asc" (default) and "timestamp
843	// desc". The first option returns entries in order of increasing values
844	// of LogEntry.timestamp (oldest first), and the second option returns
845	// entries in order of decreasing timestamps (newest first). Entries
846	// with equal timestamps are returned in order of their insert_id
847	// values.
848	OrderBy string `json:"orderBy,omitempty"`
849
850	// PageSize: Optional. The maximum number of results to return from this
851	// request. Non-positive values are ignored. The presence of
852	// next_page_token in the response indicates that more results might be
853	// available.
854	PageSize int64 `json:"pageSize,omitempty"`
855
856	// PageToken: Optional. If present, then retrieve the next batch of
857	// results from the preceding call to this method. page_token must be
858	// the value of next_page_token from the previous response. The values
859	// of other method parameters should be identical to those in the
860	// previous call.
861	PageToken string `json:"pageToken,omitempty"`
862
863	// ProjectIds: Deprecated. Use resource_names instead. One or more
864	// project identifiers or project numbers from which to retrieve log
865	// entries. Example: "my-project-1A".
866	ProjectIds []string `json:"projectIds,omitempty"`
867
868	// ResourceNames: Required. Names of one or more parent resources from
869	// which to retrieve log
870	// entries:
871	// "projects/[PROJECT_ID]"
872	// "organizations/[ORGANIZATION_ID]"
873	// "bi
874	// llingAccounts/[BILLING_ACCOUNT_ID]"
875	// "folders/[FOLDER_ID]"
876	// Projects listed in the project_ids field are added to this list.
877	ResourceNames []string `json:"resourceNames,omitempty"`
878
879	// ForceSendFields is a list of field names (e.g. "Filter") to
880	// unconditionally include in API requests. By default, fields with
881	// empty values are omitted from API requests. However, any non-pointer,
882	// non-interface field appearing in ForceSendFields will be sent to the
883	// server regardless of whether the field is empty or not. This may be
884	// used to include empty fields in Patch requests.
885	ForceSendFields []string `json:"-"`
886
887	// NullFields is a list of field names (e.g. "Filter") to include in API
888	// requests with the JSON null value. By default, fields with empty
889	// values are omitted from API requests. However, any field with an
890	// empty value appearing in NullFields will be sent to the server as
891	// null. It is an error if a field in this list has a non-empty value.
892	// This may be used to include null fields in Patch requests.
893	NullFields []string `json:"-"`
894}
895
896func (s *ListLogEntriesRequest) MarshalJSON() ([]byte, error) {
897	type NoMethod ListLogEntriesRequest
898	raw := NoMethod(*s)
899	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
900}
901
902// ListLogEntriesResponse: Result returned from ListLogEntries.
903type ListLogEntriesResponse struct {
904	// Entries: A list of log entries. If entries is empty, nextPageToken
905	// may still be returned, indicating that more entries may exist. See
906	// nextPageToken for more information.
907	Entries []*LogEntry `json:"entries,omitempty"`
908
909	// NextPageToken: If there might be more results than those appearing in
910	// this response, then nextPageToken is included. To get the next set of
911	// results, call this method again using the value of nextPageToken as
912	// pageToken.If a value for next_page_token appears and the entries
913	// field is empty, it means that the search found no log entries so far
914	// but it did not have time to search all the possible log entries.
915	// Retry the method with this value for page_token to continue the
916	// search. Alternatively, consider speeding up the search by changing
917	// your filter to specify a single log name or resource type, or to
918	// narrow the time range of the search.
919	NextPageToken string `json:"nextPageToken,omitempty"`
920
921	// ServerResponse contains the HTTP response code and headers from the
922	// server.
923	googleapi.ServerResponse `json:"-"`
924
925	// ForceSendFields is a list of field names (e.g. "Entries") to
926	// unconditionally include in API requests. By default, fields with
927	// empty values are omitted from API requests. However, any non-pointer,
928	// non-interface field appearing in ForceSendFields will be sent to the
929	// server regardless of whether the field is empty or not. This may be
930	// used to include empty fields in Patch requests.
931	ForceSendFields []string `json:"-"`
932
933	// NullFields is a list of field names (e.g. "Entries") to include in
934	// API requests with the JSON null value. By default, fields with empty
935	// values are omitted from API requests. However, any field with an
936	// empty value appearing in NullFields will be sent to the server as
937	// null. It is an error if a field in this list has a non-empty value.
938	// This may be used to include null fields in Patch requests.
939	NullFields []string `json:"-"`
940}
941
942func (s *ListLogEntriesResponse) MarshalJSON() ([]byte, error) {
943	type NoMethod ListLogEntriesResponse
944	raw := NoMethod(*s)
945	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
946}
947
948// ListLogMetricsResponse: Result returned from ListLogMetrics.
949type ListLogMetricsResponse struct {
950	// Metrics: A list of logs-based metrics.
951	Metrics []*LogMetric `json:"metrics,omitempty"`
952
953	// NextPageToken: If there might be more results than appear in this
954	// response, then nextPageToken is included. To get the next set of
955	// results, call this method again using the value of nextPageToken as
956	// pageToken.
957	NextPageToken string `json:"nextPageToken,omitempty"`
958
959	// ServerResponse contains the HTTP response code and headers from the
960	// server.
961	googleapi.ServerResponse `json:"-"`
962
963	// ForceSendFields is a list of field names (e.g. "Metrics") to
964	// unconditionally include in API requests. By default, fields with
965	// empty values are omitted from API requests. However, any non-pointer,
966	// non-interface field appearing in ForceSendFields will be sent to the
967	// server regardless of whether the field is empty or not. This may be
968	// used to include empty fields in Patch requests.
969	ForceSendFields []string `json:"-"`
970
971	// NullFields is a list of field names (e.g. "Metrics") to include in
972	// API requests with the JSON null value. By default, fields with empty
973	// values are omitted from API requests. However, any field with an
974	// empty value appearing in NullFields will be sent to the server as
975	// null. It is an error if a field in this list has a non-empty value.
976	// This may be used to include null fields in Patch requests.
977	NullFields []string `json:"-"`
978}
979
980func (s *ListLogMetricsResponse) MarshalJSON() ([]byte, error) {
981	type NoMethod ListLogMetricsResponse
982	raw := NoMethod(*s)
983	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
984}
985
986// ListLogsResponse: Result returned from ListLogs.
987type ListLogsResponse struct {
988	// LogNames: A list of log names. For example,
989	// "projects/my-project/logs/syslog" or
990	// "organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity
991	// ".
992	LogNames []string `json:"logNames,omitempty"`
993
994	// NextPageToken: If there might be more results than those appearing in
995	// this response, then nextPageToken is included. To get the next set of
996	// results, call this method again using the value of nextPageToken as
997	// pageToken.
998	NextPageToken string `json:"nextPageToken,omitempty"`
999
1000	// ServerResponse contains the HTTP response code and headers from the
1001	// server.
1002	googleapi.ServerResponse `json:"-"`
1003
1004	// ForceSendFields is a list of field names (e.g. "LogNames") to
1005	// unconditionally include in API requests. By default, fields with
1006	// empty values are omitted from API requests. However, any non-pointer,
1007	// non-interface field appearing in ForceSendFields will be sent to the
1008	// server regardless of whether the field is empty or not. This may be
1009	// used to include empty fields in Patch requests.
1010	ForceSendFields []string `json:"-"`
1011
1012	// NullFields is a list of field names (e.g. "LogNames") to include in
1013	// API requests with the JSON null value. By default, fields with empty
1014	// values are omitted from API requests. However, any field with an
1015	// empty value appearing in NullFields will be sent to the server as
1016	// null. It is an error if a field in this list has a non-empty value.
1017	// This may be used to include null fields in Patch requests.
1018	NullFields []string `json:"-"`
1019}
1020
1021func (s *ListLogsResponse) MarshalJSON() ([]byte, error) {
1022	type NoMethod ListLogsResponse
1023	raw := NoMethod(*s)
1024	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1025}
1026
1027// ListMonitoredResourceDescriptorsResponse: Result returned from
1028// ListMonitoredResourceDescriptors.
1029type ListMonitoredResourceDescriptorsResponse struct {
1030	// NextPageToken: If there might be more results than those appearing in
1031	// this response, then nextPageToken is included. To get the next set of
1032	// results, call this method again using the value of nextPageToken as
1033	// pageToken.
1034	NextPageToken string `json:"nextPageToken,omitempty"`
1035
1036	// ResourceDescriptors: A list of resource descriptors.
1037	ResourceDescriptors []*MonitoredResourceDescriptor `json:"resourceDescriptors,omitempty"`
1038
1039	// ServerResponse contains the HTTP response code and headers from the
1040	// server.
1041	googleapi.ServerResponse `json:"-"`
1042
1043	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1044	// unconditionally include in API requests. By default, fields with
1045	// empty values are omitted from API requests. However, any non-pointer,
1046	// non-interface field appearing in ForceSendFields will be sent to the
1047	// server regardless of whether the field is empty or not. This may be
1048	// used to include empty fields in Patch requests.
1049	ForceSendFields []string `json:"-"`
1050
1051	// NullFields is a list of field names (e.g. "NextPageToken") to include
1052	// in API requests with the JSON null value. By default, fields with
1053	// empty values are omitted from API requests. However, any field with
1054	// an empty value appearing in NullFields will be sent to the server as
1055	// null. It is an error if a field in this list has a non-empty value.
1056	// This may be used to include null fields in Patch requests.
1057	NullFields []string `json:"-"`
1058}
1059
1060func (s *ListMonitoredResourceDescriptorsResponse) MarshalJSON() ([]byte, error) {
1061	type NoMethod ListMonitoredResourceDescriptorsResponse
1062	raw := NoMethod(*s)
1063	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1064}
1065
1066// ListSinksResponse: Result returned from ListSinks.
1067type ListSinksResponse struct {
1068	// NextPageToken: If there might be more results than appear in this
1069	// response, then nextPageToken is included. To get the next set of
1070	// results, call the same method again using the value of nextPageToken
1071	// as pageToken.
1072	NextPageToken string `json:"nextPageToken,omitempty"`
1073
1074	// Sinks: A list of sinks.
1075	Sinks []*LogSink `json:"sinks,omitempty"`
1076
1077	// ServerResponse contains the HTTP response code and headers from the
1078	// server.
1079	googleapi.ServerResponse `json:"-"`
1080
1081	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1082	// unconditionally include in API requests. By default, fields with
1083	// empty values are omitted from API requests. However, any non-pointer,
1084	// non-interface field appearing in ForceSendFields will be sent to the
1085	// server regardless of whether the field is empty or not. This may be
1086	// used to include empty fields in Patch requests.
1087	ForceSendFields []string `json:"-"`
1088
1089	// NullFields is a list of field names (e.g. "NextPageToken") to include
1090	// in API requests with the JSON null value. By default, fields with
1091	// empty values are omitted from API requests. However, any field with
1092	// an empty value appearing in NullFields will be sent to the server as
1093	// null. It is an error if a field in this list has a non-empty value.
1094	// This may be used to include null fields in Patch requests.
1095	NullFields []string `json:"-"`
1096}
1097
1098func (s *ListSinksResponse) MarshalJSON() ([]byte, error) {
1099	type NoMethod ListSinksResponse
1100	raw := NoMethod(*s)
1101	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1102}
1103
1104// LogEntry: An individual entry in a log.
1105type LogEntry struct {
1106	// HttpRequest: Optional. Information about the HTTP request associated
1107	// with this log entry, if applicable.
1108	HttpRequest *HttpRequest `json:"httpRequest,omitempty"`
1109
1110	// InsertId: Optional. A unique identifier for the log entry. If you
1111	// provide a value, then Logging considers other log entries in the same
1112	// project, with the same timestamp, and with the same insert_id to be
1113	// duplicates which can be removed. If omitted in new log entries, then
1114	// Logging assigns its own unique identifier. The insert_id is also used
1115	// to order log entries that have the same timestamp value.
1116	InsertId string `json:"insertId,omitempty"`
1117
1118	// JsonPayload: The log entry payload, represented as a structure that
1119	// is expressed as a JSON object.
1120	JsonPayload googleapi.RawMessage `json:"jsonPayload,omitempty"`
1121
1122	// Labels: Optional. A set of user-defined (key, value) data that
1123	// provides additional information about the log entry.
1124	Labels map[string]string `json:"labels,omitempty"`
1125
1126	// LogName: Required. The resource name of the log to which this log
1127	// entry
1128	// belongs:
1129	// "projects/[PROJECT_ID]/logs/[LOG_ID]"
1130	// "organizations/[ORGANIZ
1131	// ATION_ID]/logs/[LOG_ID]"
1132	// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[L
1133	// OG_ID]"
1134	// "folders/[FOLDER_ID]/logs/[LOG_ID]"
1135	// A project number may optionally be used in place of PROJECT_ID. The
1136	// project number is translated to its corresponding PROJECT_ID
1137	// internally and the log_name field will contain PROJECT_ID in queries
1138	// and exports.[LOG_ID] must be URL-encoded within log_name. Example:
1139	// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Fa
1140	// ctivity". [LOG_ID] must be less than 512 characters long and can only
1141	// include the following characters: upper and lower case alphanumeric
1142	// characters, forward-slash, underscore, hyphen, and period.For
1143	// backward compatibility, if log_name begins with a forward-slash, such
1144	// as /projects/..., then the log entry is ingested as usual but the
1145	// forward-slash is removed. Listing the log entry will not show the
1146	// leading slash and filtering for a log name with a leading slash will
1147	// never return any results.
1148	LogName string `json:"logName,omitempty"`
1149
1150	// Metadata: Deprecated. Output only. Additional metadata about the
1151	// monitored resource.Only k8s_container, k8s_pod, and k8s_node
1152	// MonitoredResources have this field populated for GKE versions older
1153	// than 1.12.6. For GKE versions 1.12.6 and above, the metadata field
1154	// has been deprecated. The Kubernetes pod labels that used to be in
1155	// metadata.userLabels will now be present in the labels field with a
1156	// key prefix of k8s-pod/. The Stackdriver system labels that were
1157	// present in the metadata.systemLabels field will no longer be
1158	// available in the LogEntry.
1159	Metadata *MonitoredResourceMetadata `json:"metadata,omitempty"`
1160
1161	// Operation: Optional. Information about an operation associated with
1162	// the log entry, if applicable.
1163	Operation *LogEntryOperation `json:"operation,omitempty"`
1164
1165	// ProtoPayload: The log entry payload, represented as a protocol
1166	// buffer. Some Google Cloud Platform services use this field for their
1167	// log entry payloads.The following protocol buffer types are supported;
1168	// user-defined types are not
1169	// supported:"type.googleapis.com/google.cloud.audit.AuditLog"
1170	// "type.googleapis.com/google.appengine.logging.v1.RequestLog"
1171	ProtoPayload googleapi.RawMessage `json:"protoPayload,omitempty"`
1172
1173	// ReceiveTimestamp: Output only. The time the log entry was received by
1174	// Logging.
1175	ReceiveTimestamp string `json:"receiveTimestamp,omitempty"`
1176
1177	// Resource: Required. The monitored resource that produced this log
1178	// entry.Example: a log entry that reports a database error would be
1179	// associated with the monitored resource designating the particular
1180	// database that reported the error.
1181	Resource *MonitoredResource `json:"resource,omitempty"`
1182
1183	// Severity: Optional. The severity of the log entry. The default value
1184	// is LogSeverity.DEFAULT.
1185	//
1186	// Possible values:
1187	//   "DEFAULT" - (0) The log entry has no assigned severity level.
1188	//   "DEBUG" - (100) Debug or trace information.
1189	//   "INFO" - (200) Routine information, such as ongoing status or
1190	// performance.
1191	//   "NOTICE" - (300) Normal but significant events, such as start up,
1192	// shut down, or a configuration change.
1193	//   "WARNING" - (400) Warning events might cause problems.
1194	//   "ERROR" - (500) Error events are likely to cause problems.
1195	//   "CRITICAL" - (600) Critical events cause more severe problems or
1196	// outages.
1197	//   "ALERT" - (700) A person must take an action immediately.
1198	//   "EMERGENCY" - (800) One or more systems are unusable.
1199	Severity string `json:"severity,omitempty"`
1200
1201	// SourceLocation: Optional. Source code location information associated
1202	// with the log entry, if any.
1203	SourceLocation *LogEntrySourceLocation `json:"sourceLocation,omitempty"`
1204
1205	// SpanId: Optional. The span ID within the trace associated with the
1206	// log entry.For Trace spans, this is the same format that the Trace API
1207	// v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
1208	// as <code>"000000000000004a"</code>.
1209	SpanId string `json:"spanId,omitempty"`
1210
1211	// TextPayload: The log entry payload, represented as a Unicode string
1212	// (UTF-8).
1213	TextPayload string `json:"textPayload,omitempty"`
1214
1215	// Timestamp: Optional. The time the event described by the log entry
1216	// occurred. This time is used to compute the log entry's age and to
1217	// enforce the logs retention period. If this field is omitted in a new
1218	// log entry, then Logging assigns it the current time. Timestamps have
1219	// nanosecond accuracy, but trailing zeros in the fractional seconds
1220	// might be omitted when the timestamp is displayed.Incoming log entries
1221	// should have timestamps that are no more than the logs retention
1222	// period in the past, and no more than 24 hours in the future. Log
1223	// entries outside those time boundaries will not be available when
1224	// calling entries.list, but those log entries can still be exported
1225	// with LogSinks.
1226	Timestamp string `json:"timestamp,omitempty"`
1227
1228	// Trace: Optional. Resource name of the trace associated with the log
1229	// entry, if any. If it contains a relative resource name, the name is
1230	// assumed to be relative to //tracing.googleapis.com. Example:
1231	// projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824
1232	Trace string `json:"trace,omitempty"`
1233
1234	// TraceSampled: Optional. The sampling decision of the trace associated
1235	// with the log entry.True means that the trace resource name in the
1236	// trace field was sampled for storage in a trace backend. False means
1237	// that the trace was not sampled for storage when this log entry was
1238	// written, or the sampling decision was unknown at the time. A
1239	// non-sampled trace value is still useful as a request correlation
1240	// identifier. The default is False.
1241	TraceSampled bool `json:"traceSampled,omitempty"`
1242
1243	// ForceSendFields is a list of field names (e.g. "HttpRequest") to
1244	// unconditionally include in API requests. By default, fields with
1245	// empty values are omitted from API requests. However, any non-pointer,
1246	// non-interface field appearing in ForceSendFields will be sent to the
1247	// server regardless of whether the field is empty or not. This may be
1248	// used to include empty fields in Patch requests.
1249	ForceSendFields []string `json:"-"`
1250
1251	// NullFields is a list of field names (e.g. "HttpRequest") to include
1252	// in API requests with the JSON null value. By default, fields with
1253	// empty values are omitted from API requests. However, any field with
1254	// an empty value appearing in NullFields will be sent to the server as
1255	// null. It is an error if a field in this list has a non-empty value.
1256	// This may be used to include null fields in Patch requests.
1257	NullFields []string `json:"-"`
1258}
1259
1260func (s *LogEntry) MarshalJSON() ([]byte, error) {
1261	type NoMethod LogEntry
1262	raw := NoMethod(*s)
1263	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1264}
1265
1266// LogEntryOperation: Additional information about a potentially
1267// long-running operation with which a log entry is associated.
1268type LogEntryOperation struct {
1269	// First: Optional. Set this to True if this is the first log entry in
1270	// the operation.
1271	First bool `json:"first,omitempty"`
1272
1273	// Id: Optional. An arbitrary operation identifier. Log entries with the
1274	// same identifier are assumed to be part of the same operation.
1275	Id string `json:"id,omitempty"`
1276
1277	// Last: Optional. Set this to True if this is the last log entry in the
1278	// operation.
1279	Last bool `json:"last,omitempty"`
1280
1281	// Producer: Optional. An arbitrary producer identifier. The combination
1282	// of id and producer must be globally unique. Examples for producer:
1283	// "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication".
1284	Producer string `json:"producer,omitempty"`
1285
1286	// ForceSendFields is a list of field names (e.g. "First") to
1287	// unconditionally include in API requests. By default, fields with
1288	// empty values are omitted from API requests. However, any non-pointer,
1289	// non-interface field appearing in ForceSendFields will be sent to the
1290	// server regardless of whether the field is empty or not. This may be
1291	// used to include empty fields in Patch requests.
1292	ForceSendFields []string `json:"-"`
1293
1294	// NullFields is a list of field names (e.g. "First") to include in API
1295	// requests with the JSON null value. By default, fields with empty
1296	// values are omitted from API requests. However, any field with an
1297	// empty value appearing in NullFields will be sent to the server as
1298	// null. It is an error if a field in this list has a non-empty value.
1299	// This may be used to include null fields in Patch requests.
1300	NullFields []string `json:"-"`
1301}
1302
1303func (s *LogEntryOperation) MarshalJSON() ([]byte, error) {
1304	type NoMethod LogEntryOperation
1305	raw := NoMethod(*s)
1306	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1307}
1308
1309// LogEntrySourceLocation: Additional information about the source code
1310// location that produced the log entry.
1311type LogEntrySourceLocation struct {
1312	// File: Optional. Source file name. Depending on the runtime
1313	// environment, this might be a simple name or a fully-qualified name.
1314	File string `json:"file,omitempty"`
1315
1316	// Function: Optional. Human-readable name of the function or method
1317	// being invoked, with optional context such as the class or package
1318	// name. This information may be used in contexts such as the logs
1319	// viewer, where a file and line number are less meaningful. The format
1320	// can vary by language. For example: qual.if.ied.Class.method (Java),
1321	// dir/package.func (Go), function (Python).
1322	Function string `json:"function,omitempty"`
1323
1324	// Line: Optional. Line within the source file. 1-based; 0 indicates no
1325	// line number available.
1326	Line int64 `json:"line,omitempty,string"`
1327
1328	// ForceSendFields is a list of field names (e.g. "File") to
1329	// unconditionally include in API requests. By default, fields with
1330	// empty values are omitted from API requests. However, any non-pointer,
1331	// non-interface field appearing in ForceSendFields will be sent to the
1332	// server regardless of whether the field is empty or not. This may be
1333	// used to include empty fields in Patch requests.
1334	ForceSendFields []string `json:"-"`
1335
1336	// NullFields is a list of field names (e.g. "File") to include in API
1337	// requests with the JSON null value. By default, fields with empty
1338	// values are omitted from API requests. However, any field with an
1339	// empty value appearing in NullFields will be sent to the server as
1340	// null. It is an error if a field in this list has a non-empty value.
1341	// This may be used to include null fields in Patch requests.
1342	NullFields []string `json:"-"`
1343}
1344
1345func (s *LogEntrySourceLocation) MarshalJSON() ([]byte, error) {
1346	type NoMethod LogEntrySourceLocation
1347	raw := NoMethod(*s)
1348	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1349}
1350
1351// LogExclusion: Specifies a set of log entries that are not to be
1352// stored in Logging. If your GCP resource receives a large volume of
1353// logs, you can use exclusions to reduce your chargeable logs.
1354// Exclusions are processed after log sinks, so you can export log
1355// entries before they are excluded. Note that organization-level and
1356// folder-level exclusions don't apply to child resources, and that you
1357// can't exclude audit log entries.
1358type LogExclusion struct {
1359	// CreateTime: Output only. The creation timestamp of the exclusion.This
1360	// field may not be present for older exclusions.
1361	CreateTime string `json:"createTime,omitempty"`
1362
1363	// Description: Optional. A description of this exclusion.
1364	Description string `json:"description,omitempty"`
1365
1366	// Disabled: Optional. If set to True, then this exclusion is disabled
1367	// and it does not exclude any log entries. You can update an exclusion
1368	// to change the value of this field.
1369	Disabled bool `json:"disabled,omitempty"`
1370
1371	// Filter: Required. An advanced logs filter that matches the log
1372	// entries to be excluded. By using the sample function, you can exclude
1373	// less than 100% of the matching log entries. For example, the
1374	// following query matches 99% of low-severity log entries from Google
1375	// Cloud Storage buckets:"resource.type=gcs_bucket severity<ERROR
1376	// sample(insertId, 0.99)"
1377	Filter string `json:"filter,omitempty"`
1378
1379	// Name: Required. A client-assigned identifier, such as
1380	// "load-balancer-exclusion". Identifiers are limited to 100 characters
1381	// and can include only letters, digits, underscores, hyphens, and
1382	// periods.
1383	Name string `json:"name,omitempty"`
1384
1385	// UpdateTime: Output only. The last update timestamp of the
1386	// exclusion.This field may not be present for older exclusions.
1387	UpdateTime string `json:"updateTime,omitempty"`
1388
1389	// ServerResponse contains the HTTP response code and headers from the
1390	// server.
1391	googleapi.ServerResponse `json:"-"`
1392
1393	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1394	// unconditionally include in API requests. By default, fields with
1395	// empty values are omitted from API requests. However, any non-pointer,
1396	// non-interface field appearing in ForceSendFields will be sent to the
1397	// server regardless of whether the field is empty or not. This may be
1398	// used to include empty fields in Patch requests.
1399	ForceSendFields []string `json:"-"`
1400
1401	// NullFields is a list of field names (e.g. "CreateTime") to include in
1402	// API requests with the JSON null value. By default, fields with empty
1403	// values are omitted from API requests. However, any field with an
1404	// empty value appearing in NullFields will be sent to the server as
1405	// null. It is an error if a field in this list has a non-empty value.
1406	// This may be used to include null fields in Patch requests.
1407	NullFields []string `json:"-"`
1408}
1409
1410func (s *LogExclusion) MarshalJSON() ([]byte, error) {
1411	type NoMethod LogExclusion
1412	raw := NoMethod(*s)
1413	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1414}
1415
1416// LogLine: Application log line emitted while processing a request.
1417type LogLine struct {
1418	// LogMessage: App-provided log message.
1419	LogMessage string `json:"logMessage,omitempty"`
1420
1421	// Severity: Severity of this log entry.
1422	//
1423	// Possible values:
1424	//   "DEFAULT" - (0) The log entry has no assigned severity level.
1425	//   "DEBUG" - (100) Debug or trace information.
1426	//   "INFO" - (200) Routine information, such as ongoing status or
1427	// performance.
1428	//   "NOTICE" - (300) Normal but significant events, such as start up,
1429	// shut down, or a configuration change.
1430	//   "WARNING" - (400) Warning events might cause problems.
1431	//   "ERROR" - (500) Error events are likely to cause problems.
1432	//   "CRITICAL" - (600) Critical events cause more severe problems or
1433	// outages.
1434	//   "ALERT" - (700) A person must take an action immediately.
1435	//   "EMERGENCY" - (800) One or more systems are unusable.
1436	Severity string `json:"severity,omitempty"`
1437
1438	// SourceLocation: Where in the source code this log message was
1439	// written.
1440	SourceLocation *SourceLocation `json:"sourceLocation,omitempty"`
1441
1442	// Time: Approximate time when this log entry was made.
1443	Time string `json:"time,omitempty"`
1444
1445	// ForceSendFields is a list of field names (e.g. "LogMessage") to
1446	// unconditionally include in API requests. By default, fields with
1447	// empty values are omitted from API requests. However, any non-pointer,
1448	// non-interface field appearing in ForceSendFields will be sent to the
1449	// server regardless of whether the field is empty or not. This may be
1450	// used to include empty fields in Patch requests.
1451	ForceSendFields []string `json:"-"`
1452
1453	// NullFields is a list of field names (e.g. "LogMessage") to include in
1454	// API requests with the JSON null value. By default, fields with empty
1455	// values are omitted from API requests. However, any field with an
1456	// empty value appearing in NullFields will be sent to the server as
1457	// null. It is an error if a field in this list has a non-empty value.
1458	// This may be used to include null fields in Patch requests.
1459	NullFields []string `json:"-"`
1460}
1461
1462func (s *LogLine) MarshalJSON() ([]byte, error) {
1463	type NoMethod LogLine
1464	raw := NoMethod(*s)
1465	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1466}
1467
1468// LogMetric: Describes a logs-based metric. The value of the metric is
1469// the number of log entries that match a logs filter in a given time
1470// interval.Logs-based metric can also be used to extract values from
1471// logs and create a a distribution of the values. The distribution
1472// records the statistics of the extracted values along with an optional
1473// histogram of the values as specified by the bucket options.
1474type LogMetric struct {
1475	// BucketOptions: Optional. The bucket_options are required when the
1476	// logs-based metric is using a DISTRIBUTION value type and it describes
1477	// the bucket boundaries used to create a histogram of the extracted
1478	// values.
1479	BucketOptions *BucketOptions `json:"bucketOptions,omitempty"`
1480
1481	// CreateTime: Output only. The creation timestamp of the metric.This
1482	// field may not be present for older metrics.
1483	CreateTime string `json:"createTime,omitempty"`
1484
1485	// Description: Optional. A description of this metric, which is used in
1486	// documentation. The maximum length of the description is 8000
1487	// characters.
1488	Description string `json:"description,omitempty"`
1489
1490	// Filter: Required. An advanced logs filter which is used to match log
1491	// entries. Example:
1492	// "resource.type=gae_app AND severity>=ERROR"
1493	// The maximum length of the filter is 20000 characters.
1494	Filter string `json:"filter,omitempty"`
1495
1496	// LabelExtractors: Optional. A map from a label key string to an
1497	// extractor expression which is used to extract data from a log entry
1498	// field and assign as the label value. Each label key specified in the
1499	// LabelDescriptor must have an associated extractor expression in this
1500	// map. The syntax of the extractor expression is the same as for the
1501	// value_extractor field.The extracted value is converted to the type
1502	// defined in the label descriptor. If the either the extraction or the
1503	// type conversion fails, the label will have a default value. The
1504	// default value for a string label is an empty string, for an integer
1505	// label its 0, and for a boolean label its false.Note that there are
1506	// upper bounds on the maximum number of labels and the number of active
1507	// time series that are allowed in a project.
1508	LabelExtractors map[string]string `json:"labelExtractors,omitempty"`
1509
1510	// MetricDescriptor: Optional. The metric descriptor associated with the
1511	// logs-based metric. If unspecified, it uses a default metric
1512	// descriptor with a DELTA metric kind, INT64 value type, with no labels
1513	// and a unit of "1". Such a metric counts the number of log entries
1514	// matching the filter expression.The name, type, and description fields
1515	// in the metric_descriptor are output only, and is constructed using
1516	// the name and description field in the LogMetric.To create a
1517	// logs-based metric that records a distribution of log values, a DELTA
1518	// metric kind with a DISTRIBUTION value type must be used along with a
1519	// value_extractor expression in the LogMetric.Each label in the metric
1520	// descriptor must have a matching label name as the key and an
1521	// extractor expression as the value in the label_extractors map.The
1522	// metric_kind and value_type fields in the metric_descriptor cannot be
1523	// updated once initially configured. New labels can be added in the
1524	// metric_descriptor, but existing labels cannot be modified except for
1525	// their description.
1526	MetricDescriptor *MetricDescriptor `json:"metricDescriptor,omitempty"`
1527
1528	// Name: Required. The client-assigned metric identifier. Examples:
1529	// "error_count", "nginx/requests".Metric identifiers are limited to 100
1530	// characters and can include only the following characters: A-Z, a-z,
1531	// 0-9, and the special characters _-.,+!*',()%/. The forward-slash
1532	// character (/) denotes a hierarchy of name pieces, and it cannot be
1533	// the first character of the name.The metric identifier in this field
1534	// must not be URL-encoded
1535	// (https://en.wikipedia.org/wiki/Percent-encoding). However, when the
1536	// metric identifier appears as the [METRIC_ID] part of a metric_name
1537	// API parameter, then the metric identifier must be URL-encoded.
1538	// Example: "projects/my-project/metrics/nginx%2Frequests".
1539	Name string `json:"name,omitempty"`
1540
1541	// UpdateTime: Output only. The last update timestamp of the metric.This
1542	// field may not be present for older metrics.
1543	UpdateTime string `json:"updateTime,omitempty"`
1544
1545	// ValueExtractor: Optional. A value_extractor is required when using a
1546	// distribution logs-based metric to extract the values to record from a
1547	// log entry. Two functions are supported for value extraction:
1548	// EXTRACT(field) or REGEXP_EXTRACT(field, regex). The argument are:  1.
1549	// field: The name of the log entry field from which the value is to be
1550	// extracted.  2. regex: A regular expression using the Google RE2
1551	// syntax  (https://github.com/google/re2/wiki/Syntax) with a single
1552	// capture  group to extract data from the specified log entry field.
1553	// The value  of the field is converted to a string before applying the
1554	// regex.  It is an error to specify a regex that does not include
1555	// exactly one  capture group.The result of the extraction must be
1556	// convertible to a double type, as the distribution always records
1557	// double values. If either the extraction or the conversion to double
1558	// fails, then those values are not recorded in the
1559	// distribution.Example: REGEXP_EXTRACT(jsonPayload.request,
1560	// ".*quantity=(\d+).*")
1561	ValueExtractor string `json:"valueExtractor,omitempty"`
1562
1563	// Version: Deprecated. The API version that created or updated this
1564	// metric. The v2 format is used by default and cannot be changed.
1565	//
1566	// Possible values:
1567	//   "V2" - Logging API v2.
1568	//   "V1" - Logging API v1.
1569	Version string `json:"version,omitempty"`
1570
1571	// ServerResponse contains the HTTP response code and headers from the
1572	// server.
1573	googleapi.ServerResponse `json:"-"`
1574
1575	// ForceSendFields is a list of field names (e.g. "BucketOptions") to
1576	// unconditionally include in API requests. By default, fields with
1577	// empty values are omitted from API requests. However, any non-pointer,
1578	// non-interface field appearing in ForceSendFields will be sent to the
1579	// server regardless of whether the field is empty or not. This may be
1580	// used to include empty fields in Patch requests.
1581	ForceSendFields []string `json:"-"`
1582
1583	// NullFields is a list of field names (e.g. "BucketOptions") to include
1584	// in API requests with the JSON null value. By default, fields with
1585	// empty values are omitted from API requests. However, any field with
1586	// an empty value appearing in NullFields will be sent to the server as
1587	// null. It is an error if a field in this list has a non-empty value.
1588	// This may be used to include null fields in Patch requests.
1589	NullFields []string `json:"-"`
1590}
1591
1592func (s *LogMetric) MarshalJSON() ([]byte, error) {
1593	type NoMethod LogMetric
1594	raw := NoMethod(*s)
1595	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1596}
1597
1598// LogSink: Describes a sink used to export log entries to one of the
1599// following destinations in any project: a Cloud Storage bucket, a
1600// BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls
1601// which log entries are exported. The sink must be created within a
1602// project, organization, billing account, or folder.
1603type LogSink struct {
1604	// BigqueryOptions: Optional. Options that affect sinks exporting data
1605	// to BigQuery.
1606	BigqueryOptions *BigQueryOptions `json:"bigqueryOptions,omitempty"`
1607
1608	// CreateTime: Output only. The creation timestamp of the sink.This
1609	// field may not be present for older sinks.
1610	CreateTime string `json:"createTime,omitempty"`
1611
1612	// Destination: Required. The export
1613	// destination:
1614	// "storage.googleapis.com/[GCS_BUCKET]"
1615	// "bigquery.googleapi
1616	// s.com/projects/[PROJECT_ID]/datasets/[DATASET]"
1617	// "pubsub.googleapis.com
1618	// /projects/[PROJECT_ID]/topics/[TOPIC_ID]"
1619	// The sink's writer_identity, set when the sink is created, must have
1620	// permission to write to the destination or else the log entries are
1621	// not exported. For more information, see Exporting Logs with Sinks.
1622	Destination string `json:"destination,omitempty"`
1623
1624	// EndTime: Do not use. This field is ignored.
1625	EndTime string `json:"endTime,omitempty"`
1626
1627	// Filter: Optional. An advanced logs filter. The only exported log
1628	// entries are those that are in the resource owning the sink and that
1629	// match the filter. For
1630	// example:
1631	// logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
1632	//
1633	Filter string `json:"filter,omitempty"`
1634
1635	// IncludeChildren: Optional. This field applies only to sinks owned by
1636	// organizations and folders. If the field is false, the default, only
1637	// the logs owned by the sink's parent resource are available for
1638	// export. If the field is true, then logs from all the projects,
1639	// folders, and billing accounts contained in the sink's parent resource
1640	// are also available for export. Whether a particular log entry from
1641	// the children is exported depends on the sink's filter expression. For
1642	// example, if this field is true, then the filter
1643	// resource.type=gce_instance would export all Compute Engine VM
1644	// instance log entries from all projects in the sink's parent. To only
1645	// export entries from certain child projects, filter on the project
1646	// part of the log name:
1647	// logName:("projects/test-project1/" OR "projects/test-project2/")
1648	// AND
1649	// resource.type=gce_instance
1650	//
1651	IncludeChildren bool `json:"includeChildren,omitempty"`
1652
1653	// Name: Required. The client-assigned sink identifier, unique within
1654	// the project. Example: "my-syslog-errors-to-pubsub". Sink identifiers
1655	// are limited to 100 characters and can include only the following
1656	// characters: upper and lower-case alphanumeric characters,
1657	// underscores, hyphens, and periods.
1658	Name string `json:"name,omitempty"`
1659
1660	// OutputVersionFormat: Deprecated. The log entry format to use for this
1661	// sink's exported log entries. The v2 format is used by default and
1662	// cannot be changed.
1663	//
1664	// Possible values:
1665	//   "VERSION_FORMAT_UNSPECIFIED" - An unspecified format version that
1666	// will default to V2.
1667	//   "V2" - LogEntry version 2 format.
1668	//   "V1" - LogEntry version 1 format.
1669	OutputVersionFormat string `json:"outputVersionFormat,omitempty"`
1670
1671	// StartTime: Do not use. This field is ignored.
1672	StartTime string `json:"startTime,omitempty"`
1673
1674	// UpdateTime: Output only. The last update timestamp of the sink.This
1675	// field may not be present for older sinks.
1676	UpdateTime string `json:"updateTime,omitempty"`
1677
1678	// WriterIdentity: Output only. An IAM identity&mdash;a service account
1679	// or group&mdash;under which Logging writes the exported log entries to
1680	// the sink's destination. This field is set by sinks.create and
1681	// sinks.update based on the value of unique_writer_identity in those
1682	// methods.Until you grant this identity write-access to the
1683	// destination, log entry exports from this sink will fail. For more
1684	// information, see Granting Access for a Resource. Consult the
1685	// destination service's documentation to determine the appropriate IAM
1686	// roles to assign to the identity.
1687	WriterIdentity string `json:"writerIdentity,omitempty"`
1688
1689	// ServerResponse contains the HTTP response code and headers from the
1690	// server.
1691	googleapi.ServerResponse `json:"-"`
1692
1693	// ForceSendFields is a list of field names (e.g. "BigqueryOptions") to
1694	// unconditionally include in API requests. By default, fields with
1695	// empty values are omitted from API requests. However, any non-pointer,
1696	// non-interface field appearing in ForceSendFields will be sent to the
1697	// server regardless of whether the field is empty or not. This may be
1698	// used to include empty fields in Patch requests.
1699	ForceSendFields []string `json:"-"`
1700
1701	// NullFields is a list of field names (e.g. "BigqueryOptions") to
1702	// include in API requests with the JSON null value. By default, fields
1703	// with empty values are omitted from API requests. However, any field
1704	// with an empty value appearing in NullFields will be sent to the
1705	// server as null. It is an error if a field in this list has a
1706	// non-empty value. This may be used to include null fields in Patch
1707	// requests.
1708	NullFields []string `json:"-"`
1709}
1710
1711func (s *LogSink) MarshalJSON() ([]byte, error) {
1712	type NoMethod LogSink
1713	raw := NoMethod(*s)
1714	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1715}
1716
1717// MetricDescriptor: Defines a metric type and its schema. Once a metric
1718// descriptor is created, deleting or altering it stops data collection
1719// and makes the metric type's existing data unusable.
1720type MetricDescriptor struct {
1721	// Description: A detailed description of the metric, which can be used
1722	// in documentation.
1723	Description string `json:"description,omitempty"`
1724
1725	// DisplayName: A concise name for the metric, which can be displayed in
1726	// user interfaces. Use sentence case without an ending period, for
1727	// example "Request count". This field is optional but it is recommended
1728	// to be set for any metrics associated with user-visible concepts, such
1729	// as Quota.
1730	DisplayName string `json:"displayName,omitempty"`
1731
1732	// Labels: The set of labels that can be used to describe a specific
1733	// instance of this metric type. For example, the
1734	// appengine.googleapis.com/http/server/response_latencies metric type
1735	// has a label for the HTTP response code, response_code, so you can
1736	// look at latencies for successful responses or just for responses that
1737	// failed.
1738	Labels []*LabelDescriptor `json:"labels,omitempty"`
1739
1740	// LaunchStage: Optional. The launch stage of the metric definition.
1741	//
1742	// Possible values:
1743	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
1744	//   "EARLY_ACCESS" - Early Access features are limited to a closed
1745	// group of testers. To use these features, you must sign up in advance
1746	// and sign a Trusted Tester agreement (which includes confidentiality
1747	// provisions). These features may be unstable, changed in
1748	// backward-incompatible ways, and are not guaranteed to be released.
1749	//   "ALPHA" - Alpha is a limited availability test for releases before
1750	// they are cleared for widespread use. By Alpha, all significant design
1751	// issues are resolved and we are in the process of verifying
1752	// functionality. Alpha customers need to apply for access, agree to
1753	// applicable terms, and have their projects whitelisted. Alpha releases
1754	// don’t have to be feature complete, no SLAs are provided, and there
1755	// are no technical support obligations, but they will be far enough
1756	// along that customers can actually use them in test environments or
1757	// for limited-use tests -- just like they would in normal production
1758	// cases.
1759	//   "BETA" - Beta is the point at which we are ready to open a release
1760	// for any customer to use. There are no SLA or technical support
1761	// obligations in a Beta release. Products will be complete from a
1762	// feature perspective, but may have some open outstanding issues. Beta
1763	// releases are suitable for limited production use cases.
1764	//   "GA" - GA features are open to all developers and are considered
1765	// stable and fully qualified for production use.
1766	//   "DEPRECATED" - Deprecated features are scheduled to be shut down
1767	// and removed. For more information, see the “Deprecation Policy”
1768	// section of our Terms of Service (https://cloud.google.com/terms/) and
1769	// the Google Cloud Platform Subject to the Deprecation Policy
1770	// (https://cloud.google.com/terms/deprecation) documentation.
1771	LaunchStage string `json:"launchStage,omitempty"`
1772
1773	// Metadata: Optional. Metadata which can be used to guide usage of the
1774	// metric.
1775	Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"`
1776
1777	// MetricKind: Whether the metric records instantaneous values, changes
1778	// to a value, etc. Some combinations of metric_kind and value_type
1779	// might not be supported.
1780	//
1781	// Possible values:
1782	//   "METRIC_KIND_UNSPECIFIED" - Do not use this default value.
1783	//   "GAUGE" - An instantaneous measurement of a value.
1784	//   "DELTA" - The change in a value during a time interval.
1785	//   "CUMULATIVE" - A value accumulated over a time interval. Cumulative
1786	// measurements in a time series should have the same start time and
1787	// increasing end times, until an event resets the cumulative value to
1788	// zero and sets a new start time for the following points.
1789	MetricKind string `json:"metricKind,omitempty"`
1790
1791	// MonitoredResourceTypes: Read-only. If present, then a time series,
1792	// which is identified partially by a metric type and a
1793	// MonitoredResourceDescriptor, that is associated with this metric type
1794	// can only be associated with one of the monitored resource types
1795	// listed here.
1796	MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"`
1797
1798	// Name: The resource name of the metric descriptor.
1799	Name string `json:"name,omitempty"`
1800
1801	// Type: The metric type, including its DNS name prefix. The type is not
1802	// URL-encoded. All user-defined metric types have the DNS name
1803	// custom.googleapis.com or external.googleapis.com. Metric types should
1804	// use a natural hierarchical grouping. For
1805	// example:
1806	// "custom.googleapis.com/invoice/paid/amount"
1807	// "external.googlea
1808	// pis.com/prometheus/up"
1809	// "appengine.googleapis.com/http/server/response_
1810	// latencies"
1811	//
1812	Type string `json:"type,omitempty"`
1813
1814	// Unit: The unit in which the metric value is reported. It is only
1815	// applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The
1816	// supported units are a subset of The Unified Code for Units of Measure
1817	// (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT)
1818	// bit bit
1819	// By byte
1820	// s second
1821	// min minute
1822	// h hour
1823	// d dayPrefixes (PREFIX)
1824	// k kilo (10**3)
1825	// M mega (10**6)
1826	// G giga (10**9)
1827	// T tera (10**12)
1828	// P peta (10**15)
1829	// E exa (10**18)
1830	// Z zetta (10**21)
1831	// Y yotta (10**24)
1832	// m milli (10**-3)
1833	// u micro (10**-6)
1834	// n nano (10**-9)
1835	// p pico (10**-12)
1836	// f femto (10**-15)
1837	// a atto (10**-18)
1838	// z zepto (10**-21)
1839	// y yocto (10**-24)
1840	// Ki kibi (2**10)
1841	// Mi mebi (2**20)
1842	// Gi gibi (2**30)
1843	// Ti tebi (2**40)GrammarThe grammar also includes these connectors:
1844	// / division (as an infix operator, e.g. 1/s).
1845	// . multiplication (as an infix operator, e.g. GBy.d)The grammar for a
1846	// unit is as follows:
1847	// Expression = Component { "." Component } { "/" Component }
1848	// ;
1849	//
1850	// Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
1851	//           | Annotation
1852	//           | "1"
1853	//           ;
1854	//
1855	// Annotation = "{" NAME "}" ;
1856	// Notes:
1857	// Annotation is just a comment if it follows a UNIT and is  equivalent
1858	// to 1 if it is used alone. For examples,  {requests}/s == 1/s,
1859	// By{transmitted}/s == By/s.
1860	// NAME is a sequence of non-blank printable ASCII characters not
1861	// containing '{' or '}'.
1862	// 1 represents dimensionless value 1, such as in 1/s.
1863	// % represents dimensionless value 1/100, and annotates values giving
1864	// a percentage.
1865	Unit string `json:"unit,omitempty"`
1866
1867	// ValueType: Whether the measurement is an integer, a floating-point
1868	// number, etc. Some combinations of metric_kind and value_type might
1869	// not be supported.
1870	//
1871	// Possible values:
1872	//   "VALUE_TYPE_UNSPECIFIED" - Do not use this default value.
1873	//   "BOOL" - The value is a boolean. This value type can be used only
1874	// if the metric kind is GAUGE.
1875	//   "INT64" - The value is a signed 64-bit integer.
1876	//   "DOUBLE" - The value is a double precision floating point number.
1877	//   "STRING" - The value is a text string. This value type can be used
1878	// only if the metric kind is GAUGE.
1879	//   "DISTRIBUTION" - The value is a Distribution.
1880	//   "MONEY" - The value is money.
1881	ValueType string `json:"valueType,omitempty"`
1882
1883	// ForceSendFields is a list of field names (e.g. "Description") to
1884	// unconditionally include in API requests. By default, fields with
1885	// empty values are omitted from API requests. However, any non-pointer,
1886	// non-interface field appearing in ForceSendFields will be sent to the
1887	// server regardless of whether the field is empty or not. This may be
1888	// used to include empty fields in Patch requests.
1889	ForceSendFields []string `json:"-"`
1890
1891	// NullFields is a list of field names (e.g. "Description") to include
1892	// in API requests with the JSON null value. By default, fields with
1893	// empty values are omitted from API requests. However, any field with
1894	// an empty value appearing in NullFields will be sent to the server as
1895	// null. It is an error if a field in this list has a non-empty value.
1896	// This may be used to include null fields in Patch requests.
1897	NullFields []string `json:"-"`
1898}
1899
1900func (s *MetricDescriptor) MarshalJSON() ([]byte, error) {
1901	type NoMethod MetricDescriptor
1902	raw := NoMethod(*s)
1903	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1904}
1905
1906// MetricDescriptorMetadata: Additional annotations that can be used to
1907// guide the usage of a metric.
1908type MetricDescriptorMetadata struct {
1909	// IngestDelay: The delay of data points caused by ingestion. Data
1910	// points older than this age are guaranteed to be ingested and
1911	// available to be read, excluding data loss due to errors.
1912	IngestDelay string `json:"ingestDelay,omitempty"`
1913
1914	// LaunchStage: Deprecated. Must use the MetricDescriptor.launch_stage
1915	// instead.
1916	//
1917	// Possible values:
1918	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
1919	//   "EARLY_ACCESS" - Early Access features are limited to a closed
1920	// group of testers. To use these features, you must sign up in advance
1921	// and sign a Trusted Tester agreement (which includes confidentiality
1922	// provisions). These features may be unstable, changed in
1923	// backward-incompatible ways, and are not guaranteed to be released.
1924	//   "ALPHA" - Alpha is a limited availability test for releases before
1925	// they are cleared for widespread use. By Alpha, all significant design
1926	// issues are resolved and we are in the process of verifying
1927	// functionality. Alpha customers need to apply for access, agree to
1928	// applicable terms, and have their projects whitelisted. Alpha releases
1929	// don’t have to be feature complete, no SLAs are provided, and there
1930	// are no technical support obligations, but they will be far enough
1931	// along that customers can actually use them in test environments or
1932	// for limited-use tests -- just like they would in normal production
1933	// cases.
1934	//   "BETA" - Beta is the point at which we are ready to open a release
1935	// for any customer to use. There are no SLA or technical support
1936	// obligations in a Beta release. Products will be complete from a
1937	// feature perspective, but may have some open outstanding issues. Beta
1938	// releases are suitable for limited production use cases.
1939	//   "GA" - GA features are open to all developers and are considered
1940	// stable and fully qualified for production use.
1941	//   "DEPRECATED" - Deprecated features are scheduled to be shut down
1942	// and removed. For more information, see the “Deprecation Policy”
1943	// section of our Terms of Service (https://cloud.google.com/terms/) and
1944	// the Google Cloud Platform Subject to the Deprecation Policy
1945	// (https://cloud.google.com/terms/deprecation) documentation.
1946	LaunchStage string `json:"launchStage,omitempty"`
1947
1948	// SamplePeriod: The sampling period of metric data points. For metrics
1949	// which are written periodically, consecutive data points are stored at
1950	// this time interval, excluding data loss due to errors. Metrics with a
1951	// higher granularity have a smaller sampling period.
1952	SamplePeriod string `json:"samplePeriod,omitempty"`
1953
1954	// ForceSendFields is a list of field names (e.g. "IngestDelay") to
1955	// unconditionally include in API requests. By default, fields with
1956	// empty values are omitted from API requests. However, any non-pointer,
1957	// non-interface field appearing in ForceSendFields will be sent to the
1958	// server regardless of whether the field is empty or not. This may be
1959	// used to include empty fields in Patch requests.
1960	ForceSendFields []string `json:"-"`
1961
1962	// NullFields is a list of field names (e.g. "IngestDelay") to include
1963	// in API requests with the JSON null value. By default, fields with
1964	// empty values are omitted from API requests. However, any field with
1965	// an empty value appearing in NullFields will be sent to the server as
1966	// null. It is an error if a field in this list has a non-empty value.
1967	// This may be used to include null fields in Patch requests.
1968	NullFields []string `json:"-"`
1969}
1970
1971func (s *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) {
1972	type NoMethod MetricDescriptorMetadata
1973	raw := NoMethod(*s)
1974	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1975}
1976
1977// MonitoredResource: An object representing a resource that can be used
1978// for monitoring, logging, billing, or other purposes. Examples include
1979// virtual machine instances, databases, and storage devices such as
1980// disks. The type field identifies a MonitoredResourceDescriptor object
1981// that describes the resource's schema. Information in the labels field
1982// identifies the actual resource and its attributes according to the
1983// schema. For example, a particular Compute Engine VM instance could be
1984// represented by the following object, because the
1985// MonitoredResourceDescriptor for "gce_instance" has labels
1986// "instance_id" and "zone":
1987// { "type": "gce_instance",
1988//   "labels": { "instance_id": "12345678901234",
1989//               "zone": "us-central1-a" }}
1990//
1991type MonitoredResource struct {
1992	// Labels: Required. Values for all of the labels listed in the
1993	// associated monitored resource descriptor. For example, Compute Engine
1994	// VM instances use the labels "project_id", "instance_id", and "zone".
1995	Labels map[string]string `json:"labels,omitempty"`
1996
1997	// Type: Required. The monitored resource type. This field must match
1998	// the type field of a MonitoredResourceDescriptor object. For example,
1999	// the type of a Compute Engine VM instance is gce_instance.
2000	Type string `json:"type,omitempty"`
2001
2002	// ForceSendFields is a list of field names (e.g. "Labels") to
2003	// unconditionally include in API requests. By default, fields with
2004	// empty values are omitted from API requests. However, any non-pointer,
2005	// non-interface field appearing in ForceSendFields will be sent to the
2006	// server regardless of whether the field is empty or not. This may be
2007	// used to include empty fields in Patch requests.
2008	ForceSendFields []string `json:"-"`
2009
2010	// NullFields is a list of field names (e.g. "Labels") to include in API
2011	// requests with the JSON null value. By default, fields with empty
2012	// values are omitted from API requests. However, any field with an
2013	// empty value appearing in NullFields will be sent to the server as
2014	// null. It is an error if a field in this list has a non-empty value.
2015	// This may be used to include null fields in Patch requests.
2016	NullFields []string `json:"-"`
2017}
2018
2019func (s *MonitoredResource) MarshalJSON() ([]byte, error) {
2020	type NoMethod MonitoredResource
2021	raw := NoMethod(*s)
2022	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2023}
2024
2025// MonitoredResourceDescriptor: An object that describes the schema of a
2026// MonitoredResource object using a type name and a set of labels. For
2027// example, the monitored resource descriptor for Google Compute Engine
2028// VM instances has a type of "gce_instance" and specifies the use of
2029// the labels "instance_id" and "zone" to identify particular VM
2030// instances.Different APIs can support different monitored resource
2031// types. APIs generally provide a list method that returns the
2032// monitored resource descriptors used by the API.
2033type MonitoredResourceDescriptor struct {
2034	// Description: Optional. A detailed description of the monitored
2035	// resource type that might be used in documentation.
2036	Description string `json:"description,omitempty"`
2037
2038	// DisplayName: Optional. A concise name for the monitored resource type
2039	// that might be displayed in user interfaces. It should be a Title
2040	// Cased Noun Phrase, without any article or other determiners. For
2041	// example, "Google Cloud SQL Database".
2042	DisplayName string `json:"displayName,omitempty"`
2043
2044	// Labels: Required. A set of labels used to describe instances of this
2045	// monitored resource type. For example, an individual Google Cloud SQL
2046	// database is identified by values for the labels "database_id" and
2047	// "zone".
2048	Labels []*LabelDescriptor `json:"labels,omitempty"`
2049
2050	// LaunchStage: Optional. The launch stage of the monitored resource
2051	// definition.
2052	//
2053	// Possible values:
2054	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2055	//   "EARLY_ACCESS" - Early Access features are limited to a closed
2056	// group of testers. To use these features, you must sign up in advance
2057	// and sign a Trusted Tester agreement (which includes confidentiality
2058	// provisions). These features may be unstable, changed in
2059	// backward-incompatible ways, and are not guaranteed to be released.
2060	//   "ALPHA" - Alpha is a limited availability test for releases before
2061	// they are cleared for widespread use. By Alpha, all significant design
2062	// issues are resolved and we are in the process of verifying
2063	// functionality. Alpha customers need to apply for access, agree to
2064	// applicable terms, and have their projects whitelisted. Alpha releases
2065	// don’t have to be feature complete, no SLAs are provided, and there
2066	// are no technical support obligations, but they will be far enough
2067	// along that customers can actually use them in test environments or
2068	// for limited-use tests -- just like they would in normal production
2069	// cases.
2070	//   "BETA" - Beta is the point at which we are ready to open a release
2071	// for any customer to use. There are no SLA or technical support
2072	// obligations in a Beta release. Products will be complete from a
2073	// feature perspective, but may have some open outstanding issues. Beta
2074	// releases are suitable for limited production use cases.
2075	//   "GA" - GA features are open to all developers and are considered
2076	// stable and fully qualified for production use.
2077	//   "DEPRECATED" - Deprecated features are scheduled to be shut down
2078	// and removed. For more information, see the “Deprecation Policy”
2079	// section of our Terms of Service (https://cloud.google.com/terms/) and
2080	// the Google Cloud Platform Subject to the Deprecation Policy
2081	// (https://cloud.google.com/terms/deprecation) documentation.
2082	LaunchStage string `json:"launchStage,omitempty"`
2083
2084	// Name: Optional. The resource name of the monitored resource
2085	// descriptor:
2086	// "projects/{project_id}/monitoredResourceDescriptors/{type}" where
2087	// {type} is the value of the type field in this object and {project_id}
2088	// is a project ID that provides API-specific context for accessing the
2089	// type. APIs that do not use project information can use the resource
2090	// name format "monitoredResourceDescriptors/{type}".
2091	Name string `json:"name,omitempty"`
2092
2093	// Type: Required. The monitored resource type. For example, the type
2094	// "cloudsql_database" represents databases in Google Cloud SQL. The
2095	// maximum length of this value is 256 characters.
2096	Type string `json:"type,omitempty"`
2097
2098	// ForceSendFields is a list of field names (e.g. "Description") to
2099	// unconditionally include in API requests. By default, fields with
2100	// empty values are omitted from API requests. However, any non-pointer,
2101	// non-interface field appearing in ForceSendFields will be sent to the
2102	// server regardless of whether the field is empty or not. This may be
2103	// used to include empty fields in Patch requests.
2104	ForceSendFields []string `json:"-"`
2105
2106	// NullFields is a list of field names (e.g. "Description") to include
2107	// in API requests with the JSON null value. By default, fields with
2108	// empty values are omitted from API requests. However, any field with
2109	// an empty value appearing in NullFields will be sent to the server as
2110	// null. It is an error if a field in this list has a non-empty value.
2111	// This may be used to include null fields in Patch requests.
2112	NullFields []string `json:"-"`
2113}
2114
2115func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
2116	type NoMethod MonitoredResourceDescriptor
2117	raw := NoMethod(*s)
2118	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2119}
2120
2121// MonitoredResourceMetadata: Auxiliary metadata for a MonitoredResource
2122// object. MonitoredResource objects contain the minimum set of
2123// information to uniquely identify a monitored resource instance. There
2124// is some other useful auxiliary metadata. Monitoring and Logging use
2125// an ingestion pipeline to extract metadata for cloud resources of all
2126// types, and store the metadata in this message.
2127type MonitoredResourceMetadata struct {
2128	// SystemLabels: Output only. Values for predefined system metadata
2129	// labels. System labels are a kind of metadata extracted by Google,
2130	// including "machine_image", "vpc", "subnet_id", "security_group",
2131	// "name", etc. System label values can be only strings, Boolean values,
2132	// or a list of strings. For example:
2133	// { "name": "my-test-instance",
2134	//   "security_group": ["a", "b", "c"],
2135	//   "spot_instance": false }
2136	//
2137	SystemLabels googleapi.RawMessage `json:"systemLabels,omitempty"`
2138
2139	// UserLabels: Output only. A map of user-defined metadata labels.
2140	UserLabels map[string]string `json:"userLabels,omitempty"`
2141
2142	// ForceSendFields is a list of field names (e.g. "SystemLabels") to
2143	// unconditionally include in API requests. By default, fields with
2144	// empty values are omitted from API requests. However, any non-pointer,
2145	// non-interface field appearing in ForceSendFields will be sent to the
2146	// server regardless of whether the field is empty or not. This may be
2147	// used to include empty fields in Patch requests.
2148	ForceSendFields []string `json:"-"`
2149
2150	// NullFields is a list of field names (e.g. "SystemLabels") to include
2151	// in API requests with the JSON null value. By default, fields with
2152	// empty values are omitted from API requests. However, any field with
2153	// an empty value appearing in NullFields will be sent to the server as
2154	// null. It is an error if a field in this list has a non-empty value.
2155	// This may be used to include null fields in Patch requests.
2156	NullFields []string `json:"-"`
2157}
2158
2159func (s *MonitoredResourceMetadata) MarshalJSON() ([]byte, error) {
2160	type NoMethod MonitoredResourceMetadata
2161	raw := NoMethod(*s)
2162	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2163}
2164
2165// RequestLog: Complete log information about a single HTTP request to
2166// an App Engine application.
2167type RequestLog struct {
2168	// AppEngineRelease: App Engine release version.
2169	AppEngineRelease string `json:"appEngineRelease,omitempty"`
2170
2171	// AppId: Application that handled this request.
2172	AppId string `json:"appId,omitempty"`
2173
2174	// Cost: An indication of the relative cost of serving this request.
2175	Cost float64 `json:"cost,omitempty"`
2176
2177	// EndTime: Time when the request finished.
2178	EndTime string `json:"endTime,omitempty"`
2179
2180	// Finished: Whether this request is finished or active.
2181	Finished bool `json:"finished,omitempty"`
2182
2183	// First: Whether this is the first RequestLog entry for this request.
2184	// If an active request has several RequestLog entries written to
2185	// Stackdriver Logging, then this field will be set for one of them.
2186	First bool `json:"first,omitempty"`
2187
2188	// Host: Internet host and port number of the resource being requested.
2189	Host string `json:"host,omitempty"`
2190
2191	// HttpVersion: HTTP version of request. Example: "HTTP/1.1".
2192	HttpVersion string `json:"httpVersion,omitempty"`
2193
2194	// InstanceId: An identifier for the instance that handled the request.
2195	InstanceId string `json:"instanceId,omitempty"`
2196
2197	// InstanceIndex: If the instance processing this request belongs to a
2198	// manually scaled module, then this is the 0-based index of the
2199	// instance. Otherwise, this value is -1.
2200	InstanceIndex int64 `json:"instanceIndex,omitempty"`
2201
2202	// Ip: Origin IP address.
2203	Ip string `json:"ip,omitempty"`
2204
2205	// Latency: Latency of the request.
2206	Latency string `json:"latency,omitempty"`
2207
2208	// Line: A list of log lines emitted by the application while serving
2209	// this request.
2210	Line []*LogLine `json:"line,omitempty"`
2211
2212	// MegaCycles: Number of CPU megacycles used to process request.
2213	MegaCycles int64 `json:"megaCycles,omitempty,string"`
2214
2215	// Method: Request method. Example: "GET", "HEAD", "PUT", "POST",
2216	// "DELETE".
2217	Method string `json:"method,omitempty"`
2218
2219	// ModuleId: Module of the application that handled this request.
2220	ModuleId string `json:"moduleId,omitempty"`
2221
2222	// Nickname: The logged-in user who made the request.Most likely, this
2223	// is the part of the user's email before the @ sign. The field value is
2224	// the same for different requests from the same user, but different
2225	// users can have similar names. This information is also available to
2226	// the application via the App Engine Users API.This field will be
2227	// populated starting with App Engine 1.9.21.
2228	Nickname string `json:"nickname,omitempty"`
2229
2230	// PendingTime: Time this request spent in the pending request queue.
2231	PendingTime string `json:"pendingTime,omitempty"`
2232
2233	// Referrer: Referrer URL of request.
2234	Referrer string `json:"referrer,omitempty"`
2235
2236	// RequestId: Globally unique identifier for a request, which is based
2237	// on the request start time. Request IDs for requests which started
2238	// later will compare greater as strings than those for requests which
2239	// started earlier.
2240	RequestId string `json:"requestId,omitempty"`
2241
2242	// Resource: Contains the path and query portion of the URL that was
2243	// requested. For example, if the URL was
2244	// "http://example.com/app?name=val", the resource would be
2245	// "/app?name=val". The fragment identifier, which is identified by the
2246	// # character, is not included.
2247	Resource string `json:"resource,omitempty"`
2248
2249	// ResponseSize: Size in bytes sent back to client by request.
2250	ResponseSize int64 `json:"responseSize,omitempty,string"`
2251
2252	// SourceReference: Source code for the application that handled this
2253	// request. There can be more than one source reference per deployed
2254	// application if source code is distributed among multiple
2255	// repositories.
2256	SourceReference []*SourceReference `json:"sourceReference,omitempty"`
2257
2258	// StartTime: Time when the request started.
2259	StartTime string `json:"startTime,omitempty"`
2260
2261	// Status: HTTP response status code. Example: 200, 404.
2262	Status int64 `json:"status,omitempty"`
2263
2264	// TaskName: Task name of the request, in the case of an offline
2265	// request.
2266	TaskName string `json:"taskName,omitempty"`
2267
2268	// TaskQueueName: Queue name of the request, in the case of an offline
2269	// request.
2270	TaskQueueName string `json:"taskQueueName,omitempty"`
2271
2272	// TraceId: Stackdriver Trace identifier for this request.
2273	TraceId string `json:"traceId,omitempty"`
2274
2275	// TraceSampled: If true, the value in the 'trace_id' field was sampled
2276	// for storage in a trace backend.
2277	TraceSampled bool `json:"traceSampled,omitempty"`
2278
2279	// UrlMapEntry: File or class that handled the request.
2280	UrlMapEntry string `json:"urlMapEntry,omitempty"`
2281
2282	// UserAgent: User agent that made the request.
2283	UserAgent string `json:"userAgent,omitempty"`
2284
2285	// VersionId: Version of the application that handled this request.
2286	VersionId string `json:"versionId,omitempty"`
2287
2288	// WasLoadingRequest: Whether this was a loading request for the
2289	// instance.
2290	WasLoadingRequest bool `json:"wasLoadingRequest,omitempty"`
2291
2292	// ForceSendFields is a list of field names (e.g. "AppEngineRelease") to
2293	// unconditionally include in API requests. By default, fields with
2294	// empty values are omitted from API requests. However, any non-pointer,
2295	// non-interface field appearing in ForceSendFields will be sent to the
2296	// server regardless of whether the field is empty or not. This may be
2297	// used to include empty fields in Patch requests.
2298	ForceSendFields []string `json:"-"`
2299
2300	// NullFields is a list of field names (e.g. "AppEngineRelease") to
2301	// include in API requests with the JSON null value. By default, fields
2302	// with empty values are omitted from API requests. However, any field
2303	// with an empty value appearing in NullFields will be sent to the
2304	// server as null. It is an error if a field in this list has a
2305	// non-empty value. This may be used to include null fields in Patch
2306	// requests.
2307	NullFields []string `json:"-"`
2308}
2309
2310func (s *RequestLog) MarshalJSON() ([]byte, error) {
2311	type NoMethod RequestLog
2312	raw := NoMethod(*s)
2313	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2314}
2315
2316func (s *RequestLog) UnmarshalJSON(data []byte) error {
2317	type NoMethod RequestLog
2318	var s1 struct {
2319		Cost gensupport.JSONFloat64 `json:"cost"`
2320		*NoMethod
2321	}
2322	s1.NoMethod = (*NoMethod)(s)
2323	if err := json.Unmarshal(data, &s1); err != nil {
2324		return err
2325	}
2326	s.Cost = float64(s1.Cost)
2327	return nil
2328}
2329
2330// SourceLocation: Specifies a location in a source code file.
2331type SourceLocation struct {
2332	// File: Source file name. Depending on the runtime environment, this
2333	// might be a simple name or a fully-qualified name.
2334	File string `json:"file,omitempty"`
2335
2336	// FunctionName: Human-readable name of the function or method being
2337	// invoked, with optional context such as the class or package name.
2338	// This information is used in contexts such as the logs viewer, where a
2339	// file and line number are less meaningful. The format can vary by
2340	// language. For example: qual.if.ied.Class.method (Java),
2341	// dir/package.func (Go), function (Python).
2342	FunctionName string `json:"functionName,omitempty"`
2343
2344	// Line: Line within the source file.
2345	Line int64 `json:"line,omitempty,string"`
2346
2347	// ForceSendFields is a list of field names (e.g. "File") to
2348	// unconditionally include in API requests. By default, fields with
2349	// empty values are omitted from API requests. However, any non-pointer,
2350	// non-interface field appearing in ForceSendFields will be sent to the
2351	// server regardless of whether the field is empty or not. This may be
2352	// used to include empty fields in Patch requests.
2353	ForceSendFields []string `json:"-"`
2354
2355	// NullFields is a list of field names (e.g. "File") to include in API
2356	// requests with the JSON null value. By default, fields with empty
2357	// values are omitted from API requests. However, any field with an
2358	// empty value appearing in NullFields will be sent to the server as
2359	// null. It is an error if a field in this list has a non-empty value.
2360	// This may be used to include null fields in Patch requests.
2361	NullFields []string `json:"-"`
2362}
2363
2364func (s *SourceLocation) MarshalJSON() ([]byte, error) {
2365	type NoMethod SourceLocation
2366	raw := NoMethod(*s)
2367	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2368}
2369
2370// SourceReference: A reference to a particular snapshot of the source
2371// tree used to build and deploy an application.
2372type SourceReference struct {
2373	// Repository: Optional. A URI string identifying the repository.
2374	// Example: "https://github.com/GoogleCloudPlatform/kubernetes.git"
2375	Repository string `json:"repository,omitempty"`
2376
2377	// RevisionId: The canonical and persistent identifier of the deployed
2378	// revision. Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b"
2379	RevisionId string `json:"revisionId,omitempty"`
2380
2381	// ForceSendFields is a list of field names (e.g. "Repository") to
2382	// unconditionally include in API requests. By default, fields with
2383	// empty values are omitted from API requests. However, any non-pointer,
2384	// non-interface field appearing in ForceSendFields will be sent to the
2385	// server regardless of whether the field is empty or not. This may be
2386	// used to include empty fields in Patch requests.
2387	ForceSendFields []string `json:"-"`
2388
2389	// NullFields is a list of field names (e.g. "Repository") to include in
2390	// API requests with the JSON null value. By default, fields with empty
2391	// values are omitted from API requests. However, any field with an
2392	// empty value appearing in NullFields will be sent to the server as
2393	// null. It is an error if a field in this list has a non-empty value.
2394	// This may be used to include null fields in Patch requests.
2395	NullFields []string `json:"-"`
2396}
2397
2398func (s *SourceReference) MarshalJSON() ([]byte, error) {
2399	type NoMethod SourceReference
2400	raw := NoMethod(*s)
2401	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2402}
2403
2404// WriteLogEntriesRequest: The parameters to WriteLogEntries.
2405type WriteLogEntriesRequest struct {
2406	// DryRun: Optional. If true, the request should expect normal response,
2407	// but the entries won't be persisted nor exported. Useful for checking
2408	// whether the logging API endpoints are working properly before sending
2409	// valuable data.
2410	DryRun bool `json:"dryRun,omitempty"`
2411
2412	// Entries: Required. The log entries to send to Logging. The order of
2413	// log entries in this list does not matter. Values supplied in this
2414	// method's log_name, resource, and labels fields are copied into those
2415	// log entries in this list that do not include values for their
2416	// corresponding fields. For more information, see the LogEntry type.If
2417	// the timestamp or insert_id fields are missing in log entries, then
2418	// this method supplies the current time or a unique identifier,
2419	// respectively. The supplied values are chosen so that, among the log
2420	// entries that did not supply their own values, the entries earlier in
2421	// the list will sort before the entries later in the list. See the
2422	// entries.list method.Log entries with timestamps that are more than
2423	// the logs retention period in the past or more than 24 hours in the
2424	// future will not be available when calling entries.list. However,
2425	// those log entries can still be exported with LogSinks.To improve
2426	// throughput and to avoid exceeding the quota limit for calls to
2427	// entries.write, you should try to include several log entries in this
2428	// list, rather than calling this method for each individual log entry.
2429	Entries []*LogEntry `json:"entries,omitempty"`
2430
2431	// Labels: Optional. Default labels that are added to the labels field
2432	// of all log entries in entries. If a log entry already has a label
2433	// with the same key as a label in this parameter, then the log entry's
2434	// label is not changed. See LogEntry.
2435	Labels map[string]string `json:"labels,omitempty"`
2436
2437	// LogName: Optional. A default log resource name that is assigned to
2438	// all log entries in entries that do not specify a value for
2439	// log_name:
2440	// "projects/[PROJECT_ID]/logs/[LOG_ID]"
2441	// "organizations/[ORGANI
2442	// ZATION_ID]/logs/[LOG_ID]"
2443	// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[
2444	// LOG_ID]"
2445	// "folders/[FOLDER_ID]/logs/[LOG_ID]"
2446	// [LOG_ID] must be URL-encoded. For
2447	// example:
2448	// "projects/my-project-id/logs/syslog"
2449	// "organizations/123456789
2450	// 0/logs/cloudresourcemanager.googleapis.com%2Factivity"
2451	// The permission <code>logging.logEntries.create</code> is needed on
2452	// each project, organization, billing account, or folder that is
2453	// receiving new log entries, whether the resource is specified in
2454	// <code>logName</code> or in an individual log entry.
2455	LogName string `json:"logName,omitempty"`
2456
2457	// PartialSuccess: Optional. Whether valid entries should be written
2458	// even if some other entries fail due to INVALID_ARGUMENT or
2459	// PERMISSION_DENIED errors. If any entry is not written, then the
2460	// response status is the error associated with one of the failed
2461	// entries and the response includes error details keyed by the entries'
2462	// zero-based index in the entries.write method.
2463	PartialSuccess bool `json:"partialSuccess,omitempty"`
2464
2465	// Resource: Optional. A default monitored resource object that is
2466	// assigned to all log entries in entries that do not specify a value
2467	// for resource. Example:
2468	// { "type": "gce_instance",
2469	//   "labels": {
2470	//     "zone": "us-central1-a", "instance_id": "00000000000000000000"
2471	// }}
2472	// See LogEntry.
2473	Resource *MonitoredResource `json:"resource,omitempty"`
2474
2475	// ForceSendFields is a list of field names (e.g. "DryRun") to
2476	// unconditionally include in API requests. By default, fields with
2477	// empty values are omitted from API requests. However, any non-pointer,
2478	// non-interface field appearing in ForceSendFields will be sent to the
2479	// server regardless of whether the field is empty or not. This may be
2480	// used to include empty fields in Patch requests.
2481	ForceSendFields []string `json:"-"`
2482
2483	// NullFields is a list of field names (e.g. "DryRun") to include in API
2484	// requests with the JSON null value. By default, fields with empty
2485	// values are omitted from API requests. However, any field with an
2486	// empty value appearing in NullFields will be sent to the server as
2487	// null. It is an error if a field in this list has a non-empty value.
2488	// This may be used to include null fields in Patch requests.
2489	NullFields []string `json:"-"`
2490}
2491
2492func (s *WriteLogEntriesRequest) MarshalJSON() ([]byte, error) {
2493	type NoMethod WriteLogEntriesRequest
2494	raw := NoMethod(*s)
2495	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2496}
2497
2498// WriteLogEntriesResponse: Result returned from WriteLogEntries. empty
2499type WriteLogEntriesResponse struct {
2500	// ServerResponse contains the HTTP response code and headers from the
2501	// server.
2502	googleapi.ServerResponse `json:"-"`
2503}
2504
2505// method id "logging.billingAccounts.exclusions.create":
2506
2507type BillingAccountsExclusionsCreateCall struct {
2508	s            *Service
2509	parent       string
2510	logexclusion *LogExclusion
2511	urlParams_   gensupport.URLParams
2512	ctx_         context.Context
2513	header_      http.Header
2514}
2515
2516// Create: Creates a new exclusion in a specified parent resource. Only
2517// log entries belonging to that resource can be excluded. You can have
2518// up to 10 exclusions in a resource.
2519func (r *BillingAccountsExclusionsService) Create(parent string, logexclusion *LogExclusion) *BillingAccountsExclusionsCreateCall {
2520	c := &BillingAccountsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2521	c.parent = parent
2522	c.logexclusion = logexclusion
2523	return c
2524}
2525
2526// Fields allows partial responses to be retrieved. See
2527// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2528// for more information.
2529func (c *BillingAccountsExclusionsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsCreateCall {
2530	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2531	return c
2532}
2533
2534// Context sets the context to be used in this call's Do method. Any
2535// pending HTTP request will be aborted if the provided context is
2536// canceled.
2537func (c *BillingAccountsExclusionsCreateCall) Context(ctx context.Context) *BillingAccountsExclusionsCreateCall {
2538	c.ctx_ = ctx
2539	return c
2540}
2541
2542// Header returns an http.Header that can be modified by the caller to
2543// add HTTP headers to the request.
2544func (c *BillingAccountsExclusionsCreateCall) Header() http.Header {
2545	if c.header_ == nil {
2546		c.header_ = make(http.Header)
2547	}
2548	return c.header_
2549}
2550
2551func (c *BillingAccountsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
2552	reqHeaders := make(http.Header)
2553	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
2554	for k, v := range c.header_ {
2555		reqHeaders[k] = v
2556	}
2557	reqHeaders.Set("User-Agent", c.s.userAgent())
2558	var body io.Reader = nil
2559	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
2560	if err != nil {
2561		return nil, err
2562	}
2563	reqHeaders.Set("Content-Type", "application/json")
2564	c.urlParams_.Set("alt", alt)
2565	c.urlParams_.Set("prettyPrint", "false")
2566	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
2567	urls += "?" + c.urlParams_.Encode()
2568	req, err := http.NewRequest("POST", urls, body)
2569	if err != nil {
2570		return nil, err
2571	}
2572	req.Header = reqHeaders
2573	googleapi.Expand(req.URL, map[string]string{
2574		"parent": c.parent,
2575	})
2576	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2577}
2578
2579// Do executes the "logging.billingAccounts.exclusions.create" call.
2580// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
2581// status code is an error. Response headers are in either
2582// *LogExclusion.ServerResponse.Header or (if a response was returned at
2583// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2584// to check whether the returned error was because
2585// http.StatusNotModified was returned.
2586func (c *BillingAccountsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
2587	gensupport.SetOptions(c.urlParams_, opts...)
2588	res, err := c.doRequest("json")
2589	if res != nil && res.StatusCode == http.StatusNotModified {
2590		if res.Body != nil {
2591			res.Body.Close()
2592		}
2593		return nil, &googleapi.Error{
2594			Code:   res.StatusCode,
2595			Header: res.Header,
2596		}
2597	}
2598	if err != nil {
2599		return nil, err
2600	}
2601	defer googleapi.CloseBody(res)
2602	if err := googleapi.CheckResponse(res); err != nil {
2603		return nil, err
2604	}
2605	ret := &LogExclusion{
2606		ServerResponse: googleapi.ServerResponse{
2607			Header:         res.Header,
2608			HTTPStatusCode: res.StatusCode,
2609		},
2610	}
2611	target := &ret
2612	if err := gensupport.DecodeResponse(target, res); err != nil {
2613		return nil, err
2614	}
2615	return ret, nil
2616	// {
2617	//   "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.",
2618	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions",
2619	//   "httpMethod": "POST",
2620	//   "id": "logging.billingAccounts.exclusions.create",
2621	//   "parameterOrder": [
2622	//     "parent"
2623	//   ],
2624	//   "parameters": {
2625	//     "parent": {
2626	//       "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
2627	//       "location": "path",
2628	//       "pattern": "^billingAccounts/[^/]+$",
2629	//       "required": true,
2630	//       "type": "string"
2631	//     }
2632	//   },
2633	//   "path": "v2/{+parent}/exclusions",
2634	//   "request": {
2635	//     "$ref": "LogExclusion"
2636	//   },
2637	//   "response": {
2638	//     "$ref": "LogExclusion"
2639	//   },
2640	//   "scopes": [
2641	//     "https://www.googleapis.com/auth/cloud-platform",
2642	//     "https://www.googleapis.com/auth/logging.admin"
2643	//   ]
2644	// }
2645
2646}
2647
2648// method id "logging.billingAccounts.exclusions.delete":
2649
2650type BillingAccountsExclusionsDeleteCall struct {
2651	s          *Service
2652	name       string
2653	urlParams_ gensupport.URLParams
2654	ctx_       context.Context
2655	header_    http.Header
2656}
2657
2658// Delete: Deletes an exclusion.
2659func (r *BillingAccountsExclusionsService) Delete(name string) *BillingAccountsExclusionsDeleteCall {
2660	c := &BillingAccountsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2661	c.name = name
2662	return c
2663}
2664
2665// Fields allows partial responses to be retrieved. See
2666// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2667// for more information.
2668func (c *BillingAccountsExclusionsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsDeleteCall {
2669	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2670	return c
2671}
2672
2673// Context sets the context to be used in this call's Do method. Any
2674// pending HTTP request will be aborted if the provided context is
2675// canceled.
2676func (c *BillingAccountsExclusionsDeleteCall) Context(ctx context.Context) *BillingAccountsExclusionsDeleteCall {
2677	c.ctx_ = ctx
2678	return c
2679}
2680
2681// Header returns an http.Header that can be modified by the caller to
2682// add HTTP headers to the request.
2683func (c *BillingAccountsExclusionsDeleteCall) Header() http.Header {
2684	if c.header_ == nil {
2685		c.header_ = make(http.Header)
2686	}
2687	return c.header_
2688}
2689
2690func (c *BillingAccountsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
2691	reqHeaders := make(http.Header)
2692	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
2693	for k, v := range c.header_ {
2694		reqHeaders[k] = v
2695	}
2696	reqHeaders.Set("User-Agent", c.s.userAgent())
2697	var body io.Reader = nil
2698	c.urlParams_.Set("alt", alt)
2699	c.urlParams_.Set("prettyPrint", "false")
2700	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
2701	urls += "?" + c.urlParams_.Encode()
2702	req, err := http.NewRequest("DELETE", urls, body)
2703	if err != nil {
2704		return nil, err
2705	}
2706	req.Header = reqHeaders
2707	googleapi.Expand(req.URL, map[string]string{
2708		"name": c.name,
2709	})
2710	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2711}
2712
2713// Do executes the "logging.billingAccounts.exclusions.delete" call.
2714// Exactly one of *Empty or error will be non-nil. Any non-2xx status
2715// code is an error. Response headers are in either
2716// *Empty.ServerResponse.Header or (if a response was returned at all)
2717// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2718// check whether the returned error was because http.StatusNotModified
2719// was returned.
2720func (c *BillingAccountsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2721	gensupport.SetOptions(c.urlParams_, opts...)
2722	res, err := c.doRequest("json")
2723	if res != nil && res.StatusCode == http.StatusNotModified {
2724		if res.Body != nil {
2725			res.Body.Close()
2726		}
2727		return nil, &googleapi.Error{
2728			Code:   res.StatusCode,
2729			Header: res.Header,
2730		}
2731	}
2732	if err != nil {
2733		return nil, err
2734	}
2735	defer googleapi.CloseBody(res)
2736	if err := googleapi.CheckResponse(res); err != nil {
2737		return nil, err
2738	}
2739	ret := &Empty{
2740		ServerResponse: googleapi.ServerResponse{
2741			Header:         res.Header,
2742			HTTPStatusCode: res.StatusCode,
2743		},
2744	}
2745	target := &ret
2746	if err := gensupport.DecodeResponse(target, res); err != nil {
2747		return nil, err
2748	}
2749	return ret, nil
2750	// {
2751	//   "description": "Deletes an exclusion.",
2752	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}",
2753	//   "httpMethod": "DELETE",
2754	//   "id": "logging.billingAccounts.exclusions.delete",
2755	//   "parameterOrder": [
2756	//     "name"
2757	//   ],
2758	//   "parameters": {
2759	//     "name": {
2760	//       "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
2761	//       "location": "path",
2762	//       "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$",
2763	//       "required": true,
2764	//       "type": "string"
2765	//     }
2766	//   },
2767	//   "path": "v2/{+name}",
2768	//   "response": {
2769	//     "$ref": "Empty"
2770	//   },
2771	//   "scopes": [
2772	//     "https://www.googleapis.com/auth/cloud-platform",
2773	//     "https://www.googleapis.com/auth/logging.admin"
2774	//   ]
2775	// }
2776
2777}
2778
2779// method id "logging.billingAccounts.exclusions.get":
2780
2781type BillingAccountsExclusionsGetCall struct {
2782	s            *Service
2783	name         string
2784	urlParams_   gensupport.URLParams
2785	ifNoneMatch_ string
2786	ctx_         context.Context
2787	header_      http.Header
2788}
2789
2790// Get: Gets the description of an exclusion.
2791func (r *BillingAccountsExclusionsService) Get(name string) *BillingAccountsExclusionsGetCall {
2792	c := &BillingAccountsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2793	c.name = name
2794	return c
2795}
2796
2797// Fields allows partial responses to be retrieved. See
2798// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2799// for more information.
2800func (c *BillingAccountsExclusionsGetCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsGetCall {
2801	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2802	return c
2803}
2804
2805// IfNoneMatch sets the optional parameter which makes the operation
2806// fail if the object's ETag matches the given value. This is useful for
2807// getting updates only after the object has changed since the last
2808// request. Use googleapi.IsNotModified to check whether the response
2809// error from Do is the result of In-None-Match.
2810func (c *BillingAccountsExclusionsGetCall) IfNoneMatch(entityTag string) *BillingAccountsExclusionsGetCall {
2811	c.ifNoneMatch_ = entityTag
2812	return c
2813}
2814
2815// Context sets the context to be used in this call's Do method. Any
2816// pending HTTP request will be aborted if the provided context is
2817// canceled.
2818func (c *BillingAccountsExclusionsGetCall) Context(ctx context.Context) *BillingAccountsExclusionsGetCall {
2819	c.ctx_ = ctx
2820	return c
2821}
2822
2823// Header returns an http.Header that can be modified by the caller to
2824// add HTTP headers to the request.
2825func (c *BillingAccountsExclusionsGetCall) Header() http.Header {
2826	if c.header_ == nil {
2827		c.header_ = make(http.Header)
2828	}
2829	return c.header_
2830}
2831
2832func (c *BillingAccountsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
2833	reqHeaders := make(http.Header)
2834	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
2835	for k, v := range c.header_ {
2836		reqHeaders[k] = v
2837	}
2838	reqHeaders.Set("User-Agent", c.s.userAgent())
2839	if c.ifNoneMatch_ != "" {
2840		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2841	}
2842	var body io.Reader = nil
2843	c.urlParams_.Set("alt", alt)
2844	c.urlParams_.Set("prettyPrint", "false")
2845	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
2846	urls += "?" + c.urlParams_.Encode()
2847	req, err := http.NewRequest("GET", urls, body)
2848	if err != nil {
2849		return nil, err
2850	}
2851	req.Header = reqHeaders
2852	googleapi.Expand(req.URL, map[string]string{
2853		"name": c.name,
2854	})
2855	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2856}
2857
2858// Do executes the "logging.billingAccounts.exclusions.get" call.
2859// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
2860// status code is an error. Response headers are in either
2861// *LogExclusion.ServerResponse.Header or (if a response was returned at
2862// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2863// to check whether the returned error was because
2864// http.StatusNotModified was returned.
2865func (c *BillingAccountsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
2866	gensupport.SetOptions(c.urlParams_, opts...)
2867	res, err := c.doRequest("json")
2868	if res != nil && res.StatusCode == http.StatusNotModified {
2869		if res.Body != nil {
2870			res.Body.Close()
2871		}
2872		return nil, &googleapi.Error{
2873			Code:   res.StatusCode,
2874			Header: res.Header,
2875		}
2876	}
2877	if err != nil {
2878		return nil, err
2879	}
2880	defer googleapi.CloseBody(res)
2881	if err := googleapi.CheckResponse(res); err != nil {
2882		return nil, err
2883	}
2884	ret := &LogExclusion{
2885		ServerResponse: googleapi.ServerResponse{
2886			Header:         res.Header,
2887			HTTPStatusCode: res.StatusCode,
2888		},
2889	}
2890	target := &ret
2891	if err := gensupport.DecodeResponse(target, res); err != nil {
2892		return nil, err
2893	}
2894	return ret, nil
2895	// {
2896	//   "description": "Gets the description of an exclusion.",
2897	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}",
2898	//   "httpMethod": "GET",
2899	//   "id": "logging.billingAccounts.exclusions.get",
2900	//   "parameterOrder": [
2901	//     "name"
2902	//   ],
2903	//   "parameters": {
2904	//     "name": {
2905	//       "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
2906	//       "location": "path",
2907	//       "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$",
2908	//       "required": true,
2909	//       "type": "string"
2910	//     }
2911	//   },
2912	//   "path": "v2/{+name}",
2913	//   "response": {
2914	//     "$ref": "LogExclusion"
2915	//   },
2916	//   "scopes": [
2917	//     "https://www.googleapis.com/auth/cloud-platform",
2918	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
2919	//     "https://www.googleapis.com/auth/logging.admin",
2920	//     "https://www.googleapis.com/auth/logging.read"
2921	//   ]
2922	// }
2923
2924}
2925
2926// method id "logging.billingAccounts.exclusions.list":
2927
2928type BillingAccountsExclusionsListCall struct {
2929	s            *Service
2930	parent       string
2931	urlParams_   gensupport.URLParams
2932	ifNoneMatch_ string
2933	ctx_         context.Context
2934	header_      http.Header
2935}
2936
2937// List: Lists all the exclusions in a parent resource.
2938func (r *BillingAccountsExclusionsService) List(parent string) *BillingAccountsExclusionsListCall {
2939	c := &BillingAccountsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2940	c.parent = parent
2941	return c
2942}
2943
2944// PageSize sets the optional parameter "pageSize": The maximum number
2945// of results to return from this request. Non-positive values are
2946// ignored. The presence of nextPageToken in the response indicates that
2947// more results might be available.
2948func (c *BillingAccountsExclusionsListCall) PageSize(pageSize int64) *BillingAccountsExclusionsListCall {
2949	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2950	return c
2951}
2952
2953// PageToken sets the optional parameter "pageToken": If present, then
2954// retrieve the next batch of results from the preceding call to this
2955// method. pageToken must be the value of nextPageToken from the
2956// previous response. The values of other method parameters should be
2957// identical to those in the previous call.
2958func (c *BillingAccountsExclusionsListCall) PageToken(pageToken string) *BillingAccountsExclusionsListCall {
2959	c.urlParams_.Set("pageToken", pageToken)
2960	return c
2961}
2962
2963// Fields allows partial responses to be retrieved. See
2964// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2965// for more information.
2966func (c *BillingAccountsExclusionsListCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsListCall {
2967	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2968	return c
2969}
2970
2971// IfNoneMatch sets the optional parameter which makes the operation
2972// fail if the object's ETag matches the given value. This is useful for
2973// getting updates only after the object has changed since the last
2974// request. Use googleapi.IsNotModified to check whether the response
2975// error from Do is the result of In-None-Match.
2976func (c *BillingAccountsExclusionsListCall) IfNoneMatch(entityTag string) *BillingAccountsExclusionsListCall {
2977	c.ifNoneMatch_ = entityTag
2978	return c
2979}
2980
2981// Context sets the context to be used in this call's Do method. Any
2982// pending HTTP request will be aborted if the provided context is
2983// canceled.
2984func (c *BillingAccountsExclusionsListCall) Context(ctx context.Context) *BillingAccountsExclusionsListCall {
2985	c.ctx_ = ctx
2986	return c
2987}
2988
2989// Header returns an http.Header that can be modified by the caller to
2990// add HTTP headers to the request.
2991func (c *BillingAccountsExclusionsListCall) Header() http.Header {
2992	if c.header_ == nil {
2993		c.header_ = make(http.Header)
2994	}
2995	return c.header_
2996}
2997
2998func (c *BillingAccountsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
2999	reqHeaders := make(http.Header)
3000	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
3001	for k, v := range c.header_ {
3002		reqHeaders[k] = v
3003	}
3004	reqHeaders.Set("User-Agent", c.s.userAgent())
3005	if c.ifNoneMatch_ != "" {
3006		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3007	}
3008	var body io.Reader = nil
3009	c.urlParams_.Set("alt", alt)
3010	c.urlParams_.Set("prettyPrint", "false")
3011	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
3012	urls += "?" + c.urlParams_.Encode()
3013	req, err := http.NewRequest("GET", urls, body)
3014	if err != nil {
3015		return nil, err
3016	}
3017	req.Header = reqHeaders
3018	googleapi.Expand(req.URL, map[string]string{
3019		"parent": c.parent,
3020	})
3021	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3022}
3023
3024// Do executes the "logging.billingAccounts.exclusions.list" call.
3025// Exactly one of *ListExclusionsResponse or error will be non-nil. Any
3026// non-2xx status code is an error. Response headers are in either
3027// *ListExclusionsResponse.ServerResponse.Header or (if a response was
3028// returned at all) in error.(*googleapi.Error).Header. Use
3029// googleapi.IsNotModified to check whether the returned error was
3030// because http.StatusNotModified was returned.
3031func (c *BillingAccountsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
3032	gensupport.SetOptions(c.urlParams_, opts...)
3033	res, err := c.doRequest("json")
3034	if res != nil && res.StatusCode == http.StatusNotModified {
3035		if res.Body != nil {
3036			res.Body.Close()
3037		}
3038		return nil, &googleapi.Error{
3039			Code:   res.StatusCode,
3040			Header: res.Header,
3041		}
3042	}
3043	if err != nil {
3044		return nil, err
3045	}
3046	defer googleapi.CloseBody(res)
3047	if err := googleapi.CheckResponse(res); err != nil {
3048		return nil, err
3049	}
3050	ret := &ListExclusionsResponse{
3051		ServerResponse: googleapi.ServerResponse{
3052			Header:         res.Header,
3053			HTTPStatusCode: res.StatusCode,
3054		},
3055	}
3056	target := &ret
3057	if err := gensupport.DecodeResponse(target, res); err != nil {
3058		return nil, err
3059	}
3060	return ret, nil
3061	// {
3062	//   "description": "Lists all the exclusions in a parent resource.",
3063	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions",
3064	//   "httpMethod": "GET",
3065	//   "id": "logging.billingAccounts.exclusions.list",
3066	//   "parameterOrder": [
3067	//     "parent"
3068	//   ],
3069	//   "parameters": {
3070	//     "pageSize": {
3071	//       "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.",
3072	//       "format": "int32",
3073	//       "location": "query",
3074	//       "type": "integer"
3075	//     },
3076	//     "pageToken": {
3077	//       "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.",
3078	//       "location": "query",
3079	//       "type": "string"
3080	//     },
3081	//     "parent": {
3082	//       "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
3083	//       "location": "path",
3084	//       "pattern": "^billingAccounts/[^/]+$",
3085	//       "required": true,
3086	//       "type": "string"
3087	//     }
3088	//   },
3089	//   "path": "v2/{+parent}/exclusions",
3090	//   "response": {
3091	//     "$ref": "ListExclusionsResponse"
3092	//   },
3093	//   "scopes": [
3094	//     "https://www.googleapis.com/auth/cloud-platform",
3095	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
3096	//     "https://www.googleapis.com/auth/logging.admin",
3097	//     "https://www.googleapis.com/auth/logging.read"
3098	//   ]
3099	// }
3100
3101}
3102
3103// Pages invokes f for each page of results.
3104// A non-nil error returned from f will halt the iteration.
3105// The provided context supersedes any context provided to the Context method.
3106func (c *BillingAccountsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
3107	c.ctx_ = ctx
3108	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3109	for {
3110		x, err := c.Do()
3111		if err != nil {
3112			return err
3113		}
3114		if err := f(x); err != nil {
3115			return err
3116		}
3117		if x.NextPageToken == "" {
3118			return nil
3119		}
3120		c.PageToken(x.NextPageToken)
3121	}
3122}
3123
3124// method id "logging.billingAccounts.exclusions.patch":
3125
3126type BillingAccountsExclusionsPatchCall struct {
3127	s            *Service
3128	name         string
3129	logexclusion *LogExclusion
3130	urlParams_   gensupport.URLParams
3131	ctx_         context.Context
3132	header_      http.Header
3133}
3134
3135// Patch: Changes one or more properties of an existing exclusion.
3136func (r *BillingAccountsExclusionsService) Patch(name string, logexclusion *LogExclusion) *BillingAccountsExclusionsPatchCall {
3137	c := &BillingAccountsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3138	c.name = name
3139	c.logexclusion = logexclusion
3140	return c
3141}
3142
3143// UpdateMask sets the optional parameter "updateMask": Required. A
3144// non-empty list of fields to change in the existing exclusion. New
3145// values for the fields are taken from the corresponding fields in the
3146// LogExclusion included in this request. Fields not mentioned in
3147// update_mask are not changed and are ignored in the request.For
3148// example, to change the filter and description of an exclusion,
3149// specify an update_mask of "filter,description".
3150func (c *BillingAccountsExclusionsPatchCall) UpdateMask(updateMask string) *BillingAccountsExclusionsPatchCall {
3151	c.urlParams_.Set("updateMask", updateMask)
3152	return c
3153}
3154
3155// Fields allows partial responses to be retrieved. See
3156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3157// for more information.
3158func (c *BillingAccountsExclusionsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsPatchCall {
3159	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3160	return c
3161}
3162
3163// Context sets the context to be used in this call's Do method. Any
3164// pending HTTP request will be aborted if the provided context is
3165// canceled.
3166func (c *BillingAccountsExclusionsPatchCall) Context(ctx context.Context) *BillingAccountsExclusionsPatchCall {
3167	c.ctx_ = ctx
3168	return c
3169}
3170
3171// Header returns an http.Header that can be modified by the caller to
3172// add HTTP headers to the request.
3173func (c *BillingAccountsExclusionsPatchCall) Header() http.Header {
3174	if c.header_ == nil {
3175		c.header_ = make(http.Header)
3176	}
3177	return c.header_
3178}
3179
3180func (c *BillingAccountsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
3181	reqHeaders := make(http.Header)
3182	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
3183	for k, v := range c.header_ {
3184		reqHeaders[k] = v
3185	}
3186	reqHeaders.Set("User-Agent", c.s.userAgent())
3187	var body io.Reader = nil
3188	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
3189	if err != nil {
3190		return nil, err
3191	}
3192	reqHeaders.Set("Content-Type", "application/json")
3193	c.urlParams_.Set("alt", alt)
3194	c.urlParams_.Set("prettyPrint", "false")
3195	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
3196	urls += "?" + c.urlParams_.Encode()
3197	req, err := http.NewRequest("PATCH", urls, body)
3198	if err != nil {
3199		return nil, err
3200	}
3201	req.Header = reqHeaders
3202	googleapi.Expand(req.URL, map[string]string{
3203		"name": c.name,
3204	})
3205	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3206}
3207
3208// Do executes the "logging.billingAccounts.exclusions.patch" call.
3209// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
3210// status code is an error. Response headers are in either
3211// *LogExclusion.ServerResponse.Header or (if a response was returned at
3212// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3213// to check whether the returned error was because
3214// http.StatusNotModified was returned.
3215func (c *BillingAccountsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
3216	gensupport.SetOptions(c.urlParams_, opts...)
3217	res, err := c.doRequest("json")
3218	if res != nil && res.StatusCode == http.StatusNotModified {
3219		if res.Body != nil {
3220			res.Body.Close()
3221		}
3222		return nil, &googleapi.Error{
3223			Code:   res.StatusCode,
3224			Header: res.Header,
3225		}
3226	}
3227	if err != nil {
3228		return nil, err
3229	}
3230	defer googleapi.CloseBody(res)
3231	if err := googleapi.CheckResponse(res); err != nil {
3232		return nil, err
3233	}
3234	ret := &LogExclusion{
3235		ServerResponse: googleapi.ServerResponse{
3236			Header:         res.Header,
3237			HTTPStatusCode: res.StatusCode,
3238		},
3239	}
3240	target := &ret
3241	if err := gensupport.DecodeResponse(target, res); err != nil {
3242		return nil, err
3243	}
3244	return ret, nil
3245	// {
3246	//   "description": "Changes one or more properties of an existing exclusion.",
3247	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}",
3248	//   "httpMethod": "PATCH",
3249	//   "id": "logging.billingAccounts.exclusions.patch",
3250	//   "parameterOrder": [
3251	//     "name"
3252	//   ],
3253	//   "parameters": {
3254	//     "name": {
3255	//       "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
3256	//       "location": "path",
3257	//       "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$",
3258	//       "required": true,
3259	//       "type": "string"
3260	//     },
3261	//     "updateMask": {
3262	//       "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\".",
3263	//       "format": "google-fieldmask",
3264	//       "location": "query",
3265	//       "type": "string"
3266	//     }
3267	//   },
3268	//   "path": "v2/{+name}",
3269	//   "request": {
3270	//     "$ref": "LogExclusion"
3271	//   },
3272	//   "response": {
3273	//     "$ref": "LogExclusion"
3274	//   },
3275	//   "scopes": [
3276	//     "https://www.googleapis.com/auth/cloud-platform",
3277	//     "https://www.googleapis.com/auth/logging.admin"
3278	//   ]
3279	// }
3280
3281}
3282
3283// method id "logging.billingAccounts.logs.delete":
3284
3285type BillingAccountsLogsDeleteCall struct {
3286	s          *Service
3287	logName    string
3288	urlParams_ gensupport.URLParams
3289	ctx_       context.Context
3290	header_    http.Header
3291}
3292
3293// Delete: Deletes all the log entries in a log. The log reappears if it
3294// receives new entries. Log entries written shortly before the delete
3295// operation might not be deleted. Entries received after the delete
3296// operation with a timestamp before the operation will be deleted.
3297func (r *BillingAccountsLogsService) Delete(logName string) *BillingAccountsLogsDeleteCall {
3298	c := &BillingAccountsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3299	c.logName = logName
3300	return c
3301}
3302
3303// Fields allows partial responses to be retrieved. See
3304// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3305// for more information.
3306func (c *BillingAccountsLogsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLogsDeleteCall {
3307	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3308	return c
3309}
3310
3311// Context sets the context to be used in this call's Do method. Any
3312// pending HTTP request will be aborted if the provided context is
3313// canceled.
3314func (c *BillingAccountsLogsDeleteCall) Context(ctx context.Context) *BillingAccountsLogsDeleteCall {
3315	c.ctx_ = ctx
3316	return c
3317}
3318
3319// Header returns an http.Header that can be modified by the caller to
3320// add HTTP headers to the request.
3321func (c *BillingAccountsLogsDeleteCall) Header() http.Header {
3322	if c.header_ == nil {
3323		c.header_ = make(http.Header)
3324	}
3325	return c.header_
3326}
3327
3328func (c *BillingAccountsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
3329	reqHeaders := make(http.Header)
3330	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
3331	for k, v := range c.header_ {
3332		reqHeaders[k] = v
3333	}
3334	reqHeaders.Set("User-Agent", c.s.userAgent())
3335	var body io.Reader = nil
3336	c.urlParams_.Set("alt", alt)
3337	c.urlParams_.Set("prettyPrint", "false")
3338	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
3339	urls += "?" + c.urlParams_.Encode()
3340	req, err := http.NewRequest("DELETE", urls, body)
3341	if err != nil {
3342		return nil, err
3343	}
3344	req.Header = reqHeaders
3345	googleapi.Expand(req.URL, map[string]string{
3346		"logName": c.logName,
3347	})
3348	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3349}
3350
3351// Do executes the "logging.billingAccounts.logs.delete" call.
3352// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3353// code is an error. Response headers are in either
3354// *Empty.ServerResponse.Header or (if a response was returned at all)
3355// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3356// check whether the returned error was because http.StatusNotModified
3357// was returned.
3358func (c *BillingAccountsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3359	gensupport.SetOptions(c.urlParams_, opts...)
3360	res, err := c.doRequest("json")
3361	if res != nil && res.StatusCode == http.StatusNotModified {
3362		if res.Body != nil {
3363			res.Body.Close()
3364		}
3365		return nil, &googleapi.Error{
3366			Code:   res.StatusCode,
3367			Header: res.Header,
3368		}
3369	}
3370	if err != nil {
3371		return nil, err
3372	}
3373	defer googleapi.CloseBody(res)
3374	if err := googleapi.CheckResponse(res); err != nil {
3375		return nil, err
3376	}
3377	ret := &Empty{
3378		ServerResponse: googleapi.ServerResponse{
3379			Header:         res.Header,
3380			HTTPStatusCode: res.StatusCode,
3381		},
3382	}
3383	target := &ret
3384	if err := gensupport.DecodeResponse(target, res); err != nil {
3385		return nil, err
3386	}
3387	return ret, nil
3388	// {
3389	//   "description": "Deletes all the log entries in a log. 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.",
3390	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/logs/{logsId}",
3391	//   "httpMethod": "DELETE",
3392	//   "id": "logging.billingAccounts.logs.delete",
3393	//   "parameterOrder": [
3394	//     "logName"
3395	//   ],
3396	//   "parameters": {
3397	//     "logName": {
3398	//       "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.",
3399	//       "location": "path",
3400	//       "pattern": "^billingAccounts/[^/]+/logs/[^/]+$",
3401	//       "required": true,
3402	//       "type": "string"
3403	//     }
3404	//   },
3405	//   "path": "v2/{+logName}",
3406	//   "response": {
3407	//     "$ref": "Empty"
3408	//   },
3409	//   "scopes": [
3410	//     "https://www.googleapis.com/auth/cloud-platform",
3411	//     "https://www.googleapis.com/auth/logging.admin"
3412	//   ]
3413	// }
3414
3415}
3416
3417// method id "logging.billingAccounts.logs.list":
3418
3419type BillingAccountsLogsListCall struct {
3420	s            *Service
3421	parent       string
3422	urlParams_   gensupport.URLParams
3423	ifNoneMatch_ string
3424	ctx_         context.Context
3425	header_      http.Header
3426}
3427
3428// List: Lists the logs in projects, organizations, folders, or billing
3429// accounts. Only logs that have entries are listed.
3430func (r *BillingAccountsLogsService) List(parent string) *BillingAccountsLogsListCall {
3431	c := &BillingAccountsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3432	c.parent = parent
3433	return c
3434}
3435
3436// PageSize sets the optional parameter "pageSize": The maximum number
3437// of results to return from this request. Non-positive values are
3438// ignored. The presence of nextPageToken in the response indicates that
3439// more results might be available.
3440func (c *BillingAccountsLogsListCall) PageSize(pageSize int64) *BillingAccountsLogsListCall {
3441	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3442	return c
3443}
3444
3445// PageToken sets the optional parameter "pageToken": If present, then
3446// retrieve the next batch of results from the preceding call to this
3447// method. pageToken must be the value of nextPageToken from the
3448// previous response. The values of other method parameters should be
3449// identical to those in the previous call.
3450func (c *BillingAccountsLogsListCall) PageToken(pageToken string) *BillingAccountsLogsListCall {
3451	c.urlParams_.Set("pageToken", pageToken)
3452	return c
3453}
3454
3455// Fields allows partial responses to be retrieved. See
3456// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3457// for more information.
3458func (c *BillingAccountsLogsListCall) Fields(s ...googleapi.Field) *BillingAccountsLogsListCall {
3459	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3460	return c
3461}
3462
3463// IfNoneMatch sets the optional parameter which makes the operation
3464// fail if the object's ETag matches the given value. This is useful for
3465// getting updates only after the object has changed since the last
3466// request. Use googleapi.IsNotModified to check whether the response
3467// error from Do is the result of In-None-Match.
3468func (c *BillingAccountsLogsListCall) IfNoneMatch(entityTag string) *BillingAccountsLogsListCall {
3469	c.ifNoneMatch_ = entityTag
3470	return c
3471}
3472
3473// Context sets the context to be used in this call's Do method. Any
3474// pending HTTP request will be aborted if the provided context is
3475// canceled.
3476func (c *BillingAccountsLogsListCall) Context(ctx context.Context) *BillingAccountsLogsListCall {
3477	c.ctx_ = ctx
3478	return c
3479}
3480
3481// Header returns an http.Header that can be modified by the caller to
3482// add HTTP headers to the request.
3483func (c *BillingAccountsLogsListCall) Header() http.Header {
3484	if c.header_ == nil {
3485		c.header_ = make(http.Header)
3486	}
3487	return c.header_
3488}
3489
3490func (c *BillingAccountsLogsListCall) doRequest(alt string) (*http.Response, error) {
3491	reqHeaders := make(http.Header)
3492	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
3493	for k, v := range c.header_ {
3494		reqHeaders[k] = v
3495	}
3496	reqHeaders.Set("User-Agent", c.s.userAgent())
3497	if c.ifNoneMatch_ != "" {
3498		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3499	}
3500	var body io.Reader = nil
3501	c.urlParams_.Set("alt", alt)
3502	c.urlParams_.Set("prettyPrint", "false")
3503	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
3504	urls += "?" + c.urlParams_.Encode()
3505	req, err := http.NewRequest("GET", urls, body)
3506	if err != nil {
3507		return nil, err
3508	}
3509	req.Header = reqHeaders
3510	googleapi.Expand(req.URL, map[string]string{
3511		"parent": c.parent,
3512	})
3513	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3514}
3515
3516// Do executes the "logging.billingAccounts.logs.list" call.
3517// Exactly one of *ListLogsResponse or error will be non-nil. Any
3518// non-2xx status code is an error. Response headers are in either
3519// *ListLogsResponse.ServerResponse.Header or (if a response was
3520// returned at all) in error.(*googleapi.Error).Header. Use
3521// googleapi.IsNotModified to check whether the returned error was
3522// because http.StatusNotModified was returned.
3523func (c *BillingAccountsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
3524	gensupport.SetOptions(c.urlParams_, opts...)
3525	res, err := c.doRequest("json")
3526	if res != nil && res.StatusCode == http.StatusNotModified {
3527		if res.Body != nil {
3528			res.Body.Close()
3529		}
3530		return nil, &googleapi.Error{
3531			Code:   res.StatusCode,
3532			Header: res.Header,
3533		}
3534	}
3535	if err != nil {
3536		return nil, err
3537	}
3538	defer googleapi.CloseBody(res)
3539	if err := googleapi.CheckResponse(res); err != nil {
3540		return nil, err
3541	}
3542	ret := &ListLogsResponse{
3543		ServerResponse: googleapi.ServerResponse{
3544			Header:         res.Header,
3545			HTTPStatusCode: res.StatusCode,
3546		},
3547	}
3548	target := &ret
3549	if err := gensupport.DecodeResponse(target, res); err != nil {
3550		return nil, err
3551	}
3552	return ret, nil
3553	// {
3554	//   "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.",
3555	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/logs",
3556	//   "httpMethod": "GET",
3557	//   "id": "logging.billingAccounts.logs.list",
3558	//   "parameterOrder": [
3559	//     "parent"
3560	//   ],
3561	//   "parameters": {
3562	//     "pageSize": {
3563	//       "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.",
3564	//       "format": "int32",
3565	//       "location": "query",
3566	//       "type": "integer"
3567	//     },
3568	//     "pageToken": {
3569	//       "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.",
3570	//       "location": "query",
3571	//       "type": "string"
3572	//     },
3573	//     "parent": {
3574	//       "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
3575	//       "location": "path",
3576	//       "pattern": "^billingAccounts/[^/]+$",
3577	//       "required": true,
3578	//       "type": "string"
3579	//     }
3580	//   },
3581	//   "path": "v2/{+parent}/logs",
3582	//   "response": {
3583	//     "$ref": "ListLogsResponse"
3584	//   },
3585	//   "scopes": [
3586	//     "https://www.googleapis.com/auth/cloud-platform",
3587	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
3588	//     "https://www.googleapis.com/auth/logging.admin",
3589	//     "https://www.googleapis.com/auth/logging.read"
3590	//   ]
3591	// }
3592
3593}
3594
3595// Pages invokes f for each page of results.
3596// A non-nil error returned from f will halt the iteration.
3597// The provided context supersedes any context provided to the Context method.
3598func (c *BillingAccountsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
3599	c.ctx_ = ctx
3600	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3601	for {
3602		x, err := c.Do()
3603		if err != nil {
3604			return err
3605		}
3606		if err := f(x); err != nil {
3607			return err
3608		}
3609		if x.NextPageToken == "" {
3610			return nil
3611		}
3612		c.PageToken(x.NextPageToken)
3613	}
3614}
3615
3616// method id "logging.billingAccounts.sinks.create":
3617
3618type BillingAccountsSinksCreateCall struct {
3619	s          *Service
3620	parent     string
3621	logsink    *LogSink
3622	urlParams_ gensupport.URLParams
3623	ctx_       context.Context
3624	header_    http.Header
3625}
3626
3627// Create: Creates a sink that exports specified log entries to a
3628// destination. The export of newly-ingested log entries begins
3629// immediately, unless the sink's writer_identity is not permitted to
3630// write to the destination. A sink can export log entries only from the
3631// resource owning the sink.
3632func (r *BillingAccountsSinksService) Create(parent string, logsink *LogSink) *BillingAccountsSinksCreateCall {
3633	c := &BillingAccountsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3634	c.parent = parent
3635	c.logsink = logsink
3636	return c
3637}
3638
3639// UniqueWriterIdentity sets the optional parameter
3640// "uniqueWriterIdentity": Determines the kind of IAM identity returned
3641// as writer_identity in the new sink. If this value is omitted or set
3642// to false, and if the sink's parent is a project, then the value
3643// returned as writer_identity is the same group or service account used
3644// by Logging before the addition of writer identities to this API. The
3645// sink's destination must be in the same project as the sink itself.If
3646// this field is set to true, or if the sink is owned by a non-project
3647// resource such as an organization, then the value of writer_identity
3648// will be a unique service account used only for exports from the new
3649// sink. For more information, see writer_identity in LogSink.
3650func (c *BillingAccountsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksCreateCall {
3651	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
3652	return c
3653}
3654
3655// Fields allows partial responses to be retrieved. See
3656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3657// for more information.
3658func (c *BillingAccountsSinksCreateCall) Fields(s ...googleapi.Field) *BillingAccountsSinksCreateCall {
3659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3660	return c
3661}
3662
3663// Context sets the context to be used in this call's Do method. Any
3664// pending HTTP request will be aborted if the provided context is
3665// canceled.
3666func (c *BillingAccountsSinksCreateCall) Context(ctx context.Context) *BillingAccountsSinksCreateCall {
3667	c.ctx_ = ctx
3668	return c
3669}
3670
3671// Header returns an http.Header that can be modified by the caller to
3672// add HTTP headers to the request.
3673func (c *BillingAccountsSinksCreateCall) Header() http.Header {
3674	if c.header_ == nil {
3675		c.header_ = make(http.Header)
3676	}
3677	return c.header_
3678}
3679
3680func (c *BillingAccountsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
3681	reqHeaders := make(http.Header)
3682	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
3683	for k, v := range c.header_ {
3684		reqHeaders[k] = v
3685	}
3686	reqHeaders.Set("User-Agent", c.s.userAgent())
3687	var body io.Reader = nil
3688	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
3689	if err != nil {
3690		return nil, err
3691	}
3692	reqHeaders.Set("Content-Type", "application/json")
3693	c.urlParams_.Set("alt", alt)
3694	c.urlParams_.Set("prettyPrint", "false")
3695	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
3696	urls += "?" + c.urlParams_.Encode()
3697	req, err := http.NewRequest("POST", urls, body)
3698	if err != nil {
3699		return nil, err
3700	}
3701	req.Header = reqHeaders
3702	googleapi.Expand(req.URL, map[string]string{
3703		"parent": c.parent,
3704	})
3705	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3706}
3707
3708// Do executes the "logging.billingAccounts.sinks.create" call.
3709// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
3710// code is an error. Response headers are in either
3711// *LogSink.ServerResponse.Header or (if a response was returned at all)
3712// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3713// check whether the returned error was because http.StatusNotModified
3714// was returned.
3715func (c *BillingAccountsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
3716	gensupport.SetOptions(c.urlParams_, opts...)
3717	res, err := c.doRequest("json")
3718	if res != nil && res.StatusCode == http.StatusNotModified {
3719		if res.Body != nil {
3720			res.Body.Close()
3721		}
3722		return nil, &googleapi.Error{
3723			Code:   res.StatusCode,
3724			Header: res.Header,
3725		}
3726	}
3727	if err != nil {
3728		return nil, err
3729	}
3730	defer googleapi.CloseBody(res)
3731	if err := googleapi.CheckResponse(res); err != nil {
3732		return nil, err
3733	}
3734	ret := &LogSink{
3735		ServerResponse: googleapi.ServerResponse{
3736			Header:         res.Header,
3737			HTTPStatusCode: res.StatusCode,
3738		},
3739	}
3740	target := &ret
3741	if err := gensupport.DecodeResponse(target, res); err != nil {
3742		return nil, err
3743	}
3744	return ret, nil
3745	// {
3746	//   "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.",
3747	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks",
3748	//   "httpMethod": "POST",
3749	//   "id": "logging.billingAccounts.sinks.create",
3750	//   "parameterOrder": [
3751	//     "parent"
3752	//   ],
3753	//   "parameters": {
3754	//     "parent": {
3755	//       "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
3756	//       "location": "path",
3757	//       "pattern": "^billingAccounts/[^/]+$",
3758	//       "required": true,
3759	//       "type": "string"
3760	//     },
3761	//     "uniqueWriterIdentity": {
3762	//       "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 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.",
3763	//       "location": "query",
3764	//       "type": "boolean"
3765	//     }
3766	//   },
3767	//   "path": "v2/{+parent}/sinks",
3768	//   "request": {
3769	//     "$ref": "LogSink"
3770	//   },
3771	//   "response": {
3772	//     "$ref": "LogSink"
3773	//   },
3774	//   "scopes": [
3775	//     "https://www.googleapis.com/auth/cloud-platform",
3776	//     "https://www.googleapis.com/auth/logging.admin"
3777	//   ]
3778	// }
3779
3780}
3781
3782// method id "logging.billingAccounts.sinks.delete":
3783
3784type BillingAccountsSinksDeleteCall struct {
3785	s          *Service
3786	sinkNameid string
3787	urlParams_ gensupport.URLParams
3788	ctx_       context.Context
3789	header_    http.Header
3790}
3791
3792// Delete: Deletes a sink. If the sink has a unique writer_identity,
3793// then that service account is also deleted.
3794func (r *BillingAccountsSinksService) Delete(sinkNameid string) *BillingAccountsSinksDeleteCall {
3795	c := &BillingAccountsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3796	c.sinkNameid = sinkNameid
3797	return c
3798}
3799
3800// Fields allows partial responses to be retrieved. See
3801// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3802// for more information.
3803func (c *BillingAccountsSinksDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsSinksDeleteCall {
3804	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3805	return c
3806}
3807
3808// Context sets the context to be used in this call's Do method. Any
3809// pending HTTP request will be aborted if the provided context is
3810// canceled.
3811func (c *BillingAccountsSinksDeleteCall) Context(ctx context.Context) *BillingAccountsSinksDeleteCall {
3812	c.ctx_ = ctx
3813	return c
3814}
3815
3816// Header returns an http.Header that can be modified by the caller to
3817// add HTTP headers to the request.
3818func (c *BillingAccountsSinksDeleteCall) Header() http.Header {
3819	if c.header_ == nil {
3820		c.header_ = make(http.Header)
3821	}
3822	return c.header_
3823}
3824
3825func (c *BillingAccountsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
3826	reqHeaders := make(http.Header)
3827	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
3828	for k, v := range c.header_ {
3829		reqHeaders[k] = v
3830	}
3831	reqHeaders.Set("User-Agent", c.s.userAgent())
3832	var body io.Reader = nil
3833	c.urlParams_.Set("alt", alt)
3834	c.urlParams_.Set("prettyPrint", "false")
3835	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
3836	urls += "?" + c.urlParams_.Encode()
3837	req, err := http.NewRequest("DELETE", urls, body)
3838	if err != nil {
3839		return nil, err
3840	}
3841	req.Header = reqHeaders
3842	googleapi.Expand(req.URL, map[string]string{
3843		"sinkName": c.sinkNameid,
3844	})
3845	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3846}
3847
3848// Do executes the "logging.billingAccounts.sinks.delete" call.
3849// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3850// code is an error. Response headers are in either
3851// *Empty.ServerResponse.Header or (if a response was returned at all)
3852// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3853// check whether the returned error was because http.StatusNotModified
3854// was returned.
3855func (c *BillingAccountsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3856	gensupport.SetOptions(c.urlParams_, opts...)
3857	res, err := c.doRequest("json")
3858	if res != nil && res.StatusCode == http.StatusNotModified {
3859		if res.Body != nil {
3860			res.Body.Close()
3861		}
3862		return nil, &googleapi.Error{
3863			Code:   res.StatusCode,
3864			Header: res.Header,
3865		}
3866	}
3867	if err != nil {
3868		return nil, err
3869	}
3870	defer googleapi.CloseBody(res)
3871	if err := googleapi.CheckResponse(res); err != nil {
3872		return nil, err
3873	}
3874	ret := &Empty{
3875		ServerResponse: googleapi.ServerResponse{
3876			Header:         res.Header,
3877			HTTPStatusCode: res.StatusCode,
3878		},
3879	}
3880	target := &ret
3881	if err := gensupport.DecodeResponse(target, res); err != nil {
3882		return nil, err
3883	}
3884	return ret, nil
3885	// {
3886	//   "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.",
3887	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}",
3888	//   "httpMethod": "DELETE",
3889	//   "id": "logging.billingAccounts.sinks.delete",
3890	//   "parameterOrder": [
3891	//     "sinkName"
3892	//   ],
3893	//   "parameters": {
3894	//     "sinkName": {
3895	//       "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
3896	//       "location": "path",
3897	//       "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$",
3898	//       "required": true,
3899	//       "type": "string"
3900	//     }
3901	//   },
3902	//   "path": "v2/{+sinkName}",
3903	//   "response": {
3904	//     "$ref": "Empty"
3905	//   },
3906	//   "scopes": [
3907	//     "https://www.googleapis.com/auth/cloud-platform",
3908	//     "https://www.googleapis.com/auth/logging.admin"
3909	//   ]
3910	// }
3911
3912}
3913
3914// method id "logging.billingAccounts.sinks.get":
3915
3916type BillingAccountsSinksGetCall struct {
3917	s            *Service
3918	sinkName     string
3919	urlParams_   gensupport.URLParams
3920	ifNoneMatch_ string
3921	ctx_         context.Context
3922	header_      http.Header
3923}
3924
3925// Get: Gets a sink.
3926func (r *BillingAccountsSinksService) Get(sinkName string) *BillingAccountsSinksGetCall {
3927	c := &BillingAccountsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3928	c.sinkName = sinkName
3929	return c
3930}
3931
3932// Fields allows partial responses to be retrieved. See
3933// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3934// for more information.
3935func (c *BillingAccountsSinksGetCall) Fields(s ...googleapi.Field) *BillingAccountsSinksGetCall {
3936	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3937	return c
3938}
3939
3940// IfNoneMatch sets the optional parameter which makes the operation
3941// fail if the object's ETag matches the given value. This is useful for
3942// getting updates only after the object has changed since the last
3943// request. Use googleapi.IsNotModified to check whether the response
3944// error from Do is the result of In-None-Match.
3945func (c *BillingAccountsSinksGetCall) IfNoneMatch(entityTag string) *BillingAccountsSinksGetCall {
3946	c.ifNoneMatch_ = entityTag
3947	return c
3948}
3949
3950// Context sets the context to be used in this call's Do method. Any
3951// pending HTTP request will be aborted if the provided context is
3952// canceled.
3953func (c *BillingAccountsSinksGetCall) Context(ctx context.Context) *BillingAccountsSinksGetCall {
3954	c.ctx_ = ctx
3955	return c
3956}
3957
3958// Header returns an http.Header that can be modified by the caller to
3959// add HTTP headers to the request.
3960func (c *BillingAccountsSinksGetCall) Header() http.Header {
3961	if c.header_ == nil {
3962		c.header_ = make(http.Header)
3963	}
3964	return c.header_
3965}
3966
3967func (c *BillingAccountsSinksGetCall) doRequest(alt string) (*http.Response, error) {
3968	reqHeaders := make(http.Header)
3969	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
3970	for k, v := range c.header_ {
3971		reqHeaders[k] = v
3972	}
3973	reqHeaders.Set("User-Agent", c.s.userAgent())
3974	if c.ifNoneMatch_ != "" {
3975		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3976	}
3977	var body io.Reader = nil
3978	c.urlParams_.Set("alt", alt)
3979	c.urlParams_.Set("prettyPrint", "false")
3980	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
3981	urls += "?" + c.urlParams_.Encode()
3982	req, err := http.NewRequest("GET", urls, body)
3983	if err != nil {
3984		return nil, err
3985	}
3986	req.Header = reqHeaders
3987	googleapi.Expand(req.URL, map[string]string{
3988		"sinkName": c.sinkName,
3989	})
3990	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3991}
3992
3993// Do executes the "logging.billingAccounts.sinks.get" call.
3994// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
3995// code is an error. Response headers are in either
3996// *LogSink.ServerResponse.Header or (if a response was returned at all)
3997// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3998// check whether the returned error was because http.StatusNotModified
3999// was returned.
4000func (c *BillingAccountsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
4001	gensupport.SetOptions(c.urlParams_, opts...)
4002	res, err := c.doRequest("json")
4003	if res != nil && res.StatusCode == http.StatusNotModified {
4004		if res.Body != nil {
4005			res.Body.Close()
4006		}
4007		return nil, &googleapi.Error{
4008			Code:   res.StatusCode,
4009			Header: res.Header,
4010		}
4011	}
4012	if err != nil {
4013		return nil, err
4014	}
4015	defer googleapi.CloseBody(res)
4016	if err := googleapi.CheckResponse(res); err != nil {
4017		return nil, err
4018	}
4019	ret := &LogSink{
4020		ServerResponse: googleapi.ServerResponse{
4021			Header:         res.Header,
4022			HTTPStatusCode: res.StatusCode,
4023		},
4024	}
4025	target := &ret
4026	if err := gensupport.DecodeResponse(target, res); err != nil {
4027		return nil, err
4028	}
4029	return ret, nil
4030	// {
4031	//   "description": "Gets a sink.",
4032	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}",
4033	//   "httpMethod": "GET",
4034	//   "id": "logging.billingAccounts.sinks.get",
4035	//   "parameterOrder": [
4036	//     "sinkName"
4037	//   ],
4038	//   "parameters": {
4039	//     "sinkName": {
4040	//       "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
4041	//       "location": "path",
4042	//       "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$",
4043	//       "required": true,
4044	//       "type": "string"
4045	//     }
4046	//   },
4047	//   "path": "v2/{+sinkName}",
4048	//   "response": {
4049	//     "$ref": "LogSink"
4050	//   },
4051	//   "scopes": [
4052	//     "https://www.googleapis.com/auth/cloud-platform",
4053	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
4054	//     "https://www.googleapis.com/auth/logging.admin",
4055	//     "https://www.googleapis.com/auth/logging.read"
4056	//   ]
4057	// }
4058
4059}
4060
4061// method id "logging.billingAccounts.sinks.list":
4062
4063type BillingAccountsSinksListCall struct {
4064	s            *Service
4065	parent       string
4066	urlParams_   gensupport.URLParams
4067	ifNoneMatch_ string
4068	ctx_         context.Context
4069	header_      http.Header
4070}
4071
4072// List: Lists sinks.
4073func (r *BillingAccountsSinksService) List(parent string) *BillingAccountsSinksListCall {
4074	c := &BillingAccountsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4075	c.parent = parent
4076	return c
4077}
4078
4079// PageSize sets the optional parameter "pageSize": The maximum number
4080// of results to return from this request. Non-positive values are
4081// ignored. The presence of nextPageToken in the response indicates that
4082// more results might be available.
4083func (c *BillingAccountsSinksListCall) PageSize(pageSize int64) *BillingAccountsSinksListCall {
4084	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4085	return c
4086}
4087
4088// PageToken sets the optional parameter "pageToken": If present, then
4089// retrieve the next batch of results from the preceding call to this
4090// method. pageToken must be the value of nextPageToken from the
4091// previous response. The values of other method parameters should be
4092// identical to those in the previous call.
4093func (c *BillingAccountsSinksListCall) PageToken(pageToken string) *BillingAccountsSinksListCall {
4094	c.urlParams_.Set("pageToken", pageToken)
4095	return c
4096}
4097
4098// Fields allows partial responses to be retrieved. See
4099// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4100// for more information.
4101func (c *BillingAccountsSinksListCall) Fields(s ...googleapi.Field) *BillingAccountsSinksListCall {
4102	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4103	return c
4104}
4105
4106// IfNoneMatch sets the optional parameter which makes the operation
4107// fail if the object's ETag matches the given value. This is useful for
4108// getting updates only after the object has changed since the last
4109// request. Use googleapi.IsNotModified to check whether the response
4110// error from Do is the result of In-None-Match.
4111func (c *BillingAccountsSinksListCall) IfNoneMatch(entityTag string) *BillingAccountsSinksListCall {
4112	c.ifNoneMatch_ = entityTag
4113	return c
4114}
4115
4116// Context sets the context to be used in this call's Do method. Any
4117// pending HTTP request will be aborted if the provided context is
4118// canceled.
4119func (c *BillingAccountsSinksListCall) Context(ctx context.Context) *BillingAccountsSinksListCall {
4120	c.ctx_ = ctx
4121	return c
4122}
4123
4124// Header returns an http.Header that can be modified by the caller to
4125// add HTTP headers to the request.
4126func (c *BillingAccountsSinksListCall) Header() http.Header {
4127	if c.header_ == nil {
4128		c.header_ = make(http.Header)
4129	}
4130	return c.header_
4131}
4132
4133func (c *BillingAccountsSinksListCall) doRequest(alt string) (*http.Response, error) {
4134	reqHeaders := make(http.Header)
4135	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4136	for k, v := range c.header_ {
4137		reqHeaders[k] = v
4138	}
4139	reqHeaders.Set("User-Agent", c.s.userAgent())
4140	if c.ifNoneMatch_ != "" {
4141		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4142	}
4143	var body io.Reader = nil
4144	c.urlParams_.Set("alt", alt)
4145	c.urlParams_.Set("prettyPrint", "false")
4146	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
4147	urls += "?" + c.urlParams_.Encode()
4148	req, err := http.NewRequest("GET", urls, body)
4149	if err != nil {
4150		return nil, err
4151	}
4152	req.Header = reqHeaders
4153	googleapi.Expand(req.URL, map[string]string{
4154		"parent": c.parent,
4155	})
4156	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4157}
4158
4159// Do executes the "logging.billingAccounts.sinks.list" call.
4160// Exactly one of *ListSinksResponse or error will be non-nil. Any
4161// non-2xx status code is an error. Response headers are in either
4162// *ListSinksResponse.ServerResponse.Header or (if a response was
4163// returned at all) in error.(*googleapi.Error).Header. Use
4164// googleapi.IsNotModified to check whether the returned error was
4165// because http.StatusNotModified was returned.
4166func (c *BillingAccountsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
4167	gensupport.SetOptions(c.urlParams_, opts...)
4168	res, err := c.doRequest("json")
4169	if res != nil && res.StatusCode == http.StatusNotModified {
4170		if res.Body != nil {
4171			res.Body.Close()
4172		}
4173		return nil, &googleapi.Error{
4174			Code:   res.StatusCode,
4175			Header: res.Header,
4176		}
4177	}
4178	if err != nil {
4179		return nil, err
4180	}
4181	defer googleapi.CloseBody(res)
4182	if err := googleapi.CheckResponse(res); err != nil {
4183		return nil, err
4184	}
4185	ret := &ListSinksResponse{
4186		ServerResponse: googleapi.ServerResponse{
4187			Header:         res.Header,
4188			HTTPStatusCode: res.StatusCode,
4189		},
4190	}
4191	target := &ret
4192	if err := gensupport.DecodeResponse(target, res); err != nil {
4193		return nil, err
4194	}
4195	return ret, nil
4196	// {
4197	//   "description": "Lists sinks.",
4198	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks",
4199	//   "httpMethod": "GET",
4200	//   "id": "logging.billingAccounts.sinks.list",
4201	//   "parameterOrder": [
4202	//     "parent"
4203	//   ],
4204	//   "parameters": {
4205	//     "pageSize": {
4206	//       "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.",
4207	//       "format": "int32",
4208	//       "location": "query",
4209	//       "type": "integer"
4210	//     },
4211	//     "pageToken": {
4212	//       "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.",
4213	//       "location": "query",
4214	//       "type": "string"
4215	//     },
4216	//     "parent": {
4217	//       "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
4218	//       "location": "path",
4219	//       "pattern": "^billingAccounts/[^/]+$",
4220	//       "required": true,
4221	//       "type": "string"
4222	//     }
4223	//   },
4224	//   "path": "v2/{+parent}/sinks",
4225	//   "response": {
4226	//     "$ref": "ListSinksResponse"
4227	//   },
4228	//   "scopes": [
4229	//     "https://www.googleapis.com/auth/cloud-platform",
4230	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
4231	//     "https://www.googleapis.com/auth/logging.admin",
4232	//     "https://www.googleapis.com/auth/logging.read"
4233	//   ]
4234	// }
4235
4236}
4237
4238// Pages invokes f for each page of results.
4239// A non-nil error returned from f will halt the iteration.
4240// The provided context supersedes any context provided to the Context method.
4241func (c *BillingAccountsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
4242	c.ctx_ = ctx
4243	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4244	for {
4245		x, err := c.Do()
4246		if err != nil {
4247			return err
4248		}
4249		if err := f(x); err != nil {
4250			return err
4251		}
4252		if x.NextPageToken == "" {
4253			return nil
4254		}
4255		c.PageToken(x.NextPageToken)
4256	}
4257}
4258
4259// method id "logging.billingAccounts.sinks.patch":
4260
4261type BillingAccountsSinksPatchCall struct {
4262	s          *Service
4263	sinkNameid string
4264	logsink    *LogSink
4265	urlParams_ gensupport.URLParams
4266	ctx_       context.Context
4267	header_    http.Header
4268}
4269
4270// Patch: Updates a sink. This method replaces the following fields in
4271// the existing sink with values from the new sink: destination, and
4272// filter.The updated sink might also have a new writer_identity; see
4273// the unique_writer_identity field.
4274func (r *BillingAccountsSinksService) Patch(sinkNameid string, logsink *LogSink) *BillingAccountsSinksPatchCall {
4275	c := &BillingAccountsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4276	c.sinkNameid = sinkNameid
4277	c.logsink = logsink
4278	return c
4279}
4280
4281// UniqueWriterIdentity sets the optional parameter
4282// "uniqueWriterIdentity": See sinks.create for a description of this
4283// field. When updating a sink, the effect of this field on the value of
4284// writer_identity in the updated sink depends on both the old and new
4285// values of this field:
4286// If the old and new values of this field are both false or both true,
4287// then there is no change to the sink's writer_identity.
4288// If the old value is false and the new value is true, then
4289// writer_identity is changed to a unique service account.
4290// It is an error if the old value is true and the new value is set to
4291// false or defaulted to false.
4292func (c *BillingAccountsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksPatchCall {
4293	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
4294	return c
4295}
4296
4297// UpdateMask sets the optional parameter "updateMask": Field mask that
4298// specifies the fields in sink that need an update. A sink field will
4299// be overwritten if, and only if, it is in the update mask. name and
4300// output only fields cannot be updated.An empty updateMask is
4301// temporarily treated as using the following mask for backwards
4302// compatibility purposes:  destination,filter,includeChildren At some
4303// point in the future, behavior will be removed and specifying an empty
4304// updateMask will be an error.For a detailed FieldMask definition, see
4305// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample:
4306// updateMask=filter.
4307func (c *BillingAccountsSinksPatchCall) UpdateMask(updateMask string) *BillingAccountsSinksPatchCall {
4308	c.urlParams_.Set("updateMask", updateMask)
4309	return c
4310}
4311
4312// Fields allows partial responses to be retrieved. See
4313// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4314// for more information.
4315func (c *BillingAccountsSinksPatchCall) Fields(s ...googleapi.Field) *BillingAccountsSinksPatchCall {
4316	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4317	return c
4318}
4319
4320// Context sets the context to be used in this call's Do method. Any
4321// pending HTTP request will be aborted if the provided context is
4322// canceled.
4323func (c *BillingAccountsSinksPatchCall) Context(ctx context.Context) *BillingAccountsSinksPatchCall {
4324	c.ctx_ = ctx
4325	return c
4326}
4327
4328// Header returns an http.Header that can be modified by the caller to
4329// add HTTP headers to the request.
4330func (c *BillingAccountsSinksPatchCall) Header() http.Header {
4331	if c.header_ == nil {
4332		c.header_ = make(http.Header)
4333	}
4334	return c.header_
4335}
4336
4337func (c *BillingAccountsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
4338	reqHeaders := make(http.Header)
4339	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4340	for k, v := range c.header_ {
4341		reqHeaders[k] = v
4342	}
4343	reqHeaders.Set("User-Agent", c.s.userAgent())
4344	var body io.Reader = nil
4345	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
4346	if err != nil {
4347		return nil, err
4348	}
4349	reqHeaders.Set("Content-Type", "application/json")
4350	c.urlParams_.Set("alt", alt)
4351	c.urlParams_.Set("prettyPrint", "false")
4352	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
4353	urls += "?" + c.urlParams_.Encode()
4354	req, err := http.NewRequest("PATCH", urls, body)
4355	if err != nil {
4356		return nil, err
4357	}
4358	req.Header = reqHeaders
4359	googleapi.Expand(req.URL, map[string]string{
4360		"sinkName": c.sinkNameid,
4361	})
4362	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4363}
4364
4365// Do executes the "logging.billingAccounts.sinks.patch" call.
4366// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
4367// code is an error. Response headers are in either
4368// *LogSink.ServerResponse.Header or (if a response was returned at all)
4369// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4370// check whether the returned error was because http.StatusNotModified
4371// was returned.
4372func (c *BillingAccountsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
4373	gensupport.SetOptions(c.urlParams_, opts...)
4374	res, err := c.doRequest("json")
4375	if res != nil && res.StatusCode == http.StatusNotModified {
4376		if res.Body != nil {
4377			res.Body.Close()
4378		}
4379		return nil, &googleapi.Error{
4380			Code:   res.StatusCode,
4381			Header: res.Header,
4382		}
4383	}
4384	if err != nil {
4385		return nil, err
4386	}
4387	defer googleapi.CloseBody(res)
4388	if err := googleapi.CheckResponse(res); err != nil {
4389		return nil, err
4390	}
4391	ret := &LogSink{
4392		ServerResponse: googleapi.ServerResponse{
4393			Header:         res.Header,
4394			HTTPStatusCode: res.StatusCode,
4395		},
4396	}
4397	target := &ret
4398	if err := gensupport.DecodeResponse(target, res); err != nil {
4399		return nil, err
4400	}
4401	return ret, nil
4402	// {
4403	//   "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.",
4404	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}",
4405	//   "httpMethod": "PATCH",
4406	//   "id": "logging.billingAccounts.sinks.patch",
4407	//   "parameterOrder": [
4408	//     "sinkName"
4409	//   ],
4410	//   "parameters": {
4411	//     "sinkName": {
4412	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
4413	//       "location": "path",
4414	//       "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$",
4415	//       "required": true,
4416	//       "type": "string"
4417	//     },
4418	//     "uniqueWriterIdentity": {
4419	//       "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:\nIf 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.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.",
4420	//       "location": "query",
4421	//       "type": "boolean"
4422	//     },
4423	//     "updateMask": {
4424	//       "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,includeChildren At 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.FieldMaskExample: updateMask=filter.",
4425	//       "format": "google-fieldmask",
4426	//       "location": "query",
4427	//       "type": "string"
4428	//     }
4429	//   },
4430	//   "path": "v2/{+sinkName}",
4431	//   "request": {
4432	//     "$ref": "LogSink"
4433	//   },
4434	//   "response": {
4435	//     "$ref": "LogSink"
4436	//   },
4437	//   "scopes": [
4438	//     "https://www.googleapis.com/auth/cloud-platform",
4439	//     "https://www.googleapis.com/auth/logging.admin"
4440	//   ]
4441	// }
4442
4443}
4444
4445// method id "logging.billingAccounts.sinks.update":
4446
4447type BillingAccountsSinksUpdateCall struct {
4448	s          *Service
4449	sinkNameid string
4450	logsink    *LogSink
4451	urlParams_ gensupport.URLParams
4452	ctx_       context.Context
4453	header_    http.Header
4454}
4455
4456// Update: Updates a sink. This method replaces the following fields in
4457// the existing sink with values from the new sink: destination, and
4458// filter.The updated sink might also have a new writer_identity; see
4459// the unique_writer_identity field.
4460func (r *BillingAccountsSinksService) Update(sinkNameid string, logsink *LogSink) *BillingAccountsSinksUpdateCall {
4461	c := &BillingAccountsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4462	c.sinkNameid = sinkNameid
4463	c.logsink = logsink
4464	return c
4465}
4466
4467// UniqueWriterIdentity sets the optional parameter
4468// "uniqueWriterIdentity": See sinks.create for a description of this
4469// field. When updating a sink, the effect of this field on the value of
4470// writer_identity in the updated sink depends on both the old and new
4471// values of this field:
4472// If the old and new values of this field are both false or both true,
4473// then there is no change to the sink's writer_identity.
4474// If the old value is false and the new value is true, then
4475// writer_identity is changed to a unique service account.
4476// It is an error if the old value is true and the new value is set to
4477// false or defaulted to false.
4478func (c *BillingAccountsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksUpdateCall {
4479	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
4480	return c
4481}
4482
4483// UpdateMask sets the optional parameter "updateMask": Field mask that
4484// specifies the fields in sink that need an update. A sink field will
4485// be overwritten if, and only if, it is in the update mask. name and
4486// output only fields cannot be updated.An empty updateMask is
4487// temporarily treated as using the following mask for backwards
4488// compatibility purposes:  destination,filter,includeChildren At some
4489// point in the future, behavior will be removed and specifying an empty
4490// updateMask will be an error.For a detailed FieldMask definition, see
4491// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample:
4492// updateMask=filter.
4493func (c *BillingAccountsSinksUpdateCall) UpdateMask(updateMask string) *BillingAccountsSinksUpdateCall {
4494	c.urlParams_.Set("updateMask", updateMask)
4495	return c
4496}
4497
4498// Fields allows partial responses to be retrieved. See
4499// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4500// for more information.
4501func (c *BillingAccountsSinksUpdateCall) Fields(s ...googleapi.Field) *BillingAccountsSinksUpdateCall {
4502	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4503	return c
4504}
4505
4506// Context sets the context to be used in this call's Do method. Any
4507// pending HTTP request will be aborted if the provided context is
4508// canceled.
4509func (c *BillingAccountsSinksUpdateCall) Context(ctx context.Context) *BillingAccountsSinksUpdateCall {
4510	c.ctx_ = ctx
4511	return c
4512}
4513
4514// Header returns an http.Header that can be modified by the caller to
4515// add HTTP headers to the request.
4516func (c *BillingAccountsSinksUpdateCall) Header() http.Header {
4517	if c.header_ == nil {
4518		c.header_ = make(http.Header)
4519	}
4520	return c.header_
4521}
4522
4523func (c *BillingAccountsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
4524	reqHeaders := make(http.Header)
4525	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4526	for k, v := range c.header_ {
4527		reqHeaders[k] = v
4528	}
4529	reqHeaders.Set("User-Agent", c.s.userAgent())
4530	var body io.Reader = nil
4531	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
4532	if err != nil {
4533		return nil, err
4534	}
4535	reqHeaders.Set("Content-Type", "application/json")
4536	c.urlParams_.Set("alt", alt)
4537	c.urlParams_.Set("prettyPrint", "false")
4538	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
4539	urls += "?" + c.urlParams_.Encode()
4540	req, err := http.NewRequest("PUT", urls, body)
4541	if err != nil {
4542		return nil, err
4543	}
4544	req.Header = reqHeaders
4545	googleapi.Expand(req.URL, map[string]string{
4546		"sinkName": c.sinkNameid,
4547	})
4548	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4549}
4550
4551// Do executes the "logging.billingAccounts.sinks.update" call.
4552// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
4553// code is an error. Response headers are in either
4554// *LogSink.ServerResponse.Header or (if a response was returned at all)
4555// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4556// check whether the returned error was because http.StatusNotModified
4557// was returned.
4558func (c *BillingAccountsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
4559	gensupport.SetOptions(c.urlParams_, opts...)
4560	res, err := c.doRequest("json")
4561	if res != nil && res.StatusCode == http.StatusNotModified {
4562		if res.Body != nil {
4563			res.Body.Close()
4564		}
4565		return nil, &googleapi.Error{
4566			Code:   res.StatusCode,
4567			Header: res.Header,
4568		}
4569	}
4570	if err != nil {
4571		return nil, err
4572	}
4573	defer googleapi.CloseBody(res)
4574	if err := googleapi.CheckResponse(res); err != nil {
4575		return nil, err
4576	}
4577	ret := &LogSink{
4578		ServerResponse: googleapi.ServerResponse{
4579			Header:         res.Header,
4580			HTTPStatusCode: res.StatusCode,
4581		},
4582	}
4583	target := &ret
4584	if err := gensupport.DecodeResponse(target, res); err != nil {
4585		return nil, err
4586	}
4587	return ret, nil
4588	// {
4589	//   "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.",
4590	//   "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}",
4591	//   "httpMethod": "PUT",
4592	//   "id": "logging.billingAccounts.sinks.update",
4593	//   "parameterOrder": [
4594	//     "sinkName"
4595	//   ],
4596	//   "parameters": {
4597	//     "sinkName": {
4598	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
4599	//       "location": "path",
4600	//       "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$",
4601	//       "required": true,
4602	//       "type": "string"
4603	//     },
4604	//     "uniqueWriterIdentity": {
4605	//       "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:\nIf 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.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.",
4606	//       "location": "query",
4607	//       "type": "boolean"
4608	//     },
4609	//     "updateMask": {
4610	//       "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,includeChildren At 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.FieldMaskExample: updateMask=filter.",
4611	//       "format": "google-fieldmask",
4612	//       "location": "query",
4613	//       "type": "string"
4614	//     }
4615	//   },
4616	//   "path": "v2/{+sinkName}",
4617	//   "request": {
4618	//     "$ref": "LogSink"
4619	//   },
4620	//   "response": {
4621	//     "$ref": "LogSink"
4622	//   },
4623	//   "scopes": [
4624	//     "https://www.googleapis.com/auth/cloud-platform",
4625	//     "https://www.googleapis.com/auth/logging.admin"
4626	//   ]
4627	// }
4628
4629}
4630
4631// method id "logging.entries.list":
4632
4633type EntriesListCall struct {
4634	s                     *Service
4635	listlogentriesrequest *ListLogEntriesRequest
4636	urlParams_            gensupport.URLParams
4637	ctx_                  context.Context
4638	header_               http.Header
4639}
4640
4641// List: Lists log entries. Use this method to retrieve log entries that
4642// originated from a project/folder/organization/billing account. For
4643// ways to export log entries, see Exporting Logs.
4644func (r *EntriesService) List(listlogentriesrequest *ListLogEntriesRequest) *EntriesListCall {
4645	c := &EntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4646	c.listlogentriesrequest = listlogentriesrequest
4647	return c
4648}
4649
4650// Fields allows partial responses to be retrieved. See
4651// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4652// for more information.
4653func (c *EntriesListCall) Fields(s ...googleapi.Field) *EntriesListCall {
4654	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4655	return c
4656}
4657
4658// Context sets the context to be used in this call's Do method. Any
4659// pending HTTP request will be aborted if the provided context is
4660// canceled.
4661func (c *EntriesListCall) Context(ctx context.Context) *EntriesListCall {
4662	c.ctx_ = ctx
4663	return c
4664}
4665
4666// Header returns an http.Header that can be modified by the caller to
4667// add HTTP headers to the request.
4668func (c *EntriesListCall) Header() http.Header {
4669	if c.header_ == nil {
4670		c.header_ = make(http.Header)
4671	}
4672	return c.header_
4673}
4674
4675func (c *EntriesListCall) doRequest(alt string) (*http.Response, error) {
4676	reqHeaders := make(http.Header)
4677	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4678	for k, v := range c.header_ {
4679		reqHeaders[k] = v
4680	}
4681	reqHeaders.Set("User-Agent", c.s.userAgent())
4682	var body io.Reader = nil
4683	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listlogentriesrequest)
4684	if err != nil {
4685		return nil, err
4686	}
4687	reqHeaders.Set("Content-Type", "application/json")
4688	c.urlParams_.Set("alt", alt)
4689	c.urlParams_.Set("prettyPrint", "false")
4690	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:list")
4691	urls += "?" + c.urlParams_.Encode()
4692	req, err := http.NewRequest("POST", urls, body)
4693	if err != nil {
4694		return nil, err
4695	}
4696	req.Header = reqHeaders
4697	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4698}
4699
4700// Do executes the "logging.entries.list" call.
4701// Exactly one of *ListLogEntriesResponse or error will be non-nil. Any
4702// non-2xx status code is an error. Response headers are in either
4703// *ListLogEntriesResponse.ServerResponse.Header or (if a response was
4704// returned at all) in error.(*googleapi.Error).Header. Use
4705// googleapi.IsNotModified to check whether the returned error was
4706// because http.StatusNotModified was returned.
4707func (c *EntriesListCall) Do(opts ...googleapi.CallOption) (*ListLogEntriesResponse, error) {
4708	gensupport.SetOptions(c.urlParams_, opts...)
4709	res, err := c.doRequest("json")
4710	if res != nil && res.StatusCode == http.StatusNotModified {
4711		if res.Body != nil {
4712			res.Body.Close()
4713		}
4714		return nil, &googleapi.Error{
4715			Code:   res.StatusCode,
4716			Header: res.Header,
4717		}
4718	}
4719	if err != nil {
4720		return nil, err
4721	}
4722	defer googleapi.CloseBody(res)
4723	if err := googleapi.CheckResponse(res); err != nil {
4724		return nil, err
4725	}
4726	ret := &ListLogEntriesResponse{
4727		ServerResponse: googleapi.ServerResponse{
4728			Header:         res.Header,
4729			HTTPStatusCode: res.StatusCode,
4730		},
4731	}
4732	target := &ret
4733	if err := gensupport.DecodeResponse(target, res); err != nil {
4734		return nil, err
4735	}
4736	return ret, nil
4737	// {
4738	//   "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.",
4739	//   "flatPath": "v2/entries:list",
4740	//   "httpMethod": "POST",
4741	//   "id": "logging.entries.list",
4742	//   "parameterOrder": [],
4743	//   "parameters": {},
4744	//   "path": "v2/entries:list",
4745	//   "request": {
4746	//     "$ref": "ListLogEntriesRequest"
4747	//   },
4748	//   "response": {
4749	//     "$ref": "ListLogEntriesResponse"
4750	//   },
4751	//   "scopes": [
4752	//     "https://www.googleapis.com/auth/cloud-platform",
4753	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
4754	//     "https://www.googleapis.com/auth/logging.admin",
4755	//     "https://www.googleapis.com/auth/logging.read"
4756	//   ]
4757	// }
4758
4759}
4760
4761// Pages invokes f for each page of results.
4762// A non-nil error returned from f will halt the iteration.
4763// The provided context supersedes any context provided to the Context method.
4764func (c *EntriesListCall) Pages(ctx context.Context, f func(*ListLogEntriesResponse) error) error {
4765	c.ctx_ = ctx
4766	defer func(pt string) { c.listlogentriesrequest.PageToken = pt }(c.listlogentriesrequest.PageToken) // reset paging to original point
4767	for {
4768		x, err := c.Do()
4769		if err != nil {
4770			return err
4771		}
4772		if err := f(x); err != nil {
4773			return err
4774		}
4775		if x.NextPageToken == "" {
4776			return nil
4777		}
4778		c.listlogentriesrequest.PageToken = x.NextPageToken
4779	}
4780}
4781
4782// method id "logging.entries.write":
4783
4784type EntriesWriteCall struct {
4785	s                      *Service
4786	writelogentriesrequest *WriteLogEntriesRequest
4787	urlParams_             gensupport.URLParams
4788	ctx_                   context.Context
4789	header_                http.Header
4790}
4791
4792// Write: Writes log entries to Logging. This API method is the only way
4793// to send log entries to Logging. This method is used, directly or
4794// indirectly, by the Logging agent (fluentd) and all logging libraries
4795// configured to use Logging. A single request may contain log entries
4796// for a maximum of 1000 different resources (projects, organizations,
4797// billing accounts or folders)
4798func (r *EntriesService) Write(writelogentriesrequest *WriteLogEntriesRequest) *EntriesWriteCall {
4799	c := &EntriesWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4800	c.writelogentriesrequest = writelogentriesrequest
4801	return c
4802}
4803
4804// Fields allows partial responses to be retrieved. See
4805// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4806// for more information.
4807func (c *EntriesWriteCall) Fields(s ...googleapi.Field) *EntriesWriteCall {
4808	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4809	return c
4810}
4811
4812// Context sets the context to be used in this call's Do method. Any
4813// pending HTTP request will be aborted if the provided context is
4814// canceled.
4815func (c *EntriesWriteCall) Context(ctx context.Context) *EntriesWriteCall {
4816	c.ctx_ = ctx
4817	return c
4818}
4819
4820// Header returns an http.Header that can be modified by the caller to
4821// add HTTP headers to the request.
4822func (c *EntriesWriteCall) Header() http.Header {
4823	if c.header_ == nil {
4824		c.header_ = make(http.Header)
4825	}
4826	return c.header_
4827}
4828
4829func (c *EntriesWriteCall) doRequest(alt string) (*http.Response, error) {
4830	reqHeaders := make(http.Header)
4831	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4832	for k, v := range c.header_ {
4833		reqHeaders[k] = v
4834	}
4835	reqHeaders.Set("User-Agent", c.s.userAgent())
4836	var body io.Reader = nil
4837	body, err := googleapi.WithoutDataWrapper.JSONReader(c.writelogentriesrequest)
4838	if err != nil {
4839		return nil, err
4840	}
4841	reqHeaders.Set("Content-Type", "application/json")
4842	c.urlParams_.Set("alt", alt)
4843	c.urlParams_.Set("prettyPrint", "false")
4844	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:write")
4845	urls += "?" + c.urlParams_.Encode()
4846	req, err := http.NewRequest("POST", urls, body)
4847	if err != nil {
4848		return nil, err
4849	}
4850	req.Header = reqHeaders
4851	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4852}
4853
4854// Do executes the "logging.entries.write" call.
4855// Exactly one of *WriteLogEntriesResponse or error will be non-nil. Any
4856// non-2xx status code is an error. Response headers are in either
4857// *WriteLogEntriesResponse.ServerResponse.Header or (if a response was
4858// returned at all) in error.(*googleapi.Error).Header. Use
4859// googleapi.IsNotModified to check whether the returned error was
4860// because http.StatusNotModified was returned.
4861func (c *EntriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteLogEntriesResponse, error) {
4862	gensupport.SetOptions(c.urlParams_, opts...)
4863	res, err := c.doRequest("json")
4864	if res != nil && res.StatusCode == http.StatusNotModified {
4865		if res.Body != nil {
4866			res.Body.Close()
4867		}
4868		return nil, &googleapi.Error{
4869			Code:   res.StatusCode,
4870			Header: res.Header,
4871		}
4872	}
4873	if err != nil {
4874		return nil, err
4875	}
4876	defer googleapi.CloseBody(res)
4877	if err := googleapi.CheckResponse(res); err != nil {
4878		return nil, err
4879	}
4880	ret := &WriteLogEntriesResponse{
4881		ServerResponse: googleapi.ServerResponse{
4882			Header:         res.Header,
4883			HTTPStatusCode: res.StatusCode,
4884		},
4885	}
4886	target := &ret
4887	if err := gensupport.DecodeResponse(target, res); err != nil {
4888		return nil, err
4889	}
4890	return ret, nil
4891	// {
4892	//   "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)",
4893	//   "flatPath": "v2/entries:write",
4894	//   "httpMethod": "POST",
4895	//   "id": "logging.entries.write",
4896	//   "parameterOrder": [],
4897	//   "parameters": {},
4898	//   "path": "v2/entries:write",
4899	//   "request": {
4900	//     "$ref": "WriteLogEntriesRequest"
4901	//   },
4902	//   "response": {
4903	//     "$ref": "WriteLogEntriesResponse"
4904	//   },
4905	//   "scopes": [
4906	//     "https://www.googleapis.com/auth/cloud-platform",
4907	//     "https://www.googleapis.com/auth/logging.admin",
4908	//     "https://www.googleapis.com/auth/logging.write"
4909	//   ]
4910	// }
4911
4912}
4913
4914// method id "logging.exclusions.create":
4915
4916type ExclusionsCreateCall struct {
4917	s            *Service
4918	parent       string
4919	logexclusion *LogExclusion
4920	urlParams_   gensupport.URLParams
4921	ctx_         context.Context
4922	header_      http.Header
4923}
4924
4925// Create: Creates a new exclusion in a specified parent resource. Only
4926// log entries belonging to that resource can be excluded. You can have
4927// up to 10 exclusions in a resource.
4928func (r *ExclusionsService) Create(parent string, logexclusion *LogExclusion) *ExclusionsCreateCall {
4929	c := &ExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4930	c.parent = parent
4931	c.logexclusion = logexclusion
4932	return c
4933}
4934
4935// Fields allows partial responses to be retrieved. See
4936// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4937// for more information.
4938func (c *ExclusionsCreateCall) Fields(s ...googleapi.Field) *ExclusionsCreateCall {
4939	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4940	return c
4941}
4942
4943// Context sets the context to be used in this call's Do method. Any
4944// pending HTTP request will be aborted if the provided context is
4945// canceled.
4946func (c *ExclusionsCreateCall) Context(ctx context.Context) *ExclusionsCreateCall {
4947	c.ctx_ = ctx
4948	return c
4949}
4950
4951// Header returns an http.Header that can be modified by the caller to
4952// add HTTP headers to the request.
4953func (c *ExclusionsCreateCall) Header() http.Header {
4954	if c.header_ == nil {
4955		c.header_ = make(http.Header)
4956	}
4957	return c.header_
4958}
4959
4960func (c *ExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
4961	reqHeaders := make(http.Header)
4962	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4963	for k, v := range c.header_ {
4964		reqHeaders[k] = v
4965	}
4966	reqHeaders.Set("User-Agent", c.s.userAgent())
4967	var body io.Reader = nil
4968	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
4969	if err != nil {
4970		return nil, err
4971	}
4972	reqHeaders.Set("Content-Type", "application/json")
4973	c.urlParams_.Set("alt", alt)
4974	c.urlParams_.Set("prettyPrint", "false")
4975	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
4976	urls += "?" + c.urlParams_.Encode()
4977	req, err := http.NewRequest("POST", urls, body)
4978	if err != nil {
4979		return nil, err
4980	}
4981	req.Header = reqHeaders
4982	googleapi.Expand(req.URL, map[string]string{
4983		"parent": c.parent,
4984	})
4985	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4986}
4987
4988// Do executes the "logging.exclusions.create" call.
4989// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
4990// status code is an error. Response headers are in either
4991// *LogExclusion.ServerResponse.Header or (if a response was returned at
4992// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4993// to check whether the returned error was because
4994// http.StatusNotModified was returned.
4995func (c *ExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
4996	gensupport.SetOptions(c.urlParams_, opts...)
4997	res, err := c.doRequest("json")
4998	if res != nil && res.StatusCode == http.StatusNotModified {
4999		if res.Body != nil {
5000			res.Body.Close()
5001		}
5002		return nil, &googleapi.Error{
5003			Code:   res.StatusCode,
5004			Header: res.Header,
5005		}
5006	}
5007	if err != nil {
5008		return nil, err
5009	}
5010	defer googleapi.CloseBody(res)
5011	if err := googleapi.CheckResponse(res); err != nil {
5012		return nil, err
5013	}
5014	ret := &LogExclusion{
5015		ServerResponse: googleapi.ServerResponse{
5016			Header:         res.Header,
5017			HTTPStatusCode: res.StatusCode,
5018		},
5019	}
5020	target := &ret
5021	if err := gensupport.DecodeResponse(target, res); err != nil {
5022		return nil, err
5023	}
5024	return ret, nil
5025	// {
5026	//   "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.",
5027	//   "flatPath": "v2/{v2Id}/{v2Id1}/exclusions",
5028	//   "httpMethod": "POST",
5029	//   "id": "logging.exclusions.create",
5030	//   "parameterOrder": [
5031	//     "parent"
5032	//   ],
5033	//   "parameters": {
5034	//     "parent": {
5035	//       "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
5036	//       "location": "path",
5037	//       "pattern": "^[^/]+/[^/]+$",
5038	//       "required": true,
5039	//       "type": "string"
5040	//     }
5041	//   },
5042	//   "path": "v2/{+parent}/exclusions",
5043	//   "request": {
5044	//     "$ref": "LogExclusion"
5045	//   },
5046	//   "response": {
5047	//     "$ref": "LogExclusion"
5048	//   },
5049	//   "scopes": [
5050	//     "https://www.googleapis.com/auth/cloud-platform",
5051	//     "https://www.googleapis.com/auth/logging.admin"
5052	//   ]
5053	// }
5054
5055}
5056
5057// method id "logging.exclusions.delete":
5058
5059type ExclusionsDeleteCall struct {
5060	s          *Service
5061	name       string
5062	urlParams_ gensupport.URLParams
5063	ctx_       context.Context
5064	header_    http.Header
5065}
5066
5067// Delete: Deletes an exclusion.
5068func (r *ExclusionsService) Delete(name string) *ExclusionsDeleteCall {
5069	c := &ExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5070	c.name = name
5071	return c
5072}
5073
5074// Fields allows partial responses to be retrieved. See
5075// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5076// for more information.
5077func (c *ExclusionsDeleteCall) Fields(s ...googleapi.Field) *ExclusionsDeleteCall {
5078	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5079	return c
5080}
5081
5082// Context sets the context to be used in this call's Do method. Any
5083// pending HTTP request will be aborted if the provided context is
5084// canceled.
5085func (c *ExclusionsDeleteCall) Context(ctx context.Context) *ExclusionsDeleteCall {
5086	c.ctx_ = ctx
5087	return c
5088}
5089
5090// Header returns an http.Header that can be modified by the caller to
5091// add HTTP headers to the request.
5092func (c *ExclusionsDeleteCall) Header() http.Header {
5093	if c.header_ == nil {
5094		c.header_ = make(http.Header)
5095	}
5096	return c.header_
5097}
5098
5099func (c *ExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
5100	reqHeaders := make(http.Header)
5101	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5102	for k, v := range c.header_ {
5103		reqHeaders[k] = v
5104	}
5105	reqHeaders.Set("User-Agent", c.s.userAgent())
5106	var body io.Reader = nil
5107	c.urlParams_.Set("alt", alt)
5108	c.urlParams_.Set("prettyPrint", "false")
5109	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5110	urls += "?" + c.urlParams_.Encode()
5111	req, err := http.NewRequest("DELETE", urls, body)
5112	if err != nil {
5113		return nil, err
5114	}
5115	req.Header = reqHeaders
5116	googleapi.Expand(req.URL, map[string]string{
5117		"name": c.name,
5118	})
5119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5120}
5121
5122// Do executes the "logging.exclusions.delete" call.
5123// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5124// code is an error. Response headers are in either
5125// *Empty.ServerResponse.Header or (if a response was returned at all)
5126// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5127// check whether the returned error was because http.StatusNotModified
5128// was returned.
5129func (c *ExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5130	gensupport.SetOptions(c.urlParams_, opts...)
5131	res, err := c.doRequest("json")
5132	if res != nil && res.StatusCode == http.StatusNotModified {
5133		if res.Body != nil {
5134			res.Body.Close()
5135		}
5136		return nil, &googleapi.Error{
5137			Code:   res.StatusCode,
5138			Header: res.Header,
5139		}
5140	}
5141	if err != nil {
5142		return nil, err
5143	}
5144	defer googleapi.CloseBody(res)
5145	if err := googleapi.CheckResponse(res); err != nil {
5146		return nil, err
5147	}
5148	ret := &Empty{
5149		ServerResponse: googleapi.ServerResponse{
5150			Header:         res.Header,
5151			HTTPStatusCode: res.StatusCode,
5152		},
5153	}
5154	target := &ret
5155	if err := gensupport.DecodeResponse(target, res); err != nil {
5156		return nil, err
5157	}
5158	return ret, nil
5159	// {
5160	//   "description": "Deletes an exclusion.",
5161	//   "flatPath": "v2/{v2Id}/{v2Id1}/exclusions/{exclusionsId}",
5162	//   "httpMethod": "DELETE",
5163	//   "id": "logging.exclusions.delete",
5164	//   "parameterOrder": [
5165	//     "name"
5166	//   ],
5167	//   "parameters": {
5168	//     "name": {
5169	//       "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
5170	//       "location": "path",
5171	//       "pattern": "^[^/]+/[^/]+/exclusions/[^/]+$",
5172	//       "required": true,
5173	//       "type": "string"
5174	//     }
5175	//   },
5176	//   "path": "v2/{+name}",
5177	//   "response": {
5178	//     "$ref": "Empty"
5179	//   },
5180	//   "scopes": [
5181	//     "https://www.googleapis.com/auth/cloud-platform",
5182	//     "https://www.googleapis.com/auth/logging.admin"
5183	//   ]
5184	// }
5185
5186}
5187
5188// method id "logging.exclusions.get":
5189
5190type ExclusionsGetCall struct {
5191	s            *Service
5192	name         string
5193	urlParams_   gensupport.URLParams
5194	ifNoneMatch_ string
5195	ctx_         context.Context
5196	header_      http.Header
5197}
5198
5199// Get: Gets the description of an exclusion.
5200func (r *ExclusionsService) Get(name string) *ExclusionsGetCall {
5201	c := &ExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5202	c.name = name
5203	return c
5204}
5205
5206// Fields allows partial responses to be retrieved. See
5207// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5208// for more information.
5209func (c *ExclusionsGetCall) Fields(s ...googleapi.Field) *ExclusionsGetCall {
5210	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5211	return c
5212}
5213
5214// IfNoneMatch sets the optional parameter which makes the operation
5215// fail if the object's ETag matches the given value. This is useful for
5216// getting updates only after the object has changed since the last
5217// request. Use googleapi.IsNotModified to check whether the response
5218// error from Do is the result of In-None-Match.
5219func (c *ExclusionsGetCall) IfNoneMatch(entityTag string) *ExclusionsGetCall {
5220	c.ifNoneMatch_ = entityTag
5221	return c
5222}
5223
5224// Context sets the context to be used in this call's Do method. Any
5225// pending HTTP request will be aborted if the provided context is
5226// canceled.
5227func (c *ExclusionsGetCall) Context(ctx context.Context) *ExclusionsGetCall {
5228	c.ctx_ = ctx
5229	return c
5230}
5231
5232// Header returns an http.Header that can be modified by the caller to
5233// add HTTP headers to the request.
5234func (c *ExclusionsGetCall) Header() http.Header {
5235	if c.header_ == nil {
5236		c.header_ = make(http.Header)
5237	}
5238	return c.header_
5239}
5240
5241func (c *ExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
5242	reqHeaders := make(http.Header)
5243	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5244	for k, v := range c.header_ {
5245		reqHeaders[k] = v
5246	}
5247	reqHeaders.Set("User-Agent", c.s.userAgent())
5248	if c.ifNoneMatch_ != "" {
5249		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5250	}
5251	var body io.Reader = nil
5252	c.urlParams_.Set("alt", alt)
5253	c.urlParams_.Set("prettyPrint", "false")
5254	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5255	urls += "?" + c.urlParams_.Encode()
5256	req, err := http.NewRequest("GET", urls, body)
5257	if err != nil {
5258		return nil, err
5259	}
5260	req.Header = reqHeaders
5261	googleapi.Expand(req.URL, map[string]string{
5262		"name": c.name,
5263	})
5264	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5265}
5266
5267// Do executes the "logging.exclusions.get" call.
5268// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
5269// status code is an error. Response headers are in either
5270// *LogExclusion.ServerResponse.Header or (if a response was returned at
5271// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5272// to check whether the returned error was because
5273// http.StatusNotModified was returned.
5274func (c *ExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
5275	gensupport.SetOptions(c.urlParams_, opts...)
5276	res, err := c.doRequest("json")
5277	if res != nil && res.StatusCode == http.StatusNotModified {
5278		if res.Body != nil {
5279			res.Body.Close()
5280		}
5281		return nil, &googleapi.Error{
5282			Code:   res.StatusCode,
5283			Header: res.Header,
5284		}
5285	}
5286	if err != nil {
5287		return nil, err
5288	}
5289	defer googleapi.CloseBody(res)
5290	if err := googleapi.CheckResponse(res); err != nil {
5291		return nil, err
5292	}
5293	ret := &LogExclusion{
5294		ServerResponse: googleapi.ServerResponse{
5295			Header:         res.Header,
5296			HTTPStatusCode: res.StatusCode,
5297		},
5298	}
5299	target := &ret
5300	if err := gensupport.DecodeResponse(target, res); err != nil {
5301		return nil, err
5302	}
5303	return ret, nil
5304	// {
5305	//   "description": "Gets the description of an exclusion.",
5306	//   "flatPath": "v2/{v2Id}/{v2Id1}/exclusions/{exclusionsId}",
5307	//   "httpMethod": "GET",
5308	//   "id": "logging.exclusions.get",
5309	//   "parameterOrder": [
5310	//     "name"
5311	//   ],
5312	//   "parameters": {
5313	//     "name": {
5314	//       "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
5315	//       "location": "path",
5316	//       "pattern": "^[^/]+/[^/]+/exclusions/[^/]+$",
5317	//       "required": true,
5318	//       "type": "string"
5319	//     }
5320	//   },
5321	//   "path": "v2/{+name}",
5322	//   "response": {
5323	//     "$ref": "LogExclusion"
5324	//   },
5325	//   "scopes": [
5326	//     "https://www.googleapis.com/auth/cloud-platform",
5327	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
5328	//     "https://www.googleapis.com/auth/logging.admin",
5329	//     "https://www.googleapis.com/auth/logging.read"
5330	//   ]
5331	// }
5332
5333}
5334
5335// method id "logging.exclusions.list":
5336
5337type ExclusionsListCall struct {
5338	s            *Service
5339	parent       string
5340	urlParams_   gensupport.URLParams
5341	ifNoneMatch_ string
5342	ctx_         context.Context
5343	header_      http.Header
5344}
5345
5346// List: Lists all the exclusions in a parent resource.
5347func (r *ExclusionsService) List(parent string) *ExclusionsListCall {
5348	c := &ExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5349	c.parent = parent
5350	return c
5351}
5352
5353// PageSize sets the optional parameter "pageSize": The maximum number
5354// of results to return from this request. Non-positive values are
5355// ignored. The presence of nextPageToken in the response indicates that
5356// more results might be available.
5357func (c *ExclusionsListCall) PageSize(pageSize int64) *ExclusionsListCall {
5358	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5359	return c
5360}
5361
5362// PageToken sets the optional parameter "pageToken": If present, then
5363// retrieve the next batch of results from the preceding call to this
5364// method. pageToken must be the value of nextPageToken from the
5365// previous response. The values of other method parameters should be
5366// identical to those in the previous call.
5367func (c *ExclusionsListCall) PageToken(pageToken string) *ExclusionsListCall {
5368	c.urlParams_.Set("pageToken", pageToken)
5369	return c
5370}
5371
5372// Fields allows partial responses to be retrieved. See
5373// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5374// for more information.
5375func (c *ExclusionsListCall) Fields(s ...googleapi.Field) *ExclusionsListCall {
5376	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5377	return c
5378}
5379
5380// IfNoneMatch sets the optional parameter which makes the operation
5381// fail if the object's ETag matches the given value. This is useful for
5382// getting updates only after the object has changed since the last
5383// request. Use googleapi.IsNotModified to check whether the response
5384// error from Do is the result of In-None-Match.
5385func (c *ExclusionsListCall) IfNoneMatch(entityTag string) *ExclusionsListCall {
5386	c.ifNoneMatch_ = entityTag
5387	return c
5388}
5389
5390// Context sets the context to be used in this call's Do method. Any
5391// pending HTTP request will be aborted if the provided context is
5392// canceled.
5393func (c *ExclusionsListCall) Context(ctx context.Context) *ExclusionsListCall {
5394	c.ctx_ = ctx
5395	return c
5396}
5397
5398// Header returns an http.Header that can be modified by the caller to
5399// add HTTP headers to the request.
5400func (c *ExclusionsListCall) Header() http.Header {
5401	if c.header_ == nil {
5402		c.header_ = make(http.Header)
5403	}
5404	return c.header_
5405}
5406
5407func (c *ExclusionsListCall) doRequest(alt string) (*http.Response, error) {
5408	reqHeaders := make(http.Header)
5409	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5410	for k, v := range c.header_ {
5411		reqHeaders[k] = v
5412	}
5413	reqHeaders.Set("User-Agent", c.s.userAgent())
5414	if c.ifNoneMatch_ != "" {
5415		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5416	}
5417	var body io.Reader = nil
5418	c.urlParams_.Set("alt", alt)
5419	c.urlParams_.Set("prettyPrint", "false")
5420	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
5421	urls += "?" + c.urlParams_.Encode()
5422	req, err := http.NewRequest("GET", urls, body)
5423	if err != nil {
5424		return nil, err
5425	}
5426	req.Header = reqHeaders
5427	googleapi.Expand(req.URL, map[string]string{
5428		"parent": c.parent,
5429	})
5430	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5431}
5432
5433// Do executes the "logging.exclusions.list" call.
5434// Exactly one of *ListExclusionsResponse or error will be non-nil. Any
5435// non-2xx status code is an error. Response headers are in either
5436// *ListExclusionsResponse.ServerResponse.Header or (if a response was
5437// returned at all) in error.(*googleapi.Error).Header. Use
5438// googleapi.IsNotModified to check whether the returned error was
5439// because http.StatusNotModified was returned.
5440func (c *ExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
5441	gensupport.SetOptions(c.urlParams_, opts...)
5442	res, err := c.doRequest("json")
5443	if res != nil && res.StatusCode == http.StatusNotModified {
5444		if res.Body != nil {
5445			res.Body.Close()
5446		}
5447		return nil, &googleapi.Error{
5448			Code:   res.StatusCode,
5449			Header: res.Header,
5450		}
5451	}
5452	if err != nil {
5453		return nil, err
5454	}
5455	defer googleapi.CloseBody(res)
5456	if err := googleapi.CheckResponse(res); err != nil {
5457		return nil, err
5458	}
5459	ret := &ListExclusionsResponse{
5460		ServerResponse: googleapi.ServerResponse{
5461			Header:         res.Header,
5462			HTTPStatusCode: res.StatusCode,
5463		},
5464	}
5465	target := &ret
5466	if err := gensupport.DecodeResponse(target, res); err != nil {
5467		return nil, err
5468	}
5469	return ret, nil
5470	// {
5471	//   "description": "Lists all the exclusions in a parent resource.",
5472	//   "flatPath": "v2/{v2Id}/{v2Id1}/exclusions",
5473	//   "httpMethod": "GET",
5474	//   "id": "logging.exclusions.list",
5475	//   "parameterOrder": [
5476	//     "parent"
5477	//   ],
5478	//   "parameters": {
5479	//     "pageSize": {
5480	//       "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.",
5481	//       "format": "int32",
5482	//       "location": "query",
5483	//       "type": "integer"
5484	//     },
5485	//     "pageToken": {
5486	//       "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.",
5487	//       "location": "query",
5488	//       "type": "string"
5489	//     },
5490	//     "parent": {
5491	//       "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
5492	//       "location": "path",
5493	//       "pattern": "^[^/]+/[^/]+$",
5494	//       "required": true,
5495	//       "type": "string"
5496	//     }
5497	//   },
5498	//   "path": "v2/{+parent}/exclusions",
5499	//   "response": {
5500	//     "$ref": "ListExclusionsResponse"
5501	//   },
5502	//   "scopes": [
5503	//     "https://www.googleapis.com/auth/cloud-platform",
5504	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
5505	//     "https://www.googleapis.com/auth/logging.admin",
5506	//     "https://www.googleapis.com/auth/logging.read"
5507	//   ]
5508	// }
5509
5510}
5511
5512// Pages invokes f for each page of results.
5513// A non-nil error returned from f will halt the iteration.
5514// The provided context supersedes any context provided to the Context method.
5515func (c *ExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
5516	c.ctx_ = ctx
5517	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5518	for {
5519		x, err := c.Do()
5520		if err != nil {
5521			return err
5522		}
5523		if err := f(x); err != nil {
5524			return err
5525		}
5526		if x.NextPageToken == "" {
5527			return nil
5528		}
5529		c.PageToken(x.NextPageToken)
5530	}
5531}
5532
5533// method id "logging.exclusions.patch":
5534
5535type ExclusionsPatchCall struct {
5536	s            *Service
5537	name         string
5538	logexclusion *LogExclusion
5539	urlParams_   gensupport.URLParams
5540	ctx_         context.Context
5541	header_      http.Header
5542}
5543
5544// Patch: Changes one or more properties of an existing exclusion.
5545func (r *ExclusionsService) Patch(name string, logexclusion *LogExclusion) *ExclusionsPatchCall {
5546	c := &ExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5547	c.name = name
5548	c.logexclusion = logexclusion
5549	return c
5550}
5551
5552// UpdateMask sets the optional parameter "updateMask": Required. A
5553// non-empty list of fields to change in the existing exclusion. New
5554// values for the fields are taken from the corresponding fields in the
5555// LogExclusion included in this request. Fields not mentioned in
5556// update_mask are not changed and are ignored in the request.For
5557// example, to change the filter and description of an exclusion,
5558// specify an update_mask of "filter,description".
5559func (c *ExclusionsPatchCall) UpdateMask(updateMask string) *ExclusionsPatchCall {
5560	c.urlParams_.Set("updateMask", updateMask)
5561	return c
5562}
5563
5564// Fields allows partial responses to be retrieved. See
5565// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5566// for more information.
5567func (c *ExclusionsPatchCall) Fields(s ...googleapi.Field) *ExclusionsPatchCall {
5568	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5569	return c
5570}
5571
5572// Context sets the context to be used in this call's Do method. Any
5573// pending HTTP request will be aborted if the provided context is
5574// canceled.
5575func (c *ExclusionsPatchCall) Context(ctx context.Context) *ExclusionsPatchCall {
5576	c.ctx_ = ctx
5577	return c
5578}
5579
5580// Header returns an http.Header that can be modified by the caller to
5581// add HTTP headers to the request.
5582func (c *ExclusionsPatchCall) Header() http.Header {
5583	if c.header_ == nil {
5584		c.header_ = make(http.Header)
5585	}
5586	return c.header_
5587}
5588
5589func (c *ExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
5590	reqHeaders := make(http.Header)
5591	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5592	for k, v := range c.header_ {
5593		reqHeaders[k] = v
5594	}
5595	reqHeaders.Set("User-Agent", c.s.userAgent())
5596	var body io.Reader = nil
5597	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
5598	if err != nil {
5599		return nil, err
5600	}
5601	reqHeaders.Set("Content-Type", "application/json")
5602	c.urlParams_.Set("alt", alt)
5603	c.urlParams_.Set("prettyPrint", "false")
5604	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5605	urls += "?" + c.urlParams_.Encode()
5606	req, err := http.NewRequest("PATCH", urls, body)
5607	if err != nil {
5608		return nil, err
5609	}
5610	req.Header = reqHeaders
5611	googleapi.Expand(req.URL, map[string]string{
5612		"name": c.name,
5613	})
5614	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5615}
5616
5617// Do executes the "logging.exclusions.patch" call.
5618// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
5619// status code is an error. Response headers are in either
5620// *LogExclusion.ServerResponse.Header or (if a response was returned at
5621// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5622// to check whether the returned error was because
5623// http.StatusNotModified was returned.
5624func (c *ExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
5625	gensupport.SetOptions(c.urlParams_, opts...)
5626	res, err := c.doRequest("json")
5627	if res != nil && res.StatusCode == http.StatusNotModified {
5628		if res.Body != nil {
5629			res.Body.Close()
5630		}
5631		return nil, &googleapi.Error{
5632			Code:   res.StatusCode,
5633			Header: res.Header,
5634		}
5635	}
5636	if err != nil {
5637		return nil, err
5638	}
5639	defer googleapi.CloseBody(res)
5640	if err := googleapi.CheckResponse(res); err != nil {
5641		return nil, err
5642	}
5643	ret := &LogExclusion{
5644		ServerResponse: googleapi.ServerResponse{
5645			Header:         res.Header,
5646			HTTPStatusCode: res.StatusCode,
5647		},
5648	}
5649	target := &ret
5650	if err := gensupport.DecodeResponse(target, res); err != nil {
5651		return nil, err
5652	}
5653	return ret, nil
5654	// {
5655	//   "description": "Changes one or more properties of an existing exclusion.",
5656	//   "flatPath": "v2/{v2Id}/{v2Id1}/exclusions/{exclusionsId}",
5657	//   "httpMethod": "PATCH",
5658	//   "id": "logging.exclusions.patch",
5659	//   "parameterOrder": [
5660	//     "name"
5661	//   ],
5662	//   "parameters": {
5663	//     "name": {
5664	//       "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
5665	//       "location": "path",
5666	//       "pattern": "^[^/]+/[^/]+/exclusions/[^/]+$",
5667	//       "required": true,
5668	//       "type": "string"
5669	//     },
5670	//     "updateMask": {
5671	//       "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\".",
5672	//       "format": "google-fieldmask",
5673	//       "location": "query",
5674	//       "type": "string"
5675	//     }
5676	//   },
5677	//   "path": "v2/{+name}",
5678	//   "request": {
5679	//     "$ref": "LogExclusion"
5680	//   },
5681	//   "response": {
5682	//     "$ref": "LogExclusion"
5683	//   },
5684	//   "scopes": [
5685	//     "https://www.googleapis.com/auth/cloud-platform",
5686	//     "https://www.googleapis.com/auth/logging.admin"
5687	//   ]
5688	// }
5689
5690}
5691
5692// method id "logging.folders.exclusions.create":
5693
5694type FoldersExclusionsCreateCall struct {
5695	s            *Service
5696	parent       string
5697	logexclusion *LogExclusion
5698	urlParams_   gensupport.URLParams
5699	ctx_         context.Context
5700	header_      http.Header
5701}
5702
5703// Create: Creates a new exclusion in a specified parent resource. Only
5704// log entries belonging to that resource can be excluded. You can have
5705// up to 10 exclusions in a resource.
5706func (r *FoldersExclusionsService) Create(parent string, logexclusion *LogExclusion) *FoldersExclusionsCreateCall {
5707	c := &FoldersExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5708	c.parent = parent
5709	c.logexclusion = logexclusion
5710	return c
5711}
5712
5713// Fields allows partial responses to be retrieved. See
5714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5715// for more information.
5716func (c *FoldersExclusionsCreateCall) Fields(s ...googleapi.Field) *FoldersExclusionsCreateCall {
5717	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5718	return c
5719}
5720
5721// Context sets the context to be used in this call's Do method. Any
5722// pending HTTP request will be aborted if the provided context is
5723// canceled.
5724func (c *FoldersExclusionsCreateCall) Context(ctx context.Context) *FoldersExclusionsCreateCall {
5725	c.ctx_ = ctx
5726	return c
5727}
5728
5729// Header returns an http.Header that can be modified by the caller to
5730// add HTTP headers to the request.
5731func (c *FoldersExclusionsCreateCall) Header() http.Header {
5732	if c.header_ == nil {
5733		c.header_ = make(http.Header)
5734	}
5735	return c.header_
5736}
5737
5738func (c *FoldersExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
5739	reqHeaders := make(http.Header)
5740	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5741	for k, v := range c.header_ {
5742		reqHeaders[k] = v
5743	}
5744	reqHeaders.Set("User-Agent", c.s.userAgent())
5745	var body io.Reader = nil
5746	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
5747	if err != nil {
5748		return nil, err
5749	}
5750	reqHeaders.Set("Content-Type", "application/json")
5751	c.urlParams_.Set("alt", alt)
5752	c.urlParams_.Set("prettyPrint", "false")
5753	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
5754	urls += "?" + c.urlParams_.Encode()
5755	req, err := http.NewRequest("POST", urls, body)
5756	if err != nil {
5757		return nil, err
5758	}
5759	req.Header = reqHeaders
5760	googleapi.Expand(req.URL, map[string]string{
5761		"parent": c.parent,
5762	})
5763	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5764}
5765
5766// Do executes the "logging.folders.exclusions.create" call.
5767// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
5768// status code is an error. Response headers are in either
5769// *LogExclusion.ServerResponse.Header or (if a response was returned at
5770// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5771// to check whether the returned error was because
5772// http.StatusNotModified was returned.
5773func (c *FoldersExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
5774	gensupport.SetOptions(c.urlParams_, opts...)
5775	res, err := c.doRequest("json")
5776	if res != nil && res.StatusCode == http.StatusNotModified {
5777		if res.Body != nil {
5778			res.Body.Close()
5779		}
5780		return nil, &googleapi.Error{
5781			Code:   res.StatusCode,
5782			Header: res.Header,
5783		}
5784	}
5785	if err != nil {
5786		return nil, err
5787	}
5788	defer googleapi.CloseBody(res)
5789	if err := googleapi.CheckResponse(res); err != nil {
5790		return nil, err
5791	}
5792	ret := &LogExclusion{
5793		ServerResponse: googleapi.ServerResponse{
5794			Header:         res.Header,
5795			HTTPStatusCode: res.StatusCode,
5796		},
5797	}
5798	target := &ret
5799	if err := gensupport.DecodeResponse(target, res); err != nil {
5800		return nil, err
5801	}
5802	return ret, nil
5803	// {
5804	//   "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.",
5805	//   "flatPath": "v2/folders/{foldersId}/exclusions",
5806	//   "httpMethod": "POST",
5807	//   "id": "logging.folders.exclusions.create",
5808	//   "parameterOrder": [
5809	//     "parent"
5810	//   ],
5811	//   "parameters": {
5812	//     "parent": {
5813	//       "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
5814	//       "location": "path",
5815	//       "pattern": "^folders/[^/]+$",
5816	//       "required": true,
5817	//       "type": "string"
5818	//     }
5819	//   },
5820	//   "path": "v2/{+parent}/exclusions",
5821	//   "request": {
5822	//     "$ref": "LogExclusion"
5823	//   },
5824	//   "response": {
5825	//     "$ref": "LogExclusion"
5826	//   },
5827	//   "scopes": [
5828	//     "https://www.googleapis.com/auth/cloud-platform",
5829	//     "https://www.googleapis.com/auth/logging.admin"
5830	//   ]
5831	// }
5832
5833}
5834
5835// method id "logging.folders.exclusions.delete":
5836
5837type FoldersExclusionsDeleteCall struct {
5838	s          *Service
5839	name       string
5840	urlParams_ gensupport.URLParams
5841	ctx_       context.Context
5842	header_    http.Header
5843}
5844
5845// Delete: Deletes an exclusion.
5846func (r *FoldersExclusionsService) Delete(name string) *FoldersExclusionsDeleteCall {
5847	c := &FoldersExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5848	c.name = name
5849	return c
5850}
5851
5852// Fields allows partial responses to be retrieved. See
5853// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5854// for more information.
5855func (c *FoldersExclusionsDeleteCall) Fields(s ...googleapi.Field) *FoldersExclusionsDeleteCall {
5856	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5857	return c
5858}
5859
5860// Context sets the context to be used in this call's Do method. Any
5861// pending HTTP request will be aborted if the provided context is
5862// canceled.
5863func (c *FoldersExclusionsDeleteCall) Context(ctx context.Context) *FoldersExclusionsDeleteCall {
5864	c.ctx_ = ctx
5865	return c
5866}
5867
5868// Header returns an http.Header that can be modified by the caller to
5869// add HTTP headers to the request.
5870func (c *FoldersExclusionsDeleteCall) Header() http.Header {
5871	if c.header_ == nil {
5872		c.header_ = make(http.Header)
5873	}
5874	return c.header_
5875}
5876
5877func (c *FoldersExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
5878	reqHeaders := make(http.Header)
5879	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5880	for k, v := range c.header_ {
5881		reqHeaders[k] = v
5882	}
5883	reqHeaders.Set("User-Agent", c.s.userAgent())
5884	var body io.Reader = nil
5885	c.urlParams_.Set("alt", alt)
5886	c.urlParams_.Set("prettyPrint", "false")
5887	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5888	urls += "?" + c.urlParams_.Encode()
5889	req, err := http.NewRequest("DELETE", urls, body)
5890	if err != nil {
5891		return nil, err
5892	}
5893	req.Header = reqHeaders
5894	googleapi.Expand(req.URL, map[string]string{
5895		"name": c.name,
5896	})
5897	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5898}
5899
5900// Do executes the "logging.folders.exclusions.delete" call.
5901// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5902// code is an error. Response headers are in either
5903// *Empty.ServerResponse.Header or (if a response was returned at all)
5904// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5905// check whether the returned error was because http.StatusNotModified
5906// was returned.
5907func (c *FoldersExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5908	gensupport.SetOptions(c.urlParams_, opts...)
5909	res, err := c.doRequest("json")
5910	if res != nil && res.StatusCode == http.StatusNotModified {
5911		if res.Body != nil {
5912			res.Body.Close()
5913		}
5914		return nil, &googleapi.Error{
5915			Code:   res.StatusCode,
5916			Header: res.Header,
5917		}
5918	}
5919	if err != nil {
5920		return nil, err
5921	}
5922	defer googleapi.CloseBody(res)
5923	if err := googleapi.CheckResponse(res); err != nil {
5924		return nil, err
5925	}
5926	ret := &Empty{
5927		ServerResponse: googleapi.ServerResponse{
5928			Header:         res.Header,
5929			HTTPStatusCode: res.StatusCode,
5930		},
5931	}
5932	target := &ret
5933	if err := gensupport.DecodeResponse(target, res); err != nil {
5934		return nil, err
5935	}
5936	return ret, nil
5937	// {
5938	//   "description": "Deletes an exclusion.",
5939	//   "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}",
5940	//   "httpMethod": "DELETE",
5941	//   "id": "logging.folders.exclusions.delete",
5942	//   "parameterOrder": [
5943	//     "name"
5944	//   ],
5945	//   "parameters": {
5946	//     "name": {
5947	//       "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
5948	//       "location": "path",
5949	//       "pattern": "^folders/[^/]+/exclusions/[^/]+$",
5950	//       "required": true,
5951	//       "type": "string"
5952	//     }
5953	//   },
5954	//   "path": "v2/{+name}",
5955	//   "response": {
5956	//     "$ref": "Empty"
5957	//   },
5958	//   "scopes": [
5959	//     "https://www.googleapis.com/auth/cloud-platform",
5960	//     "https://www.googleapis.com/auth/logging.admin"
5961	//   ]
5962	// }
5963
5964}
5965
5966// method id "logging.folders.exclusions.get":
5967
5968type FoldersExclusionsGetCall struct {
5969	s            *Service
5970	name         string
5971	urlParams_   gensupport.URLParams
5972	ifNoneMatch_ string
5973	ctx_         context.Context
5974	header_      http.Header
5975}
5976
5977// Get: Gets the description of an exclusion.
5978func (r *FoldersExclusionsService) Get(name string) *FoldersExclusionsGetCall {
5979	c := &FoldersExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5980	c.name = name
5981	return c
5982}
5983
5984// Fields allows partial responses to be retrieved. See
5985// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5986// for more information.
5987func (c *FoldersExclusionsGetCall) Fields(s ...googleapi.Field) *FoldersExclusionsGetCall {
5988	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5989	return c
5990}
5991
5992// IfNoneMatch sets the optional parameter which makes the operation
5993// fail if the object's ETag matches the given value. This is useful for
5994// getting updates only after the object has changed since the last
5995// request. Use googleapi.IsNotModified to check whether the response
5996// error from Do is the result of In-None-Match.
5997func (c *FoldersExclusionsGetCall) IfNoneMatch(entityTag string) *FoldersExclusionsGetCall {
5998	c.ifNoneMatch_ = entityTag
5999	return c
6000}
6001
6002// Context sets the context to be used in this call's Do method. Any
6003// pending HTTP request will be aborted if the provided context is
6004// canceled.
6005func (c *FoldersExclusionsGetCall) Context(ctx context.Context) *FoldersExclusionsGetCall {
6006	c.ctx_ = ctx
6007	return c
6008}
6009
6010// Header returns an http.Header that can be modified by the caller to
6011// add HTTP headers to the request.
6012func (c *FoldersExclusionsGetCall) Header() http.Header {
6013	if c.header_ == nil {
6014		c.header_ = make(http.Header)
6015	}
6016	return c.header_
6017}
6018
6019func (c *FoldersExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
6020	reqHeaders := make(http.Header)
6021	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6022	for k, v := range c.header_ {
6023		reqHeaders[k] = v
6024	}
6025	reqHeaders.Set("User-Agent", c.s.userAgent())
6026	if c.ifNoneMatch_ != "" {
6027		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6028	}
6029	var body io.Reader = nil
6030	c.urlParams_.Set("alt", alt)
6031	c.urlParams_.Set("prettyPrint", "false")
6032	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6033	urls += "?" + c.urlParams_.Encode()
6034	req, err := http.NewRequest("GET", urls, body)
6035	if err != nil {
6036		return nil, err
6037	}
6038	req.Header = reqHeaders
6039	googleapi.Expand(req.URL, map[string]string{
6040		"name": c.name,
6041	})
6042	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6043}
6044
6045// Do executes the "logging.folders.exclusions.get" call.
6046// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
6047// status code is an error. Response headers are in either
6048// *LogExclusion.ServerResponse.Header or (if a response was returned at
6049// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6050// to check whether the returned error was because
6051// http.StatusNotModified was returned.
6052func (c *FoldersExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
6053	gensupport.SetOptions(c.urlParams_, opts...)
6054	res, err := c.doRequest("json")
6055	if res != nil && res.StatusCode == http.StatusNotModified {
6056		if res.Body != nil {
6057			res.Body.Close()
6058		}
6059		return nil, &googleapi.Error{
6060			Code:   res.StatusCode,
6061			Header: res.Header,
6062		}
6063	}
6064	if err != nil {
6065		return nil, err
6066	}
6067	defer googleapi.CloseBody(res)
6068	if err := googleapi.CheckResponse(res); err != nil {
6069		return nil, err
6070	}
6071	ret := &LogExclusion{
6072		ServerResponse: googleapi.ServerResponse{
6073			Header:         res.Header,
6074			HTTPStatusCode: res.StatusCode,
6075		},
6076	}
6077	target := &ret
6078	if err := gensupport.DecodeResponse(target, res); err != nil {
6079		return nil, err
6080	}
6081	return ret, nil
6082	// {
6083	//   "description": "Gets the description of an exclusion.",
6084	//   "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}",
6085	//   "httpMethod": "GET",
6086	//   "id": "logging.folders.exclusions.get",
6087	//   "parameterOrder": [
6088	//     "name"
6089	//   ],
6090	//   "parameters": {
6091	//     "name": {
6092	//       "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
6093	//       "location": "path",
6094	//       "pattern": "^folders/[^/]+/exclusions/[^/]+$",
6095	//       "required": true,
6096	//       "type": "string"
6097	//     }
6098	//   },
6099	//   "path": "v2/{+name}",
6100	//   "response": {
6101	//     "$ref": "LogExclusion"
6102	//   },
6103	//   "scopes": [
6104	//     "https://www.googleapis.com/auth/cloud-platform",
6105	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
6106	//     "https://www.googleapis.com/auth/logging.admin",
6107	//     "https://www.googleapis.com/auth/logging.read"
6108	//   ]
6109	// }
6110
6111}
6112
6113// method id "logging.folders.exclusions.list":
6114
6115type FoldersExclusionsListCall struct {
6116	s            *Service
6117	parent       string
6118	urlParams_   gensupport.URLParams
6119	ifNoneMatch_ string
6120	ctx_         context.Context
6121	header_      http.Header
6122}
6123
6124// List: Lists all the exclusions in a parent resource.
6125func (r *FoldersExclusionsService) List(parent string) *FoldersExclusionsListCall {
6126	c := &FoldersExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6127	c.parent = parent
6128	return c
6129}
6130
6131// PageSize sets the optional parameter "pageSize": The maximum number
6132// of results to return from this request. Non-positive values are
6133// ignored. The presence of nextPageToken in the response indicates that
6134// more results might be available.
6135func (c *FoldersExclusionsListCall) PageSize(pageSize int64) *FoldersExclusionsListCall {
6136	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6137	return c
6138}
6139
6140// PageToken sets the optional parameter "pageToken": If present, then
6141// retrieve the next batch of results from the preceding call to this
6142// method. pageToken must be the value of nextPageToken from the
6143// previous response. The values of other method parameters should be
6144// identical to those in the previous call.
6145func (c *FoldersExclusionsListCall) PageToken(pageToken string) *FoldersExclusionsListCall {
6146	c.urlParams_.Set("pageToken", pageToken)
6147	return c
6148}
6149
6150// Fields allows partial responses to be retrieved. See
6151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6152// for more information.
6153func (c *FoldersExclusionsListCall) Fields(s ...googleapi.Field) *FoldersExclusionsListCall {
6154	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6155	return c
6156}
6157
6158// IfNoneMatch sets the optional parameter which makes the operation
6159// fail if the object's ETag matches the given value. This is useful for
6160// getting updates only after the object has changed since the last
6161// request. Use googleapi.IsNotModified to check whether the response
6162// error from Do is the result of In-None-Match.
6163func (c *FoldersExclusionsListCall) IfNoneMatch(entityTag string) *FoldersExclusionsListCall {
6164	c.ifNoneMatch_ = entityTag
6165	return c
6166}
6167
6168// Context sets the context to be used in this call's Do method. Any
6169// pending HTTP request will be aborted if the provided context is
6170// canceled.
6171func (c *FoldersExclusionsListCall) Context(ctx context.Context) *FoldersExclusionsListCall {
6172	c.ctx_ = ctx
6173	return c
6174}
6175
6176// Header returns an http.Header that can be modified by the caller to
6177// add HTTP headers to the request.
6178func (c *FoldersExclusionsListCall) Header() http.Header {
6179	if c.header_ == nil {
6180		c.header_ = make(http.Header)
6181	}
6182	return c.header_
6183}
6184
6185func (c *FoldersExclusionsListCall) doRequest(alt string) (*http.Response, error) {
6186	reqHeaders := make(http.Header)
6187	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6188	for k, v := range c.header_ {
6189		reqHeaders[k] = v
6190	}
6191	reqHeaders.Set("User-Agent", c.s.userAgent())
6192	if c.ifNoneMatch_ != "" {
6193		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6194	}
6195	var body io.Reader = nil
6196	c.urlParams_.Set("alt", alt)
6197	c.urlParams_.Set("prettyPrint", "false")
6198	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
6199	urls += "?" + c.urlParams_.Encode()
6200	req, err := http.NewRequest("GET", urls, body)
6201	if err != nil {
6202		return nil, err
6203	}
6204	req.Header = reqHeaders
6205	googleapi.Expand(req.URL, map[string]string{
6206		"parent": c.parent,
6207	})
6208	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6209}
6210
6211// Do executes the "logging.folders.exclusions.list" call.
6212// Exactly one of *ListExclusionsResponse or error will be non-nil. Any
6213// non-2xx status code is an error. Response headers are in either
6214// *ListExclusionsResponse.ServerResponse.Header or (if a response was
6215// returned at all) in error.(*googleapi.Error).Header. Use
6216// googleapi.IsNotModified to check whether the returned error was
6217// because http.StatusNotModified was returned.
6218func (c *FoldersExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
6219	gensupport.SetOptions(c.urlParams_, opts...)
6220	res, err := c.doRequest("json")
6221	if res != nil && res.StatusCode == http.StatusNotModified {
6222		if res.Body != nil {
6223			res.Body.Close()
6224		}
6225		return nil, &googleapi.Error{
6226			Code:   res.StatusCode,
6227			Header: res.Header,
6228		}
6229	}
6230	if err != nil {
6231		return nil, err
6232	}
6233	defer googleapi.CloseBody(res)
6234	if err := googleapi.CheckResponse(res); err != nil {
6235		return nil, err
6236	}
6237	ret := &ListExclusionsResponse{
6238		ServerResponse: googleapi.ServerResponse{
6239			Header:         res.Header,
6240			HTTPStatusCode: res.StatusCode,
6241		},
6242	}
6243	target := &ret
6244	if err := gensupport.DecodeResponse(target, res); err != nil {
6245		return nil, err
6246	}
6247	return ret, nil
6248	// {
6249	//   "description": "Lists all the exclusions in a parent resource.",
6250	//   "flatPath": "v2/folders/{foldersId}/exclusions",
6251	//   "httpMethod": "GET",
6252	//   "id": "logging.folders.exclusions.list",
6253	//   "parameterOrder": [
6254	//     "parent"
6255	//   ],
6256	//   "parameters": {
6257	//     "pageSize": {
6258	//       "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.",
6259	//       "format": "int32",
6260	//       "location": "query",
6261	//       "type": "integer"
6262	//     },
6263	//     "pageToken": {
6264	//       "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.",
6265	//       "location": "query",
6266	//       "type": "string"
6267	//     },
6268	//     "parent": {
6269	//       "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
6270	//       "location": "path",
6271	//       "pattern": "^folders/[^/]+$",
6272	//       "required": true,
6273	//       "type": "string"
6274	//     }
6275	//   },
6276	//   "path": "v2/{+parent}/exclusions",
6277	//   "response": {
6278	//     "$ref": "ListExclusionsResponse"
6279	//   },
6280	//   "scopes": [
6281	//     "https://www.googleapis.com/auth/cloud-platform",
6282	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
6283	//     "https://www.googleapis.com/auth/logging.admin",
6284	//     "https://www.googleapis.com/auth/logging.read"
6285	//   ]
6286	// }
6287
6288}
6289
6290// Pages invokes f for each page of results.
6291// A non-nil error returned from f will halt the iteration.
6292// The provided context supersedes any context provided to the Context method.
6293func (c *FoldersExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
6294	c.ctx_ = ctx
6295	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6296	for {
6297		x, err := c.Do()
6298		if err != nil {
6299			return err
6300		}
6301		if err := f(x); err != nil {
6302			return err
6303		}
6304		if x.NextPageToken == "" {
6305			return nil
6306		}
6307		c.PageToken(x.NextPageToken)
6308	}
6309}
6310
6311// method id "logging.folders.exclusions.patch":
6312
6313type FoldersExclusionsPatchCall struct {
6314	s            *Service
6315	name         string
6316	logexclusion *LogExclusion
6317	urlParams_   gensupport.URLParams
6318	ctx_         context.Context
6319	header_      http.Header
6320}
6321
6322// Patch: Changes one or more properties of an existing exclusion.
6323func (r *FoldersExclusionsService) Patch(name string, logexclusion *LogExclusion) *FoldersExclusionsPatchCall {
6324	c := &FoldersExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6325	c.name = name
6326	c.logexclusion = logexclusion
6327	return c
6328}
6329
6330// UpdateMask sets the optional parameter "updateMask": Required. A
6331// non-empty list of fields to change in the existing exclusion. New
6332// values for the fields are taken from the corresponding fields in the
6333// LogExclusion included in this request. Fields not mentioned in
6334// update_mask are not changed and are ignored in the request.For
6335// example, to change the filter and description of an exclusion,
6336// specify an update_mask of "filter,description".
6337func (c *FoldersExclusionsPatchCall) UpdateMask(updateMask string) *FoldersExclusionsPatchCall {
6338	c.urlParams_.Set("updateMask", updateMask)
6339	return c
6340}
6341
6342// Fields allows partial responses to be retrieved. See
6343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6344// for more information.
6345func (c *FoldersExclusionsPatchCall) Fields(s ...googleapi.Field) *FoldersExclusionsPatchCall {
6346	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6347	return c
6348}
6349
6350// Context sets the context to be used in this call's Do method. Any
6351// pending HTTP request will be aborted if the provided context is
6352// canceled.
6353func (c *FoldersExclusionsPatchCall) Context(ctx context.Context) *FoldersExclusionsPatchCall {
6354	c.ctx_ = ctx
6355	return c
6356}
6357
6358// Header returns an http.Header that can be modified by the caller to
6359// add HTTP headers to the request.
6360func (c *FoldersExclusionsPatchCall) Header() http.Header {
6361	if c.header_ == nil {
6362		c.header_ = make(http.Header)
6363	}
6364	return c.header_
6365}
6366
6367func (c *FoldersExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
6368	reqHeaders := make(http.Header)
6369	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6370	for k, v := range c.header_ {
6371		reqHeaders[k] = v
6372	}
6373	reqHeaders.Set("User-Agent", c.s.userAgent())
6374	var body io.Reader = nil
6375	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
6376	if err != nil {
6377		return nil, err
6378	}
6379	reqHeaders.Set("Content-Type", "application/json")
6380	c.urlParams_.Set("alt", alt)
6381	c.urlParams_.Set("prettyPrint", "false")
6382	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6383	urls += "?" + c.urlParams_.Encode()
6384	req, err := http.NewRequest("PATCH", urls, body)
6385	if err != nil {
6386		return nil, err
6387	}
6388	req.Header = reqHeaders
6389	googleapi.Expand(req.URL, map[string]string{
6390		"name": c.name,
6391	})
6392	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6393}
6394
6395// Do executes the "logging.folders.exclusions.patch" call.
6396// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
6397// status code is an error. Response headers are in either
6398// *LogExclusion.ServerResponse.Header or (if a response was returned at
6399// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6400// to check whether the returned error was because
6401// http.StatusNotModified was returned.
6402func (c *FoldersExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
6403	gensupport.SetOptions(c.urlParams_, opts...)
6404	res, err := c.doRequest("json")
6405	if res != nil && res.StatusCode == http.StatusNotModified {
6406		if res.Body != nil {
6407			res.Body.Close()
6408		}
6409		return nil, &googleapi.Error{
6410			Code:   res.StatusCode,
6411			Header: res.Header,
6412		}
6413	}
6414	if err != nil {
6415		return nil, err
6416	}
6417	defer googleapi.CloseBody(res)
6418	if err := googleapi.CheckResponse(res); err != nil {
6419		return nil, err
6420	}
6421	ret := &LogExclusion{
6422		ServerResponse: googleapi.ServerResponse{
6423			Header:         res.Header,
6424			HTTPStatusCode: res.StatusCode,
6425		},
6426	}
6427	target := &ret
6428	if err := gensupport.DecodeResponse(target, res); err != nil {
6429		return nil, err
6430	}
6431	return ret, nil
6432	// {
6433	//   "description": "Changes one or more properties of an existing exclusion.",
6434	//   "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}",
6435	//   "httpMethod": "PATCH",
6436	//   "id": "logging.folders.exclusions.patch",
6437	//   "parameterOrder": [
6438	//     "name"
6439	//   ],
6440	//   "parameters": {
6441	//     "name": {
6442	//       "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
6443	//       "location": "path",
6444	//       "pattern": "^folders/[^/]+/exclusions/[^/]+$",
6445	//       "required": true,
6446	//       "type": "string"
6447	//     },
6448	//     "updateMask": {
6449	//       "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\".",
6450	//       "format": "google-fieldmask",
6451	//       "location": "query",
6452	//       "type": "string"
6453	//     }
6454	//   },
6455	//   "path": "v2/{+name}",
6456	//   "request": {
6457	//     "$ref": "LogExclusion"
6458	//   },
6459	//   "response": {
6460	//     "$ref": "LogExclusion"
6461	//   },
6462	//   "scopes": [
6463	//     "https://www.googleapis.com/auth/cloud-platform",
6464	//     "https://www.googleapis.com/auth/logging.admin"
6465	//   ]
6466	// }
6467
6468}
6469
6470// method id "logging.folders.logs.delete":
6471
6472type FoldersLogsDeleteCall struct {
6473	s          *Service
6474	logName    string
6475	urlParams_ gensupport.URLParams
6476	ctx_       context.Context
6477	header_    http.Header
6478}
6479
6480// Delete: Deletes all the log entries in a log. The log reappears if it
6481// receives new entries. Log entries written shortly before the delete
6482// operation might not be deleted. Entries received after the delete
6483// operation with a timestamp before the operation will be deleted.
6484func (r *FoldersLogsService) Delete(logName string) *FoldersLogsDeleteCall {
6485	c := &FoldersLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6486	c.logName = logName
6487	return c
6488}
6489
6490// Fields allows partial responses to be retrieved. See
6491// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6492// for more information.
6493func (c *FoldersLogsDeleteCall) Fields(s ...googleapi.Field) *FoldersLogsDeleteCall {
6494	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6495	return c
6496}
6497
6498// Context sets the context to be used in this call's Do method. Any
6499// pending HTTP request will be aborted if the provided context is
6500// canceled.
6501func (c *FoldersLogsDeleteCall) Context(ctx context.Context) *FoldersLogsDeleteCall {
6502	c.ctx_ = ctx
6503	return c
6504}
6505
6506// Header returns an http.Header that can be modified by the caller to
6507// add HTTP headers to the request.
6508func (c *FoldersLogsDeleteCall) Header() http.Header {
6509	if c.header_ == nil {
6510		c.header_ = make(http.Header)
6511	}
6512	return c.header_
6513}
6514
6515func (c *FoldersLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
6516	reqHeaders := make(http.Header)
6517	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6518	for k, v := range c.header_ {
6519		reqHeaders[k] = v
6520	}
6521	reqHeaders.Set("User-Agent", c.s.userAgent())
6522	var body io.Reader = nil
6523	c.urlParams_.Set("alt", alt)
6524	c.urlParams_.Set("prettyPrint", "false")
6525	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
6526	urls += "?" + c.urlParams_.Encode()
6527	req, err := http.NewRequest("DELETE", urls, body)
6528	if err != nil {
6529		return nil, err
6530	}
6531	req.Header = reqHeaders
6532	googleapi.Expand(req.URL, map[string]string{
6533		"logName": c.logName,
6534	})
6535	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6536}
6537
6538// Do executes the "logging.folders.logs.delete" call.
6539// Exactly one of *Empty or error will be non-nil. Any non-2xx status
6540// code is an error. Response headers are in either
6541// *Empty.ServerResponse.Header or (if a response was returned at all)
6542// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6543// check whether the returned error was because http.StatusNotModified
6544// was returned.
6545func (c *FoldersLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6546	gensupport.SetOptions(c.urlParams_, opts...)
6547	res, err := c.doRequest("json")
6548	if res != nil && res.StatusCode == http.StatusNotModified {
6549		if res.Body != nil {
6550			res.Body.Close()
6551		}
6552		return nil, &googleapi.Error{
6553			Code:   res.StatusCode,
6554			Header: res.Header,
6555		}
6556	}
6557	if err != nil {
6558		return nil, err
6559	}
6560	defer googleapi.CloseBody(res)
6561	if err := googleapi.CheckResponse(res); err != nil {
6562		return nil, err
6563	}
6564	ret := &Empty{
6565		ServerResponse: googleapi.ServerResponse{
6566			Header:         res.Header,
6567			HTTPStatusCode: res.StatusCode,
6568		},
6569	}
6570	target := &ret
6571	if err := gensupport.DecodeResponse(target, res); err != nil {
6572		return nil, err
6573	}
6574	return ret, nil
6575	// {
6576	//   "description": "Deletes all the log entries in a log. 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.",
6577	//   "flatPath": "v2/folders/{foldersId}/logs/{logsId}",
6578	//   "httpMethod": "DELETE",
6579	//   "id": "logging.folders.logs.delete",
6580	//   "parameterOrder": [
6581	//     "logName"
6582	//   ],
6583	//   "parameters": {
6584	//     "logName": {
6585	//       "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.",
6586	//       "location": "path",
6587	//       "pattern": "^folders/[^/]+/logs/[^/]+$",
6588	//       "required": true,
6589	//       "type": "string"
6590	//     }
6591	//   },
6592	//   "path": "v2/{+logName}",
6593	//   "response": {
6594	//     "$ref": "Empty"
6595	//   },
6596	//   "scopes": [
6597	//     "https://www.googleapis.com/auth/cloud-platform",
6598	//     "https://www.googleapis.com/auth/logging.admin"
6599	//   ]
6600	// }
6601
6602}
6603
6604// method id "logging.folders.logs.list":
6605
6606type FoldersLogsListCall struct {
6607	s            *Service
6608	parent       string
6609	urlParams_   gensupport.URLParams
6610	ifNoneMatch_ string
6611	ctx_         context.Context
6612	header_      http.Header
6613}
6614
6615// List: Lists the logs in projects, organizations, folders, or billing
6616// accounts. Only logs that have entries are listed.
6617func (r *FoldersLogsService) List(parent string) *FoldersLogsListCall {
6618	c := &FoldersLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6619	c.parent = parent
6620	return c
6621}
6622
6623// PageSize sets the optional parameter "pageSize": The maximum number
6624// of results to return from this request. Non-positive values are
6625// ignored. The presence of nextPageToken in the response indicates that
6626// more results might be available.
6627func (c *FoldersLogsListCall) PageSize(pageSize int64) *FoldersLogsListCall {
6628	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6629	return c
6630}
6631
6632// PageToken sets the optional parameter "pageToken": If present, then
6633// retrieve the next batch of results from the preceding call to this
6634// method. pageToken must be the value of nextPageToken from the
6635// previous response. The values of other method parameters should be
6636// identical to those in the previous call.
6637func (c *FoldersLogsListCall) PageToken(pageToken string) *FoldersLogsListCall {
6638	c.urlParams_.Set("pageToken", pageToken)
6639	return c
6640}
6641
6642// Fields allows partial responses to be retrieved. See
6643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6644// for more information.
6645func (c *FoldersLogsListCall) Fields(s ...googleapi.Field) *FoldersLogsListCall {
6646	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6647	return c
6648}
6649
6650// IfNoneMatch sets the optional parameter which makes the operation
6651// fail if the object's ETag matches the given value. This is useful for
6652// getting updates only after the object has changed since the last
6653// request. Use googleapi.IsNotModified to check whether the response
6654// error from Do is the result of In-None-Match.
6655func (c *FoldersLogsListCall) IfNoneMatch(entityTag string) *FoldersLogsListCall {
6656	c.ifNoneMatch_ = entityTag
6657	return c
6658}
6659
6660// Context sets the context to be used in this call's Do method. Any
6661// pending HTTP request will be aborted if the provided context is
6662// canceled.
6663func (c *FoldersLogsListCall) Context(ctx context.Context) *FoldersLogsListCall {
6664	c.ctx_ = ctx
6665	return c
6666}
6667
6668// Header returns an http.Header that can be modified by the caller to
6669// add HTTP headers to the request.
6670func (c *FoldersLogsListCall) Header() http.Header {
6671	if c.header_ == nil {
6672		c.header_ = make(http.Header)
6673	}
6674	return c.header_
6675}
6676
6677func (c *FoldersLogsListCall) doRequest(alt string) (*http.Response, error) {
6678	reqHeaders := make(http.Header)
6679	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6680	for k, v := range c.header_ {
6681		reqHeaders[k] = v
6682	}
6683	reqHeaders.Set("User-Agent", c.s.userAgent())
6684	if c.ifNoneMatch_ != "" {
6685		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6686	}
6687	var body io.Reader = nil
6688	c.urlParams_.Set("alt", alt)
6689	c.urlParams_.Set("prettyPrint", "false")
6690	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
6691	urls += "?" + c.urlParams_.Encode()
6692	req, err := http.NewRequest("GET", urls, body)
6693	if err != nil {
6694		return nil, err
6695	}
6696	req.Header = reqHeaders
6697	googleapi.Expand(req.URL, map[string]string{
6698		"parent": c.parent,
6699	})
6700	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6701}
6702
6703// Do executes the "logging.folders.logs.list" call.
6704// Exactly one of *ListLogsResponse or error will be non-nil. Any
6705// non-2xx status code is an error. Response headers are in either
6706// *ListLogsResponse.ServerResponse.Header or (if a response was
6707// returned at all) in error.(*googleapi.Error).Header. Use
6708// googleapi.IsNotModified to check whether the returned error was
6709// because http.StatusNotModified was returned.
6710func (c *FoldersLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
6711	gensupport.SetOptions(c.urlParams_, opts...)
6712	res, err := c.doRequest("json")
6713	if res != nil && res.StatusCode == http.StatusNotModified {
6714		if res.Body != nil {
6715			res.Body.Close()
6716		}
6717		return nil, &googleapi.Error{
6718			Code:   res.StatusCode,
6719			Header: res.Header,
6720		}
6721	}
6722	if err != nil {
6723		return nil, err
6724	}
6725	defer googleapi.CloseBody(res)
6726	if err := googleapi.CheckResponse(res); err != nil {
6727		return nil, err
6728	}
6729	ret := &ListLogsResponse{
6730		ServerResponse: googleapi.ServerResponse{
6731			Header:         res.Header,
6732			HTTPStatusCode: res.StatusCode,
6733		},
6734	}
6735	target := &ret
6736	if err := gensupport.DecodeResponse(target, res); err != nil {
6737		return nil, err
6738	}
6739	return ret, nil
6740	// {
6741	//   "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.",
6742	//   "flatPath": "v2/folders/{foldersId}/logs",
6743	//   "httpMethod": "GET",
6744	//   "id": "logging.folders.logs.list",
6745	//   "parameterOrder": [
6746	//     "parent"
6747	//   ],
6748	//   "parameters": {
6749	//     "pageSize": {
6750	//       "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.",
6751	//       "format": "int32",
6752	//       "location": "query",
6753	//       "type": "integer"
6754	//     },
6755	//     "pageToken": {
6756	//       "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.",
6757	//       "location": "query",
6758	//       "type": "string"
6759	//     },
6760	//     "parent": {
6761	//       "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
6762	//       "location": "path",
6763	//       "pattern": "^folders/[^/]+$",
6764	//       "required": true,
6765	//       "type": "string"
6766	//     }
6767	//   },
6768	//   "path": "v2/{+parent}/logs",
6769	//   "response": {
6770	//     "$ref": "ListLogsResponse"
6771	//   },
6772	//   "scopes": [
6773	//     "https://www.googleapis.com/auth/cloud-platform",
6774	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
6775	//     "https://www.googleapis.com/auth/logging.admin",
6776	//     "https://www.googleapis.com/auth/logging.read"
6777	//   ]
6778	// }
6779
6780}
6781
6782// Pages invokes f for each page of results.
6783// A non-nil error returned from f will halt the iteration.
6784// The provided context supersedes any context provided to the Context method.
6785func (c *FoldersLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
6786	c.ctx_ = ctx
6787	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6788	for {
6789		x, err := c.Do()
6790		if err != nil {
6791			return err
6792		}
6793		if err := f(x); err != nil {
6794			return err
6795		}
6796		if x.NextPageToken == "" {
6797			return nil
6798		}
6799		c.PageToken(x.NextPageToken)
6800	}
6801}
6802
6803// method id "logging.folders.sinks.create":
6804
6805type FoldersSinksCreateCall struct {
6806	s          *Service
6807	parent     string
6808	logsink    *LogSink
6809	urlParams_ gensupport.URLParams
6810	ctx_       context.Context
6811	header_    http.Header
6812}
6813
6814// Create: Creates a sink that exports specified log entries to a
6815// destination. The export of newly-ingested log entries begins
6816// immediately, unless the sink's writer_identity is not permitted to
6817// write to the destination. A sink can export log entries only from the
6818// resource owning the sink.
6819func (r *FoldersSinksService) Create(parent string, logsink *LogSink) *FoldersSinksCreateCall {
6820	c := &FoldersSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6821	c.parent = parent
6822	c.logsink = logsink
6823	return c
6824}
6825
6826// UniqueWriterIdentity sets the optional parameter
6827// "uniqueWriterIdentity": Determines the kind of IAM identity returned
6828// as writer_identity in the new sink. If this value is omitted or set
6829// to false, and if the sink's parent is a project, then the value
6830// returned as writer_identity is the same group or service account used
6831// by Logging before the addition of writer identities to this API. The
6832// sink's destination must be in the same project as the sink itself.If
6833// this field is set to true, or if the sink is owned by a non-project
6834// resource such as an organization, then the value of writer_identity
6835// will be a unique service account used only for exports from the new
6836// sink. For more information, see writer_identity in LogSink.
6837func (c *FoldersSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksCreateCall {
6838	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
6839	return c
6840}
6841
6842// Fields allows partial responses to be retrieved. See
6843// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6844// for more information.
6845func (c *FoldersSinksCreateCall) Fields(s ...googleapi.Field) *FoldersSinksCreateCall {
6846	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6847	return c
6848}
6849
6850// Context sets the context to be used in this call's Do method. Any
6851// pending HTTP request will be aborted if the provided context is
6852// canceled.
6853func (c *FoldersSinksCreateCall) Context(ctx context.Context) *FoldersSinksCreateCall {
6854	c.ctx_ = ctx
6855	return c
6856}
6857
6858// Header returns an http.Header that can be modified by the caller to
6859// add HTTP headers to the request.
6860func (c *FoldersSinksCreateCall) Header() http.Header {
6861	if c.header_ == nil {
6862		c.header_ = make(http.Header)
6863	}
6864	return c.header_
6865}
6866
6867func (c *FoldersSinksCreateCall) doRequest(alt string) (*http.Response, error) {
6868	reqHeaders := make(http.Header)
6869	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6870	for k, v := range c.header_ {
6871		reqHeaders[k] = v
6872	}
6873	reqHeaders.Set("User-Agent", c.s.userAgent())
6874	var body io.Reader = nil
6875	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
6876	if err != nil {
6877		return nil, err
6878	}
6879	reqHeaders.Set("Content-Type", "application/json")
6880	c.urlParams_.Set("alt", alt)
6881	c.urlParams_.Set("prettyPrint", "false")
6882	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
6883	urls += "?" + c.urlParams_.Encode()
6884	req, err := http.NewRequest("POST", urls, body)
6885	if err != nil {
6886		return nil, err
6887	}
6888	req.Header = reqHeaders
6889	googleapi.Expand(req.URL, map[string]string{
6890		"parent": c.parent,
6891	})
6892	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6893}
6894
6895// Do executes the "logging.folders.sinks.create" call.
6896// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
6897// code is an error. Response headers are in either
6898// *LogSink.ServerResponse.Header or (if a response was returned at all)
6899// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6900// check whether the returned error was because http.StatusNotModified
6901// was returned.
6902func (c *FoldersSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
6903	gensupport.SetOptions(c.urlParams_, opts...)
6904	res, err := c.doRequest("json")
6905	if res != nil && res.StatusCode == http.StatusNotModified {
6906		if res.Body != nil {
6907			res.Body.Close()
6908		}
6909		return nil, &googleapi.Error{
6910			Code:   res.StatusCode,
6911			Header: res.Header,
6912		}
6913	}
6914	if err != nil {
6915		return nil, err
6916	}
6917	defer googleapi.CloseBody(res)
6918	if err := googleapi.CheckResponse(res); err != nil {
6919		return nil, err
6920	}
6921	ret := &LogSink{
6922		ServerResponse: googleapi.ServerResponse{
6923			Header:         res.Header,
6924			HTTPStatusCode: res.StatusCode,
6925		},
6926	}
6927	target := &ret
6928	if err := gensupport.DecodeResponse(target, res); err != nil {
6929		return nil, err
6930	}
6931	return ret, nil
6932	// {
6933	//   "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.",
6934	//   "flatPath": "v2/folders/{foldersId}/sinks",
6935	//   "httpMethod": "POST",
6936	//   "id": "logging.folders.sinks.create",
6937	//   "parameterOrder": [
6938	//     "parent"
6939	//   ],
6940	//   "parameters": {
6941	//     "parent": {
6942	//       "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
6943	//       "location": "path",
6944	//       "pattern": "^folders/[^/]+$",
6945	//       "required": true,
6946	//       "type": "string"
6947	//     },
6948	//     "uniqueWriterIdentity": {
6949	//       "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 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.",
6950	//       "location": "query",
6951	//       "type": "boolean"
6952	//     }
6953	//   },
6954	//   "path": "v2/{+parent}/sinks",
6955	//   "request": {
6956	//     "$ref": "LogSink"
6957	//   },
6958	//   "response": {
6959	//     "$ref": "LogSink"
6960	//   },
6961	//   "scopes": [
6962	//     "https://www.googleapis.com/auth/cloud-platform",
6963	//     "https://www.googleapis.com/auth/logging.admin"
6964	//   ]
6965	// }
6966
6967}
6968
6969// method id "logging.folders.sinks.delete":
6970
6971type FoldersSinksDeleteCall struct {
6972	s          *Service
6973	sinkNameid string
6974	urlParams_ gensupport.URLParams
6975	ctx_       context.Context
6976	header_    http.Header
6977}
6978
6979// Delete: Deletes a sink. If the sink has a unique writer_identity,
6980// then that service account is also deleted.
6981func (r *FoldersSinksService) Delete(sinkNameid string) *FoldersSinksDeleteCall {
6982	c := &FoldersSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6983	c.sinkNameid = sinkNameid
6984	return c
6985}
6986
6987// Fields allows partial responses to be retrieved. See
6988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6989// for more information.
6990func (c *FoldersSinksDeleteCall) Fields(s ...googleapi.Field) *FoldersSinksDeleteCall {
6991	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6992	return c
6993}
6994
6995// Context sets the context to be used in this call's Do method. Any
6996// pending HTTP request will be aborted if the provided context is
6997// canceled.
6998func (c *FoldersSinksDeleteCall) Context(ctx context.Context) *FoldersSinksDeleteCall {
6999	c.ctx_ = ctx
7000	return c
7001}
7002
7003// Header returns an http.Header that can be modified by the caller to
7004// add HTTP headers to the request.
7005func (c *FoldersSinksDeleteCall) Header() http.Header {
7006	if c.header_ == nil {
7007		c.header_ = make(http.Header)
7008	}
7009	return c.header_
7010}
7011
7012func (c *FoldersSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
7013	reqHeaders := make(http.Header)
7014	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7015	for k, v := range c.header_ {
7016		reqHeaders[k] = v
7017	}
7018	reqHeaders.Set("User-Agent", c.s.userAgent())
7019	var body io.Reader = nil
7020	c.urlParams_.Set("alt", alt)
7021	c.urlParams_.Set("prettyPrint", "false")
7022	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
7023	urls += "?" + c.urlParams_.Encode()
7024	req, err := http.NewRequest("DELETE", urls, body)
7025	if err != nil {
7026		return nil, err
7027	}
7028	req.Header = reqHeaders
7029	googleapi.Expand(req.URL, map[string]string{
7030		"sinkName": c.sinkNameid,
7031	})
7032	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7033}
7034
7035// Do executes the "logging.folders.sinks.delete" call.
7036// Exactly one of *Empty or error will be non-nil. Any non-2xx status
7037// code is an error. Response headers are in either
7038// *Empty.ServerResponse.Header or (if a response was returned at all)
7039// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7040// check whether the returned error was because http.StatusNotModified
7041// was returned.
7042func (c *FoldersSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7043	gensupport.SetOptions(c.urlParams_, opts...)
7044	res, err := c.doRequest("json")
7045	if res != nil && res.StatusCode == http.StatusNotModified {
7046		if res.Body != nil {
7047			res.Body.Close()
7048		}
7049		return nil, &googleapi.Error{
7050			Code:   res.StatusCode,
7051			Header: res.Header,
7052		}
7053	}
7054	if err != nil {
7055		return nil, err
7056	}
7057	defer googleapi.CloseBody(res)
7058	if err := googleapi.CheckResponse(res); err != nil {
7059		return nil, err
7060	}
7061	ret := &Empty{
7062		ServerResponse: googleapi.ServerResponse{
7063			Header:         res.Header,
7064			HTTPStatusCode: res.StatusCode,
7065		},
7066	}
7067	target := &ret
7068	if err := gensupport.DecodeResponse(target, res); err != nil {
7069		return nil, err
7070	}
7071	return ret, nil
7072	// {
7073	//   "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.",
7074	//   "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}",
7075	//   "httpMethod": "DELETE",
7076	//   "id": "logging.folders.sinks.delete",
7077	//   "parameterOrder": [
7078	//     "sinkName"
7079	//   ],
7080	//   "parameters": {
7081	//     "sinkName": {
7082	//       "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
7083	//       "location": "path",
7084	//       "pattern": "^folders/[^/]+/sinks/[^/]+$",
7085	//       "required": true,
7086	//       "type": "string"
7087	//     }
7088	//   },
7089	//   "path": "v2/{+sinkName}",
7090	//   "response": {
7091	//     "$ref": "Empty"
7092	//   },
7093	//   "scopes": [
7094	//     "https://www.googleapis.com/auth/cloud-platform",
7095	//     "https://www.googleapis.com/auth/logging.admin"
7096	//   ]
7097	// }
7098
7099}
7100
7101// method id "logging.folders.sinks.get":
7102
7103type FoldersSinksGetCall struct {
7104	s            *Service
7105	sinkName     string
7106	urlParams_   gensupport.URLParams
7107	ifNoneMatch_ string
7108	ctx_         context.Context
7109	header_      http.Header
7110}
7111
7112// Get: Gets a sink.
7113func (r *FoldersSinksService) Get(sinkName string) *FoldersSinksGetCall {
7114	c := &FoldersSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7115	c.sinkName = sinkName
7116	return c
7117}
7118
7119// Fields allows partial responses to be retrieved. See
7120// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7121// for more information.
7122func (c *FoldersSinksGetCall) Fields(s ...googleapi.Field) *FoldersSinksGetCall {
7123	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7124	return c
7125}
7126
7127// IfNoneMatch sets the optional parameter which makes the operation
7128// fail if the object's ETag matches the given value. This is useful for
7129// getting updates only after the object has changed since the last
7130// request. Use googleapi.IsNotModified to check whether the response
7131// error from Do is the result of In-None-Match.
7132func (c *FoldersSinksGetCall) IfNoneMatch(entityTag string) *FoldersSinksGetCall {
7133	c.ifNoneMatch_ = entityTag
7134	return c
7135}
7136
7137// Context sets the context to be used in this call's Do method. Any
7138// pending HTTP request will be aborted if the provided context is
7139// canceled.
7140func (c *FoldersSinksGetCall) Context(ctx context.Context) *FoldersSinksGetCall {
7141	c.ctx_ = ctx
7142	return c
7143}
7144
7145// Header returns an http.Header that can be modified by the caller to
7146// add HTTP headers to the request.
7147func (c *FoldersSinksGetCall) Header() http.Header {
7148	if c.header_ == nil {
7149		c.header_ = make(http.Header)
7150	}
7151	return c.header_
7152}
7153
7154func (c *FoldersSinksGetCall) doRequest(alt string) (*http.Response, error) {
7155	reqHeaders := make(http.Header)
7156	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7157	for k, v := range c.header_ {
7158		reqHeaders[k] = v
7159	}
7160	reqHeaders.Set("User-Agent", c.s.userAgent())
7161	if c.ifNoneMatch_ != "" {
7162		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7163	}
7164	var body io.Reader = nil
7165	c.urlParams_.Set("alt", alt)
7166	c.urlParams_.Set("prettyPrint", "false")
7167	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
7168	urls += "?" + c.urlParams_.Encode()
7169	req, err := http.NewRequest("GET", urls, body)
7170	if err != nil {
7171		return nil, err
7172	}
7173	req.Header = reqHeaders
7174	googleapi.Expand(req.URL, map[string]string{
7175		"sinkName": c.sinkName,
7176	})
7177	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7178}
7179
7180// Do executes the "logging.folders.sinks.get" call.
7181// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
7182// code is an error. Response headers are in either
7183// *LogSink.ServerResponse.Header or (if a response was returned at all)
7184// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7185// check whether the returned error was because http.StatusNotModified
7186// was returned.
7187func (c *FoldersSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
7188	gensupport.SetOptions(c.urlParams_, opts...)
7189	res, err := c.doRequest("json")
7190	if res != nil && res.StatusCode == http.StatusNotModified {
7191		if res.Body != nil {
7192			res.Body.Close()
7193		}
7194		return nil, &googleapi.Error{
7195			Code:   res.StatusCode,
7196			Header: res.Header,
7197		}
7198	}
7199	if err != nil {
7200		return nil, err
7201	}
7202	defer googleapi.CloseBody(res)
7203	if err := googleapi.CheckResponse(res); err != nil {
7204		return nil, err
7205	}
7206	ret := &LogSink{
7207		ServerResponse: googleapi.ServerResponse{
7208			Header:         res.Header,
7209			HTTPStatusCode: res.StatusCode,
7210		},
7211	}
7212	target := &ret
7213	if err := gensupport.DecodeResponse(target, res); err != nil {
7214		return nil, err
7215	}
7216	return ret, nil
7217	// {
7218	//   "description": "Gets a sink.",
7219	//   "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}",
7220	//   "httpMethod": "GET",
7221	//   "id": "logging.folders.sinks.get",
7222	//   "parameterOrder": [
7223	//     "sinkName"
7224	//   ],
7225	//   "parameters": {
7226	//     "sinkName": {
7227	//       "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
7228	//       "location": "path",
7229	//       "pattern": "^folders/[^/]+/sinks/[^/]+$",
7230	//       "required": true,
7231	//       "type": "string"
7232	//     }
7233	//   },
7234	//   "path": "v2/{+sinkName}",
7235	//   "response": {
7236	//     "$ref": "LogSink"
7237	//   },
7238	//   "scopes": [
7239	//     "https://www.googleapis.com/auth/cloud-platform",
7240	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
7241	//     "https://www.googleapis.com/auth/logging.admin",
7242	//     "https://www.googleapis.com/auth/logging.read"
7243	//   ]
7244	// }
7245
7246}
7247
7248// method id "logging.folders.sinks.list":
7249
7250type FoldersSinksListCall struct {
7251	s            *Service
7252	parent       string
7253	urlParams_   gensupport.URLParams
7254	ifNoneMatch_ string
7255	ctx_         context.Context
7256	header_      http.Header
7257}
7258
7259// List: Lists sinks.
7260func (r *FoldersSinksService) List(parent string) *FoldersSinksListCall {
7261	c := &FoldersSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7262	c.parent = parent
7263	return c
7264}
7265
7266// PageSize sets the optional parameter "pageSize": The maximum number
7267// of results to return from this request. Non-positive values are
7268// ignored. The presence of nextPageToken in the response indicates that
7269// more results might be available.
7270func (c *FoldersSinksListCall) PageSize(pageSize int64) *FoldersSinksListCall {
7271	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7272	return c
7273}
7274
7275// PageToken sets the optional parameter "pageToken": If present, then
7276// retrieve the next batch of results from the preceding call to this
7277// method. pageToken must be the value of nextPageToken from the
7278// previous response. The values of other method parameters should be
7279// identical to those in the previous call.
7280func (c *FoldersSinksListCall) PageToken(pageToken string) *FoldersSinksListCall {
7281	c.urlParams_.Set("pageToken", pageToken)
7282	return c
7283}
7284
7285// Fields allows partial responses to be retrieved. See
7286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7287// for more information.
7288func (c *FoldersSinksListCall) Fields(s ...googleapi.Field) *FoldersSinksListCall {
7289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7290	return c
7291}
7292
7293// IfNoneMatch sets the optional parameter which makes the operation
7294// fail if the object's ETag matches the given value. This is useful for
7295// getting updates only after the object has changed since the last
7296// request. Use googleapi.IsNotModified to check whether the response
7297// error from Do is the result of In-None-Match.
7298func (c *FoldersSinksListCall) IfNoneMatch(entityTag string) *FoldersSinksListCall {
7299	c.ifNoneMatch_ = entityTag
7300	return c
7301}
7302
7303// Context sets the context to be used in this call's Do method. Any
7304// pending HTTP request will be aborted if the provided context is
7305// canceled.
7306func (c *FoldersSinksListCall) Context(ctx context.Context) *FoldersSinksListCall {
7307	c.ctx_ = ctx
7308	return c
7309}
7310
7311// Header returns an http.Header that can be modified by the caller to
7312// add HTTP headers to the request.
7313func (c *FoldersSinksListCall) Header() http.Header {
7314	if c.header_ == nil {
7315		c.header_ = make(http.Header)
7316	}
7317	return c.header_
7318}
7319
7320func (c *FoldersSinksListCall) doRequest(alt string) (*http.Response, error) {
7321	reqHeaders := make(http.Header)
7322	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7323	for k, v := range c.header_ {
7324		reqHeaders[k] = v
7325	}
7326	reqHeaders.Set("User-Agent", c.s.userAgent())
7327	if c.ifNoneMatch_ != "" {
7328		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7329	}
7330	var body io.Reader = nil
7331	c.urlParams_.Set("alt", alt)
7332	c.urlParams_.Set("prettyPrint", "false")
7333	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
7334	urls += "?" + c.urlParams_.Encode()
7335	req, err := http.NewRequest("GET", urls, body)
7336	if err != nil {
7337		return nil, err
7338	}
7339	req.Header = reqHeaders
7340	googleapi.Expand(req.URL, map[string]string{
7341		"parent": c.parent,
7342	})
7343	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7344}
7345
7346// Do executes the "logging.folders.sinks.list" call.
7347// Exactly one of *ListSinksResponse or error will be non-nil. Any
7348// non-2xx status code is an error. Response headers are in either
7349// *ListSinksResponse.ServerResponse.Header or (if a response was
7350// returned at all) in error.(*googleapi.Error).Header. Use
7351// googleapi.IsNotModified to check whether the returned error was
7352// because http.StatusNotModified was returned.
7353func (c *FoldersSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
7354	gensupport.SetOptions(c.urlParams_, opts...)
7355	res, err := c.doRequest("json")
7356	if res != nil && res.StatusCode == http.StatusNotModified {
7357		if res.Body != nil {
7358			res.Body.Close()
7359		}
7360		return nil, &googleapi.Error{
7361			Code:   res.StatusCode,
7362			Header: res.Header,
7363		}
7364	}
7365	if err != nil {
7366		return nil, err
7367	}
7368	defer googleapi.CloseBody(res)
7369	if err := googleapi.CheckResponse(res); err != nil {
7370		return nil, err
7371	}
7372	ret := &ListSinksResponse{
7373		ServerResponse: googleapi.ServerResponse{
7374			Header:         res.Header,
7375			HTTPStatusCode: res.StatusCode,
7376		},
7377	}
7378	target := &ret
7379	if err := gensupport.DecodeResponse(target, res); err != nil {
7380		return nil, err
7381	}
7382	return ret, nil
7383	// {
7384	//   "description": "Lists sinks.",
7385	//   "flatPath": "v2/folders/{foldersId}/sinks",
7386	//   "httpMethod": "GET",
7387	//   "id": "logging.folders.sinks.list",
7388	//   "parameterOrder": [
7389	//     "parent"
7390	//   ],
7391	//   "parameters": {
7392	//     "pageSize": {
7393	//       "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.",
7394	//       "format": "int32",
7395	//       "location": "query",
7396	//       "type": "integer"
7397	//     },
7398	//     "pageToken": {
7399	//       "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.",
7400	//       "location": "query",
7401	//       "type": "string"
7402	//     },
7403	//     "parent": {
7404	//       "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
7405	//       "location": "path",
7406	//       "pattern": "^folders/[^/]+$",
7407	//       "required": true,
7408	//       "type": "string"
7409	//     }
7410	//   },
7411	//   "path": "v2/{+parent}/sinks",
7412	//   "response": {
7413	//     "$ref": "ListSinksResponse"
7414	//   },
7415	//   "scopes": [
7416	//     "https://www.googleapis.com/auth/cloud-platform",
7417	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
7418	//     "https://www.googleapis.com/auth/logging.admin",
7419	//     "https://www.googleapis.com/auth/logging.read"
7420	//   ]
7421	// }
7422
7423}
7424
7425// Pages invokes f for each page of results.
7426// A non-nil error returned from f will halt the iteration.
7427// The provided context supersedes any context provided to the Context method.
7428func (c *FoldersSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
7429	c.ctx_ = ctx
7430	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7431	for {
7432		x, err := c.Do()
7433		if err != nil {
7434			return err
7435		}
7436		if err := f(x); err != nil {
7437			return err
7438		}
7439		if x.NextPageToken == "" {
7440			return nil
7441		}
7442		c.PageToken(x.NextPageToken)
7443	}
7444}
7445
7446// method id "logging.folders.sinks.patch":
7447
7448type FoldersSinksPatchCall struct {
7449	s          *Service
7450	sinkNameid string
7451	logsink    *LogSink
7452	urlParams_ gensupport.URLParams
7453	ctx_       context.Context
7454	header_    http.Header
7455}
7456
7457// Patch: Updates a sink. This method replaces the following fields in
7458// the existing sink with values from the new sink: destination, and
7459// filter.The updated sink might also have a new writer_identity; see
7460// the unique_writer_identity field.
7461func (r *FoldersSinksService) Patch(sinkNameid string, logsink *LogSink) *FoldersSinksPatchCall {
7462	c := &FoldersSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7463	c.sinkNameid = sinkNameid
7464	c.logsink = logsink
7465	return c
7466}
7467
7468// UniqueWriterIdentity sets the optional parameter
7469// "uniqueWriterIdentity": See sinks.create for a description of this
7470// field. When updating a sink, the effect of this field on the value of
7471// writer_identity in the updated sink depends on both the old and new
7472// values of this field:
7473// If the old and new values of this field are both false or both true,
7474// then there is no change to the sink's writer_identity.
7475// If the old value is false and the new value is true, then
7476// writer_identity is changed to a unique service account.
7477// It is an error if the old value is true and the new value is set to
7478// false or defaulted to false.
7479func (c *FoldersSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksPatchCall {
7480	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
7481	return c
7482}
7483
7484// UpdateMask sets the optional parameter "updateMask": Field mask that
7485// specifies the fields in sink that need an update. A sink field will
7486// be overwritten if, and only if, it is in the update mask. name and
7487// output only fields cannot be updated.An empty updateMask is
7488// temporarily treated as using the following mask for backwards
7489// compatibility purposes:  destination,filter,includeChildren At some
7490// point in the future, behavior will be removed and specifying an empty
7491// updateMask will be an error.For a detailed FieldMask definition, see
7492// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample:
7493// updateMask=filter.
7494func (c *FoldersSinksPatchCall) UpdateMask(updateMask string) *FoldersSinksPatchCall {
7495	c.urlParams_.Set("updateMask", updateMask)
7496	return c
7497}
7498
7499// Fields allows partial responses to be retrieved. See
7500// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7501// for more information.
7502func (c *FoldersSinksPatchCall) Fields(s ...googleapi.Field) *FoldersSinksPatchCall {
7503	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7504	return c
7505}
7506
7507// Context sets the context to be used in this call's Do method. Any
7508// pending HTTP request will be aborted if the provided context is
7509// canceled.
7510func (c *FoldersSinksPatchCall) Context(ctx context.Context) *FoldersSinksPatchCall {
7511	c.ctx_ = ctx
7512	return c
7513}
7514
7515// Header returns an http.Header that can be modified by the caller to
7516// add HTTP headers to the request.
7517func (c *FoldersSinksPatchCall) Header() http.Header {
7518	if c.header_ == nil {
7519		c.header_ = make(http.Header)
7520	}
7521	return c.header_
7522}
7523
7524func (c *FoldersSinksPatchCall) doRequest(alt string) (*http.Response, error) {
7525	reqHeaders := make(http.Header)
7526	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7527	for k, v := range c.header_ {
7528		reqHeaders[k] = v
7529	}
7530	reqHeaders.Set("User-Agent", c.s.userAgent())
7531	var body io.Reader = nil
7532	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
7533	if err != nil {
7534		return nil, err
7535	}
7536	reqHeaders.Set("Content-Type", "application/json")
7537	c.urlParams_.Set("alt", alt)
7538	c.urlParams_.Set("prettyPrint", "false")
7539	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
7540	urls += "?" + c.urlParams_.Encode()
7541	req, err := http.NewRequest("PATCH", urls, body)
7542	if err != nil {
7543		return nil, err
7544	}
7545	req.Header = reqHeaders
7546	googleapi.Expand(req.URL, map[string]string{
7547		"sinkName": c.sinkNameid,
7548	})
7549	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7550}
7551
7552// Do executes the "logging.folders.sinks.patch" call.
7553// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
7554// code is an error. Response headers are in either
7555// *LogSink.ServerResponse.Header or (if a response was returned at all)
7556// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7557// check whether the returned error was because http.StatusNotModified
7558// was returned.
7559func (c *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
7560	gensupport.SetOptions(c.urlParams_, opts...)
7561	res, err := c.doRequest("json")
7562	if res != nil && res.StatusCode == http.StatusNotModified {
7563		if res.Body != nil {
7564			res.Body.Close()
7565		}
7566		return nil, &googleapi.Error{
7567			Code:   res.StatusCode,
7568			Header: res.Header,
7569		}
7570	}
7571	if err != nil {
7572		return nil, err
7573	}
7574	defer googleapi.CloseBody(res)
7575	if err := googleapi.CheckResponse(res); err != nil {
7576		return nil, err
7577	}
7578	ret := &LogSink{
7579		ServerResponse: googleapi.ServerResponse{
7580			Header:         res.Header,
7581			HTTPStatusCode: res.StatusCode,
7582		},
7583	}
7584	target := &ret
7585	if err := gensupport.DecodeResponse(target, res); err != nil {
7586		return nil, err
7587	}
7588	return ret, nil
7589	// {
7590	//   "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.",
7591	//   "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}",
7592	//   "httpMethod": "PATCH",
7593	//   "id": "logging.folders.sinks.patch",
7594	//   "parameterOrder": [
7595	//     "sinkName"
7596	//   ],
7597	//   "parameters": {
7598	//     "sinkName": {
7599	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
7600	//       "location": "path",
7601	//       "pattern": "^folders/[^/]+/sinks/[^/]+$",
7602	//       "required": true,
7603	//       "type": "string"
7604	//     },
7605	//     "uniqueWriterIdentity": {
7606	//       "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:\nIf 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.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.",
7607	//       "location": "query",
7608	//       "type": "boolean"
7609	//     },
7610	//     "updateMask": {
7611	//       "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,includeChildren At 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.FieldMaskExample: updateMask=filter.",
7612	//       "format": "google-fieldmask",
7613	//       "location": "query",
7614	//       "type": "string"
7615	//     }
7616	//   },
7617	//   "path": "v2/{+sinkName}",
7618	//   "request": {
7619	//     "$ref": "LogSink"
7620	//   },
7621	//   "response": {
7622	//     "$ref": "LogSink"
7623	//   },
7624	//   "scopes": [
7625	//     "https://www.googleapis.com/auth/cloud-platform",
7626	//     "https://www.googleapis.com/auth/logging.admin"
7627	//   ]
7628	// }
7629
7630}
7631
7632// method id "logging.folders.sinks.update":
7633
7634type FoldersSinksUpdateCall struct {
7635	s          *Service
7636	sinkNameid string
7637	logsink    *LogSink
7638	urlParams_ gensupport.URLParams
7639	ctx_       context.Context
7640	header_    http.Header
7641}
7642
7643// Update: Updates a sink. This method replaces the following fields in
7644// the existing sink with values from the new sink: destination, and
7645// filter.The updated sink might also have a new writer_identity; see
7646// the unique_writer_identity field.
7647func (r *FoldersSinksService) Update(sinkNameid string, logsink *LogSink) *FoldersSinksUpdateCall {
7648	c := &FoldersSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7649	c.sinkNameid = sinkNameid
7650	c.logsink = logsink
7651	return c
7652}
7653
7654// UniqueWriterIdentity sets the optional parameter
7655// "uniqueWriterIdentity": See sinks.create for a description of this
7656// field. When updating a sink, the effect of this field on the value of
7657// writer_identity in the updated sink depends on both the old and new
7658// values of this field:
7659// If the old and new values of this field are both false or both true,
7660// then there is no change to the sink's writer_identity.
7661// If the old value is false and the new value is true, then
7662// writer_identity is changed to a unique service account.
7663// It is an error if the old value is true and the new value is set to
7664// false or defaulted to false.
7665func (c *FoldersSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksUpdateCall {
7666	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
7667	return c
7668}
7669
7670// UpdateMask sets the optional parameter "updateMask": Field mask that
7671// specifies the fields in sink that need an update. A sink field will
7672// be overwritten if, and only if, it is in the update mask. name and
7673// output only fields cannot be updated.An empty updateMask is
7674// temporarily treated as using the following mask for backwards
7675// compatibility purposes:  destination,filter,includeChildren At some
7676// point in the future, behavior will be removed and specifying an empty
7677// updateMask will be an error.For a detailed FieldMask definition, see
7678// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample:
7679// updateMask=filter.
7680func (c *FoldersSinksUpdateCall) UpdateMask(updateMask string) *FoldersSinksUpdateCall {
7681	c.urlParams_.Set("updateMask", updateMask)
7682	return c
7683}
7684
7685// Fields allows partial responses to be retrieved. See
7686// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7687// for more information.
7688func (c *FoldersSinksUpdateCall) Fields(s ...googleapi.Field) *FoldersSinksUpdateCall {
7689	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7690	return c
7691}
7692
7693// Context sets the context to be used in this call's Do method. Any
7694// pending HTTP request will be aborted if the provided context is
7695// canceled.
7696func (c *FoldersSinksUpdateCall) Context(ctx context.Context) *FoldersSinksUpdateCall {
7697	c.ctx_ = ctx
7698	return c
7699}
7700
7701// Header returns an http.Header that can be modified by the caller to
7702// add HTTP headers to the request.
7703func (c *FoldersSinksUpdateCall) Header() http.Header {
7704	if c.header_ == nil {
7705		c.header_ = make(http.Header)
7706	}
7707	return c.header_
7708}
7709
7710func (c *FoldersSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
7711	reqHeaders := make(http.Header)
7712	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7713	for k, v := range c.header_ {
7714		reqHeaders[k] = v
7715	}
7716	reqHeaders.Set("User-Agent", c.s.userAgent())
7717	var body io.Reader = nil
7718	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
7719	if err != nil {
7720		return nil, err
7721	}
7722	reqHeaders.Set("Content-Type", "application/json")
7723	c.urlParams_.Set("alt", alt)
7724	c.urlParams_.Set("prettyPrint", "false")
7725	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
7726	urls += "?" + c.urlParams_.Encode()
7727	req, err := http.NewRequest("PUT", urls, body)
7728	if err != nil {
7729		return nil, err
7730	}
7731	req.Header = reqHeaders
7732	googleapi.Expand(req.URL, map[string]string{
7733		"sinkName": c.sinkNameid,
7734	})
7735	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7736}
7737
7738// Do executes the "logging.folders.sinks.update" call.
7739// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
7740// code is an error. Response headers are in either
7741// *LogSink.ServerResponse.Header or (if a response was returned at all)
7742// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7743// check whether the returned error was because http.StatusNotModified
7744// was returned.
7745func (c *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
7746	gensupport.SetOptions(c.urlParams_, opts...)
7747	res, err := c.doRequest("json")
7748	if res != nil && res.StatusCode == http.StatusNotModified {
7749		if res.Body != nil {
7750			res.Body.Close()
7751		}
7752		return nil, &googleapi.Error{
7753			Code:   res.StatusCode,
7754			Header: res.Header,
7755		}
7756	}
7757	if err != nil {
7758		return nil, err
7759	}
7760	defer googleapi.CloseBody(res)
7761	if err := googleapi.CheckResponse(res); err != nil {
7762		return nil, err
7763	}
7764	ret := &LogSink{
7765		ServerResponse: googleapi.ServerResponse{
7766			Header:         res.Header,
7767			HTTPStatusCode: res.StatusCode,
7768		},
7769	}
7770	target := &ret
7771	if err := gensupport.DecodeResponse(target, res); err != nil {
7772		return nil, err
7773	}
7774	return ret, nil
7775	// {
7776	//   "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.",
7777	//   "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}",
7778	//   "httpMethod": "PUT",
7779	//   "id": "logging.folders.sinks.update",
7780	//   "parameterOrder": [
7781	//     "sinkName"
7782	//   ],
7783	//   "parameters": {
7784	//     "sinkName": {
7785	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
7786	//       "location": "path",
7787	//       "pattern": "^folders/[^/]+/sinks/[^/]+$",
7788	//       "required": true,
7789	//       "type": "string"
7790	//     },
7791	//     "uniqueWriterIdentity": {
7792	//       "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:\nIf 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.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.",
7793	//       "location": "query",
7794	//       "type": "boolean"
7795	//     },
7796	//     "updateMask": {
7797	//       "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,includeChildren At 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.FieldMaskExample: updateMask=filter.",
7798	//       "format": "google-fieldmask",
7799	//       "location": "query",
7800	//       "type": "string"
7801	//     }
7802	//   },
7803	//   "path": "v2/{+sinkName}",
7804	//   "request": {
7805	//     "$ref": "LogSink"
7806	//   },
7807	//   "response": {
7808	//     "$ref": "LogSink"
7809	//   },
7810	//   "scopes": [
7811	//     "https://www.googleapis.com/auth/cloud-platform",
7812	//     "https://www.googleapis.com/auth/logging.admin"
7813	//   ]
7814	// }
7815
7816}
7817
7818// method id "logging.logs.delete":
7819
7820type LogsDeleteCall struct {
7821	s          *Service
7822	logName    string
7823	urlParams_ gensupport.URLParams
7824	ctx_       context.Context
7825	header_    http.Header
7826}
7827
7828// Delete: Deletes all the log entries in a log. The log reappears if it
7829// receives new entries. Log entries written shortly before the delete
7830// operation might not be deleted. Entries received after the delete
7831// operation with a timestamp before the operation will be deleted.
7832func (r *LogsService) Delete(logName string) *LogsDeleteCall {
7833	c := &LogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7834	c.logName = logName
7835	return c
7836}
7837
7838// Fields allows partial responses to be retrieved. See
7839// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7840// for more information.
7841func (c *LogsDeleteCall) Fields(s ...googleapi.Field) *LogsDeleteCall {
7842	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7843	return c
7844}
7845
7846// Context sets the context to be used in this call's Do method. Any
7847// pending HTTP request will be aborted if the provided context is
7848// canceled.
7849func (c *LogsDeleteCall) Context(ctx context.Context) *LogsDeleteCall {
7850	c.ctx_ = ctx
7851	return c
7852}
7853
7854// Header returns an http.Header that can be modified by the caller to
7855// add HTTP headers to the request.
7856func (c *LogsDeleteCall) Header() http.Header {
7857	if c.header_ == nil {
7858		c.header_ = make(http.Header)
7859	}
7860	return c.header_
7861}
7862
7863func (c *LogsDeleteCall) doRequest(alt string) (*http.Response, error) {
7864	reqHeaders := make(http.Header)
7865	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7866	for k, v := range c.header_ {
7867		reqHeaders[k] = v
7868	}
7869	reqHeaders.Set("User-Agent", c.s.userAgent())
7870	var body io.Reader = nil
7871	c.urlParams_.Set("alt", alt)
7872	c.urlParams_.Set("prettyPrint", "false")
7873	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
7874	urls += "?" + c.urlParams_.Encode()
7875	req, err := http.NewRequest("DELETE", urls, body)
7876	if err != nil {
7877		return nil, err
7878	}
7879	req.Header = reqHeaders
7880	googleapi.Expand(req.URL, map[string]string{
7881		"logName": c.logName,
7882	})
7883	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7884}
7885
7886// Do executes the "logging.logs.delete" call.
7887// Exactly one of *Empty or error will be non-nil. Any non-2xx status
7888// code is an error. Response headers are in either
7889// *Empty.ServerResponse.Header or (if a response was returned at all)
7890// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7891// check whether the returned error was because http.StatusNotModified
7892// was returned.
7893func (c *LogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7894	gensupport.SetOptions(c.urlParams_, opts...)
7895	res, err := c.doRequest("json")
7896	if res != nil && res.StatusCode == http.StatusNotModified {
7897		if res.Body != nil {
7898			res.Body.Close()
7899		}
7900		return nil, &googleapi.Error{
7901			Code:   res.StatusCode,
7902			Header: res.Header,
7903		}
7904	}
7905	if err != nil {
7906		return nil, err
7907	}
7908	defer googleapi.CloseBody(res)
7909	if err := googleapi.CheckResponse(res); err != nil {
7910		return nil, err
7911	}
7912	ret := &Empty{
7913		ServerResponse: googleapi.ServerResponse{
7914			Header:         res.Header,
7915			HTTPStatusCode: res.StatusCode,
7916		},
7917	}
7918	target := &ret
7919	if err := gensupport.DecodeResponse(target, res); err != nil {
7920		return nil, err
7921	}
7922	return ret, nil
7923	// {
7924	//   "description": "Deletes all the log entries in a log. 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.",
7925	//   "flatPath": "v2/{v2Id}/{v2Id1}/logs/{logsId}",
7926	//   "httpMethod": "DELETE",
7927	//   "id": "logging.logs.delete",
7928	//   "parameterOrder": [
7929	//     "logName"
7930	//   ],
7931	//   "parameters": {
7932	//     "logName": {
7933	//       "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.",
7934	//       "location": "path",
7935	//       "pattern": "^[^/]+/[^/]+/logs/[^/]+$",
7936	//       "required": true,
7937	//       "type": "string"
7938	//     }
7939	//   },
7940	//   "path": "v2/{+logName}",
7941	//   "response": {
7942	//     "$ref": "Empty"
7943	//   },
7944	//   "scopes": [
7945	//     "https://www.googleapis.com/auth/cloud-platform",
7946	//     "https://www.googleapis.com/auth/logging.admin"
7947	//   ]
7948	// }
7949
7950}
7951
7952// method id "logging.logs.list":
7953
7954type LogsListCall struct {
7955	s            *Service
7956	parent       string
7957	urlParams_   gensupport.URLParams
7958	ifNoneMatch_ string
7959	ctx_         context.Context
7960	header_      http.Header
7961}
7962
7963// List: Lists the logs in projects, organizations, folders, or billing
7964// accounts. Only logs that have entries are listed.
7965func (r *LogsService) List(parent string) *LogsListCall {
7966	c := &LogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7967	c.parent = parent
7968	return c
7969}
7970
7971// PageSize sets the optional parameter "pageSize": The maximum number
7972// of results to return from this request. Non-positive values are
7973// ignored. The presence of nextPageToken in the response indicates that
7974// more results might be available.
7975func (c *LogsListCall) PageSize(pageSize int64) *LogsListCall {
7976	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7977	return c
7978}
7979
7980// PageToken sets the optional parameter "pageToken": If present, then
7981// retrieve the next batch of results from the preceding call to this
7982// method. pageToken must be the value of nextPageToken from the
7983// previous response. The values of other method parameters should be
7984// identical to those in the previous call.
7985func (c *LogsListCall) PageToken(pageToken string) *LogsListCall {
7986	c.urlParams_.Set("pageToken", pageToken)
7987	return c
7988}
7989
7990// Fields allows partial responses to be retrieved. See
7991// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7992// for more information.
7993func (c *LogsListCall) Fields(s ...googleapi.Field) *LogsListCall {
7994	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7995	return c
7996}
7997
7998// IfNoneMatch sets the optional parameter which makes the operation
7999// fail if the object's ETag matches the given value. This is useful for
8000// getting updates only after the object has changed since the last
8001// request. Use googleapi.IsNotModified to check whether the response
8002// error from Do is the result of In-None-Match.
8003func (c *LogsListCall) IfNoneMatch(entityTag string) *LogsListCall {
8004	c.ifNoneMatch_ = entityTag
8005	return c
8006}
8007
8008// Context sets the context to be used in this call's Do method. Any
8009// pending HTTP request will be aborted if the provided context is
8010// canceled.
8011func (c *LogsListCall) Context(ctx context.Context) *LogsListCall {
8012	c.ctx_ = ctx
8013	return c
8014}
8015
8016// Header returns an http.Header that can be modified by the caller to
8017// add HTTP headers to the request.
8018func (c *LogsListCall) Header() http.Header {
8019	if c.header_ == nil {
8020		c.header_ = make(http.Header)
8021	}
8022	return c.header_
8023}
8024
8025func (c *LogsListCall) doRequest(alt string) (*http.Response, error) {
8026	reqHeaders := make(http.Header)
8027	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
8028	for k, v := range c.header_ {
8029		reqHeaders[k] = v
8030	}
8031	reqHeaders.Set("User-Agent", c.s.userAgent())
8032	if c.ifNoneMatch_ != "" {
8033		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8034	}
8035	var body io.Reader = nil
8036	c.urlParams_.Set("alt", alt)
8037	c.urlParams_.Set("prettyPrint", "false")
8038	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
8039	urls += "?" + c.urlParams_.Encode()
8040	req, err := http.NewRequest("GET", urls, body)
8041	if err != nil {
8042		return nil, err
8043	}
8044	req.Header = reqHeaders
8045	googleapi.Expand(req.URL, map[string]string{
8046		"parent": c.parent,
8047	})
8048	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8049}
8050
8051// Do executes the "logging.logs.list" call.
8052// Exactly one of *ListLogsResponse or error will be non-nil. Any
8053// non-2xx status code is an error. Response headers are in either
8054// *ListLogsResponse.ServerResponse.Header or (if a response was
8055// returned at all) in error.(*googleapi.Error).Header. Use
8056// googleapi.IsNotModified to check whether the returned error was
8057// because http.StatusNotModified was returned.
8058func (c *LogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
8059	gensupport.SetOptions(c.urlParams_, opts...)
8060	res, err := c.doRequest("json")
8061	if res != nil && res.StatusCode == http.StatusNotModified {
8062		if res.Body != nil {
8063			res.Body.Close()
8064		}
8065		return nil, &googleapi.Error{
8066			Code:   res.StatusCode,
8067			Header: res.Header,
8068		}
8069	}
8070	if err != nil {
8071		return nil, err
8072	}
8073	defer googleapi.CloseBody(res)
8074	if err := googleapi.CheckResponse(res); err != nil {
8075		return nil, err
8076	}
8077	ret := &ListLogsResponse{
8078		ServerResponse: googleapi.ServerResponse{
8079			Header:         res.Header,
8080			HTTPStatusCode: res.StatusCode,
8081		},
8082	}
8083	target := &ret
8084	if err := gensupport.DecodeResponse(target, res); err != nil {
8085		return nil, err
8086	}
8087	return ret, nil
8088	// {
8089	//   "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.",
8090	//   "flatPath": "v2/{v2Id}/{v2Id1}/logs",
8091	//   "httpMethod": "GET",
8092	//   "id": "logging.logs.list",
8093	//   "parameterOrder": [
8094	//     "parent"
8095	//   ],
8096	//   "parameters": {
8097	//     "pageSize": {
8098	//       "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.",
8099	//       "format": "int32",
8100	//       "location": "query",
8101	//       "type": "integer"
8102	//     },
8103	//     "pageToken": {
8104	//       "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.",
8105	//       "location": "query",
8106	//       "type": "string"
8107	//     },
8108	//     "parent": {
8109	//       "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
8110	//       "location": "path",
8111	//       "pattern": "^[^/]+/[^/]+$",
8112	//       "required": true,
8113	//       "type": "string"
8114	//     }
8115	//   },
8116	//   "path": "v2/{+parent}/logs",
8117	//   "response": {
8118	//     "$ref": "ListLogsResponse"
8119	//   },
8120	//   "scopes": [
8121	//     "https://www.googleapis.com/auth/cloud-platform",
8122	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
8123	//     "https://www.googleapis.com/auth/logging.admin",
8124	//     "https://www.googleapis.com/auth/logging.read"
8125	//   ]
8126	// }
8127
8128}
8129
8130// Pages invokes f for each page of results.
8131// A non-nil error returned from f will halt the iteration.
8132// The provided context supersedes any context provided to the Context method.
8133func (c *LogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
8134	c.ctx_ = ctx
8135	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8136	for {
8137		x, err := c.Do()
8138		if err != nil {
8139			return err
8140		}
8141		if err := f(x); err != nil {
8142			return err
8143		}
8144		if x.NextPageToken == "" {
8145			return nil
8146		}
8147		c.PageToken(x.NextPageToken)
8148	}
8149}
8150
8151// method id "logging.monitoredResourceDescriptors.list":
8152
8153type MonitoredResourceDescriptorsListCall struct {
8154	s            *Service
8155	urlParams_   gensupport.URLParams
8156	ifNoneMatch_ string
8157	ctx_         context.Context
8158	header_      http.Header
8159}
8160
8161// List: Lists the descriptors for monitored resource types used by
8162// Logging.
8163func (r *MonitoredResourceDescriptorsService) List() *MonitoredResourceDescriptorsListCall {
8164	c := &MonitoredResourceDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8165	return c
8166}
8167
8168// PageSize sets the optional parameter "pageSize": The maximum number
8169// of results to return from this request. Non-positive values are
8170// ignored. The presence of nextPageToken in the response indicates that
8171// more results might be available.
8172func (c *MonitoredResourceDescriptorsListCall) PageSize(pageSize int64) *MonitoredResourceDescriptorsListCall {
8173	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8174	return c
8175}
8176
8177// PageToken sets the optional parameter "pageToken": If present, then
8178// retrieve the next batch of results from the preceding call to this
8179// method. pageToken must be the value of nextPageToken from the
8180// previous response. The values of other method parameters should be
8181// identical to those in the previous call.
8182func (c *MonitoredResourceDescriptorsListCall) PageToken(pageToken string) *MonitoredResourceDescriptorsListCall {
8183	c.urlParams_.Set("pageToken", pageToken)
8184	return c
8185}
8186
8187// Fields allows partial responses to be retrieved. See
8188// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8189// for more information.
8190func (c *MonitoredResourceDescriptorsListCall) Fields(s ...googleapi.Field) *MonitoredResourceDescriptorsListCall {
8191	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8192	return c
8193}
8194
8195// IfNoneMatch sets the optional parameter which makes the operation
8196// fail if the object's ETag matches the given value. This is useful for
8197// getting updates only after the object has changed since the last
8198// request. Use googleapi.IsNotModified to check whether the response
8199// error from Do is the result of In-None-Match.
8200func (c *MonitoredResourceDescriptorsListCall) IfNoneMatch(entityTag string) *MonitoredResourceDescriptorsListCall {
8201	c.ifNoneMatch_ = entityTag
8202	return c
8203}
8204
8205// Context sets the context to be used in this call's Do method. Any
8206// pending HTTP request will be aborted if the provided context is
8207// canceled.
8208func (c *MonitoredResourceDescriptorsListCall) Context(ctx context.Context) *MonitoredResourceDescriptorsListCall {
8209	c.ctx_ = ctx
8210	return c
8211}
8212
8213// Header returns an http.Header that can be modified by the caller to
8214// add HTTP headers to the request.
8215func (c *MonitoredResourceDescriptorsListCall) Header() http.Header {
8216	if c.header_ == nil {
8217		c.header_ = make(http.Header)
8218	}
8219	return c.header_
8220}
8221
8222func (c *MonitoredResourceDescriptorsListCall) doRequest(alt string) (*http.Response, error) {
8223	reqHeaders := make(http.Header)
8224	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
8225	for k, v := range c.header_ {
8226		reqHeaders[k] = v
8227	}
8228	reqHeaders.Set("User-Agent", c.s.userAgent())
8229	if c.ifNoneMatch_ != "" {
8230		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8231	}
8232	var body io.Reader = nil
8233	c.urlParams_.Set("alt", alt)
8234	c.urlParams_.Set("prettyPrint", "false")
8235	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/monitoredResourceDescriptors")
8236	urls += "?" + c.urlParams_.Encode()
8237	req, err := http.NewRequest("GET", urls, body)
8238	if err != nil {
8239		return nil, err
8240	}
8241	req.Header = reqHeaders
8242	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8243}
8244
8245// Do executes the "logging.monitoredResourceDescriptors.list" call.
8246// Exactly one of *ListMonitoredResourceDescriptorsResponse or error
8247// will be non-nil. Any non-2xx status code is an error. Response
8248// headers are in either
8249// *ListMonitoredResourceDescriptorsResponse.ServerResponse.Header or
8250// (if a response was returned at all) in
8251// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8252// whether the returned error was because http.StatusNotModified was
8253// returned.
8254func (c *MonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) {
8255	gensupport.SetOptions(c.urlParams_, opts...)
8256	res, err := c.doRequest("json")
8257	if res != nil && res.StatusCode == http.StatusNotModified {
8258		if res.Body != nil {
8259			res.Body.Close()
8260		}
8261		return nil, &googleapi.Error{
8262			Code:   res.StatusCode,
8263			Header: res.Header,
8264		}
8265	}
8266	if err != nil {
8267		return nil, err
8268	}
8269	defer googleapi.CloseBody(res)
8270	if err := googleapi.CheckResponse(res); err != nil {
8271		return nil, err
8272	}
8273	ret := &ListMonitoredResourceDescriptorsResponse{
8274		ServerResponse: googleapi.ServerResponse{
8275			Header:         res.Header,
8276			HTTPStatusCode: res.StatusCode,
8277		},
8278	}
8279	target := &ret
8280	if err := gensupport.DecodeResponse(target, res); err != nil {
8281		return nil, err
8282	}
8283	return ret, nil
8284	// {
8285	//   "description": "Lists the descriptors for monitored resource types used by Logging.",
8286	//   "flatPath": "v2/monitoredResourceDescriptors",
8287	//   "httpMethod": "GET",
8288	//   "id": "logging.monitoredResourceDescriptors.list",
8289	//   "parameterOrder": [],
8290	//   "parameters": {
8291	//     "pageSize": {
8292	//       "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.",
8293	//       "format": "int32",
8294	//       "location": "query",
8295	//       "type": "integer"
8296	//     },
8297	//     "pageToken": {
8298	//       "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.",
8299	//       "location": "query",
8300	//       "type": "string"
8301	//     }
8302	//   },
8303	//   "path": "v2/monitoredResourceDescriptors",
8304	//   "response": {
8305	//     "$ref": "ListMonitoredResourceDescriptorsResponse"
8306	//   },
8307	//   "scopes": [
8308	//     "https://www.googleapis.com/auth/cloud-platform",
8309	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
8310	//     "https://www.googleapis.com/auth/logging.admin",
8311	//     "https://www.googleapis.com/auth/logging.read"
8312	//   ]
8313	// }
8314
8315}
8316
8317// Pages invokes f for each page of results.
8318// A non-nil error returned from f will halt the iteration.
8319// The provided context supersedes any context provided to the Context method.
8320func (c *MonitoredResourceDescriptorsListCall) Pages(ctx context.Context, f func(*ListMonitoredResourceDescriptorsResponse) error) error {
8321	c.ctx_ = ctx
8322	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8323	for {
8324		x, err := c.Do()
8325		if err != nil {
8326			return err
8327		}
8328		if err := f(x); err != nil {
8329			return err
8330		}
8331		if x.NextPageToken == "" {
8332			return nil
8333		}
8334		c.PageToken(x.NextPageToken)
8335	}
8336}
8337
8338// method id "logging.organizations.exclusions.create":
8339
8340type OrganizationsExclusionsCreateCall struct {
8341	s            *Service
8342	parent       string
8343	logexclusion *LogExclusion
8344	urlParams_   gensupport.URLParams
8345	ctx_         context.Context
8346	header_      http.Header
8347}
8348
8349// Create: Creates a new exclusion in a specified parent resource. Only
8350// log entries belonging to that resource can be excluded. You can have
8351// up to 10 exclusions in a resource.
8352func (r *OrganizationsExclusionsService) Create(parent string, logexclusion *LogExclusion) *OrganizationsExclusionsCreateCall {
8353	c := &OrganizationsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8354	c.parent = parent
8355	c.logexclusion = logexclusion
8356	return c
8357}
8358
8359// Fields allows partial responses to be retrieved. See
8360// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8361// for more information.
8362func (c *OrganizationsExclusionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsCreateCall {
8363	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8364	return c
8365}
8366
8367// Context sets the context to be used in this call's Do method. Any
8368// pending HTTP request will be aborted if the provided context is
8369// canceled.
8370func (c *OrganizationsExclusionsCreateCall) Context(ctx context.Context) *OrganizationsExclusionsCreateCall {
8371	c.ctx_ = ctx
8372	return c
8373}
8374
8375// Header returns an http.Header that can be modified by the caller to
8376// add HTTP headers to the request.
8377func (c *OrganizationsExclusionsCreateCall) Header() http.Header {
8378	if c.header_ == nil {
8379		c.header_ = make(http.Header)
8380	}
8381	return c.header_
8382}
8383
8384func (c *OrganizationsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
8385	reqHeaders := make(http.Header)
8386	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
8387	for k, v := range c.header_ {
8388		reqHeaders[k] = v
8389	}
8390	reqHeaders.Set("User-Agent", c.s.userAgent())
8391	var body io.Reader = nil
8392	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
8393	if err != nil {
8394		return nil, err
8395	}
8396	reqHeaders.Set("Content-Type", "application/json")
8397	c.urlParams_.Set("alt", alt)
8398	c.urlParams_.Set("prettyPrint", "false")
8399	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
8400	urls += "?" + c.urlParams_.Encode()
8401	req, err := http.NewRequest("POST", urls, body)
8402	if err != nil {
8403		return nil, err
8404	}
8405	req.Header = reqHeaders
8406	googleapi.Expand(req.URL, map[string]string{
8407		"parent": c.parent,
8408	})
8409	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8410}
8411
8412// Do executes the "logging.organizations.exclusions.create" call.
8413// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
8414// status code is an error. Response headers are in either
8415// *LogExclusion.ServerResponse.Header or (if a response was returned at
8416// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8417// to check whether the returned error was because
8418// http.StatusNotModified was returned.
8419func (c *OrganizationsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
8420	gensupport.SetOptions(c.urlParams_, opts...)
8421	res, err := c.doRequest("json")
8422	if res != nil && res.StatusCode == http.StatusNotModified {
8423		if res.Body != nil {
8424			res.Body.Close()
8425		}
8426		return nil, &googleapi.Error{
8427			Code:   res.StatusCode,
8428			Header: res.Header,
8429		}
8430	}
8431	if err != nil {
8432		return nil, err
8433	}
8434	defer googleapi.CloseBody(res)
8435	if err := googleapi.CheckResponse(res); err != nil {
8436		return nil, err
8437	}
8438	ret := &LogExclusion{
8439		ServerResponse: googleapi.ServerResponse{
8440			Header:         res.Header,
8441			HTTPStatusCode: res.StatusCode,
8442		},
8443	}
8444	target := &ret
8445	if err := gensupport.DecodeResponse(target, res); err != nil {
8446		return nil, err
8447	}
8448	return ret, nil
8449	// {
8450	//   "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.",
8451	//   "flatPath": "v2/organizations/{organizationsId}/exclusions",
8452	//   "httpMethod": "POST",
8453	//   "id": "logging.organizations.exclusions.create",
8454	//   "parameterOrder": [
8455	//     "parent"
8456	//   ],
8457	//   "parameters": {
8458	//     "parent": {
8459	//       "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
8460	//       "location": "path",
8461	//       "pattern": "^organizations/[^/]+$",
8462	//       "required": true,
8463	//       "type": "string"
8464	//     }
8465	//   },
8466	//   "path": "v2/{+parent}/exclusions",
8467	//   "request": {
8468	//     "$ref": "LogExclusion"
8469	//   },
8470	//   "response": {
8471	//     "$ref": "LogExclusion"
8472	//   },
8473	//   "scopes": [
8474	//     "https://www.googleapis.com/auth/cloud-platform",
8475	//     "https://www.googleapis.com/auth/logging.admin"
8476	//   ]
8477	// }
8478
8479}
8480
8481// method id "logging.organizations.exclusions.delete":
8482
8483type OrganizationsExclusionsDeleteCall struct {
8484	s          *Service
8485	name       string
8486	urlParams_ gensupport.URLParams
8487	ctx_       context.Context
8488	header_    http.Header
8489}
8490
8491// Delete: Deletes an exclusion.
8492func (r *OrganizationsExclusionsService) Delete(name string) *OrganizationsExclusionsDeleteCall {
8493	c := &OrganizationsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8494	c.name = name
8495	return c
8496}
8497
8498// Fields allows partial responses to be retrieved. See
8499// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8500// for more information.
8501func (c *OrganizationsExclusionsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsDeleteCall {
8502	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8503	return c
8504}
8505
8506// Context sets the context to be used in this call's Do method. Any
8507// pending HTTP request will be aborted if the provided context is
8508// canceled.
8509func (c *OrganizationsExclusionsDeleteCall) Context(ctx context.Context) *OrganizationsExclusionsDeleteCall {
8510	c.ctx_ = ctx
8511	return c
8512}
8513
8514// Header returns an http.Header that can be modified by the caller to
8515// add HTTP headers to the request.
8516func (c *OrganizationsExclusionsDeleteCall) Header() http.Header {
8517	if c.header_ == nil {
8518		c.header_ = make(http.Header)
8519	}
8520	return c.header_
8521}
8522
8523func (c *OrganizationsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
8524	reqHeaders := make(http.Header)
8525	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
8526	for k, v := range c.header_ {
8527		reqHeaders[k] = v
8528	}
8529	reqHeaders.Set("User-Agent", c.s.userAgent())
8530	var body io.Reader = nil
8531	c.urlParams_.Set("alt", alt)
8532	c.urlParams_.Set("prettyPrint", "false")
8533	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
8534	urls += "?" + c.urlParams_.Encode()
8535	req, err := http.NewRequest("DELETE", urls, body)
8536	if err != nil {
8537		return nil, err
8538	}
8539	req.Header = reqHeaders
8540	googleapi.Expand(req.URL, map[string]string{
8541		"name": c.name,
8542	})
8543	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8544}
8545
8546// Do executes the "logging.organizations.exclusions.delete" call.
8547// Exactly one of *Empty or error will be non-nil. Any non-2xx status
8548// code is an error. Response headers are in either
8549// *Empty.ServerResponse.Header or (if a response was returned at all)
8550// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8551// check whether the returned error was because http.StatusNotModified
8552// was returned.
8553func (c *OrganizationsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8554	gensupport.SetOptions(c.urlParams_, opts...)
8555	res, err := c.doRequest("json")
8556	if res != nil && res.StatusCode == http.StatusNotModified {
8557		if res.Body != nil {
8558			res.Body.Close()
8559		}
8560		return nil, &googleapi.Error{
8561			Code:   res.StatusCode,
8562			Header: res.Header,
8563		}
8564	}
8565	if err != nil {
8566		return nil, err
8567	}
8568	defer googleapi.CloseBody(res)
8569	if err := googleapi.CheckResponse(res); err != nil {
8570		return nil, err
8571	}
8572	ret := &Empty{
8573		ServerResponse: googleapi.ServerResponse{
8574			Header:         res.Header,
8575			HTTPStatusCode: res.StatusCode,
8576		},
8577	}
8578	target := &ret
8579	if err := gensupport.DecodeResponse(target, res); err != nil {
8580		return nil, err
8581	}
8582	return ret, nil
8583	// {
8584	//   "description": "Deletes an exclusion.",
8585	//   "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}",
8586	//   "httpMethod": "DELETE",
8587	//   "id": "logging.organizations.exclusions.delete",
8588	//   "parameterOrder": [
8589	//     "name"
8590	//   ],
8591	//   "parameters": {
8592	//     "name": {
8593	//       "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
8594	//       "location": "path",
8595	//       "pattern": "^organizations/[^/]+/exclusions/[^/]+$",
8596	//       "required": true,
8597	//       "type": "string"
8598	//     }
8599	//   },
8600	//   "path": "v2/{+name}",
8601	//   "response": {
8602	//     "$ref": "Empty"
8603	//   },
8604	//   "scopes": [
8605	//     "https://www.googleapis.com/auth/cloud-platform",
8606	//     "https://www.googleapis.com/auth/logging.admin"
8607	//   ]
8608	// }
8609
8610}
8611
8612// method id "logging.organizations.exclusions.get":
8613
8614type OrganizationsExclusionsGetCall struct {
8615	s            *Service
8616	name         string
8617	urlParams_   gensupport.URLParams
8618	ifNoneMatch_ string
8619	ctx_         context.Context
8620	header_      http.Header
8621}
8622
8623// Get: Gets the description of an exclusion.
8624func (r *OrganizationsExclusionsService) Get(name string) *OrganizationsExclusionsGetCall {
8625	c := &OrganizationsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8626	c.name = name
8627	return c
8628}
8629
8630// Fields allows partial responses to be retrieved. See
8631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8632// for more information.
8633func (c *OrganizationsExclusionsGetCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsGetCall {
8634	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8635	return c
8636}
8637
8638// IfNoneMatch sets the optional parameter which makes the operation
8639// fail if the object's ETag matches the given value. This is useful for
8640// getting updates only after the object has changed since the last
8641// request. Use googleapi.IsNotModified to check whether the response
8642// error from Do is the result of In-None-Match.
8643func (c *OrganizationsExclusionsGetCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsGetCall {
8644	c.ifNoneMatch_ = entityTag
8645	return c
8646}
8647
8648// Context sets the context to be used in this call's Do method. Any
8649// pending HTTP request will be aborted if the provided context is
8650// canceled.
8651func (c *OrganizationsExclusionsGetCall) Context(ctx context.Context) *OrganizationsExclusionsGetCall {
8652	c.ctx_ = ctx
8653	return c
8654}
8655
8656// Header returns an http.Header that can be modified by the caller to
8657// add HTTP headers to the request.
8658func (c *OrganizationsExclusionsGetCall) Header() http.Header {
8659	if c.header_ == nil {
8660		c.header_ = make(http.Header)
8661	}
8662	return c.header_
8663}
8664
8665func (c *OrganizationsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
8666	reqHeaders := make(http.Header)
8667	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
8668	for k, v := range c.header_ {
8669		reqHeaders[k] = v
8670	}
8671	reqHeaders.Set("User-Agent", c.s.userAgent())
8672	if c.ifNoneMatch_ != "" {
8673		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8674	}
8675	var body io.Reader = nil
8676	c.urlParams_.Set("alt", alt)
8677	c.urlParams_.Set("prettyPrint", "false")
8678	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
8679	urls += "?" + c.urlParams_.Encode()
8680	req, err := http.NewRequest("GET", urls, body)
8681	if err != nil {
8682		return nil, err
8683	}
8684	req.Header = reqHeaders
8685	googleapi.Expand(req.URL, map[string]string{
8686		"name": c.name,
8687	})
8688	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8689}
8690
8691// Do executes the "logging.organizations.exclusions.get" call.
8692// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
8693// status code is an error. Response headers are in either
8694// *LogExclusion.ServerResponse.Header or (if a response was returned at
8695// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8696// to check whether the returned error was because
8697// http.StatusNotModified was returned.
8698func (c *OrganizationsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
8699	gensupport.SetOptions(c.urlParams_, opts...)
8700	res, err := c.doRequest("json")
8701	if res != nil && res.StatusCode == http.StatusNotModified {
8702		if res.Body != nil {
8703			res.Body.Close()
8704		}
8705		return nil, &googleapi.Error{
8706			Code:   res.StatusCode,
8707			Header: res.Header,
8708		}
8709	}
8710	if err != nil {
8711		return nil, err
8712	}
8713	defer googleapi.CloseBody(res)
8714	if err := googleapi.CheckResponse(res); err != nil {
8715		return nil, err
8716	}
8717	ret := &LogExclusion{
8718		ServerResponse: googleapi.ServerResponse{
8719			Header:         res.Header,
8720			HTTPStatusCode: res.StatusCode,
8721		},
8722	}
8723	target := &ret
8724	if err := gensupport.DecodeResponse(target, res); err != nil {
8725		return nil, err
8726	}
8727	return ret, nil
8728	// {
8729	//   "description": "Gets the description of an exclusion.",
8730	//   "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}",
8731	//   "httpMethod": "GET",
8732	//   "id": "logging.organizations.exclusions.get",
8733	//   "parameterOrder": [
8734	//     "name"
8735	//   ],
8736	//   "parameters": {
8737	//     "name": {
8738	//       "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
8739	//       "location": "path",
8740	//       "pattern": "^organizations/[^/]+/exclusions/[^/]+$",
8741	//       "required": true,
8742	//       "type": "string"
8743	//     }
8744	//   },
8745	//   "path": "v2/{+name}",
8746	//   "response": {
8747	//     "$ref": "LogExclusion"
8748	//   },
8749	//   "scopes": [
8750	//     "https://www.googleapis.com/auth/cloud-platform",
8751	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
8752	//     "https://www.googleapis.com/auth/logging.admin",
8753	//     "https://www.googleapis.com/auth/logging.read"
8754	//   ]
8755	// }
8756
8757}
8758
8759// method id "logging.organizations.exclusions.list":
8760
8761type OrganizationsExclusionsListCall struct {
8762	s            *Service
8763	parent       string
8764	urlParams_   gensupport.URLParams
8765	ifNoneMatch_ string
8766	ctx_         context.Context
8767	header_      http.Header
8768}
8769
8770// List: Lists all the exclusions in a parent resource.
8771func (r *OrganizationsExclusionsService) List(parent string) *OrganizationsExclusionsListCall {
8772	c := &OrganizationsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8773	c.parent = parent
8774	return c
8775}
8776
8777// PageSize sets the optional parameter "pageSize": The maximum number
8778// of results to return from this request. Non-positive values are
8779// ignored. The presence of nextPageToken in the response indicates that
8780// more results might be available.
8781func (c *OrganizationsExclusionsListCall) PageSize(pageSize int64) *OrganizationsExclusionsListCall {
8782	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8783	return c
8784}
8785
8786// PageToken sets the optional parameter "pageToken": If present, then
8787// retrieve the next batch of results from the preceding call to this
8788// method. pageToken must be the value of nextPageToken from the
8789// previous response. The values of other method parameters should be
8790// identical to those in the previous call.
8791func (c *OrganizationsExclusionsListCall) PageToken(pageToken string) *OrganizationsExclusionsListCall {
8792	c.urlParams_.Set("pageToken", pageToken)
8793	return c
8794}
8795
8796// Fields allows partial responses to be retrieved. See
8797// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8798// for more information.
8799func (c *OrganizationsExclusionsListCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsListCall {
8800	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8801	return c
8802}
8803
8804// IfNoneMatch sets the optional parameter which makes the operation
8805// fail if the object's ETag matches the given value. This is useful for
8806// getting updates only after the object has changed since the last
8807// request. Use googleapi.IsNotModified to check whether the response
8808// error from Do is the result of In-None-Match.
8809func (c *OrganizationsExclusionsListCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsListCall {
8810	c.ifNoneMatch_ = entityTag
8811	return c
8812}
8813
8814// Context sets the context to be used in this call's Do method. Any
8815// pending HTTP request will be aborted if the provided context is
8816// canceled.
8817func (c *OrganizationsExclusionsListCall) Context(ctx context.Context) *OrganizationsExclusionsListCall {
8818	c.ctx_ = ctx
8819	return c
8820}
8821
8822// Header returns an http.Header that can be modified by the caller to
8823// add HTTP headers to the request.
8824func (c *OrganizationsExclusionsListCall) Header() http.Header {
8825	if c.header_ == nil {
8826		c.header_ = make(http.Header)
8827	}
8828	return c.header_
8829}
8830
8831func (c *OrganizationsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
8832	reqHeaders := make(http.Header)
8833	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
8834	for k, v := range c.header_ {
8835		reqHeaders[k] = v
8836	}
8837	reqHeaders.Set("User-Agent", c.s.userAgent())
8838	if c.ifNoneMatch_ != "" {
8839		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8840	}
8841	var body io.Reader = nil
8842	c.urlParams_.Set("alt", alt)
8843	c.urlParams_.Set("prettyPrint", "false")
8844	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
8845	urls += "?" + c.urlParams_.Encode()
8846	req, err := http.NewRequest("GET", urls, body)
8847	if err != nil {
8848		return nil, err
8849	}
8850	req.Header = reqHeaders
8851	googleapi.Expand(req.URL, map[string]string{
8852		"parent": c.parent,
8853	})
8854	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8855}
8856
8857// Do executes the "logging.organizations.exclusions.list" call.
8858// Exactly one of *ListExclusionsResponse or error will be non-nil. Any
8859// non-2xx status code is an error. Response headers are in either
8860// *ListExclusionsResponse.ServerResponse.Header or (if a response was
8861// returned at all) in error.(*googleapi.Error).Header. Use
8862// googleapi.IsNotModified to check whether the returned error was
8863// because http.StatusNotModified was returned.
8864func (c *OrganizationsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
8865	gensupport.SetOptions(c.urlParams_, opts...)
8866	res, err := c.doRequest("json")
8867	if res != nil && res.StatusCode == http.StatusNotModified {
8868		if res.Body != nil {
8869			res.Body.Close()
8870		}
8871		return nil, &googleapi.Error{
8872			Code:   res.StatusCode,
8873			Header: res.Header,
8874		}
8875	}
8876	if err != nil {
8877		return nil, err
8878	}
8879	defer googleapi.CloseBody(res)
8880	if err := googleapi.CheckResponse(res); err != nil {
8881		return nil, err
8882	}
8883	ret := &ListExclusionsResponse{
8884		ServerResponse: googleapi.ServerResponse{
8885			Header:         res.Header,
8886			HTTPStatusCode: res.StatusCode,
8887		},
8888	}
8889	target := &ret
8890	if err := gensupport.DecodeResponse(target, res); err != nil {
8891		return nil, err
8892	}
8893	return ret, nil
8894	// {
8895	//   "description": "Lists all the exclusions in a parent resource.",
8896	//   "flatPath": "v2/organizations/{organizationsId}/exclusions",
8897	//   "httpMethod": "GET",
8898	//   "id": "logging.organizations.exclusions.list",
8899	//   "parameterOrder": [
8900	//     "parent"
8901	//   ],
8902	//   "parameters": {
8903	//     "pageSize": {
8904	//       "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.",
8905	//       "format": "int32",
8906	//       "location": "query",
8907	//       "type": "integer"
8908	//     },
8909	//     "pageToken": {
8910	//       "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.",
8911	//       "location": "query",
8912	//       "type": "string"
8913	//     },
8914	//     "parent": {
8915	//       "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
8916	//       "location": "path",
8917	//       "pattern": "^organizations/[^/]+$",
8918	//       "required": true,
8919	//       "type": "string"
8920	//     }
8921	//   },
8922	//   "path": "v2/{+parent}/exclusions",
8923	//   "response": {
8924	//     "$ref": "ListExclusionsResponse"
8925	//   },
8926	//   "scopes": [
8927	//     "https://www.googleapis.com/auth/cloud-platform",
8928	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
8929	//     "https://www.googleapis.com/auth/logging.admin",
8930	//     "https://www.googleapis.com/auth/logging.read"
8931	//   ]
8932	// }
8933
8934}
8935
8936// Pages invokes f for each page of results.
8937// A non-nil error returned from f will halt the iteration.
8938// The provided context supersedes any context provided to the Context method.
8939func (c *OrganizationsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
8940	c.ctx_ = ctx
8941	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8942	for {
8943		x, err := c.Do()
8944		if err != nil {
8945			return err
8946		}
8947		if err := f(x); err != nil {
8948			return err
8949		}
8950		if x.NextPageToken == "" {
8951			return nil
8952		}
8953		c.PageToken(x.NextPageToken)
8954	}
8955}
8956
8957// method id "logging.organizations.exclusions.patch":
8958
8959type OrganizationsExclusionsPatchCall struct {
8960	s            *Service
8961	name         string
8962	logexclusion *LogExclusion
8963	urlParams_   gensupport.URLParams
8964	ctx_         context.Context
8965	header_      http.Header
8966}
8967
8968// Patch: Changes one or more properties of an existing exclusion.
8969func (r *OrganizationsExclusionsService) Patch(name string, logexclusion *LogExclusion) *OrganizationsExclusionsPatchCall {
8970	c := &OrganizationsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8971	c.name = name
8972	c.logexclusion = logexclusion
8973	return c
8974}
8975
8976// UpdateMask sets the optional parameter "updateMask": Required. A
8977// non-empty list of fields to change in the existing exclusion. New
8978// values for the fields are taken from the corresponding fields in the
8979// LogExclusion included in this request. Fields not mentioned in
8980// update_mask are not changed and are ignored in the request.For
8981// example, to change the filter and description of an exclusion,
8982// specify an update_mask of "filter,description".
8983func (c *OrganizationsExclusionsPatchCall) UpdateMask(updateMask string) *OrganizationsExclusionsPatchCall {
8984	c.urlParams_.Set("updateMask", updateMask)
8985	return c
8986}
8987
8988// Fields allows partial responses to be retrieved. See
8989// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8990// for more information.
8991func (c *OrganizationsExclusionsPatchCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsPatchCall {
8992	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8993	return c
8994}
8995
8996// Context sets the context to be used in this call's Do method. Any
8997// pending HTTP request will be aborted if the provided context is
8998// canceled.
8999func (c *OrganizationsExclusionsPatchCall) Context(ctx context.Context) *OrganizationsExclusionsPatchCall {
9000	c.ctx_ = ctx
9001	return c
9002}
9003
9004// Header returns an http.Header that can be modified by the caller to
9005// add HTTP headers to the request.
9006func (c *OrganizationsExclusionsPatchCall) Header() http.Header {
9007	if c.header_ == nil {
9008		c.header_ = make(http.Header)
9009	}
9010	return c.header_
9011}
9012
9013func (c *OrganizationsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
9014	reqHeaders := make(http.Header)
9015	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
9016	for k, v := range c.header_ {
9017		reqHeaders[k] = v
9018	}
9019	reqHeaders.Set("User-Agent", c.s.userAgent())
9020	var body io.Reader = nil
9021	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
9022	if err != nil {
9023		return nil, err
9024	}
9025	reqHeaders.Set("Content-Type", "application/json")
9026	c.urlParams_.Set("alt", alt)
9027	c.urlParams_.Set("prettyPrint", "false")
9028	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
9029	urls += "?" + c.urlParams_.Encode()
9030	req, err := http.NewRequest("PATCH", urls, body)
9031	if err != nil {
9032		return nil, err
9033	}
9034	req.Header = reqHeaders
9035	googleapi.Expand(req.URL, map[string]string{
9036		"name": c.name,
9037	})
9038	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9039}
9040
9041// Do executes the "logging.organizations.exclusions.patch" call.
9042// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
9043// status code is an error. Response headers are in either
9044// *LogExclusion.ServerResponse.Header or (if a response was returned at
9045// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9046// to check whether the returned error was because
9047// http.StatusNotModified was returned.
9048func (c *OrganizationsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
9049	gensupport.SetOptions(c.urlParams_, opts...)
9050	res, err := c.doRequest("json")
9051	if res != nil && res.StatusCode == http.StatusNotModified {
9052		if res.Body != nil {
9053			res.Body.Close()
9054		}
9055		return nil, &googleapi.Error{
9056			Code:   res.StatusCode,
9057			Header: res.Header,
9058		}
9059	}
9060	if err != nil {
9061		return nil, err
9062	}
9063	defer googleapi.CloseBody(res)
9064	if err := googleapi.CheckResponse(res); err != nil {
9065		return nil, err
9066	}
9067	ret := &LogExclusion{
9068		ServerResponse: googleapi.ServerResponse{
9069			Header:         res.Header,
9070			HTTPStatusCode: res.StatusCode,
9071		},
9072	}
9073	target := &ret
9074	if err := gensupport.DecodeResponse(target, res); err != nil {
9075		return nil, err
9076	}
9077	return ret, nil
9078	// {
9079	//   "description": "Changes one or more properties of an existing exclusion.",
9080	//   "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}",
9081	//   "httpMethod": "PATCH",
9082	//   "id": "logging.organizations.exclusions.patch",
9083	//   "parameterOrder": [
9084	//     "name"
9085	//   ],
9086	//   "parameters": {
9087	//     "name": {
9088	//       "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
9089	//       "location": "path",
9090	//       "pattern": "^organizations/[^/]+/exclusions/[^/]+$",
9091	//       "required": true,
9092	//       "type": "string"
9093	//     },
9094	//     "updateMask": {
9095	//       "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\".",
9096	//       "format": "google-fieldmask",
9097	//       "location": "query",
9098	//       "type": "string"
9099	//     }
9100	//   },
9101	//   "path": "v2/{+name}",
9102	//   "request": {
9103	//     "$ref": "LogExclusion"
9104	//   },
9105	//   "response": {
9106	//     "$ref": "LogExclusion"
9107	//   },
9108	//   "scopes": [
9109	//     "https://www.googleapis.com/auth/cloud-platform",
9110	//     "https://www.googleapis.com/auth/logging.admin"
9111	//   ]
9112	// }
9113
9114}
9115
9116// method id "logging.organizations.logs.delete":
9117
9118type OrganizationsLogsDeleteCall struct {
9119	s          *Service
9120	logName    string
9121	urlParams_ gensupport.URLParams
9122	ctx_       context.Context
9123	header_    http.Header
9124}
9125
9126// Delete: Deletes all the log entries in a log. The log reappears if it
9127// receives new entries. Log entries written shortly before the delete
9128// operation might not be deleted. Entries received after the delete
9129// operation with a timestamp before the operation will be deleted.
9130func (r *OrganizationsLogsService) Delete(logName string) *OrganizationsLogsDeleteCall {
9131	c := &OrganizationsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9132	c.logName = logName
9133	return c
9134}
9135
9136// Fields allows partial responses to be retrieved. See
9137// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9138// for more information.
9139func (c *OrganizationsLogsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLogsDeleteCall {
9140	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9141	return c
9142}
9143
9144// Context sets the context to be used in this call's Do method. Any
9145// pending HTTP request will be aborted if the provided context is
9146// canceled.
9147func (c *OrganizationsLogsDeleteCall) Context(ctx context.Context) *OrganizationsLogsDeleteCall {
9148	c.ctx_ = ctx
9149	return c
9150}
9151
9152// Header returns an http.Header that can be modified by the caller to
9153// add HTTP headers to the request.
9154func (c *OrganizationsLogsDeleteCall) Header() http.Header {
9155	if c.header_ == nil {
9156		c.header_ = make(http.Header)
9157	}
9158	return c.header_
9159}
9160
9161func (c *OrganizationsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
9162	reqHeaders := make(http.Header)
9163	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
9164	for k, v := range c.header_ {
9165		reqHeaders[k] = v
9166	}
9167	reqHeaders.Set("User-Agent", c.s.userAgent())
9168	var body io.Reader = nil
9169	c.urlParams_.Set("alt", alt)
9170	c.urlParams_.Set("prettyPrint", "false")
9171	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
9172	urls += "?" + c.urlParams_.Encode()
9173	req, err := http.NewRequest("DELETE", urls, body)
9174	if err != nil {
9175		return nil, err
9176	}
9177	req.Header = reqHeaders
9178	googleapi.Expand(req.URL, map[string]string{
9179		"logName": c.logName,
9180	})
9181	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9182}
9183
9184// Do executes the "logging.organizations.logs.delete" call.
9185// Exactly one of *Empty or error will be non-nil. Any non-2xx status
9186// code is an error. Response headers are in either
9187// *Empty.ServerResponse.Header or (if a response was returned at all)
9188// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9189// check whether the returned error was because http.StatusNotModified
9190// was returned.
9191func (c *OrganizationsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9192	gensupport.SetOptions(c.urlParams_, opts...)
9193	res, err := c.doRequest("json")
9194	if res != nil && res.StatusCode == http.StatusNotModified {
9195		if res.Body != nil {
9196			res.Body.Close()
9197		}
9198		return nil, &googleapi.Error{
9199			Code:   res.StatusCode,
9200			Header: res.Header,
9201		}
9202	}
9203	if err != nil {
9204		return nil, err
9205	}
9206	defer googleapi.CloseBody(res)
9207	if err := googleapi.CheckResponse(res); err != nil {
9208		return nil, err
9209	}
9210	ret := &Empty{
9211		ServerResponse: googleapi.ServerResponse{
9212			Header:         res.Header,
9213			HTTPStatusCode: res.StatusCode,
9214		},
9215	}
9216	target := &ret
9217	if err := gensupport.DecodeResponse(target, res); err != nil {
9218		return nil, err
9219	}
9220	return ret, nil
9221	// {
9222	//   "description": "Deletes all the log entries in a log. 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.",
9223	//   "flatPath": "v2/organizations/{organizationsId}/logs/{logsId}",
9224	//   "httpMethod": "DELETE",
9225	//   "id": "logging.organizations.logs.delete",
9226	//   "parameterOrder": [
9227	//     "logName"
9228	//   ],
9229	//   "parameters": {
9230	//     "logName": {
9231	//       "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.",
9232	//       "location": "path",
9233	//       "pattern": "^organizations/[^/]+/logs/[^/]+$",
9234	//       "required": true,
9235	//       "type": "string"
9236	//     }
9237	//   },
9238	//   "path": "v2/{+logName}",
9239	//   "response": {
9240	//     "$ref": "Empty"
9241	//   },
9242	//   "scopes": [
9243	//     "https://www.googleapis.com/auth/cloud-platform",
9244	//     "https://www.googleapis.com/auth/logging.admin"
9245	//   ]
9246	// }
9247
9248}
9249
9250// method id "logging.organizations.logs.list":
9251
9252type OrganizationsLogsListCall struct {
9253	s            *Service
9254	parent       string
9255	urlParams_   gensupport.URLParams
9256	ifNoneMatch_ string
9257	ctx_         context.Context
9258	header_      http.Header
9259}
9260
9261// List: Lists the logs in projects, organizations, folders, or billing
9262// accounts. Only logs that have entries are listed.
9263func (r *OrganizationsLogsService) List(parent string) *OrganizationsLogsListCall {
9264	c := &OrganizationsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9265	c.parent = parent
9266	return c
9267}
9268
9269// PageSize sets the optional parameter "pageSize": The maximum number
9270// of results to return from this request. Non-positive values are
9271// ignored. The presence of nextPageToken in the response indicates that
9272// more results might be available.
9273func (c *OrganizationsLogsListCall) PageSize(pageSize int64) *OrganizationsLogsListCall {
9274	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9275	return c
9276}
9277
9278// PageToken sets the optional parameter "pageToken": If present, then
9279// retrieve the next batch of results from the preceding call to this
9280// method. pageToken must be the value of nextPageToken from the
9281// previous response. The values of other method parameters should be
9282// identical to those in the previous call.
9283func (c *OrganizationsLogsListCall) PageToken(pageToken string) *OrganizationsLogsListCall {
9284	c.urlParams_.Set("pageToken", pageToken)
9285	return c
9286}
9287
9288// Fields allows partial responses to be retrieved. See
9289// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9290// for more information.
9291func (c *OrganizationsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsLogsListCall {
9292	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9293	return c
9294}
9295
9296// IfNoneMatch sets the optional parameter which makes the operation
9297// fail if the object's ETag matches the given value. This is useful for
9298// getting updates only after the object has changed since the last
9299// request. Use googleapi.IsNotModified to check whether the response
9300// error from Do is the result of In-None-Match.
9301func (c *OrganizationsLogsListCall) IfNoneMatch(entityTag string) *OrganizationsLogsListCall {
9302	c.ifNoneMatch_ = entityTag
9303	return c
9304}
9305
9306// Context sets the context to be used in this call's Do method. Any
9307// pending HTTP request will be aborted if the provided context is
9308// canceled.
9309func (c *OrganizationsLogsListCall) Context(ctx context.Context) *OrganizationsLogsListCall {
9310	c.ctx_ = ctx
9311	return c
9312}
9313
9314// Header returns an http.Header that can be modified by the caller to
9315// add HTTP headers to the request.
9316func (c *OrganizationsLogsListCall) Header() http.Header {
9317	if c.header_ == nil {
9318		c.header_ = make(http.Header)
9319	}
9320	return c.header_
9321}
9322
9323func (c *OrganizationsLogsListCall) doRequest(alt string) (*http.Response, error) {
9324	reqHeaders := make(http.Header)
9325	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
9326	for k, v := range c.header_ {
9327		reqHeaders[k] = v
9328	}
9329	reqHeaders.Set("User-Agent", c.s.userAgent())
9330	if c.ifNoneMatch_ != "" {
9331		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9332	}
9333	var body io.Reader = nil
9334	c.urlParams_.Set("alt", alt)
9335	c.urlParams_.Set("prettyPrint", "false")
9336	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
9337	urls += "?" + c.urlParams_.Encode()
9338	req, err := http.NewRequest("GET", urls, body)
9339	if err != nil {
9340		return nil, err
9341	}
9342	req.Header = reqHeaders
9343	googleapi.Expand(req.URL, map[string]string{
9344		"parent": c.parent,
9345	})
9346	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9347}
9348
9349// Do executes the "logging.organizations.logs.list" call.
9350// Exactly one of *ListLogsResponse or error will be non-nil. Any
9351// non-2xx status code is an error. Response headers are in either
9352// *ListLogsResponse.ServerResponse.Header or (if a response was
9353// returned at all) in error.(*googleapi.Error).Header. Use
9354// googleapi.IsNotModified to check whether the returned error was
9355// because http.StatusNotModified was returned.
9356func (c *OrganizationsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
9357	gensupport.SetOptions(c.urlParams_, opts...)
9358	res, err := c.doRequest("json")
9359	if res != nil && res.StatusCode == http.StatusNotModified {
9360		if res.Body != nil {
9361			res.Body.Close()
9362		}
9363		return nil, &googleapi.Error{
9364			Code:   res.StatusCode,
9365			Header: res.Header,
9366		}
9367	}
9368	if err != nil {
9369		return nil, err
9370	}
9371	defer googleapi.CloseBody(res)
9372	if err := googleapi.CheckResponse(res); err != nil {
9373		return nil, err
9374	}
9375	ret := &ListLogsResponse{
9376		ServerResponse: googleapi.ServerResponse{
9377			Header:         res.Header,
9378			HTTPStatusCode: res.StatusCode,
9379		},
9380	}
9381	target := &ret
9382	if err := gensupport.DecodeResponse(target, res); err != nil {
9383		return nil, err
9384	}
9385	return ret, nil
9386	// {
9387	//   "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.",
9388	//   "flatPath": "v2/organizations/{organizationsId}/logs",
9389	//   "httpMethod": "GET",
9390	//   "id": "logging.organizations.logs.list",
9391	//   "parameterOrder": [
9392	//     "parent"
9393	//   ],
9394	//   "parameters": {
9395	//     "pageSize": {
9396	//       "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.",
9397	//       "format": "int32",
9398	//       "location": "query",
9399	//       "type": "integer"
9400	//     },
9401	//     "pageToken": {
9402	//       "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.",
9403	//       "location": "query",
9404	//       "type": "string"
9405	//     },
9406	//     "parent": {
9407	//       "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
9408	//       "location": "path",
9409	//       "pattern": "^organizations/[^/]+$",
9410	//       "required": true,
9411	//       "type": "string"
9412	//     }
9413	//   },
9414	//   "path": "v2/{+parent}/logs",
9415	//   "response": {
9416	//     "$ref": "ListLogsResponse"
9417	//   },
9418	//   "scopes": [
9419	//     "https://www.googleapis.com/auth/cloud-platform",
9420	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
9421	//     "https://www.googleapis.com/auth/logging.admin",
9422	//     "https://www.googleapis.com/auth/logging.read"
9423	//   ]
9424	// }
9425
9426}
9427
9428// Pages invokes f for each page of results.
9429// A non-nil error returned from f will halt the iteration.
9430// The provided context supersedes any context provided to the Context method.
9431func (c *OrganizationsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
9432	c.ctx_ = ctx
9433	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9434	for {
9435		x, err := c.Do()
9436		if err != nil {
9437			return err
9438		}
9439		if err := f(x); err != nil {
9440			return err
9441		}
9442		if x.NextPageToken == "" {
9443			return nil
9444		}
9445		c.PageToken(x.NextPageToken)
9446	}
9447}
9448
9449// method id "logging.organizations.sinks.create":
9450
9451type OrganizationsSinksCreateCall struct {
9452	s          *Service
9453	parent     string
9454	logsink    *LogSink
9455	urlParams_ gensupport.URLParams
9456	ctx_       context.Context
9457	header_    http.Header
9458}
9459
9460// Create: Creates a sink that exports specified log entries to a
9461// destination. The export of newly-ingested log entries begins
9462// immediately, unless the sink's writer_identity is not permitted to
9463// write to the destination. A sink can export log entries only from the
9464// resource owning the sink.
9465func (r *OrganizationsSinksService) Create(parent string, logsink *LogSink) *OrganizationsSinksCreateCall {
9466	c := &OrganizationsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9467	c.parent = parent
9468	c.logsink = logsink
9469	return c
9470}
9471
9472// UniqueWriterIdentity sets the optional parameter
9473// "uniqueWriterIdentity": Determines the kind of IAM identity returned
9474// as writer_identity in the new sink. If this value is omitted or set
9475// to false, and if the sink's parent is a project, then the value
9476// returned as writer_identity is the same group or service account used
9477// by Logging before the addition of writer identities to this API. The
9478// sink's destination must be in the same project as the sink itself.If
9479// this field is set to true, or if the sink is owned by a non-project
9480// resource such as an organization, then the value of writer_identity
9481// will be a unique service account used only for exports from the new
9482// sink. For more information, see writer_identity in LogSink.
9483func (c *OrganizationsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksCreateCall {
9484	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
9485	return c
9486}
9487
9488// Fields allows partial responses to be retrieved. See
9489// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9490// for more information.
9491func (c *OrganizationsSinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsSinksCreateCall {
9492	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9493	return c
9494}
9495
9496// Context sets the context to be used in this call's Do method. Any
9497// pending HTTP request will be aborted if the provided context is
9498// canceled.
9499func (c *OrganizationsSinksCreateCall) Context(ctx context.Context) *OrganizationsSinksCreateCall {
9500	c.ctx_ = ctx
9501	return c
9502}
9503
9504// Header returns an http.Header that can be modified by the caller to
9505// add HTTP headers to the request.
9506func (c *OrganizationsSinksCreateCall) Header() http.Header {
9507	if c.header_ == nil {
9508		c.header_ = make(http.Header)
9509	}
9510	return c.header_
9511}
9512
9513func (c *OrganizationsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
9514	reqHeaders := make(http.Header)
9515	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
9516	for k, v := range c.header_ {
9517		reqHeaders[k] = v
9518	}
9519	reqHeaders.Set("User-Agent", c.s.userAgent())
9520	var body io.Reader = nil
9521	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
9522	if err != nil {
9523		return nil, err
9524	}
9525	reqHeaders.Set("Content-Type", "application/json")
9526	c.urlParams_.Set("alt", alt)
9527	c.urlParams_.Set("prettyPrint", "false")
9528	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
9529	urls += "?" + c.urlParams_.Encode()
9530	req, err := http.NewRequest("POST", urls, body)
9531	if err != nil {
9532		return nil, err
9533	}
9534	req.Header = reqHeaders
9535	googleapi.Expand(req.URL, map[string]string{
9536		"parent": c.parent,
9537	})
9538	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9539}
9540
9541// Do executes the "logging.organizations.sinks.create" call.
9542// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
9543// code is an error. Response headers are in either
9544// *LogSink.ServerResponse.Header or (if a response was returned at all)
9545// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9546// check whether the returned error was because http.StatusNotModified
9547// was returned.
9548func (c *OrganizationsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
9549	gensupport.SetOptions(c.urlParams_, opts...)
9550	res, err := c.doRequest("json")
9551	if res != nil && res.StatusCode == http.StatusNotModified {
9552		if res.Body != nil {
9553			res.Body.Close()
9554		}
9555		return nil, &googleapi.Error{
9556			Code:   res.StatusCode,
9557			Header: res.Header,
9558		}
9559	}
9560	if err != nil {
9561		return nil, err
9562	}
9563	defer googleapi.CloseBody(res)
9564	if err := googleapi.CheckResponse(res); err != nil {
9565		return nil, err
9566	}
9567	ret := &LogSink{
9568		ServerResponse: googleapi.ServerResponse{
9569			Header:         res.Header,
9570			HTTPStatusCode: res.StatusCode,
9571		},
9572	}
9573	target := &ret
9574	if err := gensupport.DecodeResponse(target, res); err != nil {
9575		return nil, err
9576	}
9577	return ret, nil
9578	// {
9579	//   "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.",
9580	//   "flatPath": "v2/organizations/{organizationsId}/sinks",
9581	//   "httpMethod": "POST",
9582	//   "id": "logging.organizations.sinks.create",
9583	//   "parameterOrder": [
9584	//     "parent"
9585	//   ],
9586	//   "parameters": {
9587	//     "parent": {
9588	//       "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
9589	//       "location": "path",
9590	//       "pattern": "^organizations/[^/]+$",
9591	//       "required": true,
9592	//       "type": "string"
9593	//     },
9594	//     "uniqueWriterIdentity": {
9595	//       "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 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.",
9596	//       "location": "query",
9597	//       "type": "boolean"
9598	//     }
9599	//   },
9600	//   "path": "v2/{+parent}/sinks",
9601	//   "request": {
9602	//     "$ref": "LogSink"
9603	//   },
9604	//   "response": {
9605	//     "$ref": "LogSink"
9606	//   },
9607	//   "scopes": [
9608	//     "https://www.googleapis.com/auth/cloud-platform",
9609	//     "https://www.googleapis.com/auth/logging.admin"
9610	//   ]
9611	// }
9612
9613}
9614
9615// method id "logging.organizations.sinks.delete":
9616
9617type OrganizationsSinksDeleteCall struct {
9618	s          *Service
9619	sinkNameid string
9620	urlParams_ gensupport.URLParams
9621	ctx_       context.Context
9622	header_    http.Header
9623}
9624
9625// Delete: Deletes a sink. If the sink has a unique writer_identity,
9626// then that service account is also deleted.
9627func (r *OrganizationsSinksService) Delete(sinkNameid string) *OrganizationsSinksDeleteCall {
9628	c := &OrganizationsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9629	c.sinkNameid = sinkNameid
9630	return c
9631}
9632
9633// Fields allows partial responses to be retrieved. See
9634// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9635// for more information.
9636func (c *OrganizationsSinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsSinksDeleteCall {
9637	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9638	return c
9639}
9640
9641// Context sets the context to be used in this call's Do method. Any
9642// pending HTTP request will be aborted if the provided context is
9643// canceled.
9644func (c *OrganizationsSinksDeleteCall) Context(ctx context.Context) *OrganizationsSinksDeleteCall {
9645	c.ctx_ = ctx
9646	return c
9647}
9648
9649// Header returns an http.Header that can be modified by the caller to
9650// add HTTP headers to the request.
9651func (c *OrganizationsSinksDeleteCall) Header() http.Header {
9652	if c.header_ == nil {
9653		c.header_ = make(http.Header)
9654	}
9655	return c.header_
9656}
9657
9658func (c *OrganizationsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
9659	reqHeaders := make(http.Header)
9660	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
9661	for k, v := range c.header_ {
9662		reqHeaders[k] = v
9663	}
9664	reqHeaders.Set("User-Agent", c.s.userAgent())
9665	var body io.Reader = nil
9666	c.urlParams_.Set("alt", alt)
9667	c.urlParams_.Set("prettyPrint", "false")
9668	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
9669	urls += "?" + c.urlParams_.Encode()
9670	req, err := http.NewRequest("DELETE", urls, body)
9671	if err != nil {
9672		return nil, err
9673	}
9674	req.Header = reqHeaders
9675	googleapi.Expand(req.URL, map[string]string{
9676		"sinkName": c.sinkNameid,
9677	})
9678	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9679}
9680
9681// Do executes the "logging.organizations.sinks.delete" call.
9682// Exactly one of *Empty or error will be non-nil. Any non-2xx status
9683// code is an error. Response headers are in either
9684// *Empty.ServerResponse.Header or (if a response was returned at all)
9685// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9686// check whether the returned error was because http.StatusNotModified
9687// was returned.
9688func (c *OrganizationsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9689	gensupport.SetOptions(c.urlParams_, opts...)
9690	res, err := c.doRequest("json")
9691	if res != nil && res.StatusCode == http.StatusNotModified {
9692		if res.Body != nil {
9693			res.Body.Close()
9694		}
9695		return nil, &googleapi.Error{
9696			Code:   res.StatusCode,
9697			Header: res.Header,
9698		}
9699	}
9700	if err != nil {
9701		return nil, err
9702	}
9703	defer googleapi.CloseBody(res)
9704	if err := googleapi.CheckResponse(res); err != nil {
9705		return nil, err
9706	}
9707	ret := &Empty{
9708		ServerResponse: googleapi.ServerResponse{
9709			Header:         res.Header,
9710			HTTPStatusCode: res.StatusCode,
9711		},
9712	}
9713	target := &ret
9714	if err := gensupport.DecodeResponse(target, res); err != nil {
9715		return nil, err
9716	}
9717	return ret, nil
9718	// {
9719	//   "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.",
9720	//   "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}",
9721	//   "httpMethod": "DELETE",
9722	//   "id": "logging.organizations.sinks.delete",
9723	//   "parameterOrder": [
9724	//     "sinkName"
9725	//   ],
9726	//   "parameters": {
9727	//     "sinkName": {
9728	//       "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
9729	//       "location": "path",
9730	//       "pattern": "^organizations/[^/]+/sinks/[^/]+$",
9731	//       "required": true,
9732	//       "type": "string"
9733	//     }
9734	//   },
9735	//   "path": "v2/{+sinkName}",
9736	//   "response": {
9737	//     "$ref": "Empty"
9738	//   },
9739	//   "scopes": [
9740	//     "https://www.googleapis.com/auth/cloud-platform",
9741	//     "https://www.googleapis.com/auth/logging.admin"
9742	//   ]
9743	// }
9744
9745}
9746
9747// method id "logging.organizations.sinks.get":
9748
9749type OrganizationsSinksGetCall struct {
9750	s            *Service
9751	sinkName     string
9752	urlParams_   gensupport.URLParams
9753	ifNoneMatch_ string
9754	ctx_         context.Context
9755	header_      http.Header
9756}
9757
9758// Get: Gets a sink.
9759func (r *OrganizationsSinksService) Get(sinkName string) *OrganizationsSinksGetCall {
9760	c := &OrganizationsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9761	c.sinkName = sinkName
9762	return c
9763}
9764
9765// Fields allows partial responses to be retrieved. See
9766// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9767// for more information.
9768func (c *OrganizationsSinksGetCall) Fields(s ...googleapi.Field) *OrganizationsSinksGetCall {
9769	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9770	return c
9771}
9772
9773// IfNoneMatch sets the optional parameter which makes the operation
9774// fail if the object's ETag matches the given value. This is useful for
9775// getting updates only after the object has changed since the last
9776// request. Use googleapi.IsNotModified to check whether the response
9777// error from Do is the result of In-None-Match.
9778func (c *OrganizationsSinksGetCall) IfNoneMatch(entityTag string) *OrganizationsSinksGetCall {
9779	c.ifNoneMatch_ = entityTag
9780	return c
9781}
9782
9783// Context sets the context to be used in this call's Do method. Any
9784// pending HTTP request will be aborted if the provided context is
9785// canceled.
9786func (c *OrganizationsSinksGetCall) Context(ctx context.Context) *OrganizationsSinksGetCall {
9787	c.ctx_ = ctx
9788	return c
9789}
9790
9791// Header returns an http.Header that can be modified by the caller to
9792// add HTTP headers to the request.
9793func (c *OrganizationsSinksGetCall) Header() http.Header {
9794	if c.header_ == nil {
9795		c.header_ = make(http.Header)
9796	}
9797	return c.header_
9798}
9799
9800func (c *OrganizationsSinksGetCall) doRequest(alt string) (*http.Response, error) {
9801	reqHeaders := make(http.Header)
9802	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
9803	for k, v := range c.header_ {
9804		reqHeaders[k] = v
9805	}
9806	reqHeaders.Set("User-Agent", c.s.userAgent())
9807	if c.ifNoneMatch_ != "" {
9808		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9809	}
9810	var body io.Reader = nil
9811	c.urlParams_.Set("alt", alt)
9812	c.urlParams_.Set("prettyPrint", "false")
9813	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
9814	urls += "?" + c.urlParams_.Encode()
9815	req, err := http.NewRequest("GET", urls, body)
9816	if err != nil {
9817		return nil, err
9818	}
9819	req.Header = reqHeaders
9820	googleapi.Expand(req.URL, map[string]string{
9821		"sinkName": c.sinkName,
9822	})
9823	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9824}
9825
9826// Do executes the "logging.organizations.sinks.get" call.
9827// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
9828// code is an error. Response headers are in either
9829// *LogSink.ServerResponse.Header or (if a response was returned at all)
9830// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9831// check whether the returned error was because http.StatusNotModified
9832// was returned.
9833func (c *OrganizationsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
9834	gensupport.SetOptions(c.urlParams_, opts...)
9835	res, err := c.doRequest("json")
9836	if res != nil && res.StatusCode == http.StatusNotModified {
9837		if res.Body != nil {
9838			res.Body.Close()
9839		}
9840		return nil, &googleapi.Error{
9841			Code:   res.StatusCode,
9842			Header: res.Header,
9843		}
9844	}
9845	if err != nil {
9846		return nil, err
9847	}
9848	defer googleapi.CloseBody(res)
9849	if err := googleapi.CheckResponse(res); err != nil {
9850		return nil, err
9851	}
9852	ret := &LogSink{
9853		ServerResponse: googleapi.ServerResponse{
9854			Header:         res.Header,
9855			HTTPStatusCode: res.StatusCode,
9856		},
9857	}
9858	target := &ret
9859	if err := gensupport.DecodeResponse(target, res); err != nil {
9860		return nil, err
9861	}
9862	return ret, nil
9863	// {
9864	//   "description": "Gets a sink.",
9865	//   "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}",
9866	//   "httpMethod": "GET",
9867	//   "id": "logging.organizations.sinks.get",
9868	//   "parameterOrder": [
9869	//     "sinkName"
9870	//   ],
9871	//   "parameters": {
9872	//     "sinkName": {
9873	//       "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
9874	//       "location": "path",
9875	//       "pattern": "^organizations/[^/]+/sinks/[^/]+$",
9876	//       "required": true,
9877	//       "type": "string"
9878	//     }
9879	//   },
9880	//   "path": "v2/{+sinkName}",
9881	//   "response": {
9882	//     "$ref": "LogSink"
9883	//   },
9884	//   "scopes": [
9885	//     "https://www.googleapis.com/auth/cloud-platform",
9886	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
9887	//     "https://www.googleapis.com/auth/logging.admin",
9888	//     "https://www.googleapis.com/auth/logging.read"
9889	//   ]
9890	// }
9891
9892}
9893
9894// method id "logging.organizations.sinks.list":
9895
9896type OrganizationsSinksListCall struct {
9897	s            *Service
9898	parent       string
9899	urlParams_   gensupport.URLParams
9900	ifNoneMatch_ string
9901	ctx_         context.Context
9902	header_      http.Header
9903}
9904
9905// List: Lists sinks.
9906func (r *OrganizationsSinksService) List(parent string) *OrganizationsSinksListCall {
9907	c := &OrganizationsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9908	c.parent = parent
9909	return c
9910}
9911
9912// PageSize sets the optional parameter "pageSize": The maximum number
9913// of results to return from this request. Non-positive values are
9914// ignored. The presence of nextPageToken in the response indicates that
9915// more results might be available.
9916func (c *OrganizationsSinksListCall) PageSize(pageSize int64) *OrganizationsSinksListCall {
9917	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9918	return c
9919}
9920
9921// PageToken sets the optional parameter "pageToken": If present, then
9922// retrieve the next batch of results from the preceding call to this
9923// method. pageToken must be the value of nextPageToken from the
9924// previous response. The values of other method parameters should be
9925// identical to those in the previous call.
9926func (c *OrganizationsSinksListCall) PageToken(pageToken string) *OrganizationsSinksListCall {
9927	c.urlParams_.Set("pageToken", pageToken)
9928	return c
9929}
9930
9931// Fields allows partial responses to be retrieved. See
9932// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9933// for more information.
9934func (c *OrganizationsSinksListCall) Fields(s ...googleapi.Field) *OrganizationsSinksListCall {
9935	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9936	return c
9937}
9938
9939// IfNoneMatch sets the optional parameter which makes the operation
9940// fail if the object's ETag matches the given value. This is useful for
9941// getting updates only after the object has changed since the last
9942// request. Use googleapi.IsNotModified to check whether the response
9943// error from Do is the result of In-None-Match.
9944func (c *OrganizationsSinksListCall) IfNoneMatch(entityTag string) *OrganizationsSinksListCall {
9945	c.ifNoneMatch_ = entityTag
9946	return c
9947}
9948
9949// Context sets the context to be used in this call's Do method. Any
9950// pending HTTP request will be aborted if the provided context is
9951// canceled.
9952func (c *OrganizationsSinksListCall) Context(ctx context.Context) *OrganizationsSinksListCall {
9953	c.ctx_ = ctx
9954	return c
9955}
9956
9957// Header returns an http.Header that can be modified by the caller to
9958// add HTTP headers to the request.
9959func (c *OrganizationsSinksListCall) Header() http.Header {
9960	if c.header_ == nil {
9961		c.header_ = make(http.Header)
9962	}
9963	return c.header_
9964}
9965
9966func (c *OrganizationsSinksListCall) doRequest(alt string) (*http.Response, error) {
9967	reqHeaders := make(http.Header)
9968	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
9969	for k, v := range c.header_ {
9970		reqHeaders[k] = v
9971	}
9972	reqHeaders.Set("User-Agent", c.s.userAgent())
9973	if c.ifNoneMatch_ != "" {
9974		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9975	}
9976	var body io.Reader = nil
9977	c.urlParams_.Set("alt", alt)
9978	c.urlParams_.Set("prettyPrint", "false")
9979	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
9980	urls += "?" + c.urlParams_.Encode()
9981	req, err := http.NewRequest("GET", urls, body)
9982	if err != nil {
9983		return nil, err
9984	}
9985	req.Header = reqHeaders
9986	googleapi.Expand(req.URL, map[string]string{
9987		"parent": c.parent,
9988	})
9989	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9990}
9991
9992// Do executes the "logging.organizations.sinks.list" call.
9993// Exactly one of *ListSinksResponse or error will be non-nil. Any
9994// non-2xx status code is an error. Response headers are in either
9995// *ListSinksResponse.ServerResponse.Header or (if a response was
9996// returned at all) in error.(*googleapi.Error).Header. Use
9997// googleapi.IsNotModified to check whether the returned error was
9998// because http.StatusNotModified was returned.
9999func (c *OrganizationsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
10000	gensupport.SetOptions(c.urlParams_, opts...)
10001	res, err := c.doRequest("json")
10002	if res != nil && res.StatusCode == http.StatusNotModified {
10003		if res.Body != nil {
10004			res.Body.Close()
10005		}
10006		return nil, &googleapi.Error{
10007			Code:   res.StatusCode,
10008			Header: res.Header,
10009		}
10010	}
10011	if err != nil {
10012		return nil, err
10013	}
10014	defer googleapi.CloseBody(res)
10015	if err := googleapi.CheckResponse(res); err != nil {
10016		return nil, err
10017	}
10018	ret := &ListSinksResponse{
10019		ServerResponse: googleapi.ServerResponse{
10020			Header:         res.Header,
10021			HTTPStatusCode: res.StatusCode,
10022		},
10023	}
10024	target := &ret
10025	if err := gensupport.DecodeResponse(target, res); err != nil {
10026		return nil, err
10027	}
10028	return ret, nil
10029	// {
10030	//   "description": "Lists sinks.",
10031	//   "flatPath": "v2/organizations/{organizationsId}/sinks",
10032	//   "httpMethod": "GET",
10033	//   "id": "logging.organizations.sinks.list",
10034	//   "parameterOrder": [
10035	//     "parent"
10036	//   ],
10037	//   "parameters": {
10038	//     "pageSize": {
10039	//       "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.",
10040	//       "format": "int32",
10041	//       "location": "query",
10042	//       "type": "integer"
10043	//     },
10044	//     "pageToken": {
10045	//       "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.",
10046	//       "location": "query",
10047	//       "type": "string"
10048	//     },
10049	//     "parent": {
10050	//       "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
10051	//       "location": "path",
10052	//       "pattern": "^organizations/[^/]+$",
10053	//       "required": true,
10054	//       "type": "string"
10055	//     }
10056	//   },
10057	//   "path": "v2/{+parent}/sinks",
10058	//   "response": {
10059	//     "$ref": "ListSinksResponse"
10060	//   },
10061	//   "scopes": [
10062	//     "https://www.googleapis.com/auth/cloud-platform",
10063	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
10064	//     "https://www.googleapis.com/auth/logging.admin",
10065	//     "https://www.googleapis.com/auth/logging.read"
10066	//   ]
10067	// }
10068
10069}
10070
10071// Pages invokes f for each page of results.
10072// A non-nil error returned from f will halt the iteration.
10073// The provided context supersedes any context provided to the Context method.
10074func (c *OrganizationsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
10075	c.ctx_ = ctx
10076	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10077	for {
10078		x, err := c.Do()
10079		if err != nil {
10080			return err
10081		}
10082		if err := f(x); err != nil {
10083			return err
10084		}
10085		if x.NextPageToken == "" {
10086			return nil
10087		}
10088		c.PageToken(x.NextPageToken)
10089	}
10090}
10091
10092// method id "logging.organizations.sinks.patch":
10093
10094type OrganizationsSinksPatchCall struct {
10095	s          *Service
10096	sinkNameid string
10097	logsink    *LogSink
10098	urlParams_ gensupport.URLParams
10099	ctx_       context.Context
10100	header_    http.Header
10101}
10102
10103// Patch: Updates a sink. This method replaces the following fields in
10104// the existing sink with values from the new sink: destination, and
10105// filter.The updated sink might also have a new writer_identity; see
10106// the unique_writer_identity field.
10107func (r *OrganizationsSinksService) Patch(sinkNameid string, logsink *LogSink) *OrganizationsSinksPatchCall {
10108	c := &OrganizationsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10109	c.sinkNameid = sinkNameid
10110	c.logsink = logsink
10111	return c
10112}
10113
10114// UniqueWriterIdentity sets the optional parameter
10115// "uniqueWriterIdentity": See sinks.create for a description of this
10116// field. When updating a sink, the effect of this field on the value of
10117// writer_identity in the updated sink depends on both the old and new
10118// values of this field:
10119// If the old and new values of this field are both false or both true,
10120// then there is no change to the sink's writer_identity.
10121// If the old value is false and the new value is true, then
10122// writer_identity is changed to a unique service account.
10123// It is an error if the old value is true and the new value is set to
10124// false or defaulted to false.
10125func (c *OrganizationsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksPatchCall {
10126	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
10127	return c
10128}
10129
10130// UpdateMask sets the optional parameter "updateMask": Field mask that
10131// specifies the fields in sink that need an update. A sink field will
10132// be overwritten if, and only if, it is in the update mask. name and
10133// output only fields cannot be updated.An empty updateMask is
10134// temporarily treated as using the following mask for backwards
10135// compatibility purposes:  destination,filter,includeChildren At some
10136// point in the future, behavior will be removed and specifying an empty
10137// updateMask will be an error.For a detailed FieldMask definition, see
10138// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample:
10139// updateMask=filter.
10140func (c *OrganizationsSinksPatchCall) UpdateMask(updateMask string) *OrganizationsSinksPatchCall {
10141	c.urlParams_.Set("updateMask", updateMask)
10142	return c
10143}
10144
10145// Fields allows partial responses to be retrieved. See
10146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10147// for more information.
10148func (c *OrganizationsSinksPatchCall) Fields(s ...googleapi.Field) *OrganizationsSinksPatchCall {
10149	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10150	return c
10151}
10152
10153// Context sets the context to be used in this call's Do method. Any
10154// pending HTTP request will be aborted if the provided context is
10155// canceled.
10156func (c *OrganizationsSinksPatchCall) Context(ctx context.Context) *OrganizationsSinksPatchCall {
10157	c.ctx_ = ctx
10158	return c
10159}
10160
10161// Header returns an http.Header that can be modified by the caller to
10162// add HTTP headers to the request.
10163func (c *OrganizationsSinksPatchCall) Header() http.Header {
10164	if c.header_ == nil {
10165		c.header_ = make(http.Header)
10166	}
10167	return c.header_
10168}
10169
10170func (c *OrganizationsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
10171	reqHeaders := make(http.Header)
10172	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
10173	for k, v := range c.header_ {
10174		reqHeaders[k] = v
10175	}
10176	reqHeaders.Set("User-Agent", c.s.userAgent())
10177	var body io.Reader = nil
10178	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
10179	if err != nil {
10180		return nil, err
10181	}
10182	reqHeaders.Set("Content-Type", "application/json")
10183	c.urlParams_.Set("alt", alt)
10184	c.urlParams_.Set("prettyPrint", "false")
10185	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
10186	urls += "?" + c.urlParams_.Encode()
10187	req, err := http.NewRequest("PATCH", urls, body)
10188	if err != nil {
10189		return nil, err
10190	}
10191	req.Header = reqHeaders
10192	googleapi.Expand(req.URL, map[string]string{
10193		"sinkName": c.sinkNameid,
10194	})
10195	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10196}
10197
10198// Do executes the "logging.organizations.sinks.patch" call.
10199// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
10200// code is an error. Response headers are in either
10201// *LogSink.ServerResponse.Header or (if a response was returned at all)
10202// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10203// check whether the returned error was because http.StatusNotModified
10204// was returned.
10205func (c *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
10206	gensupport.SetOptions(c.urlParams_, opts...)
10207	res, err := c.doRequest("json")
10208	if res != nil && res.StatusCode == http.StatusNotModified {
10209		if res.Body != nil {
10210			res.Body.Close()
10211		}
10212		return nil, &googleapi.Error{
10213			Code:   res.StatusCode,
10214			Header: res.Header,
10215		}
10216	}
10217	if err != nil {
10218		return nil, err
10219	}
10220	defer googleapi.CloseBody(res)
10221	if err := googleapi.CheckResponse(res); err != nil {
10222		return nil, err
10223	}
10224	ret := &LogSink{
10225		ServerResponse: googleapi.ServerResponse{
10226			Header:         res.Header,
10227			HTTPStatusCode: res.StatusCode,
10228		},
10229	}
10230	target := &ret
10231	if err := gensupport.DecodeResponse(target, res); err != nil {
10232		return nil, err
10233	}
10234	return ret, nil
10235	// {
10236	//   "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.",
10237	//   "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}",
10238	//   "httpMethod": "PATCH",
10239	//   "id": "logging.organizations.sinks.patch",
10240	//   "parameterOrder": [
10241	//     "sinkName"
10242	//   ],
10243	//   "parameters": {
10244	//     "sinkName": {
10245	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
10246	//       "location": "path",
10247	//       "pattern": "^organizations/[^/]+/sinks/[^/]+$",
10248	//       "required": true,
10249	//       "type": "string"
10250	//     },
10251	//     "uniqueWriterIdentity": {
10252	//       "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:\nIf 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.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.",
10253	//       "location": "query",
10254	//       "type": "boolean"
10255	//     },
10256	//     "updateMask": {
10257	//       "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,includeChildren At 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.FieldMaskExample: updateMask=filter.",
10258	//       "format": "google-fieldmask",
10259	//       "location": "query",
10260	//       "type": "string"
10261	//     }
10262	//   },
10263	//   "path": "v2/{+sinkName}",
10264	//   "request": {
10265	//     "$ref": "LogSink"
10266	//   },
10267	//   "response": {
10268	//     "$ref": "LogSink"
10269	//   },
10270	//   "scopes": [
10271	//     "https://www.googleapis.com/auth/cloud-platform",
10272	//     "https://www.googleapis.com/auth/logging.admin"
10273	//   ]
10274	// }
10275
10276}
10277
10278// method id "logging.organizations.sinks.update":
10279
10280type OrganizationsSinksUpdateCall struct {
10281	s          *Service
10282	sinkNameid string
10283	logsink    *LogSink
10284	urlParams_ gensupport.URLParams
10285	ctx_       context.Context
10286	header_    http.Header
10287}
10288
10289// Update: Updates a sink. This method replaces the following fields in
10290// the existing sink with values from the new sink: destination, and
10291// filter.The updated sink might also have a new writer_identity; see
10292// the unique_writer_identity field.
10293func (r *OrganizationsSinksService) Update(sinkNameid string, logsink *LogSink) *OrganizationsSinksUpdateCall {
10294	c := &OrganizationsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10295	c.sinkNameid = sinkNameid
10296	c.logsink = logsink
10297	return c
10298}
10299
10300// UniqueWriterIdentity sets the optional parameter
10301// "uniqueWriterIdentity": See sinks.create for a description of this
10302// field. When updating a sink, the effect of this field on the value of
10303// writer_identity in the updated sink depends on both the old and new
10304// values of this field:
10305// If the old and new values of this field are both false or both true,
10306// then there is no change to the sink's writer_identity.
10307// If the old value is false and the new value is true, then
10308// writer_identity is changed to a unique service account.
10309// It is an error if the old value is true and the new value is set to
10310// false or defaulted to false.
10311func (c *OrganizationsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksUpdateCall {
10312	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
10313	return c
10314}
10315
10316// UpdateMask sets the optional parameter "updateMask": Field mask that
10317// specifies the fields in sink that need an update. A sink field will
10318// be overwritten if, and only if, it is in the update mask. name and
10319// output only fields cannot be updated.An empty updateMask is
10320// temporarily treated as using the following mask for backwards
10321// compatibility purposes:  destination,filter,includeChildren At some
10322// point in the future, behavior will be removed and specifying an empty
10323// updateMask will be an error.For a detailed FieldMask definition, see
10324// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample:
10325// updateMask=filter.
10326func (c *OrganizationsSinksUpdateCall) UpdateMask(updateMask string) *OrganizationsSinksUpdateCall {
10327	c.urlParams_.Set("updateMask", updateMask)
10328	return c
10329}
10330
10331// Fields allows partial responses to be retrieved. See
10332// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10333// for more information.
10334func (c *OrganizationsSinksUpdateCall) Fields(s ...googleapi.Field) *OrganizationsSinksUpdateCall {
10335	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10336	return c
10337}
10338
10339// Context sets the context to be used in this call's Do method. Any
10340// pending HTTP request will be aborted if the provided context is
10341// canceled.
10342func (c *OrganizationsSinksUpdateCall) Context(ctx context.Context) *OrganizationsSinksUpdateCall {
10343	c.ctx_ = ctx
10344	return c
10345}
10346
10347// Header returns an http.Header that can be modified by the caller to
10348// add HTTP headers to the request.
10349func (c *OrganizationsSinksUpdateCall) Header() http.Header {
10350	if c.header_ == nil {
10351		c.header_ = make(http.Header)
10352	}
10353	return c.header_
10354}
10355
10356func (c *OrganizationsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
10357	reqHeaders := make(http.Header)
10358	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
10359	for k, v := range c.header_ {
10360		reqHeaders[k] = v
10361	}
10362	reqHeaders.Set("User-Agent", c.s.userAgent())
10363	var body io.Reader = nil
10364	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
10365	if err != nil {
10366		return nil, err
10367	}
10368	reqHeaders.Set("Content-Type", "application/json")
10369	c.urlParams_.Set("alt", alt)
10370	c.urlParams_.Set("prettyPrint", "false")
10371	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
10372	urls += "?" + c.urlParams_.Encode()
10373	req, err := http.NewRequest("PUT", urls, body)
10374	if err != nil {
10375		return nil, err
10376	}
10377	req.Header = reqHeaders
10378	googleapi.Expand(req.URL, map[string]string{
10379		"sinkName": c.sinkNameid,
10380	})
10381	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10382}
10383
10384// Do executes the "logging.organizations.sinks.update" call.
10385// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
10386// code is an error. Response headers are in either
10387// *LogSink.ServerResponse.Header or (if a response was returned at all)
10388// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10389// check whether the returned error was because http.StatusNotModified
10390// was returned.
10391func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
10392	gensupport.SetOptions(c.urlParams_, opts...)
10393	res, err := c.doRequest("json")
10394	if res != nil && res.StatusCode == http.StatusNotModified {
10395		if res.Body != nil {
10396			res.Body.Close()
10397		}
10398		return nil, &googleapi.Error{
10399			Code:   res.StatusCode,
10400			Header: res.Header,
10401		}
10402	}
10403	if err != nil {
10404		return nil, err
10405	}
10406	defer googleapi.CloseBody(res)
10407	if err := googleapi.CheckResponse(res); err != nil {
10408		return nil, err
10409	}
10410	ret := &LogSink{
10411		ServerResponse: googleapi.ServerResponse{
10412			Header:         res.Header,
10413			HTTPStatusCode: res.StatusCode,
10414		},
10415	}
10416	target := &ret
10417	if err := gensupport.DecodeResponse(target, res); err != nil {
10418		return nil, err
10419	}
10420	return ret, nil
10421	// {
10422	//   "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.",
10423	//   "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}",
10424	//   "httpMethod": "PUT",
10425	//   "id": "logging.organizations.sinks.update",
10426	//   "parameterOrder": [
10427	//     "sinkName"
10428	//   ],
10429	//   "parameters": {
10430	//     "sinkName": {
10431	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
10432	//       "location": "path",
10433	//       "pattern": "^organizations/[^/]+/sinks/[^/]+$",
10434	//       "required": true,
10435	//       "type": "string"
10436	//     },
10437	//     "uniqueWriterIdentity": {
10438	//       "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:\nIf 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.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.",
10439	//       "location": "query",
10440	//       "type": "boolean"
10441	//     },
10442	//     "updateMask": {
10443	//       "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,includeChildren At 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.FieldMaskExample: updateMask=filter.",
10444	//       "format": "google-fieldmask",
10445	//       "location": "query",
10446	//       "type": "string"
10447	//     }
10448	//   },
10449	//   "path": "v2/{+sinkName}",
10450	//   "request": {
10451	//     "$ref": "LogSink"
10452	//   },
10453	//   "response": {
10454	//     "$ref": "LogSink"
10455	//   },
10456	//   "scopes": [
10457	//     "https://www.googleapis.com/auth/cloud-platform",
10458	//     "https://www.googleapis.com/auth/logging.admin"
10459	//   ]
10460	// }
10461
10462}
10463
10464// method id "logging.projects.exclusions.create":
10465
10466type ProjectsExclusionsCreateCall struct {
10467	s            *Service
10468	parent       string
10469	logexclusion *LogExclusion
10470	urlParams_   gensupport.URLParams
10471	ctx_         context.Context
10472	header_      http.Header
10473}
10474
10475// Create: Creates a new exclusion in a specified parent resource. Only
10476// log entries belonging to that resource can be excluded. You can have
10477// up to 10 exclusions in a resource.
10478func (r *ProjectsExclusionsService) Create(parent string, logexclusion *LogExclusion) *ProjectsExclusionsCreateCall {
10479	c := &ProjectsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10480	c.parent = parent
10481	c.logexclusion = logexclusion
10482	return c
10483}
10484
10485// Fields allows partial responses to be retrieved. See
10486// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10487// for more information.
10488func (c *ProjectsExclusionsCreateCall) Fields(s ...googleapi.Field) *ProjectsExclusionsCreateCall {
10489	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10490	return c
10491}
10492
10493// Context sets the context to be used in this call's Do method. Any
10494// pending HTTP request will be aborted if the provided context is
10495// canceled.
10496func (c *ProjectsExclusionsCreateCall) Context(ctx context.Context) *ProjectsExclusionsCreateCall {
10497	c.ctx_ = ctx
10498	return c
10499}
10500
10501// Header returns an http.Header that can be modified by the caller to
10502// add HTTP headers to the request.
10503func (c *ProjectsExclusionsCreateCall) Header() http.Header {
10504	if c.header_ == nil {
10505		c.header_ = make(http.Header)
10506	}
10507	return c.header_
10508}
10509
10510func (c *ProjectsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
10511	reqHeaders := make(http.Header)
10512	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
10513	for k, v := range c.header_ {
10514		reqHeaders[k] = v
10515	}
10516	reqHeaders.Set("User-Agent", c.s.userAgent())
10517	var body io.Reader = nil
10518	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
10519	if err != nil {
10520		return nil, err
10521	}
10522	reqHeaders.Set("Content-Type", "application/json")
10523	c.urlParams_.Set("alt", alt)
10524	c.urlParams_.Set("prettyPrint", "false")
10525	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
10526	urls += "?" + c.urlParams_.Encode()
10527	req, err := http.NewRequest("POST", urls, body)
10528	if err != nil {
10529		return nil, err
10530	}
10531	req.Header = reqHeaders
10532	googleapi.Expand(req.URL, map[string]string{
10533		"parent": c.parent,
10534	})
10535	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10536}
10537
10538// Do executes the "logging.projects.exclusions.create" call.
10539// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
10540// status code is an error. Response headers are in either
10541// *LogExclusion.ServerResponse.Header or (if a response was returned at
10542// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10543// to check whether the returned error was because
10544// http.StatusNotModified was returned.
10545func (c *ProjectsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
10546	gensupport.SetOptions(c.urlParams_, opts...)
10547	res, err := c.doRequest("json")
10548	if res != nil && res.StatusCode == http.StatusNotModified {
10549		if res.Body != nil {
10550			res.Body.Close()
10551		}
10552		return nil, &googleapi.Error{
10553			Code:   res.StatusCode,
10554			Header: res.Header,
10555		}
10556	}
10557	if err != nil {
10558		return nil, err
10559	}
10560	defer googleapi.CloseBody(res)
10561	if err := googleapi.CheckResponse(res); err != nil {
10562		return nil, err
10563	}
10564	ret := &LogExclusion{
10565		ServerResponse: googleapi.ServerResponse{
10566			Header:         res.Header,
10567			HTTPStatusCode: res.StatusCode,
10568		},
10569	}
10570	target := &ret
10571	if err := gensupport.DecodeResponse(target, res); err != nil {
10572		return nil, err
10573	}
10574	return ret, nil
10575	// {
10576	//   "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.",
10577	//   "flatPath": "v2/projects/{projectsId}/exclusions",
10578	//   "httpMethod": "POST",
10579	//   "id": "logging.projects.exclusions.create",
10580	//   "parameterOrder": [
10581	//     "parent"
10582	//   ],
10583	//   "parameters": {
10584	//     "parent": {
10585	//       "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
10586	//       "location": "path",
10587	//       "pattern": "^projects/[^/]+$",
10588	//       "required": true,
10589	//       "type": "string"
10590	//     }
10591	//   },
10592	//   "path": "v2/{+parent}/exclusions",
10593	//   "request": {
10594	//     "$ref": "LogExclusion"
10595	//   },
10596	//   "response": {
10597	//     "$ref": "LogExclusion"
10598	//   },
10599	//   "scopes": [
10600	//     "https://www.googleapis.com/auth/cloud-platform",
10601	//     "https://www.googleapis.com/auth/logging.admin"
10602	//   ]
10603	// }
10604
10605}
10606
10607// method id "logging.projects.exclusions.delete":
10608
10609type ProjectsExclusionsDeleteCall struct {
10610	s          *Service
10611	name       string
10612	urlParams_ gensupport.URLParams
10613	ctx_       context.Context
10614	header_    http.Header
10615}
10616
10617// Delete: Deletes an exclusion.
10618func (r *ProjectsExclusionsService) Delete(name string) *ProjectsExclusionsDeleteCall {
10619	c := &ProjectsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10620	c.name = name
10621	return c
10622}
10623
10624// Fields allows partial responses to be retrieved. See
10625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10626// for more information.
10627func (c *ProjectsExclusionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsExclusionsDeleteCall {
10628	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10629	return c
10630}
10631
10632// Context sets the context to be used in this call's Do method. Any
10633// pending HTTP request will be aborted if the provided context is
10634// canceled.
10635func (c *ProjectsExclusionsDeleteCall) Context(ctx context.Context) *ProjectsExclusionsDeleteCall {
10636	c.ctx_ = ctx
10637	return c
10638}
10639
10640// Header returns an http.Header that can be modified by the caller to
10641// add HTTP headers to the request.
10642func (c *ProjectsExclusionsDeleteCall) Header() http.Header {
10643	if c.header_ == nil {
10644		c.header_ = make(http.Header)
10645	}
10646	return c.header_
10647}
10648
10649func (c *ProjectsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
10650	reqHeaders := make(http.Header)
10651	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
10652	for k, v := range c.header_ {
10653		reqHeaders[k] = v
10654	}
10655	reqHeaders.Set("User-Agent", c.s.userAgent())
10656	var body io.Reader = nil
10657	c.urlParams_.Set("alt", alt)
10658	c.urlParams_.Set("prettyPrint", "false")
10659	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
10660	urls += "?" + c.urlParams_.Encode()
10661	req, err := http.NewRequest("DELETE", urls, body)
10662	if err != nil {
10663		return nil, err
10664	}
10665	req.Header = reqHeaders
10666	googleapi.Expand(req.URL, map[string]string{
10667		"name": c.name,
10668	})
10669	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10670}
10671
10672// Do executes the "logging.projects.exclusions.delete" call.
10673// Exactly one of *Empty or error will be non-nil. Any non-2xx status
10674// code is an error. Response headers are in either
10675// *Empty.ServerResponse.Header or (if a response was returned at all)
10676// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10677// check whether the returned error was because http.StatusNotModified
10678// was returned.
10679func (c *ProjectsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10680	gensupport.SetOptions(c.urlParams_, opts...)
10681	res, err := c.doRequest("json")
10682	if res != nil && res.StatusCode == http.StatusNotModified {
10683		if res.Body != nil {
10684			res.Body.Close()
10685		}
10686		return nil, &googleapi.Error{
10687			Code:   res.StatusCode,
10688			Header: res.Header,
10689		}
10690	}
10691	if err != nil {
10692		return nil, err
10693	}
10694	defer googleapi.CloseBody(res)
10695	if err := googleapi.CheckResponse(res); err != nil {
10696		return nil, err
10697	}
10698	ret := &Empty{
10699		ServerResponse: googleapi.ServerResponse{
10700			Header:         res.Header,
10701			HTTPStatusCode: res.StatusCode,
10702		},
10703	}
10704	target := &ret
10705	if err := gensupport.DecodeResponse(target, res); err != nil {
10706		return nil, err
10707	}
10708	return ret, nil
10709	// {
10710	//   "description": "Deletes an exclusion.",
10711	//   "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}",
10712	//   "httpMethod": "DELETE",
10713	//   "id": "logging.projects.exclusions.delete",
10714	//   "parameterOrder": [
10715	//     "name"
10716	//   ],
10717	//   "parameters": {
10718	//     "name": {
10719	//       "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
10720	//       "location": "path",
10721	//       "pattern": "^projects/[^/]+/exclusions/[^/]+$",
10722	//       "required": true,
10723	//       "type": "string"
10724	//     }
10725	//   },
10726	//   "path": "v2/{+name}",
10727	//   "response": {
10728	//     "$ref": "Empty"
10729	//   },
10730	//   "scopes": [
10731	//     "https://www.googleapis.com/auth/cloud-platform",
10732	//     "https://www.googleapis.com/auth/logging.admin"
10733	//   ]
10734	// }
10735
10736}
10737
10738// method id "logging.projects.exclusions.get":
10739
10740type ProjectsExclusionsGetCall struct {
10741	s            *Service
10742	name         string
10743	urlParams_   gensupport.URLParams
10744	ifNoneMatch_ string
10745	ctx_         context.Context
10746	header_      http.Header
10747}
10748
10749// Get: Gets the description of an exclusion.
10750func (r *ProjectsExclusionsService) Get(name string) *ProjectsExclusionsGetCall {
10751	c := &ProjectsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10752	c.name = name
10753	return c
10754}
10755
10756// Fields allows partial responses to be retrieved. See
10757// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10758// for more information.
10759func (c *ProjectsExclusionsGetCall) Fields(s ...googleapi.Field) *ProjectsExclusionsGetCall {
10760	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10761	return c
10762}
10763
10764// IfNoneMatch sets the optional parameter which makes the operation
10765// fail if the object's ETag matches the given value. This is useful for
10766// getting updates only after the object has changed since the last
10767// request. Use googleapi.IsNotModified to check whether the response
10768// error from Do is the result of In-None-Match.
10769func (c *ProjectsExclusionsGetCall) IfNoneMatch(entityTag string) *ProjectsExclusionsGetCall {
10770	c.ifNoneMatch_ = entityTag
10771	return c
10772}
10773
10774// Context sets the context to be used in this call's Do method. Any
10775// pending HTTP request will be aborted if the provided context is
10776// canceled.
10777func (c *ProjectsExclusionsGetCall) Context(ctx context.Context) *ProjectsExclusionsGetCall {
10778	c.ctx_ = ctx
10779	return c
10780}
10781
10782// Header returns an http.Header that can be modified by the caller to
10783// add HTTP headers to the request.
10784func (c *ProjectsExclusionsGetCall) Header() http.Header {
10785	if c.header_ == nil {
10786		c.header_ = make(http.Header)
10787	}
10788	return c.header_
10789}
10790
10791func (c *ProjectsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
10792	reqHeaders := make(http.Header)
10793	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
10794	for k, v := range c.header_ {
10795		reqHeaders[k] = v
10796	}
10797	reqHeaders.Set("User-Agent", c.s.userAgent())
10798	if c.ifNoneMatch_ != "" {
10799		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10800	}
10801	var body io.Reader = nil
10802	c.urlParams_.Set("alt", alt)
10803	c.urlParams_.Set("prettyPrint", "false")
10804	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
10805	urls += "?" + c.urlParams_.Encode()
10806	req, err := http.NewRequest("GET", urls, body)
10807	if err != nil {
10808		return nil, err
10809	}
10810	req.Header = reqHeaders
10811	googleapi.Expand(req.URL, map[string]string{
10812		"name": c.name,
10813	})
10814	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10815}
10816
10817// Do executes the "logging.projects.exclusions.get" call.
10818// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
10819// status code is an error. Response headers are in either
10820// *LogExclusion.ServerResponse.Header or (if a response was returned at
10821// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10822// to check whether the returned error was because
10823// http.StatusNotModified was returned.
10824func (c *ProjectsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
10825	gensupport.SetOptions(c.urlParams_, opts...)
10826	res, err := c.doRequest("json")
10827	if res != nil && res.StatusCode == http.StatusNotModified {
10828		if res.Body != nil {
10829			res.Body.Close()
10830		}
10831		return nil, &googleapi.Error{
10832			Code:   res.StatusCode,
10833			Header: res.Header,
10834		}
10835	}
10836	if err != nil {
10837		return nil, err
10838	}
10839	defer googleapi.CloseBody(res)
10840	if err := googleapi.CheckResponse(res); err != nil {
10841		return nil, err
10842	}
10843	ret := &LogExclusion{
10844		ServerResponse: googleapi.ServerResponse{
10845			Header:         res.Header,
10846			HTTPStatusCode: res.StatusCode,
10847		},
10848	}
10849	target := &ret
10850	if err := gensupport.DecodeResponse(target, res); err != nil {
10851		return nil, err
10852	}
10853	return ret, nil
10854	// {
10855	//   "description": "Gets the description of an exclusion.",
10856	//   "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}",
10857	//   "httpMethod": "GET",
10858	//   "id": "logging.projects.exclusions.get",
10859	//   "parameterOrder": [
10860	//     "name"
10861	//   ],
10862	//   "parameters": {
10863	//     "name": {
10864	//       "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
10865	//       "location": "path",
10866	//       "pattern": "^projects/[^/]+/exclusions/[^/]+$",
10867	//       "required": true,
10868	//       "type": "string"
10869	//     }
10870	//   },
10871	//   "path": "v2/{+name}",
10872	//   "response": {
10873	//     "$ref": "LogExclusion"
10874	//   },
10875	//   "scopes": [
10876	//     "https://www.googleapis.com/auth/cloud-platform",
10877	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
10878	//     "https://www.googleapis.com/auth/logging.admin",
10879	//     "https://www.googleapis.com/auth/logging.read"
10880	//   ]
10881	// }
10882
10883}
10884
10885// method id "logging.projects.exclusions.list":
10886
10887type ProjectsExclusionsListCall struct {
10888	s            *Service
10889	parent       string
10890	urlParams_   gensupport.URLParams
10891	ifNoneMatch_ string
10892	ctx_         context.Context
10893	header_      http.Header
10894}
10895
10896// List: Lists all the exclusions in a parent resource.
10897func (r *ProjectsExclusionsService) List(parent string) *ProjectsExclusionsListCall {
10898	c := &ProjectsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10899	c.parent = parent
10900	return c
10901}
10902
10903// PageSize sets the optional parameter "pageSize": The maximum number
10904// of results to return from this request. Non-positive values are
10905// ignored. The presence of nextPageToken in the response indicates that
10906// more results might be available.
10907func (c *ProjectsExclusionsListCall) PageSize(pageSize int64) *ProjectsExclusionsListCall {
10908	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10909	return c
10910}
10911
10912// PageToken sets the optional parameter "pageToken": If present, then
10913// retrieve the next batch of results from the preceding call to this
10914// method. pageToken must be the value of nextPageToken from the
10915// previous response. The values of other method parameters should be
10916// identical to those in the previous call.
10917func (c *ProjectsExclusionsListCall) PageToken(pageToken string) *ProjectsExclusionsListCall {
10918	c.urlParams_.Set("pageToken", pageToken)
10919	return c
10920}
10921
10922// Fields allows partial responses to be retrieved. See
10923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10924// for more information.
10925func (c *ProjectsExclusionsListCall) Fields(s ...googleapi.Field) *ProjectsExclusionsListCall {
10926	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10927	return c
10928}
10929
10930// IfNoneMatch sets the optional parameter which makes the operation
10931// fail if the object's ETag matches the given value. This is useful for
10932// getting updates only after the object has changed since the last
10933// request. Use googleapi.IsNotModified to check whether the response
10934// error from Do is the result of In-None-Match.
10935func (c *ProjectsExclusionsListCall) IfNoneMatch(entityTag string) *ProjectsExclusionsListCall {
10936	c.ifNoneMatch_ = entityTag
10937	return c
10938}
10939
10940// Context sets the context to be used in this call's Do method. Any
10941// pending HTTP request will be aborted if the provided context is
10942// canceled.
10943func (c *ProjectsExclusionsListCall) Context(ctx context.Context) *ProjectsExclusionsListCall {
10944	c.ctx_ = ctx
10945	return c
10946}
10947
10948// Header returns an http.Header that can be modified by the caller to
10949// add HTTP headers to the request.
10950func (c *ProjectsExclusionsListCall) Header() http.Header {
10951	if c.header_ == nil {
10952		c.header_ = make(http.Header)
10953	}
10954	return c.header_
10955}
10956
10957func (c *ProjectsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
10958	reqHeaders := make(http.Header)
10959	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
10960	for k, v := range c.header_ {
10961		reqHeaders[k] = v
10962	}
10963	reqHeaders.Set("User-Agent", c.s.userAgent())
10964	if c.ifNoneMatch_ != "" {
10965		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10966	}
10967	var body io.Reader = nil
10968	c.urlParams_.Set("alt", alt)
10969	c.urlParams_.Set("prettyPrint", "false")
10970	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
10971	urls += "?" + c.urlParams_.Encode()
10972	req, err := http.NewRequest("GET", urls, body)
10973	if err != nil {
10974		return nil, err
10975	}
10976	req.Header = reqHeaders
10977	googleapi.Expand(req.URL, map[string]string{
10978		"parent": c.parent,
10979	})
10980	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10981}
10982
10983// Do executes the "logging.projects.exclusions.list" call.
10984// Exactly one of *ListExclusionsResponse or error will be non-nil. Any
10985// non-2xx status code is an error. Response headers are in either
10986// *ListExclusionsResponse.ServerResponse.Header or (if a response was
10987// returned at all) in error.(*googleapi.Error).Header. Use
10988// googleapi.IsNotModified to check whether the returned error was
10989// because http.StatusNotModified was returned.
10990func (c *ProjectsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
10991	gensupport.SetOptions(c.urlParams_, opts...)
10992	res, err := c.doRequest("json")
10993	if res != nil && res.StatusCode == http.StatusNotModified {
10994		if res.Body != nil {
10995			res.Body.Close()
10996		}
10997		return nil, &googleapi.Error{
10998			Code:   res.StatusCode,
10999			Header: res.Header,
11000		}
11001	}
11002	if err != nil {
11003		return nil, err
11004	}
11005	defer googleapi.CloseBody(res)
11006	if err := googleapi.CheckResponse(res); err != nil {
11007		return nil, err
11008	}
11009	ret := &ListExclusionsResponse{
11010		ServerResponse: googleapi.ServerResponse{
11011			Header:         res.Header,
11012			HTTPStatusCode: res.StatusCode,
11013		},
11014	}
11015	target := &ret
11016	if err := gensupport.DecodeResponse(target, res); err != nil {
11017		return nil, err
11018	}
11019	return ret, nil
11020	// {
11021	//   "description": "Lists all the exclusions in a parent resource.",
11022	//   "flatPath": "v2/projects/{projectsId}/exclusions",
11023	//   "httpMethod": "GET",
11024	//   "id": "logging.projects.exclusions.list",
11025	//   "parameterOrder": [
11026	//     "parent"
11027	//   ],
11028	//   "parameters": {
11029	//     "pageSize": {
11030	//       "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.",
11031	//       "format": "int32",
11032	//       "location": "query",
11033	//       "type": "integer"
11034	//     },
11035	//     "pageToken": {
11036	//       "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.",
11037	//       "location": "query",
11038	//       "type": "string"
11039	//     },
11040	//     "parent": {
11041	//       "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
11042	//       "location": "path",
11043	//       "pattern": "^projects/[^/]+$",
11044	//       "required": true,
11045	//       "type": "string"
11046	//     }
11047	//   },
11048	//   "path": "v2/{+parent}/exclusions",
11049	//   "response": {
11050	//     "$ref": "ListExclusionsResponse"
11051	//   },
11052	//   "scopes": [
11053	//     "https://www.googleapis.com/auth/cloud-platform",
11054	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
11055	//     "https://www.googleapis.com/auth/logging.admin",
11056	//     "https://www.googleapis.com/auth/logging.read"
11057	//   ]
11058	// }
11059
11060}
11061
11062// Pages invokes f for each page of results.
11063// A non-nil error returned from f will halt the iteration.
11064// The provided context supersedes any context provided to the Context method.
11065func (c *ProjectsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
11066	c.ctx_ = ctx
11067	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11068	for {
11069		x, err := c.Do()
11070		if err != nil {
11071			return err
11072		}
11073		if err := f(x); err != nil {
11074			return err
11075		}
11076		if x.NextPageToken == "" {
11077			return nil
11078		}
11079		c.PageToken(x.NextPageToken)
11080	}
11081}
11082
11083// method id "logging.projects.exclusions.patch":
11084
11085type ProjectsExclusionsPatchCall struct {
11086	s            *Service
11087	name         string
11088	logexclusion *LogExclusion
11089	urlParams_   gensupport.URLParams
11090	ctx_         context.Context
11091	header_      http.Header
11092}
11093
11094// Patch: Changes one or more properties of an existing exclusion.
11095func (r *ProjectsExclusionsService) Patch(name string, logexclusion *LogExclusion) *ProjectsExclusionsPatchCall {
11096	c := &ProjectsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11097	c.name = name
11098	c.logexclusion = logexclusion
11099	return c
11100}
11101
11102// UpdateMask sets the optional parameter "updateMask": Required. A
11103// non-empty list of fields to change in the existing exclusion. New
11104// values for the fields are taken from the corresponding fields in the
11105// LogExclusion included in this request. Fields not mentioned in
11106// update_mask are not changed and are ignored in the request.For
11107// example, to change the filter and description of an exclusion,
11108// specify an update_mask of "filter,description".
11109func (c *ProjectsExclusionsPatchCall) UpdateMask(updateMask string) *ProjectsExclusionsPatchCall {
11110	c.urlParams_.Set("updateMask", updateMask)
11111	return c
11112}
11113
11114// Fields allows partial responses to be retrieved. See
11115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11116// for more information.
11117func (c *ProjectsExclusionsPatchCall) Fields(s ...googleapi.Field) *ProjectsExclusionsPatchCall {
11118	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11119	return c
11120}
11121
11122// Context sets the context to be used in this call's Do method. Any
11123// pending HTTP request will be aborted if the provided context is
11124// canceled.
11125func (c *ProjectsExclusionsPatchCall) Context(ctx context.Context) *ProjectsExclusionsPatchCall {
11126	c.ctx_ = ctx
11127	return c
11128}
11129
11130// Header returns an http.Header that can be modified by the caller to
11131// add HTTP headers to the request.
11132func (c *ProjectsExclusionsPatchCall) Header() http.Header {
11133	if c.header_ == nil {
11134		c.header_ = make(http.Header)
11135	}
11136	return c.header_
11137}
11138
11139func (c *ProjectsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
11140	reqHeaders := make(http.Header)
11141	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
11142	for k, v := range c.header_ {
11143		reqHeaders[k] = v
11144	}
11145	reqHeaders.Set("User-Agent", c.s.userAgent())
11146	var body io.Reader = nil
11147	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
11148	if err != nil {
11149		return nil, err
11150	}
11151	reqHeaders.Set("Content-Type", "application/json")
11152	c.urlParams_.Set("alt", alt)
11153	c.urlParams_.Set("prettyPrint", "false")
11154	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
11155	urls += "?" + c.urlParams_.Encode()
11156	req, err := http.NewRequest("PATCH", urls, body)
11157	if err != nil {
11158		return nil, err
11159	}
11160	req.Header = reqHeaders
11161	googleapi.Expand(req.URL, map[string]string{
11162		"name": c.name,
11163	})
11164	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11165}
11166
11167// Do executes the "logging.projects.exclusions.patch" call.
11168// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx
11169// status code is an error. Response headers are in either
11170// *LogExclusion.ServerResponse.Header or (if a response was returned at
11171// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11172// to check whether the returned error was because
11173// http.StatusNotModified was returned.
11174func (c *ProjectsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
11175	gensupport.SetOptions(c.urlParams_, opts...)
11176	res, err := c.doRequest("json")
11177	if res != nil && res.StatusCode == http.StatusNotModified {
11178		if res.Body != nil {
11179			res.Body.Close()
11180		}
11181		return nil, &googleapi.Error{
11182			Code:   res.StatusCode,
11183			Header: res.Header,
11184		}
11185	}
11186	if err != nil {
11187		return nil, err
11188	}
11189	defer googleapi.CloseBody(res)
11190	if err := googleapi.CheckResponse(res); err != nil {
11191		return nil, err
11192	}
11193	ret := &LogExclusion{
11194		ServerResponse: googleapi.ServerResponse{
11195			Header:         res.Header,
11196			HTTPStatusCode: res.StatusCode,
11197		},
11198	}
11199	target := &ret
11200	if err := gensupport.DecodeResponse(target, res); err != nil {
11201		return nil, err
11202	}
11203	return ret, nil
11204	// {
11205	//   "description": "Changes one or more properties of an existing exclusion.",
11206	//   "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}",
11207	//   "httpMethod": "PATCH",
11208	//   "id": "logging.projects.exclusions.patch",
11209	//   "parameterOrder": [
11210	//     "name"
11211	//   ],
11212	//   "parameters": {
11213	//     "name": {
11214	//       "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".",
11215	//       "location": "path",
11216	//       "pattern": "^projects/[^/]+/exclusions/[^/]+$",
11217	//       "required": true,
11218	//       "type": "string"
11219	//     },
11220	//     "updateMask": {
11221	//       "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\".",
11222	//       "format": "google-fieldmask",
11223	//       "location": "query",
11224	//       "type": "string"
11225	//     }
11226	//   },
11227	//   "path": "v2/{+name}",
11228	//   "request": {
11229	//     "$ref": "LogExclusion"
11230	//   },
11231	//   "response": {
11232	//     "$ref": "LogExclusion"
11233	//   },
11234	//   "scopes": [
11235	//     "https://www.googleapis.com/auth/cloud-platform",
11236	//     "https://www.googleapis.com/auth/logging.admin"
11237	//   ]
11238	// }
11239
11240}
11241
11242// method id "logging.projects.logs.delete":
11243
11244type ProjectsLogsDeleteCall struct {
11245	s          *Service
11246	logName    string
11247	urlParams_ gensupport.URLParams
11248	ctx_       context.Context
11249	header_    http.Header
11250}
11251
11252// Delete: Deletes all the log entries in a log. The log reappears if it
11253// receives new entries. Log entries written shortly before the delete
11254// operation might not be deleted. Entries received after the delete
11255// operation with a timestamp before the operation will be deleted.
11256func (r *ProjectsLogsService) Delete(logName string) *ProjectsLogsDeleteCall {
11257	c := &ProjectsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11258	c.logName = logName
11259	return c
11260}
11261
11262// Fields allows partial responses to be retrieved. See
11263// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11264// for more information.
11265func (c *ProjectsLogsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLogsDeleteCall {
11266	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11267	return c
11268}
11269
11270// Context sets the context to be used in this call's Do method. Any
11271// pending HTTP request will be aborted if the provided context is
11272// canceled.
11273func (c *ProjectsLogsDeleteCall) Context(ctx context.Context) *ProjectsLogsDeleteCall {
11274	c.ctx_ = ctx
11275	return c
11276}
11277
11278// Header returns an http.Header that can be modified by the caller to
11279// add HTTP headers to the request.
11280func (c *ProjectsLogsDeleteCall) Header() http.Header {
11281	if c.header_ == nil {
11282		c.header_ = make(http.Header)
11283	}
11284	return c.header_
11285}
11286
11287func (c *ProjectsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
11288	reqHeaders := make(http.Header)
11289	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
11290	for k, v := range c.header_ {
11291		reqHeaders[k] = v
11292	}
11293	reqHeaders.Set("User-Agent", c.s.userAgent())
11294	var body io.Reader = nil
11295	c.urlParams_.Set("alt", alt)
11296	c.urlParams_.Set("prettyPrint", "false")
11297	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
11298	urls += "?" + c.urlParams_.Encode()
11299	req, err := http.NewRequest("DELETE", urls, body)
11300	if err != nil {
11301		return nil, err
11302	}
11303	req.Header = reqHeaders
11304	googleapi.Expand(req.URL, map[string]string{
11305		"logName": c.logName,
11306	})
11307	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11308}
11309
11310// Do executes the "logging.projects.logs.delete" call.
11311// Exactly one of *Empty or error will be non-nil. Any non-2xx status
11312// code is an error. Response headers are in either
11313// *Empty.ServerResponse.Header or (if a response was returned at all)
11314// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11315// check whether the returned error was because http.StatusNotModified
11316// was returned.
11317func (c *ProjectsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11318	gensupport.SetOptions(c.urlParams_, opts...)
11319	res, err := c.doRequest("json")
11320	if res != nil && res.StatusCode == http.StatusNotModified {
11321		if res.Body != nil {
11322			res.Body.Close()
11323		}
11324		return nil, &googleapi.Error{
11325			Code:   res.StatusCode,
11326			Header: res.Header,
11327		}
11328	}
11329	if err != nil {
11330		return nil, err
11331	}
11332	defer googleapi.CloseBody(res)
11333	if err := googleapi.CheckResponse(res); err != nil {
11334		return nil, err
11335	}
11336	ret := &Empty{
11337		ServerResponse: googleapi.ServerResponse{
11338			Header:         res.Header,
11339			HTTPStatusCode: res.StatusCode,
11340		},
11341	}
11342	target := &ret
11343	if err := gensupport.DecodeResponse(target, res); err != nil {
11344		return nil, err
11345	}
11346	return ret, nil
11347	// {
11348	//   "description": "Deletes all the log entries in a log. 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.",
11349	//   "flatPath": "v2/projects/{projectsId}/logs/{logsId}",
11350	//   "httpMethod": "DELETE",
11351	//   "id": "logging.projects.logs.delete",
11352	//   "parameterOrder": [
11353	//     "logName"
11354	//   ],
11355	//   "parameters": {
11356	//     "logName": {
11357	//       "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.",
11358	//       "location": "path",
11359	//       "pattern": "^projects/[^/]+/logs/[^/]+$",
11360	//       "required": true,
11361	//       "type": "string"
11362	//     }
11363	//   },
11364	//   "path": "v2/{+logName}",
11365	//   "response": {
11366	//     "$ref": "Empty"
11367	//   },
11368	//   "scopes": [
11369	//     "https://www.googleapis.com/auth/cloud-platform",
11370	//     "https://www.googleapis.com/auth/logging.admin"
11371	//   ]
11372	// }
11373
11374}
11375
11376// method id "logging.projects.logs.list":
11377
11378type ProjectsLogsListCall struct {
11379	s            *Service
11380	parent       string
11381	urlParams_   gensupport.URLParams
11382	ifNoneMatch_ string
11383	ctx_         context.Context
11384	header_      http.Header
11385}
11386
11387// List: Lists the logs in projects, organizations, folders, or billing
11388// accounts. Only logs that have entries are listed.
11389func (r *ProjectsLogsService) List(parent string) *ProjectsLogsListCall {
11390	c := &ProjectsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11391	c.parent = parent
11392	return c
11393}
11394
11395// PageSize sets the optional parameter "pageSize": The maximum number
11396// of results to return from this request. Non-positive values are
11397// ignored. The presence of nextPageToken in the response indicates that
11398// more results might be available.
11399func (c *ProjectsLogsListCall) PageSize(pageSize int64) *ProjectsLogsListCall {
11400	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11401	return c
11402}
11403
11404// PageToken sets the optional parameter "pageToken": If present, then
11405// retrieve the next batch of results from the preceding call to this
11406// method. pageToken must be the value of nextPageToken from the
11407// previous response. The values of other method parameters should be
11408// identical to those in the previous call.
11409func (c *ProjectsLogsListCall) PageToken(pageToken string) *ProjectsLogsListCall {
11410	c.urlParams_.Set("pageToken", pageToken)
11411	return c
11412}
11413
11414// Fields allows partial responses to be retrieved. See
11415// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11416// for more information.
11417func (c *ProjectsLogsListCall) Fields(s ...googleapi.Field) *ProjectsLogsListCall {
11418	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11419	return c
11420}
11421
11422// IfNoneMatch sets the optional parameter which makes the operation
11423// fail if the object's ETag matches the given value. This is useful for
11424// getting updates only after the object has changed since the last
11425// request. Use googleapi.IsNotModified to check whether the response
11426// error from Do is the result of In-None-Match.
11427func (c *ProjectsLogsListCall) IfNoneMatch(entityTag string) *ProjectsLogsListCall {
11428	c.ifNoneMatch_ = entityTag
11429	return c
11430}
11431
11432// Context sets the context to be used in this call's Do method. Any
11433// pending HTTP request will be aborted if the provided context is
11434// canceled.
11435func (c *ProjectsLogsListCall) Context(ctx context.Context) *ProjectsLogsListCall {
11436	c.ctx_ = ctx
11437	return c
11438}
11439
11440// Header returns an http.Header that can be modified by the caller to
11441// add HTTP headers to the request.
11442func (c *ProjectsLogsListCall) Header() http.Header {
11443	if c.header_ == nil {
11444		c.header_ = make(http.Header)
11445	}
11446	return c.header_
11447}
11448
11449func (c *ProjectsLogsListCall) doRequest(alt string) (*http.Response, error) {
11450	reqHeaders := make(http.Header)
11451	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
11452	for k, v := range c.header_ {
11453		reqHeaders[k] = v
11454	}
11455	reqHeaders.Set("User-Agent", c.s.userAgent())
11456	if c.ifNoneMatch_ != "" {
11457		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11458	}
11459	var body io.Reader = nil
11460	c.urlParams_.Set("alt", alt)
11461	c.urlParams_.Set("prettyPrint", "false")
11462	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
11463	urls += "?" + c.urlParams_.Encode()
11464	req, err := http.NewRequest("GET", urls, body)
11465	if err != nil {
11466		return nil, err
11467	}
11468	req.Header = reqHeaders
11469	googleapi.Expand(req.URL, map[string]string{
11470		"parent": c.parent,
11471	})
11472	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11473}
11474
11475// Do executes the "logging.projects.logs.list" call.
11476// Exactly one of *ListLogsResponse or error will be non-nil. Any
11477// non-2xx status code is an error. Response headers are in either
11478// *ListLogsResponse.ServerResponse.Header or (if a response was
11479// returned at all) in error.(*googleapi.Error).Header. Use
11480// googleapi.IsNotModified to check whether the returned error was
11481// because http.StatusNotModified was returned.
11482func (c *ProjectsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
11483	gensupport.SetOptions(c.urlParams_, opts...)
11484	res, err := c.doRequest("json")
11485	if res != nil && res.StatusCode == http.StatusNotModified {
11486		if res.Body != nil {
11487			res.Body.Close()
11488		}
11489		return nil, &googleapi.Error{
11490			Code:   res.StatusCode,
11491			Header: res.Header,
11492		}
11493	}
11494	if err != nil {
11495		return nil, err
11496	}
11497	defer googleapi.CloseBody(res)
11498	if err := googleapi.CheckResponse(res); err != nil {
11499		return nil, err
11500	}
11501	ret := &ListLogsResponse{
11502		ServerResponse: googleapi.ServerResponse{
11503			Header:         res.Header,
11504			HTTPStatusCode: res.StatusCode,
11505		},
11506	}
11507	target := &ret
11508	if err := gensupport.DecodeResponse(target, res); err != nil {
11509		return nil, err
11510	}
11511	return ret, nil
11512	// {
11513	//   "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.",
11514	//   "flatPath": "v2/projects/{projectsId}/logs",
11515	//   "httpMethod": "GET",
11516	//   "id": "logging.projects.logs.list",
11517	//   "parameterOrder": [
11518	//     "parent"
11519	//   ],
11520	//   "parameters": {
11521	//     "pageSize": {
11522	//       "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.",
11523	//       "format": "int32",
11524	//       "location": "query",
11525	//       "type": "integer"
11526	//     },
11527	//     "pageToken": {
11528	//       "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.",
11529	//       "location": "query",
11530	//       "type": "string"
11531	//     },
11532	//     "parent": {
11533	//       "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
11534	//       "location": "path",
11535	//       "pattern": "^projects/[^/]+$",
11536	//       "required": true,
11537	//       "type": "string"
11538	//     }
11539	//   },
11540	//   "path": "v2/{+parent}/logs",
11541	//   "response": {
11542	//     "$ref": "ListLogsResponse"
11543	//   },
11544	//   "scopes": [
11545	//     "https://www.googleapis.com/auth/cloud-platform",
11546	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
11547	//     "https://www.googleapis.com/auth/logging.admin",
11548	//     "https://www.googleapis.com/auth/logging.read"
11549	//   ]
11550	// }
11551
11552}
11553
11554// Pages invokes f for each page of results.
11555// A non-nil error returned from f will halt the iteration.
11556// The provided context supersedes any context provided to the Context method.
11557func (c *ProjectsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
11558	c.ctx_ = ctx
11559	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11560	for {
11561		x, err := c.Do()
11562		if err != nil {
11563			return err
11564		}
11565		if err := f(x); err != nil {
11566			return err
11567		}
11568		if x.NextPageToken == "" {
11569			return nil
11570		}
11571		c.PageToken(x.NextPageToken)
11572	}
11573}
11574
11575// method id "logging.projects.metrics.create":
11576
11577type ProjectsMetricsCreateCall struct {
11578	s          *Service
11579	parent     string
11580	logmetric  *LogMetric
11581	urlParams_ gensupport.URLParams
11582	ctx_       context.Context
11583	header_    http.Header
11584}
11585
11586// Create: Creates a logs-based metric.
11587func (r *ProjectsMetricsService) Create(parent string, logmetric *LogMetric) *ProjectsMetricsCreateCall {
11588	c := &ProjectsMetricsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11589	c.parent = parent
11590	c.logmetric = logmetric
11591	return c
11592}
11593
11594// Fields allows partial responses to be retrieved. See
11595// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11596// for more information.
11597func (c *ProjectsMetricsCreateCall) Fields(s ...googleapi.Field) *ProjectsMetricsCreateCall {
11598	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11599	return c
11600}
11601
11602// Context sets the context to be used in this call's Do method. Any
11603// pending HTTP request will be aborted if the provided context is
11604// canceled.
11605func (c *ProjectsMetricsCreateCall) Context(ctx context.Context) *ProjectsMetricsCreateCall {
11606	c.ctx_ = ctx
11607	return c
11608}
11609
11610// Header returns an http.Header that can be modified by the caller to
11611// add HTTP headers to the request.
11612func (c *ProjectsMetricsCreateCall) Header() http.Header {
11613	if c.header_ == nil {
11614		c.header_ = make(http.Header)
11615	}
11616	return c.header_
11617}
11618
11619func (c *ProjectsMetricsCreateCall) doRequest(alt string) (*http.Response, error) {
11620	reqHeaders := make(http.Header)
11621	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
11622	for k, v := range c.header_ {
11623		reqHeaders[k] = v
11624	}
11625	reqHeaders.Set("User-Agent", c.s.userAgent())
11626	var body io.Reader = nil
11627	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logmetric)
11628	if err != nil {
11629		return nil, err
11630	}
11631	reqHeaders.Set("Content-Type", "application/json")
11632	c.urlParams_.Set("alt", alt)
11633	c.urlParams_.Set("prettyPrint", "false")
11634	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/metrics")
11635	urls += "?" + c.urlParams_.Encode()
11636	req, err := http.NewRequest("POST", urls, body)
11637	if err != nil {
11638		return nil, err
11639	}
11640	req.Header = reqHeaders
11641	googleapi.Expand(req.URL, map[string]string{
11642		"parent": c.parent,
11643	})
11644	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11645}
11646
11647// Do executes the "logging.projects.metrics.create" call.
11648// Exactly one of *LogMetric or error will be non-nil. Any non-2xx
11649// status code is an error. Response headers are in either
11650// *LogMetric.ServerResponse.Header or (if a response was returned at
11651// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11652// to check whether the returned error was because
11653// http.StatusNotModified was returned.
11654func (c *ProjectsMetricsCreateCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
11655	gensupport.SetOptions(c.urlParams_, opts...)
11656	res, err := c.doRequest("json")
11657	if res != nil && res.StatusCode == http.StatusNotModified {
11658		if res.Body != nil {
11659			res.Body.Close()
11660		}
11661		return nil, &googleapi.Error{
11662			Code:   res.StatusCode,
11663			Header: res.Header,
11664		}
11665	}
11666	if err != nil {
11667		return nil, err
11668	}
11669	defer googleapi.CloseBody(res)
11670	if err := googleapi.CheckResponse(res); err != nil {
11671		return nil, err
11672	}
11673	ret := &LogMetric{
11674		ServerResponse: googleapi.ServerResponse{
11675			Header:         res.Header,
11676			HTTPStatusCode: res.StatusCode,
11677		},
11678	}
11679	target := &ret
11680	if err := gensupport.DecodeResponse(target, res); err != nil {
11681		return nil, err
11682	}
11683	return ret, nil
11684	// {
11685	//   "description": "Creates a logs-based metric.",
11686	//   "flatPath": "v2/projects/{projectsId}/metrics",
11687	//   "httpMethod": "POST",
11688	//   "id": "logging.projects.metrics.create",
11689	//   "parameterOrder": [
11690	//     "parent"
11691	//   ],
11692	//   "parameters": {
11693	//     "parent": {
11694	//       "description": "The resource name of the project in which to create the metric:\n\"projects/[PROJECT_ID]\"\nThe new metric must be provided in the request.",
11695	//       "location": "path",
11696	//       "pattern": "^projects/[^/]+$",
11697	//       "required": true,
11698	//       "type": "string"
11699	//     }
11700	//   },
11701	//   "path": "v2/{+parent}/metrics",
11702	//   "request": {
11703	//     "$ref": "LogMetric"
11704	//   },
11705	//   "response": {
11706	//     "$ref": "LogMetric"
11707	//   },
11708	//   "scopes": [
11709	//     "https://www.googleapis.com/auth/cloud-platform",
11710	//     "https://www.googleapis.com/auth/logging.admin",
11711	//     "https://www.googleapis.com/auth/logging.write"
11712	//   ]
11713	// }
11714
11715}
11716
11717// method id "logging.projects.metrics.delete":
11718
11719type ProjectsMetricsDeleteCall struct {
11720	s          *Service
11721	metricName string
11722	urlParams_ gensupport.URLParams
11723	ctx_       context.Context
11724	header_    http.Header
11725}
11726
11727// Delete: Deletes a logs-based metric.
11728func (r *ProjectsMetricsService) Delete(metricName string) *ProjectsMetricsDeleteCall {
11729	c := &ProjectsMetricsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11730	c.metricName = metricName
11731	return c
11732}
11733
11734// Fields allows partial responses to be retrieved. See
11735// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11736// for more information.
11737func (c *ProjectsMetricsDeleteCall) Fields(s ...googleapi.Field) *ProjectsMetricsDeleteCall {
11738	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11739	return c
11740}
11741
11742// Context sets the context to be used in this call's Do method. Any
11743// pending HTTP request will be aborted if the provided context is
11744// canceled.
11745func (c *ProjectsMetricsDeleteCall) Context(ctx context.Context) *ProjectsMetricsDeleteCall {
11746	c.ctx_ = ctx
11747	return c
11748}
11749
11750// Header returns an http.Header that can be modified by the caller to
11751// add HTTP headers to the request.
11752func (c *ProjectsMetricsDeleteCall) Header() http.Header {
11753	if c.header_ == nil {
11754		c.header_ = make(http.Header)
11755	}
11756	return c.header_
11757}
11758
11759func (c *ProjectsMetricsDeleteCall) doRequest(alt string) (*http.Response, error) {
11760	reqHeaders := make(http.Header)
11761	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
11762	for k, v := range c.header_ {
11763		reqHeaders[k] = v
11764	}
11765	reqHeaders.Set("User-Agent", c.s.userAgent())
11766	var body io.Reader = nil
11767	c.urlParams_.Set("alt", alt)
11768	c.urlParams_.Set("prettyPrint", "false")
11769	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
11770	urls += "?" + c.urlParams_.Encode()
11771	req, err := http.NewRequest("DELETE", urls, body)
11772	if err != nil {
11773		return nil, err
11774	}
11775	req.Header = reqHeaders
11776	googleapi.Expand(req.URL, map[string]string{
11777		"metricName": c.metricName,
11778	})
11779	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11780}
11781
11782// Do executes the "logging.projects.metrics.delete" call.
11783// Exactly one of *Empty or error will be non-nil. Any non-2xx status
11784// code is an error. Response headers are in either
11785// *Empty.ServerResponse.Header or (if a response was returned at all)
11786// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11787// check whether the returned error was because http.StatusNotModified
11788// was returned.
11789func (c *ProjectsMetricsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11790	gensupport.SetOptions(c.urlParams_, opts...)
11791	res, err := c.doRequest("json")
11792	if res != nil && res.StatusCode == http.StatusNotModified {
11793		if res.Body != nil {
11794			res.Body.Close()
11795		}
11796		return nil, &googleapi.Error{
11797			Code:   res.StatusCode,
11798			Header: res.Header,
11799		}
11800	}
11801	if err != nil {
11802		return nil, err
11803	}
11804	defer googleapi.CloseBody(res)
11805	if err := googleapi.CheckResponse(res); err != nil {
11806		return nil, err
11807	}
11808	ret := &Empty{
11809		ServerResponse: googleapi.ServerResponse{
11810			Header:         res.Header,
11811			HTTPStatusCode: res.StatusCode,
11812		},
11813	}
11814	target := &ret
11815	if err := gensupport.DecodeResponse(target, res); err != nil {
11816		return nil, err
11817	}
11818	return ret, nil
11819	// {
11820	//   "description": "Deletes a logs-based metric.",
11821	//   "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}",
11822	//   "httpMethod": "DELETE",
11823	//   "id": "logging.projects.metrics.delete",
11824	//   "parameterOrder": [
11825	//     "metricName"
11826	//   ],
11827	//   "parameters": {
11828	//     "metricName": {
11829	//       "description": "The resource name of the metric to delete:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n",
11830	//       "location": "path",
11831	//       "pattern": "^projects/[^/]+/metrics/[^/]+$",
11832	//       "required": true,
11833	//       "type": "string"
11834	//     }
11835	//   },
11836	//   "path": "v2/{+metricName}",
11837	//   "response": {
11838	//     "$ref": "Empty"
11839	//   },
11840	//   "scopes": [
11841	//     "https://www.googleapis.com/auth/cloud-platform",
11842	//     "https://www.googleapis.com/auth/logging.admin",
11843	//     "https://www.googleapis.com/auth/logging.write"
11844	//   ]
11845	// }
11846
11847}
11848
11849// method id "logging.projects.metrics.get":
11850
11851type ProjectsMetricsGetCall struct {
11852	s            *Service
11853	metricName   string
11854	urlParams_   gensupport.URLParams
11855	ifNoneMatch_ string
11856	ctx_         context.Context
11857	header_      http.Header
11858}
11859
11860// Get: Gets a logs-based metric.
11861func (r *ProjectsMetricsService) Get(metricName string) *ProjectsMetricsGetCall {
11862	c := &ProjectsMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11863	c.metricName = metricName
11864	return c
11865}
11866
11867// Fields allows partial responses to be retrieved. See
11868// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11869// for more information.
11870func (c *ProjectsMetricsGetCall) Fields(s ...googleapi.Field) *ProjectsMetricsGetCall {
11871	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11872	return c
11873}
11874
11875// IfNoneMatch sets the optional parameter which makes the operation
11876// fail if the object's ETag matches the given value. This is useful for
11877// getting updates only after the object has changed since the last
11878// request. Use googleapi.IsNotModified to check whether the response
11879// error from Do is the result of In-None-Match.
11880func (c *ProjectsMetricsGetCall) IfNoneMatch(entityTag string) *ProjectsMetricsGetCall {
11881	c.ifNoneMatch_ = entityTag
11882	return c
11883}
11884
11885// Context sets the context to be used in this call's Do method. Any
11886// pending HTTP request will be aborted if the provided context is
11887// canceled.
11888func (c *ProjectsMetricsGetCall) Context(ctx context.Context) *ProjectsMetricsGetCall {
11889	c.ctx_ = ctx
11890	return c
11891}
11892
11893// Header returns an http.Header that can be modified by the caller to
11894// add HTTP headers to the request.
11895func (c *ProjectsMetricsGetCall) Header() http.Header {
11896	if c.header_ == nil {
11897		c.header_ = make(http.Header)
11898	}
11899	return c.header_
11900}
11901
11902func (c *ProjectsMetricsGetCall) doRequest(alt string) (*http.Response, error) {
11903	reqHeaders := make(http.Header)
11904	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
11905	for k, v := range c.header_ {
11906		reqHeaders[k] = v
11907	}
11908	reqHeaders.Set("User-Agent", c.s.userAgent())
11909	if c.ifNoneMatch_ != "" {
11910		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11911	}
11912	var body io.Reader = nil
11913	c.urlParams_.Set("alt", alt)
11914	c.urlParams_.Set("prettyPrint", "false")
11915	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
11916	urls += "?" + c.urlParams_.Encode()
11917	req, err := http.NewRequest("GET", urls, body)
11918	if err != nil {
11919		return nil, err
11920	}
11921	req.Header = reqHeaders
11922	googleapi.Expand(req.URL, map[string]string{
11923		"metricName": c.metricName,
11924	})
11925	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11926}
11927
11928// Do executes the "logging.projects.metrics.get" call.
11929// Exactly one of *LogMetric or error will be non-nil. Any non-2xx
11930// status code is an error. Response headers are in either
11931// *LogMetric.ServerResponse.Header or (if a response was returned at
11932// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11933// to check whether the returned error was because
11934// http.StatusNotModified was returned.
11935func (c *ProjectsMetricsGetCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
11936	gensupport.SetOptions(c.urlParams_, opts...)
11937	res, err := c.doRequest("json")
11938	if res != nil && res.StatusCode == http.StatusNotModified {
11939		if res.Body != nil {
11940			res.Body.Close()
11941		}
11942		return nil, &googleapi.Error{
11943			Code:   res.StatusCode,
11944			Header: res.Header,
11945		}
11946	}
11947	if err != nil {
11948		return nil, err
11949	}
11950	defer googleapi.CloseBody(res)
11951	if err := googleapi.CheckResponse(res); err != nil {
11952		return nil, err
11953	}
11954	ret := &LogMetric{
11955		ServerResponse: googleapi.ServerResponse{
11956			Header:         res.Header,
11957			HTTPStatusCode: res.StatusCode,
11958		},
11959	}
11960	target := &ret
11961	if err := gensupport.DecodeResponse(target, res); err != nil {
11962		return nil, err
11963	}
11964	return ret, nil
11965	// {
11966	//   "description": "Gets a logs-based metric.",
11967	//   "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}",
11968	//   "httpMethod": "GET",
11969	//   "id": "logging.projects.metrics.get",
11970	//   "parameterOrder": [
11971	//     "metricName"
11972	//   ],
11973	//   "parameters": {
11974	//     "metricName": {
11975	//       "description": "The resource name of the desired metric:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n",
11976	//       "location": "path",
11977	//       "pattern": "^projects/[^/]+/metrics/[^/]+$",
11978	//       "required": true,
11979	//       "type": "string"
11980	//     }
11981	//   },
11982	//   "path": "v2/{+metricName}",
11983	//   "response": {
11984	//     "$ref": "LogMetric"
11985	//   },
11986	//   "scopes": [
11987	//     "https://www.googleapis.com/auth/cloud-platform",
11988	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
11989	//     "https://www.googleapis.com/auth/logging.admin",
11990	//     "https://www.googleapis.com/auth/logging.read"
11991	//   ]
11992	// }
11993
11994}
11995
11996// method id "logging.projects.metrics.list":
11997
11998type ProjectsMetricsListCall struct {
11999	s            *Service
12000	parent       string
12001	urlParams_   gensupport.URLParams
12002	ifNoneMatch_ string
12003	ctx_         context.Context
12004	header_      http.Header
12005}
12006
12007// List: Lists logs-based metrics.
12008func (r *ProjectsMetricsService) List(parent string) *ProjectsMetricsListCall {
12009	c := &ProjectsMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12010	c.parent = parent
12011	return c
12012}
12013
12014// PageSize sets the optional parameter "pageSize": The maximum number
12015// of results to return from this request. Non-positive values are
12016// ignored. The presence of nextPageToken in the response indicates that
12017// more results might be available.
12018func (c *ProjectsMetricsListCall) PageSize(pageSize int64) *ProjectsMetricsListCall {
12019	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12020	return c
12021}
12022
12023// PageToken sets the optional parameter "pageToken": If present, then
12024// retrieve the next batch of results from the preceding call to this
12025// method. pageToken must be the value of nextPageToken from the
12026// previous response. The values of other method parameters should be
12027// identical to those in the previous call.
12028func (c *ProjectsMetricsListCall) PageToken(pageToken string) *ProjectsMetricsListCall {
12029	c.urlParams_.Set("pageToken", pageToken)
12030	return c
12031}
12032
12033// Fields allows partial responses to be retrieved. See
12034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12035// for more information.
12036func (c *ProjectsMetricsListCall) Fields(s ...googleapi.Field) *ProjectsMetricsListCall {
12037	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12038	return c
12039}
12040
12041// IfNoneMatch sets the optional parameter which makes the operation
12042// fail if the object's ETag matches the given value. This is useful for
12043// getting updates only after the object has changed since the last
12044// request. Use googleapi.IsNotModified to check whether the response
12045// error from Do is the result of In-None-Match.
12046func (c *ProjectsMetricsListCall) IfNoneMatch(entityTag string) *ProjectsMetricsListCall {
12047	c.ifNoneMatch_ = entityTag
12048	return c
12049}
12050
12051// Context sets the context to be used in this call's Do method. Any
12052// pending HTTP request will be aborted if the provided context is
12053// canceled.
12054func (c *ProjectsMetricsListCall) Context(ctx context.Context) *ProjectsMetricsListCall {
12055	c.ctx_ = ctx
12056	return c
12057}
12058
12059// Header returns an http.Header that can be modified by the caller to
12060// add HTTP headers to the request.
12061func (c *ProjectsMetricsListCall) Header() http.Header {
12062	if c.header_ == nil {
12063		c.header_ = make(http.Header)
12064	}
12065	return c.header_
12066}
12067
12068func (c *ProjectsMetricsListCall) doRequest(alt string) (*http.Response, error) {
12069	reqHeaders := make(http.Header)
12070	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
12071	for k, v := range c.header_ {
12072		reqHeaders[k] = v
12073	}
12074	reqHeaders.Set("User-Agent", c.s.userAgent())
12075	if c.ifNoneMatch_ != "" {
12076		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12077	}
12078	var body io.Reader = nil
12079	c.urlParams_.Set("alt", alt)
12080	c.urlParams_.Set("prettyPrint", "false")
12081	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/metrics")
12082	urls += "?" + c.urlParams_.Encode()
12083	req, err := http.NewRequest("GET", urls, body)
12084	if err != nil {
12085		return nil, err
12086	}
12087	req.Header = reqHeaders
12088	googleapi.Expand(req.URL, map[string]string{
12089		"parent": c.parent,
12090	})
12091	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12092}
12093
12094// Do executes the "logging.projects.metrics.list" call.
12095// Exactly one of *ListLogMetricsResponse or error will be non-nil. Any
12096// non-2xx status code is an error. Response headers are in either
12097// *ListLogMetricsResponse.ServerResponse.Header or (if a response was
12098// returned at all) in error.(*googleapi.Error).Header. Use
12099// googleapi.IsNotModified to check whether the returned error was
12100// because http.StatusNotModified was returned.
12101func (c *ProjectsMetricsListCall) Do(opts ...googleapi.CallOption) (*ListLogMetricsResponse, error) {
12102	gensupport.SetOptions(c.urlParams_, opts...)
12103	res, err := c.doRequest("json")
12104	if res != nil && res.StatusCode == http.StatusNotModified {
12105		if res.Body != nil {
12106			res.Body.Close()
12107		}
12108		return nil, &googleapi.Error{
12109			Code:   res.StatusCode,
12110			Header: res.Header,
12111		}
12112	}
12113	if err != nil {
12114		return nil, err
12115	}
12116	defer googleapi.CloseBody(res)
12117	if err := googleapi.CheckResponse(res); err != nil {
12118		return nil, err
12119	}
12120	ret := &ListLogMetricsResponse{
12121		ServerResponse: googleapi.ServerResponse{
12122			Header:         res.Header,
12123			HTTPStatusCode: res.StatusCode,
12124		},
12125	}
12126	target := &ret
12127	if err := gensupport.DecodeResponse(target, res); err != nil {
12128		return nil, err
12129	}
12130	return ret, nil
12131	// {
12132	//   "description": "Lists logs-based metrics.",
12133	//   "flatPath": "v2/projects/{projectsId}/metrics",
12134	//   "httpMethod": "GET",
12135	//   "id": "logging.projects.metrics.list",
12136	//   "parameterOrder": [
12137	//     "parent"
12138	//   ],
12139	//   "parameters": {
12140	//     "pageSize": {
12141	//       "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.",
12142	//       "format": "int32",
12143	//       "location": "query",
12144	//       "type": "integer"
12145	//     },
12146	//     "pageToken": {
12147	//       "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.",
12148	//       "location": "query",
12149	//       "type": "string"
12150	//     },
12151	//     "parent": {
12152	//       "description": "Required. The name of the project containing the metrics:\n\"projects/[PROJECT_ID]\"\n",
12153	//       "location": "path",
12154	//       "pattern": "^projects/[^/]+$",
12155	//       "required": true,
12156	//       "type": "string"
12157	//     }
12158	//   },
12159	//   "path": "v2/{+parent}/metrics",
12160	//   "response": {
12161	//     "$ref": "ListLogMetricsResponse"
12162	//   },
12163	//   "scopes": [
12164	//     "https://www.googleapis.com/auth/cloud-platform",
12165	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
12166	//     "https://www.googleapis.com/auth/logging.admin",
12167	//     "https://www.googleapis.com/auth/logging.read"
12168	//   ]
12169	// }
12170
12171}
12172
12173// Pages invokes f for each page of results.
12174// A non-nil error returned from f will halt the iteration.
12175// The provided context supersedes any context provided to the Context method.
12176func (c *ProjectsMetricsListCall) Pages(ctx context.Context, f func(*ListLogMetricsResponse) error) error {
12177	c.ctx_ = ctx
12178	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12179	for {
12180		x, err := c.Do()
12181		if err != nil {
12182			return err
12183		}
12184		if err := f(x); err != nil {
12185			return err
12186		}
12187		if x.NextPageToken == "" {
12188			return nil
12189		}
12190		c.PageToken(x.NextPageToken)
12191	}
12192}
12193
12194// method id "logging.projects.metrics.update":
12195
12196type ProjectsMetricsUpdateCall struct {
12197	s          *Service
12198	metricName string
12199	logmetric  *LogMetric
12200	urlParams_ gensupport.URLParams
12201	ctx_       context.Context
12202	header_    http.Header
12203}
12204
12205// Update: Creates or updates a logs-based metric.
12206func (r *ProjectsMetricsService) Update(metricName string, logmetric *LogMetric) *ProjectsMetricsUpdateCall {
12207	c := &ProjectsMetricsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12208	c.metricName = metricName
12209	c.logmetric = logmetric
12210	return c
12211}
12212
12213// Fields allows partial responses to be retrieved. See
12214// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12215// for more information.
12216func (c *ProjectsMetricsUpdateCall) Fields(s ...googleapi.Field) *ProjectsMetricsUpdateCall {
12217	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12218	return c
12219}
12220
12221// Context sets the context to be used in this call's Do method. Any
12222// pending HTTP request will be aborted if the provided context is
12223// canceled.
12224func (c *ProjectsMetricsUpdateCall) Context(ctx context.Context) *ProjectsMetricsUpdateCall {
12225	c.ctx_ = ctx
12226	return c
12227}
12228
12229// Header returns an http.Header that can be modified by the caller to
12230// add HTTP headers to the request.
12231func (c *ProjectsMetricsUpdateCall) Header() http.Header {
12232	if c.header_ == nil {
12233		c.header_ = make(http.Header)
12234	}
12235	return c.header_
12236}
12237
12238func (c *ProjectsMetricsUpdateCall) doRequest(alt string) (*http.Response, error) {
12239	reqHeaders := make(http.Header)
12240	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
12241	for k, v := range c.header_ {
12242		reqHeaders[k] = v
12243	}
12244	reqHeaders.Set("User-Agent", c.s.userAgent())
12245	var body io.Reader = nil
12246	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logmetric)
12247	if err != nil {
12248		return nil, err
12249	}
12250	reqHeaders.Set("Content-Type", "application/json")
12251	c.urlParams_.Set("alt", alt)
12252	c.urlParams_.Set("prettyPrint", "false")
12253	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
12254	urls += "?" + c.urlParams_.Encode()
12255	req, err := http.NewRequest("PUT", urls, body)
12256	if err != nil {
12257		return nil, err
12258	}
12259	req.Header = reqHeaders
12260	googleapi.Expand(req.URL, map[string]string{
12261		"metricName": c.metricName,
12262	})
12263	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12264}
12265
12266// Do executes the "logging.projects.metrics.update" call.
12267// Exactly one of *LogMetric or error will be non-nil. Any non-2xx
12268// status code is an error. Response headers are in either
12269// *LogMetric.ServerResponse.Header or (if a response was returned at
12270// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12271// to check whether the returned error was because
12272// http.StatusNotModified was returned.
12273func (c *ProjectsMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
12274	gensupport.SetOptions(c.urlParams_, opts...)
12275	res, err := c.doRequest("json")
12276	if res != nil && res.StatusCode == http.StatusNotModified {
12277		if res.Body != nil {
12278			res.Body.Close()
12279		}
12280		return nil, &googleapi.Error{
12281			Code:   res.StatusCode,
12282			Header: res.Header,
12283		}
12284	}
12285	if err != nil {
12286		return nil, err
12287	}
12288	defer googleapi.CloseBody(res)
12289	if err := googleapi.CheckResponse(res); err != nil {
12290		return nil, err
12291	}
12292	ret := &LogMetric{
12293		ServerResponse: googleapi.ServerResponse{
12294			Header:         res.Header,
12295			HTTPStatusCode: res.StatusCode,
12296		},
12297	}
12298	target := &ret
12299	if err := gensupport.DecodeResponse(target, res); err != nil {
12300		return nil, err
12301	}
12302	return ret, nil
12303	// {
12304	//   "description": "Creates or updates a logs-based metric.",
12305	//   "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}",
12306	//   "httpMethod": "PUT",
12307	//   "id": "logging.projects.metrics.update",
12308	//   "parameterOrder": [
12309	//     "metricName"
12310	//   ],
12311	//   "parameters": {
12312	//     "metricName": {
12313	//       "description": "The resource name of the metric to update:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\nThe 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.",
12314	//       "location": "path",
12315	//       "pattern": "^projects/[^/]+/metrics/[^/]+$",
12316	//       "required": true,
12317	//       "type": "string"
12318	//     }
12319	//   },
12320	//   "path": "v2/{+metricName}",
12321	//   "request": {
12322	//     "$ref": "LogMetric"
12323	//   },
12324	//   "response": {
12325	//     "$ref": "LogMetric"
12326	//   },
12327	//   "scopes": [
12328	//     "https://www.googleapis.com/auth/cloud-platform",
12329	//     "https://www.googleapis.com/auth/logging.admin",
12330	//     "https://www.googleapis.com/auth/logging.write"
12331	//   ]
12332	// }
12333
12334}
12335
12336// method id "logging.projects.sinks.create":
12337
12338type ProjectsSinksCreateCall struct {
12339	s          *Service
12340	parent     string
12341	logsink    *LogSink
12342	urlParams_ gensupport.URLParams
12343	ctx_       context.Context
12344	header_    http.Header
12345}
12346
12347// Create: Creates a sink that exports specified log entries to a
12348// destination. The export of newly-ingested log entries begins
12349// immediately, unless the sink's writer_identity is not permitted to
12350// write to the destination. A sink can export log entries only from the
12351// resource owning the sink.
12352func (r *ProjectsSinksService) Create(parent string, logsink *LogSink) *ProjectsSinksCreateCall {
12353	c := &ProjectsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12354	c.parent = parent
12355	c.logsink = logsink
12356	return c
12357}
12358
12359// UniqueWriterIdentity sets the optional parameter
12360// "uniqueWriterIdentity": Determines the kind of IAM identity returned
12361// as writer_identity in the new sink. If this value is omitted or set
12362// to false, and if the sink's parent is a project, then the value
12363// returned as writer_identity is the same group or service account used
12364// by Logging before the addition of writer identities to this API. The
12365// sink's destination must be in the same project as the sink itself.If
12366// this field is set to true, or if the sink is owned by a non-project
12367// resource such as an organization, then the value of writer_identity
12368// will be a unique service account used only for exports from the new
12369// sink. For more information, see writer_identity in LogSink.
12370func (c *ProjectsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksCreateCall {
12371	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
12372	return c
12373}
12374
12375// Fields allows partial responses to be retrieved. See
12376// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12377// for more information.
12378func (c *ProjectsSinksCreateCall) Fields(s ...googleapi.Field) *ProjectsSinksCreateCall {
12379	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12380	return c
12381}
12382
12383// Context sets the context to be used in this call's Do method. Any
12384// pending HTTP request will be aborted if the provided context is
12385// canceled.
12386func (c *ProjectsSinksCreateCall) Context(ctx context.Context) *ProjectsSinksCreateCall {
12387	c.ctx_ = ctx
12388	return c
12389}
12390
12391// Header returns an http.Header that can be modified by the caller to
12392// add HTTP headers to the request.
12393func (c *ProjectsSinksCreateCall) Header() http.Header {
12394	if c.header_ == nil {
12395		c.header_ = make(http.Header)
12396	}
12397	return c.header_
12398}
12399
12400func (c *ProjectsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
12401	reqHeaders := make(http.Header)
12402	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
12403	for k, v := range c.header_ {
12404		reqHeaders[k] = v
12405	}
12406	reqHeaders.Set("User-Agent", c.s.userAgent())
12407	var body io.Reader = nil
12408	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
12409	if err != nil {
12410		return nil, err
12411	}
12412	reqHeaders.Set("Content-Type", "application/json")
12413	c.urlParams_.Set("alt", alt)
12414	c.urlParams_.Set("prettyPrint", "false")
12415	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
12416	urls += "?" + c.urlParams_.Encode()
12417	req, err := http.NewRequest("POST", urls, body)
12418	if err != nil {
12419		return nil, err
12420	}
12421	req.Header = reqHeaders
12422	googleapi.Expand(req.URL, map[string]string{
12423		"parent": c.parent,
12424	})
12425	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12426}
12427
12428// Do executes the "logging.projects.sinks.create" call.
12429// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
12430// code is an error. Response headers are in either
12431// *LogSink.ServerResponse.Header or (if a response was returned at all)
12432// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12433// check whether the returned error was because http.StatusNotModified
12434// was returned.
12435func (c *ProjectsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
12436	gensupport.SetOptions(c.urlParams_, opts...)
12437	res, err := c.doRequest("json")
12438	if res != nil && res.StatusCode == http.StatusNotModified {
12439		if res.Body != nil {
12440			res.Body.Close()
12441		}
12442		return nil, &googleapi.Error{
12443			Code:   res.StatusCode,
12444			Header: res.Header,
12445		}
12446	}
12447	if err != nil {
12448		return nil, err
12449	}
12450	defer googleapi.CloseBody(res)
12451	if err := googleapi.CheckResponse(res); err != nil {
12452		return nil, err
12453	}
12454	ret := &LogSink{
12455		ServerResponse: googleapi.ServerResponse{
12456			Header:         res.Header,
12457			HTTPStatusCode: res.StatusCode,
12458		},
12459	}
12460	target := &ret
12461	if err := gensupport.DecodeResponse(target, res); err != nil {
12462		return nil, err
12463	}
12464	return ret, nil
12465	// {
12466	//   "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.",
12467	//   "flatPath": "v2/projects/{projectsId}/sinks",
12468	//   "httpMethod": "POST",
12469	//   "id": "logging.projects.sinks.create",
12470	//   "parameterOrder": [
12471	//     "parent"
12472	//   ],
12473	//   "parameters": {
12474	//     "parent": {
12475	//       "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
12476	//       "location": "path",
12477	//       "pattern": "^projects/[^/]+$",
12478	//       "required": true,
12479	//       "type": "string"
12480	//     },
12481	//     "uniqueWriterIdentity": {
12482	//       "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 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.",
12483	//       "location": "query",
12484	//       "type": "boolean"
12485	//     }
12486	//   },
12487	//   "path": "v2/{+parent}/sinks",
12488	//   "request": {
12489	//     "$ref": "LogSink"
12490	//   },
12491	//   "response": {
12492	//     "$ref": "LogSink"
12493	//   },
12494	//   "scopes": [
12495	//     "https://www.googleapis.com/auth/cloud-platform",
12496	//     "https://www.googleapis.com/auth/logging.admin"
12497	//   ]
12498	// }
12499
12500}
12501
12502// method id "logging.projects.sinks.delete":
12503
12504type ProjectsSinksDeleteCall struct {
12505	s          *Service
12506	sinkNameid string
12507	urlParams_ gensupport.URLParams
12508	ctx_       context.Context
12509	header_    http.Header
12510}
12511
12512// Delete: Deletes a sink. If the sink has a unique writer_identity,
12513// then that service account is also deleted.
12514func (r *ProjectsSinksService) Delete(sinkNameid string) *ProjectsSinksDeleteCall {
12515	c := &ProjectsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12516	c.sinkNameid = sinkNameid
12517	return c
12518}
12519
12520// Fields allows partial responses to be retrieved. See
12521// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12522// for more information.
12523func (c *ProjectsSinksDeleteCall) Fields(s ...googleapi.Field) *ProjectsSinksDeleteCall {
12524	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12525	return c
12526}
12527
12528// Context sets the context to be used in this call's Do method. Any
12529// pending HTTP request will be aborted if the provided context is
12530// canceled.
12531func (c *ProjectsSinksDeleteCall) Context(ctx context.Context) *ProjectsSinksDeleteCall {
12532	c.ctx_ = ctx
12533	return c
12534}
12535
12536// Header returns an http.Header that can be modified by the caller to
12537// add HTTP headers to the request.
12538func (c *ProjectsSinksDeleteCall) Header() http.Header {
12539	if c.header_ == nil {
12540		c.header_ = make(http.Header)
12541	}
12542	return c.header_
12543}
12544
12545func (c *ProjectsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
12546	reqHeaders := make(http.Header)
12547	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
12548	for k, v := range c.header_ {
12549		reqHeaders[k] = v
12550	}
12551	reqHeaders.Set("User-Agent", c.s.userAgent())
12552	var body io.Reader = nil
12553	c.urlParams_.Set("alt", alt)
12554	c.urlParams_.Set("prettyPrint", "false")
12555	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
12556	urls += "?" + c.urlParams_.Encode()
12557	req, err := http.NewRequest("DELETE", urls, body)
12558	if err != nil {
12559		return nil, err
12560	}
12561	req.Header = reqHeaders
12562	googleapi.Expand(req.URL, map[string]string{
12563		"sinkName": c.sinkNameid,
12564	})
12565	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12566}
12567
12568// Do executes the "logging.projects.sinks.delete" call.
12569// Exactly one of *Empty or error will be non-nil. Any non-2xx status
12570// code is an error. Response headers are in either
12571// *Empty.ServerResponse.Header or (if a response was returned at all)
12572// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12573// check whether the returned error was because http.StatusNotModified
12574// was returned.
12575func (c *ProjectsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12576	gensupport.SetOptions(c.urlParams_, opts...)
12577	res, err := c.doRequest("json")
12578	if res != nil && res.StatusCode == http.StatusNotModified {
12579		if res.Body != nil {
12580			res.Body.Close()
12581		}
12582		return nil, &googleapi.Error{
12583			Code:   res.StatusCode,
12584			Header: res.Header,
12585		}
12586	}
12587	if err != nil {
12588		return nil, err
12589	}
12590	defer googleapi.CloseBody(res)
12591	if err := googleapi.CheckResponse(res); err != nil {
12592		return nil, err
12593	}
12594	ret := &Empty{
12595		ServerResponse: googleapi.ServerResponse{
12596			Header:         res.Header,
12597			HTTPStatusCode: res.StatusCode,
12598		},
12599	}
12600	target := &ret
12601	if err := gensupport.DecodeResponse(target, res); err != nil {
12602		return nil, err
12603	}
12604	return ret, nil
12605	// {
12606	//   "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.",
12607	//   "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}",
12608	//   "httpMethod": "DELETE",
12609	//   "id": "logging.projects.sinks.delete",
12610	//   "parameterOrder": [
12611	//     "sinkName"
12612	//   ],
12613	//   "parameters": {
12614	//     "sinkName": {
12615	//       "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
12616	//       "location": "path",
12617	//       "pattern": "^projects/[^/]+/sinks/[^/]+$",
12618	//       "required": true,
12619	//       "type": "string"
12620	//     }
12621	//   },
12622	//   "path": "v2/{+sinkName}",
12623	//   "response": {
12624	//     "$ref": "Empty"
12625	//   },
12626	//   "scopes": [
12627	//     "https://www.googleapis.com/auth/cloud-platform",
12628	//     "https://www.googleapis.com/auth/logging.admin"
12629	//   ]
12630	// }
12631
12632}
12633
12634// method id "logging.projects.sinks.get":
12635
12636type ProjectsSinksGetCall struct {
12637	s            *Service
12638	sinkName     string
12639	urlParams_   gensupport.URLParams
12640	ifNoneMatch_ string
12641	ctx_         context.Context
12642	header_      http.Header
12643}
12644
12645// Get: Gets a sink.
12646func (r *ProjectsSinksService) Get(sinkName string) *ProjectsSinksGetCall {
12647	c := &ProjectsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12648	c.sinkName = sinkName
12649	return c
12650}
12651
12652// Fields allows partial responses to be retrieved. See
12653// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12654// for more information.
12655func (c *ProjectsSinksGetCall) Fields(s ...googleapi.Field) *ProjectsSinksGetCall {
12656	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12657	return c
12658}
12659
12660// IfNoneMatch sets the optional parameter which makes the operation
12661// fail if the object's ETag matches the given value. This is useful for
12662// getting updates only after the object has changed since the last
12663// request. Use googleapi.IsNotModified to check whether the response
12664// error from Do is the result of In-None-Match.
12665func (c *ProjectsSinksGetCall) IfNoneMatch(entityTag string) *ProjectsSinksGetCall {
12666	c.ifNoneMatch_ = entityTag
12667	return c
12668}
12669
12670// Context sets the context to be used in this call's Do method. Any
12671// pending HTTP request will be aborted if the provided context is
12672// canceled.
12673func (c *ProjectsSinksGetCall) Context(ctx context.Context) *ProjectsSinksGetCall {
12674	c.ctx_ = ctx
12675	return c
12676}
12677
12678// Header returns an http.Header that can be modified by the caller to
12679// add HTTP headers to the request.
12680func (c *ProjectsSinksGetCall) Header() http.Header {
12681	if c.header_ == nil {
12682		c.header_ = make(http.Header)
12683	}
12684	return c.header_
12685}
12686
12687func (c *ProjectsSinksGetCall) doRequest(alt string) (*http.Response, error) {
12688	reqHeaders := make(http.Header)
12689	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
12690	for k, v := range c.header_ {
12691		reqHeaders[k] = v
12692	}
12693	reqHeaders.Set("User-Agent", c.s.userAgent())
12694	if c.ifNoneMatch_ != "" {
12695		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12696	}
12697	var body io.Reader = nil
12698	c.urlParams_.Set("alt", alt)
12699	c.urlParams_.Set("prettyPrint", "false")
12700	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
12701	urls += "?" + c.urlParams_.Encode()
12702	req, err := http.NewRequest("GET", urls, body)
12703	if err != nil {
12704		return nil, err
12705	}
12706	req.Header = reqHeaders
12707	googleapi.Expand(req.URL, map[string]string{
12708		"sinkName": c.sinkName,
12709	})
12710	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12711}
12712
12713// Do executes the "logging.projects.sinks.get" call.
12714// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
12715// code is an error. Response headers are in either
12716// *LogSink.ServerResponse.Header or (if a response was returned at all)
12717// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12718// check whether the returned error was because http.StatusNotModified
12719// was returned.
12720func (c *ProjectsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
12721	gensupport.SetOptions(c.urlParams_, opts...)
12722	res, err := c.doRequest("json")
12723	if res != nil && res.StatusCode == http.StatusNotModified {
12724		if res.Body != nil {
12725			res.Body.Close()
12726		}
12727		return nil, &googleapi.Error{
12728			Code:   res.StatusCode,
12729			Header: res.Header,
12730		}
12731	}
12732	if err != nil {
12733		return nil, err
12734	}
12735	defer googleapi.CloseBody(res)
12736	if err := googleapi.CheckResponse(res); err != nil {
12737		return nil, err
12738	}
12739	ret := &LogSink{
12740		ServerResponse: googleapi.ServerResponse{
12741			Header:         res.Header,
12742			HTTPStatusCode: res.StatusCode,
12743		},
12744	}
12745	target := &ret
12746	if err := gensupport.DecodeResponse(target, res); err != nil {
12747		return nil, err
12748	}
12749	return ret, nil
12750	// {
12751	//   "description": "Gets a sink.",
12752	//   "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}",
12753	//   "httpMethod": "GET",
12754	//   "id": "logging.projects.sinks.get",
12755	//   "parameterOrder": [
12756	//     "sinkName"
12757	//   ],
12758	//   "parameters": {
12759	//     "sinkName": {
12760	//       "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
12761	//       "location": "path",
12762	//       "pattern": "^projects/[^/]+/sinks/[^/]+$",
12763	//       "required": true,
12764	//       "type": "string"
12765	//     }
12766	//   },
12767	//   "path": "v2/{+sinkName}",
12768	//   "response": {
12769	//     "$ref": "LogSink"
12770	//   },
12771	//   "scopes": [
12772	//     "https://www.googleapis.com/auth/cloud-platform",
12773	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
12774	//     "https://www.googleapis.com/auth/logging.admin",
12775	//     "https://www.googleapis.com/auth/logging.read"
12776	//   ]
12777	// }
12778
12779}
12780
12781// method id "logging.projects.sinks.list":
12782
12783type ProjectsSinksListCall struct {
12784	s            *Service
12785	parent       string
12786	urlParams_   gensupport.URLParams
12787	ifNoneMatch_ string
12788	ctx_         context.Context
12789	header_      http.Header
12790}
12791
12792// List: Lists sinks.
12793func (r *ProjectsSinksService) List(parent string) *ProjectsSinksListCall {
12794	c := &ProjectsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12795	c.parent = parent
12796	return c
12797}
12798
12799// PageSize sets the optional parameter "pageSize": The maximum number
12800// of results to return from this request. Non-positive values are
12801// ignored. The presence of nextPageToken in the response indicates that
12802// more results might be available.
12803func (c *ProjectsSinksListCall) PageSize(pageSize int64) *ProjectsSinksListCall {
12804	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12805	return c
12806}
12807
12808// PageToken sets the optional parameter "pageToken": If present, then
12809// retrieve the next batch of results from the preceding call to this
12810// method. pageToken must be the value of nextPageToken from the
12811// previous response. The values of other method parameters should be
12812// identical to those in the previous call.
12813func (c *ProjectsSinksListCall) PageToken(pageToken string) *ProjectsSinksListCall {
12814	c.urlParams_.Set("pageToken", pageToken)
12815	return c
12816}
12817
12818// Fields allows partial responses to be retrieved. See
12819// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12820// for more information.
12821func (c *ProjectsSinksListCall) Fields(s ...googleapi.Field) *ProjectsSinksListCall {
12822	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12823	return c
12824}
12825
12826// IfNoneMatch sets the optional parameter which makes the operation
12827// fail if the object's ETag matches the given value. This is useful for
12828// getting updates only after the object has changed since the last
12829// request. Use googleapi.IsNotModified to check whether the response
12830// error from Do is the result of In-None-Match.
12831func (c *ProjectsSinksListCall) IfNoneMatch(entityTag string) *ProjectsSinksListCall {
12832	c.ifNoneMatch_ = entityTag
12833	return c
12834}
12835
12836// Context sets the context to be used in this call's Do method. Any
12837// pending HTTP request will be aborted if the provided context is
12838// canceled.
12839func (c *ProjectsSinksListCall) Context(ctx context.Context) *ProjectsSinksListCall {
12840	c.ctx_ = ctx
12841	return c
12842}
12843
12844// Header returns an http.Header that can be modified by the caller to
12845// add HTTP headers to the request.
12846func (c *ProjectsSinksListCall) Header() http.Header {
12847	if c.header_ == nil {
12848		c.header_ = make(http.Header)
12849	}
12850	return c.header_
12851}
12852
12853func (c *ProjectsSinksListCall) doRequest(alt string) (*http.Response, error) {
12854	reqHeaders := make(http.Header)
12855	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
12856	for k, v := range c.header_ {
12857		reqHeaders[k] = v
12858	}
12859	reqHeaders.Set("User-Agent", c.s.userAgent())
12860	if c.ifNoneMatch_ != "" {
12861		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12862	}
12863	var body io.Reader = nil
12864	c.urlParams_.Set("alt", alt)
12865	c.urlParams_.Set("prettyPrint", "false")
12866	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
12867	urls += "?" + c.urlParams_.Encode()
12868	req, err := http.NewRequest("GET", urls, body)
12869	if err != nil {
12870		return nil, err
12871	}
12872	req.Header = reqHeaders
12873	googleapi.Expand(req.URL, map[string]string{
12874		"parent": c.parent,
12875	})
12876	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12877}
12878
12879// Do executes the "logging.projects.sinks.list" call.
12880// Exactly one of *ListSinksResponse or error will be non-nil. Any
12881// non-2xx status code is an error. Response headers are in either
12882// *ListSinksResponse.ServerResponse.Header or (if a response was
12883// returned at all) in error.(*googleapi.Error).Header. Use
12884// googleapi.IsNotModified to check whether the returned error was
12885// because http.StatusNotModified was returned.
12886func (c *ProjectsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
12887	gensupport.SetOptions(c.urlParams_, opts...)
12888	res, err := c.doRequest("json")
12889	if res != nil && res.StatusCode == http.StatusNotModified {
12890		if res.Body != nil {
12891			res.Body.Close()
12892		}
12893		return nil, &googleapi.Error{
12894			Code:   res.StatusCode,
12895			Header: res.Header,
12896		}
12897	}
12898	if err != nil {
12899		return nil, err
12900	}
12901	defer googleapi.CloseBody(res)
12902	if err := googleapi.CheckResponse(res); err != nil {
12903		return nil, err
12904	}
12905	ret := &ListSinksResponse{
12906		ServerResponse: googleapi.ServerResponse{
12907			Header:         res.Header,
12908			HTTPStatusCode: res.StatusCode,
12909		},
12910	}
12911	target := &ret
12912	if err := gensupport.DecodeResponse(target, res); err != nil {
12913		return nil, err
12914	}
12915	return ret, nil
12916	// {
12917	//   "description": "Lists sinks.",
12918	//   "flatPath": "v2/projects/{projectsId}/sinks",
12919	//   "httpMethod": "GET",
12920	//   "id": "logging.projects.sinks.list",
12921	//   "parameterOrder": [
12922	//     "parent"
12923	//   ],
12924	//   "parameters": {
12925	//     "pageSize": {
12926	//       "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.",
12927	//       "format": "int32",
12928	//       "location": "query",
12929	//       "type": "integer"
12930	//     },
12931	//     "pageToken": {
12932	//       "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.",
12933	//       "location": "query",
12934	//       "type": "string"
12935	//     },
12936	//     "parent": {
12937	//       "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
12938	//       "location": "path",
12939	//       "pattern": "^projects/[^/]+$",
12940	//       "required": true,
12941	//       "type": "string"
12942	//     }
12943	//   },
12944	//   "path": "v2/{+parent}/sinks",
12945	//   "response": {
12946	//     "$ref": "ListSinksResponse"
12947	//   },
12948	//   "scopes": [
12949	//     "https://www.googleapis.com/auth/cloud-platform",
12950	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
12951	//     "https://www.googleapis.com/auth/logging.admin",
12952	//     "https://www.googleapis.com/auth/logging.read"
12953	//   ]
12954	// }
12955
12956}
12957
12958// Pages invokes f for each page of results.
12959// A non-nil error returned from f will halt the iteration.
12960// The provided context supersedes any context provided to the Context method.
12961func (c *ProjectsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
12962	c.ctx_ = ctx
12963	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12964	for {
12965		x, err := c.Do()
12966		if err != nil {
12967			return err
12968		}
12969		if err := f(x); err != nil {
12970			return err
12971		}
12972		if x.NextPageToken == "" {
12973			return nil
12974		}
12975		c.PageToken(x.NextPageToken)
12976	}
12977}
12978
12979// method id "logging.projects.sinks.patch":
12980
12981type ProjectsSinksPatchCall struct {
12982	s          *Service
12983	sinkNameid string
12984	logsink    *LogSink
12985	urlParams_ gensupport.URLParams
12986	ctx_       context.Context
12987	header_    http.Header
12988}
12989
12990// Patch: Updates a sink. This method replaces the following fields in
12991// the existing sink with values from the new sink: destination, and
12992// filter.The updated sink might also have a new writer_identity; see
12993// the unique_writer_identity field.
12994func (r *ProjectsSinksService) Patch(sinkNameid string, logsink *LogSink) *ProjectsSinksPatchCall {
12995	c := &ProjectsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12996	c.sinkNameid = sinkNameid
12997	c.logsink = logsink
12998	return c
12999}
13000
13001// UniqueWriterIdentity sets the optional parameter
13002// "uniqueWriterIdentity": See sinks.create for a description of this
13003// field. When updating a sink, the effect of this field on the value of
13004// writer_identity in the updated sink depends on both the old and new
13005// values of this field:
13006// If the old and new values of this field are both false or both true,
13007// then there is no change to the sink's writer_identity.
13008// If the old value is false and the new value is true, then
13009// writer_identity is changed to a unique service account.
13010// It is an error if the old value is true and the new value is set to
13011// false or defaulted to false.
13012func (c *ProjectsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksPatchCall {
13013	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
13014	return c
13015}
13016
13017// UpdateMask sets the optional parameter "updateMask": Field mask that
13018// specifies the fields in sink that need an update. A sink field will
13019// be overwritten if, and only if, it is in the update mask. name and
13020// output only fields cannot be updated.An empty updateMask is
13021// temporarily treated as using the following mask for backwards
13022// compatibility purposes:  destination,filter,includeChildren At some
13023// point in the future, behavior will be removed and specifying an empty
13024// updateMask will be an error.For a detailed FieldMask definition, see
13025// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample:
13026// updateMask=filter.
13027func (c *ProjectsSinksPatchCall) UpdateMask(updateMask string) *ProjectsSinksPatchCall {
13028	c.urlParams_.Set("updateMask", updateMask)
13029	return c
13030}
13031
13032// Fields allows partial responses to be retrieved. See
13033// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13034// for more information.
13035func (c *ProjectsSinksPatchCall) Fields(s ...googleapi.Field) *ProjectsSinksPatchCall {
13036	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13037	return c
13038}
13039
13040// Context sets the context to be used in this call's Do method. Any
13041// pending HTTP request will be aborted if the provided context is
13042// canceled.
13043func (c *ProjectsSinksPatchCall) Context(ctx context.Context) *ProjectsSinksPatchCall {
13044	c.ctx_ = ctx
13045	return c
13046}
13047
13048// Header returns an http.Header that can be modified by the caller to
13049// add HTTP headers to the request.
13050func (c *ProjectsSinksPatchCall) Header() http.Header {
13051	if c.header_ == nil {
13052		c.header_ = make(http.Header)
13053	}
13054	return c.header_
13055}
13056
13057func (c *ProjectsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
13058	reqHeaders := make(http.Header)
13059	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
13060	for k, v := range c.header_ {
13061		reqHeaders[k] = v
13062	}
13063	reqHeaders.Set("User-Agent", c.s.userAgent())
13064	var body io.Reader = nil
13065	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
13066	if err != nil {
13067		return nil, err
13068	}
13069	reqHeaders.Set("Content-Type", "application/json")
13070	c.urlParams_.Set("alt", alt)
13071	c.urlParams_.Set("prettyPrint", "false")
13072	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
13073	urls += "?" + c.urlParams_.Encode()
13074	req, err := http.NewRequest("PATCH", urls, body)
13075	if err != nil {
13076		return nil, err
13077	}
13078	req.Header = reqHeaders
13079	googleapi.Expand(req.URL, map[string]string{
13080		"sinkName": c.sinkNameid,
13081	})
13082	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13083}
13084
13085// Do executes the "logging.projects.sinks.patch" call.
13086// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
13087// code is an error. Response headers are in either
13088// *LogSink.ServerResponse.Header or (if a response was returned at all)
13089// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13090// check whether the returned error was because http.StatusNotModified
13091// was returned.
13092func (c *ProjectsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
13093	gensupport.SetOptions(c.urlParams_, opts...)
13094	res, err := c.doRequest("json")
13095	if res != nil && res.StatusCode == http.StatusNotModified {
13096		if res.Body != nil {
13097			res.Body.Close()
13098		}
13099		return nil, &googleapi.Error{
13100			Code:   res.StatusCode,
13101			Header: res.Header,
13102		}
13103	}
13104	if err != nil {
13105		return nil, err
13106	}
13107	defer googleapi.CloseBody(res)
13108	if err := googleapi.CheckResponse(res); err != nil {
13109		return nil, err
13110	}
13111	ret := &LogSink{
13112		ServerResponse: googleapi.ServerResponse{
13113			Header:         res.Header,
13114			HTTPStatusCode: res.StatusCode,
13115		},
13116	}
13117	target := &ret
13118	if err := gensupport.DecodeResponse(target, res); err != nil {
13119		return nil, err
13120	}
13121	return ret, nil
13122	// {
13123	//   "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.",
13124	//   "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}",
13125	//   "httpMethod": "PATCH",
13126	//   "id": "logging.projects.sinks.patch",
13127	//   "parameterOrder": [
13128	//     "sinkName"
13129	//   ],
13130	//   "parameters": {
13131	//     "sinkName": {
13132	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
13133	//       "location": "path",
13134	//       "pattern": "^projects/[^/]+/sinks/[^/]+$",
13135	//       "required": true,
13136	//       "type": "string"
13137	//     },
13138	//     "uniqueWriterIdentity": {
13139	//       "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:\nIf 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.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.",
13140	//       "location": "query",
13141	//       "type": "boolean"
13142	//     },
13143	//     "updateMask": {
13144	//       "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,includeChildren At 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.FieldMaskExample: updateMask=filter.",
13145	//       "format": "google-fieldmask",
13146	//       "location": "query",
13147	//       "type": "string"
13148	//     }
13149	//   },
13150	//   "path": "v2/{+sinkName}",
13151	//   "request": {
13152	//     "$ref": "LogSink"
13153	//   },
13154	//   "response": {
13155	//     "$ref": "LogSink"
13156	//   },
13157	//   "scopes": [
13158	//     "https://www.googleapis.com/auth/cloud-platform",
13159	//     "https://www.googleapis.com/auth/logging.admin"
13160	//   ]
13161	// }
13162
13163}
13164
13165// method id "logging.projects.sinks.update":
13166
13167type ProjectsSinksUpdateCall struct {
13168	s          *Service
13169	sinkNameid string
13170	logsink    *LogSink
13171	urlParams_ gensupport.URLParams
13172	ctx_       context.Context
13173	header_    http.Header
13174}
13175
13176// Update: Updates a sink. This method replaces the following fields in
13177// the existing sink with values from the new sink: destination, and
13178// filter.The updated sink might also have a new writer_identity; see
13179// the unique_writer_identity field.
13180func (r *ProjectsSinksService) Update(sinkNameid string, logsink *LogSink) *ProjectsSinksUpdateCall {
13181	c := &ProjectsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13182	c.sinkNameid = sinkNameid
13183	c.logsink = logsink
13184	return c
13185}
13186
13187// UniqueWriterIdentity sets the optional parameter
13188// "uniqueWriterIdentity": See sinks.create for a description of this
13189// field. When updating a sink, the effect of this field on the value of
13190// writer_identity in the updated sink depends on both the old and new
13191// values of this field:
13192// If the old and new values of this field are both false or both true,
13193// then there is no change to the sink's writer_identity.
13194// If the old value is false and the new value is true, then
13195// writer_identity is changed to a unique service account.
13196// It is an error if the old value is true and the new value is set to
13197// false or defaulted to false.
13198func (c *ProjectsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksUpdateCall {
13199	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
13200	return c
13201}
13202
13203// UpdateMask sets the optional parameter "updateMask": Field mask that
13204// specifies the fields in sink that need an update. A sink field will
13205// be overwritten if, and only if, it is in the update mask. name and
13206// output only fields cannot be updated.An empty updateMask is
13207// temporarily treated as using the following mask for backwards
13208// compatibility purposes:  destination,filter,includeChildren At some
13209// point in the future, behavior will be removed and specifying an empty
13210// updateMask will be an error.For a detailed FieldMask definition, see
13211// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample:
13212// updateMask=filter.
13213func (c *ProjectsSinksUpdateCall) UpdateMask(updateMask string) *ProjectsSinksUpdateCall {
13214	c.urlParams_.Set("updateMask", updateMask)
13215	return c
13216}
13217
13218// Fields allows partial responses to be retrieved. See
13219// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13220// for more information.
13221func (c *ProjectsSinksUpdateCall) Fields(s ...googleapi.Field) *ProjectsSinksUpdateCall {
13222	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13223	return c
13224}
13225
13226// Context sets the context to be used in this call's Do method. Any
13227// pending HTTP request will be aborted if the provided context is
13228// canceled.
13229func (c *ProjectsSinksUpdateCall) Context(ctx context.Context) *ProjectsSinksUpdateCall {
13230	c.ctx_ = ctx
13231	return c
13232}
13233
13234// Header returns an http.Header that can be modified by the caller to
13235// add HTTP headers to the request.
13236func (c *ProjectsSinksUpdateCall) Header() http.Header {
13237	if c.header_ == nil {
13238		c.header_ = make(http.Header)
13239	}
13240	return c.header_
13241}
13242
13243func (c *ProjectsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
13244	reqHeaders := make(http.Header)
13245	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
13246	for k, v := range c.header_ {
13247		reqHeaders[k] = v
13248	}
13249	reqHeaders.Set("User-Agent", c.s.userAgent())
13250	var body io.Reader = nil
13251	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
13252	if err != nil {
13253		return nil, err
13254	}
13255	reqHeaders.Set("Content-Type", "application/json")
13256	c.urlParams_.Set("alt", alt)
13257	c.urlParams_.Set("prettyPrint", "false")
13258	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
13259	urls += "?" + c.urlParams_.Encode()
13260	req, err := http.NewRequest("PUT", urls, body)
13261	if err != nil {
13262		return nil, err
13263	}
13264	req.Header = reqHeaders
13265	googleapi.Expand(req.URL, map[string]string{
13266		"sinkName": c.sinkNameid,
13267	})
13268	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13269}
13270
13271// Do executes the "logging.projects.sinks.update" call.
13272// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
13273// code is an error. Response headers are in either
13274// *LogSink.ServerResponse.Header or (if a response was returned at all)
13275// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13276// check whether the returned error was because http.StatusNotModified
13277// was returned.
13278func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
13279	gensupport.SetOptions(c.urlParams_, opts...)
13280	res, err := c.doRequest("json")
13281	if res != nil && res.StatusCode == http.StatusNotModified {
13282		if res.Body != nil {
13283			res.Body.Close()
13284		}
13285		return nil, &googleapi.Error{
13286			Code:   res.StatusCode,
13287			Header: res.Header,
13288		}
13289	}
13290	if err != nil {
13291		return nil, err
13292	}
13293	defer googleapi.CloseBody(res)
13294	if err := googleapi.CheckResponse(res); err != nil {
13295		return nil, err
13296	}
13297	ret := &LogSink{
13298		ServerResponse: googleapi.ServerResponse{
13299			Header:         res.Header,
13300			HTTPStatusCode: res.StatusCode,
13301		},
13302	}
13303	target := &ret
13304	if err := gensupport.DecodeResponse(target, res); err != nil {
13305		return nil, err
13306	}
13307	return ret, nil
13308	// {
13309	//   "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.",
13310	//   "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}",
13311	//   "httpMethod": "PUT",
13312	//   "id": "logging.projects.sinks.update",
13313	//   "parameterOrder": [
13314	//     "sinkName"
13315	//   ],
13316	//   "parameters": {
13317	//     "sinkName": {
13318	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
13319	//       "location": "path",
13320	//       "pattern": "^projects/[^/]+/sinks/[^/]+$",
13321	//       "required": true,
13322	//       "type": "string"
13323	//     },
13324	//     "uniqueWriterIdentity": {
13325	//       "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:\nIf 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.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.",
13326	//       "location": "query",
13327	//       "type": "boolean"
13328	//     },
13329	//     "updateMask": {
13330	//       "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,includeChildren At 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.FieldMaskExample: updateMask=filter.",
13331	//       "format": "google-fieldmask",
13332	//       "location": "query",
13333	//       "type": "string"
13334	//     }
13335	//   },
13336	//   "path": "v2/{+sinkName}",
13337	//   "request": {
13338	//     "$ref": "LogSink"
13339	//   },
13340	//   "response": {
13341	//     "$ref": "LogSink"
13342	//   },
13343	//   "scopes": [
13344	//     "https://www.googleapis.com/auth/cloud-platform",
13345	//     "https://www.googleapis.com/auth/logging.admin"
13346	//   ]
13347	// }
13348
13349}
13350
13351// method id "logging.sinks.create":
13352
13353type SinksCreateCall struct {
13354	s          *Service
13355	parent     string
13356	logsink    *LogSink
13357	urlParams_ gensupport.URLParams
13358	ctx_       context.Context
13359	header_    http.Header
13360}
13361
13362// Create: Creates a sink that exports specified log entries to a
13363// destination. The export of newly-ingested log entries begins
13364// immediately, unless the sink's writer_identity is not permitted to
13365// write to the destination. A sink can export log entries only from the
13366// resource owning the sink.
13367func (r *SinksService) Create(parent string, logsink *LogSink) *SinksCreateCall {
13368	c := &SinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13369	c.parent = parent
13370	c.logsink = logsink
13371	return c
13372}
13373
13374// UniqueWriterIdentity sets the optional parameter
13375// "uniqueWriterIdentity": Determines the kind of IAM identity returned
13376// as writer_identity in the new sink. If this value is omitted or set
13377// to false, and if the sink's parent is a project, then the value
13378// returned as writer_identity is the same group or service account used
13379// by Logging before the addition of writer identities to this API. The
13380// sink's destination must be in the same project as the sink itself.If
13381// this field is set to true, or if the sink is owned by a non-project
13382// resource such as an organization, then the value of writer_identity
13383// will be a unique service account used only for exports from the new
13384// sink. For more information, see writer_identity in LogSink.
13385func (c *SinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *SinksCreateCall {
13386	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
13387	return c
13388}
13389
13390// Fields allows partial responses to be retrieved. See
13391// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13392// for more information.
13393func (c *SinksCreateCall) Fields(s ...googleapi.Field) *SinksCreateCall {
13394	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13395	return c
13396}
13397
13398// Context sets the context to be used in this call's Do method. Any
13399// pending HTTP request will be aborted if the provided context is
13400// canceled.
13401func (c *SinksCreateCall) Context(ctx context.Context) *SinksCreateCall {
13402	c.ctx_ = ctx
13403	return c
13404}
13405
13406// Header returns an http.Header that can be modified by the caller to
13407// add HTTP headers to the request.
13408func (c *SinksCreateCall) Header() http.Header {
13409	if c.header_ == nil {
13410		c.header_ = make(http.Header)
13411	}
13412	return c.header_
13413}
13414
13415func (c *SinksCreateCall) doRequest(alt string) (*http.Response, error) {
13416	reqHeaders := make(http.Header)
13417	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
13418	for k, v := range c.header_ {
13419		reqHeaders[k] = v
13420	}
13421	reqHeaders.Set("User-Agent", c.s.userAgent())
13422	var body io.Reader = nil
13423	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
13424	if err != nil {
13425		return nil, err
13426	}
13427	reqHeaders.Set("Content-Type", "application/json")
13428	c.urlParams_.Set("alt", alt)
13429	c.urlParams_.Set("prettyPrint", "false")
13430	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
13431	urls += "?" + c.urlParams_.Encode()
13432	req, err := http.NewRequest("POST", urls, body)
13433	if err != nil {
13434		return nil, err
13435	}
13436	req.Header = reqHeaders
13437	googleapi.Expand(req.URL, map[string]string{
13438		"parent": c.parent,
13439	})
13440	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13441}
13442
13443// Do executes the "logging.sinks.create" call.
13444// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
13445// code is an error. Response headers are in either
13446// *LogSink.ServerResponse.Header or (if a response was returned at all)
13447// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13448// check whether the returned error was because http.StatusNotModified
13449// was returned.
13450func (c *SinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
13451	gensupport.SetOptions(c.urlParams_, opts...)
13452	res, err := c.doRequest("json")
13453	if res != nil && res.StatusCode == http.StatusNotModified {
13454		if res.Body != nil {
13455			res.Body.Close()
13456		}
13457		return nil, &googleapi.Error{
13458			Code:   res.StatusCode,
13459			Header: res.Header,
13460		}
13461	}
13462	if err != nil {
13463		return nil, err
13464	}
13465	defer googleapi.CloseBody(res)
13466	if err := googleapi.CheckResponse(res); err != nil {
13467		return nil, err
13468	}
13469	ret := &LogSink{
13470		ServerResponse: googleapi.ServerResponse{
13471			Header:         res.Header,
13472			HTTPStatusCode: res.StatusCode,
13473		},
13474	}
13475	target := &ret
13476	if err := gensupport.DecodeResponse(target, res); err != nil {
13477		return nil, err
13478	}
13479	return ret, nil
13480	// {
13481	//   "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.",
13482	//   "flatPath": "v2/{v2Id}/{v2Id1}/sinks",
13483	//   "httpMethod": "POST",
13484	//   "id": "logging.sinks.create",
13485	//   "parameterOrder": [
13486	//     "parent"
13487	//   ],
13488	//   "parameters": {
13489	//     "parent": {
13490	//       "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
13491	//       "location": "path",
13492	//       "pattern": "^[^/]+/[^/]+$",
13493	//       "required": true,
13494	//       "type": "string"
13495	//     },
13496	//     "uniqueWriterIdentity": {
13497	//       "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 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.",
13498	//       "location": "query",
13499	//       "type": "boolean"
13500	//     }
13501	//   },
13502	//   "path": "v2/{+parent}/sinks",
13503	//   "request": {
13504	//     "$ref": "LogSink"
13505	//   },
13506	//   "response": {
13507	//     "$ref": "LogSink"
13508	//   },
13509	//   "scopes": [
13510	//     "https://www.googleapis.com/auth/cloud-platform",
13511	//     "https://www.googleapis.com/auth/logging.admin"
13512	//   ]
13513	// }
13514
13515}
13516
13517// method id "logging.sinks.delete":
13518
13519type SinksDeleteCall struct {
13520	s          *Service
13521	sinkNameid string
13522	urlParams_ gensupport.URLParams
13523	ctx_       context.Context
13524	header_    http.Header
13525}
13526
13527// Delete: Deletes a sink. If the sink has a unique writer_identity,
13528// then that service account is also deleted.
13529func (r *SinksService) Delete(sinkNameid string) *SinksDeleteCall {
13530	c := &SinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13531	c.sinkNameid = sinkNameid
13532	return c
13533}
13534
13535// Fields allows partial responses to be retrieved. See
13536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13537// for more information.
13538func (c *SinksDeleteCall) Fields(s ...googleapi.Field) *SinksDeleteCall {
13539	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13540	return c
13541}
13542
13543// Context sets the context to be used in this call's Do method. Any
13544// pending HTTP request will be aborted if the provided context is
13545// canceled.
13546func (c *SinksDeleteCall) Context(ctx context.Context) *SinksDeleteCall {
13547	c.ctx_ = ctx
13548	return c
13549}
13550
13551// Header returns an http.Header that can be modified by the caller to
13552// add HTTP headers to the request.
13553func (c *SinksDeleteCall) Header() http.Header {
13554	if c.header_ == nil {
13555		c.header_ = make(http.Header)
13556	}
13557	return c.header_
13558}
13559
13560func (c *SinksDeleteCall) doRequest(alt string) (*http.Response, error) {
13561	reqHeaders := make(http.Header)
13562	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
13563	for k, v := range c.header_ {
13564		reqHeaders[k] = v
13565	}
13566	reqHeaders.Set("User-Agent", c.s.userAgent())
13567	var body io.Reader = nil
13568	c.urlParams_.Set("alt", alt)
13569	c.urlParams_.Set("prettyPrint", "false")
13570	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
13571	urls += "?" + c.urlParams_.Encode()
13572	req, err := http.NewRequest("DELETE", urls, body)
13573	if err != nil {
13574		return nil, err
13575	}
13576	req.Header = reqHeaders
13577	googleapi.Expand(req.URL, map[string]string{
13578		"sinkName": c.sinkNameid,
13579	})
13580	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13581}
13582
13583// Do executes the "logging.sinks.delete" call.
13584// Exactly one of *Empty or error will be non-nil. Any non-2xx status
13585// code is an error. Response headers are in either
13586// *Empty.ServerResponse.Header or (if a response was returned at all)
13587// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13588// check whether the returned error was because http.StatusNotModified
13589// was returned.
13590func (c *SinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
13591	gensupport.SetOptions(c.urlParams_, opts...)
13592	res, err := c.doRequest("json")
13593	if res != nil && res.StatusCode == http.StatusNotModified {
13594		if res.Body != nil {
13595			res.Body.Close()
13596		}
13597		return nil, &googleapi.Error{
13598			Code:   res.StatusCode,
13599			Header: res.Header,
13600		}
13601	}
13602	if err != nil {
13603		return nil, err
13604	}
13605	defer googleapi.CloseBody(res)
13606	if err := googleapi.CheckResponse(res); err != nil {
13607		return nil, err
13608	}
13609	ret := &Empty{
13610		ServerResponse: googleapi.ServerResponse{
13611			Header:         res.Header,
13612			HTTPStatusCode: res.StatusCode,
13613		},
13614	}
13615	target := &ret
13616	if err := gensupport.DecodeResponse(target, res); err != nil {
13617		return nil, err
13618	}
13619	return ret, nil
13620	// {
13621	//   "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.",
13622	//   "flatPath": "v2/{v2Id}/{v2Id1}/sinks/{sinksId}",
13623	//   "httpMethod": "DELETE",
13624	//   "id": "logging.sinks.delete",
13625	//   "parameterOrder": [
13626	//     "sinkName"
13627	//   ],
13628	//   "parameters": {
13629	//     "sinkName": {
13630	//       "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
13631	//       "location": "path",
13632	//       "pattern": "^[^/]+/[^/]+/sinks/[^/]+$",
13633	//       "required": true,
13634	//       "type": "string"
13635	//     }
13636	//   },
13637	//   "path": "v2/{+sinkName}",
13638	//   "response": {
13639	//     "$ref": "Empty"
13640	//   },
13641	//   "scopes": [
13642	//     "https://www.googleapis.com/auth/cloud-platform",
13643	//     "https://www.googleapis.com/auth/logging.admin"
13644	//   ]
13645	// }
13646
13647}
13648
13649// method id "logging.sinks.get":
13650
13651type SinksGetCall struct {
13652	s            *Service
13653	sinkName     string
13654	urlParams_   gensupport.URLParams
13655	ifNoneMatch_ string
13656	ctx_         context.Context
13657	header_      http.Header
13658}
13659
13660// Get: Gets a sink.
13661func (r *SinksService) Get(sinkName string) *SinksGetCall {
13662	c := &SinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13663	c.sinkName = sinkName
13664	return c
13665}
13666
13667// Fields allows partial responses to be retrieved. See
13668// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13669// for more information.
13670func (c *SinksGetCall) Fields(s ...googleapi.Field) *SinksGetCall {
13671	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13672	return c
13673}
13674
13675// IfNoneMatch sets the optional parameter which makes the operation
13676// fail if the object's ETag matches the given value. This is useful for
13677// getting updates only after the object has changed since the last
13678// request. Use googleapi.IsNotModified to check whether the response
13679// error from Do is the result of In-None-Match.
13680func (c *SinksGetCall) IfNoneMatch(entityTag string) *SinksGetCall {
13681	c.ifNoneMatch_ = entityTag
13682	return c
13683}
13684
13685// Context sets the context to be used in this call's Do method. Any
13686// pending HTTP request will be aborted if the provided context is
13687// canceled.
13688func (c *SinksGetCall) Context(ctx context.Context) *SinksGetCall {
13689	c.ctx_ = ctx
13690	return c
13691}
13692
13693// Header returns an http.Header that can be modified by the caller to
13694// add HTTP headers to the request.
13695func (c *SinksGetCall) Header() http.Header {
13696	if c.header_ == nil {
13697		c.header_ = make(http.Header)
13698	}
13699	return c.header_
13700}
13701
13702func (c *SinksGetCall) doRequest(alt string) (*http.Response, error) {
13703	reqHeaders := make(http.Header)
13704	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
13705	for k, v := range c.header_ {
13706		reqHeaders[k] = v
13707	}
13708	reqHeaders.Set("User-Agent", c.s.userAgent())
13709	if c.ifNoneMatch_ != "" {
13710		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13711	}
13712	var body io.Reader = nil
13713	c.urlParams_.Set("alt", alt)
13714	c.urlParams_.Set("prettyPrint", "false")
13715	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
13716	urls += "?" + c.urlParams_.Encode()
13717	req, err := http.NewRequest("GET", urls, body)
13718	if err != nil {
13719		return nil, err
13720	}
13721	req.Header = reqHeaders
13722	googleapi.Expand(req.URL, map[string]string{
13723		"sinkName": c.sinkName,
13724	})
13725	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13726}
13727
13728// Do executes the "logging.sinks.get" call.
13729// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
13730// code is an error. Response headers are in either
13731// *LogSink.ServerResponse.Header or (if a response was returned at all)
13732// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13733// check whether the returned error was because http.StatusNotModified
13734// was returned.
13735func (c *SinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
13736	gensupport.SetOptions(c.urlParams_, opts...)
13737	res, err := c.doRequest("json")
13738	if res != nil && res.StatusCode == http.StatusNotModified {
13739		if res.Body != nil {
13740			res.Body.Close()
13741		}
13742		return nil, &googleapi.Error{
13743			Code:   res.StatusCode,
13744			Header: res.Header,
13745		}
13746	}
13747	if err != nil {
13748		return nil, err
13749	}
13750	defer googleapi.CloseBody(res)
13751	if err := googleapi.CheckResponse(res); err != nil {
13752		return nil, err
13753	}
13754	ret := &LogSink{
13755		ServerResponse: googleapi.ServerResponse{
13756			Header:         res.Header,
13757			HTTPStatusCode: res.StatusCode,
13758		},
13759	}
13760	target := &ret
13761	if err := gensupport.DecodeResponse(target, res); err != nil {
13762		return nil, err
13763	}
13764	return ret, nil
13765	// {
13766	//   "description": "Gets a sink.",
13767	//   "flatPath": "v2/{v2Id}/{v2Id1}/sinks/{sinksId}",
13768	//   "httpMethod": "GET",
13769	//   "id": "logging.sinks.get",
13770	//   "parameterOrder": [
13771	//     "sinkName"
13772	//   ],
13773	//   "parameters": {
13774	//     "sinkName": {
13775	//       "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
13776	//       "location": "path",
13777	//       "pattern": "^[^/]+/[^/]+/sinks/[^/]+$",
13778	//       "required": true,
13779	//       "type": "string"
13780	//     }
13781	//   },
13782	//   "path": "v2/{+sinkName}",
13783	//   "response": {
13784	//     "$ref": "LogSink"
13785	//   },
13786	//   "scopes": [
13787	//     "https://www.googleapis.com/auth/cloud-platform",
13788	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
13789	//     "https://www.googleapis.com/auth/logging.admin",
13790	//     "https://www.googleapis.com/auth/logging.read"
13791	//   ]
13792	// }
13793
13794}
13795
13796// method id "logging.sinks.list":
13797
13798type SinksListCall struct {
13799	s            *Service
13800	parent       string
13801	urlParams_   gensupport.URLParams
13802	ifNoneMatch_ string
13803	ctx_         context.Context
13804	header_      http.Header
13805}
13806
13807// List: Lists sinks.
13808func (r *SinksService) List(parent string) *SinksListCall {
13809	c := &SinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13810	c.parent = parent
13811	return c
13812}
13813
13814// PageSize sets the optional parameter "pageSize": The maximum number
13815// of results to return from this request. Non-positive values are
13816// ignored. The presence of nextPageToken in the response indicates that
13817// more results might be available.
13818func (c *SinksListCall) PageSize(pageSize int64) *SinksListCall {
13819	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13820	return c
13821}
13822
13823// PageToken sets the optional parameter "pageToken": If present, then
13824// retrieve the next batch of results from the preceding call to this
13825// method. pageToken must be the value of nextPageToken from the
13826// previous response. The values of other method parameters should be
13827// identical to those in the previous call.
13828func (c *SinksListCall) PageToken(pageToken string) *SinksListCall {
13829	c.urlParams_.Set("pageToken", pageToken)
13830	return c
13831}
13832
13833// Fields allows partial responses to be retrieved. See
13834// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13835// for more information.
13836func (c *SinksListCall) Fields(s ...googleapi.Field) *SinksListCall {
13837	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13838	return c
13839}
13840
13841// IfNoneMatch sets the optional parameter which makes the operation
13842// fail if the object's ETag matches the given value. This is useful for
13843// getting updates only after the object has changed since the last
13844// request. Use googleapi.IsNotModified to check whether the response
13845// error from Do is the result of In-None-Match.
13846func (c *SinksListCall) IfNoneMatch(entityTag string) *SinksListCall {
13847	c.ifNoneMatch_ = entityTag
13848	return c
13849}
13850
13851// Context sets the context to be used in this call's Do method. Any
13852// pending HTTP request will be aborted if the provided context is
13853// canceled.
13854func (c *SinksListCall) Context(ctx context.Context) *SinksListCall {
13855	c.ctx_ = ctx
13856	return c
13857}
13858
13859// Header returns an http.Header that can be modified by the caller to
13860// add HTTP headers to the request.
13861func (c *SinksListCall) Header() http.Header {
13862	if c.header_ == nil {
13863		c.header_ = make(http.Header)
13864	}
13865	return c.header_
13866}
13867
13868func (c *SinksListCall) doRequest(alt string) (*http.Response, error) {
13869	reqHeaders := make(http.Header)
13870	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
13871	for k, v := range c.header_ {
13872		reqHeaders[k] = v
13873	}
13874	reqHeaders.Set("User-Agent", c.s.userAgent())
13875	if c.ifNoneMatch_ != "" {
13876		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13877	}
13878	var body io.Reader = nil
13879	c.urlParams_.Set("alt", alt)
13880	c.urlParams_.Set("prettyPrint", "false")
13881	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
13882	urls += "?" + c.urlParams_.Encode()
13883	req, err := http.NewRequest("GET", urls, body)
13884	if err != nil {
13885		return nil, err
13886	}
13887	req.Header = reqHeaders
13888	googleapi.Expand(req.URL, map[string]string{
13889		"parent": c.parent,
13890	})
13891	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13892}
13893
13894// Do executes the "logging.sinks.list" call.
13895// Exactly one of *ListSinksResponse or error will be non-nil. Any
13896// non-2xx status code is an error. Response headers are in either
13897// *ListSinksResponse.ServerResponse.Header or (if a response was
13898// returned at all) in error.(*googleapi.Error).Header. Use
13899// googleapi.IsNotModified to check whether the returned error was
13900// because http.StatusNotModified was returned.
13901func (c *SinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
13902	gensupport.SetOptions(c.urlParams_, opts...)
13903	res, err := c.doRequest("json")
13904	if res != nil && res.StatusCode == http.StatusNotModified {
13905		if res.Body != nil {
13906			res.Body.Close()
13907		}
13908		return nil, &googleapi.Error{
13909			Code:   res.StatusCode,
13910			Header: res.Header,
13911		}
13912	}
13913	if err != nil {
13914		return nil, err
13915	}
13916	defer googleapi.CloseBody(res)
13917	if err := googleapi.CheckResponse(res); err != nil {
13918		return nil, err
13919	}
13920	ret := &ListSinksResponse{
13921		ServerResponse: googleapi.ServerResponse{
13922			Header:         res.Header,
13923			HTTPStatusCode: res.StatusCode,
13924		},
13925	}
13926	target := &ret
13927	if err := gensupport.DecodeResponse(target, res); err != nil {
13928		return nil, err
13929	}
13930	return ret, nil
13931	// {
13932	//   "description": "Lists sinks.",
13933	//   "flatPath": "v2/{v2Id}/{v2Id1}/sinks",
13934	//   "httpMethod": "GET",
13935	//   "id": "logging.sinks.list",
13936	//   "parameterOrder": [
13937	//     "parent"
13938	//   ],
13939	//   "parameters": {
13940	//     "pageSize": {
13941	//       "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.",
13942	//       "format": "int32",
13943	//       "location": "query",
13944	//       "type": "integer"
13945	//     },
13946	//     "pageToken": {
13947	//       "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.",
13948	//       "location": "query",
13949	//       "type": "string"
13950	//     },
13951	//     "parent": {
13952	//       "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n",
13953	//       "location": "path",
13954	//       "pattern": "^[^/]+/[^/]+$",
13955	//       "required": true,
13956	//       "type": "string"
13957	//     }
13958	//   },
13959	//   "path": "v2/{+parent}/sinks",
13960	//   "response": {
13961	//     "$ref": "ListSinksResponse"
13962	//   },
13963	//   "scopes": [
13964	//     "https://www.googleapis.com/auth/cloud-platform",
13965	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
13966	//     "https://www.googleapis.com/auth/logging.admin",
13967	//     "https://www.googleapis.com/auth/logging.read"
13968	//   ]
13969	// }
13970
13971}
13972
13973// Pages invokes f for each page of results.
13974// A non-nil error returned from f will halt the iteration.
13975// The provided context supersedes any context provided to the Context method.
13976func (c *SinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
13977	c.ctx_ = ctx
13978	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13979	for {
13980		x, err := c.Do()
13981		if err != nil {
13982			return err
13983		}
13984		if err := f(x); err != nil {
13985			return err
13986		}
13987		if x.NextPageToken == "" {
13988			return nil
13989		}
13990		c.PageToken(x.NextPageToken)
13991	}
13992}
13993
13994// method id "logging.sinks.update":
13995
13996type SinksUpdateCall struct {
13997	s          *Service
13998	sinkNameid string
13999	logsink    *LogSink
14000	urlParams_ gensupport.URLParams
14001	ctx_       context.Context
14002	header_    http.Header
14003}
14004
14005// Update: Updates a sink. This method replaces the following fields in
14006// the existing sink with values from the new sink: destination, and
14007// filter.The updated sink might also have a new writer_identity; see
14008// the unique_writer_identity field.
14009func (r *SinksService) Update(sinkNameid string, logsink *LogSink) *SinksUpdateCall {
14010	c := &SinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14011	c.sinkNameid = sinkNameid
14012	c.logsink = logsink
14013	return c
14014}
14015
14016// UniqueWriterIdentity sets the optional parameter
14017// "uniqueWriterIdentity": See sinks.create for a description of this
14018// field. When updating a sink, the effect of this field on the value of
14019// writer_identity in the updated sink depends on both the old and new
14020// values of this field:
14021// If the old and new values of this field are both false or both true,
14022// then there is no change to the sink's writer_identity.
14023// If the old value is false and the new value is true, then
14024// writer_identity is changed to a unique service account.
14025// It is an error if the old value is true and the new value is set to
14026// false or defaulted to false.
14027func (c *SinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *SinksUpdateCall {
14028	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
14029	return c
14030}
14031
14032// UpdateMask sets the optional parameter "updateMask": Field mask that
14033// specifies the fields in sink that need an update. A sink field will
14034// be overwritten if, and only if, it is in the update mask. name and
14035// output only fields cannot be updated.An empty updateMask is
14036// temporarily treated as using the following mask for backwards
14037// compatibility purposes:  destination,filter,includeChildren At some
14038// point in the future, behavior will be removed and specifying an empty
14039// updateMask will be an error.For a detailed FieldMask definition, see
14040// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample:
14041// updateMask=filter.
14042func (c *SinksUpdateCall) UpdateMask(updateMask string) *SinksUpdateCall {
14043	c.urlParams_.Set("updateMask", updateMask)
14044	return c
14045}
14046
14047// Fields allows partial responses to be retrieved. See
14048// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14049// for more information.
14050func (c *SinksUpdateCall) Fields(s ...googleapi.Field) *SinksUpdateCall {
14051	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14052	return c
14053}
14054
14055// Context sets the context to be used in this call's Do method. Any
14056// pending HTTP request will be aborted if the provided context is
14057// canceled.
14058func (c *SinksUpdateCall) Context(ctx context.Context) *SinksUpdateCall {
14059	c.ctx_ = ctx
14060	return c
14061}
14062
14063// Header returns an http.Header that can be modified by the caller to
14064// add HTTP headers to the request.
14065func (c *SinksUpdateCall) Header() http.Header {
14066	if c.header_ == nil {
14067		c.header_ = make(http.Header)
14068	}
14069	return c.header_
14070}
14071
14072func (c *SinksUpdateCall) doRequest(alt string) (*http.Response, error) {
14073	reqHeaders := make(http.Header)
14074	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
14075	for k, v := range c.header_ {
14076		reqHeaders[k] = v
14077	}
14078	reqHeaders.Set("User-Agent", c.s.userAgent())
14079	var body io.Reader = nil
14080	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
14081	if err != nil {
14082		return nil, err
14083	}
14084	reqHeaders.Set("Content-Type", "application/json")
14085	c.urlParams_.Set("alt", alt)
14086	c.urlParams_.Set("prettyPrint", "false")
14087	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
14088	urls += "?" + c.urlParams_.Encode()
14089	req, err := http.NewRequest("PUT", urls, body)
14090	if err != nil {
14091		return nil, err
14092	}
14093	req.Header = reqHeaders
14094	googleapi.Expand(req.URL, map[string]string{
14095		"sinkName": c.sinkNameid,
14096	})
14097	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14098}
14099
14100// Do executes the "logging.sinks.update" call.
14101// Exactly one of *LogSink or error will be non-nil. Any non-2xx status
14102// code is an error. Response headers are in either
14103// *LogSink.ServerResponse.Header or (if a response was returned at all)
14104// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14105// check whether the returned error was because http.StatusNotModified
14106// was returned.
14107func (c *SinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
14108	gensupport.SetOptions(c.urlParams_, opts...)
14109	res, err := c.doRequest("json")
14110	if res != nil && res.StatusCode == http.StatusNotModified {
14111		if res.Body != nil {
14112			res.Body.Close()
14113		}
14114		return nil, &googleapi.Error{
14115			Code:   res.StatusCode,
14116			Header: res.Header,
14117		}
14118	}
14119	if err != nil {
14120		return nil, err
14121	}
14122	defer googleapi.CloseBody(res)
14123	if err := googleapi.CheckResponse(res); err != nil {
14124		return nil, err
14125	}
14126	ret := &LogSink{
14127		ServerResponse: googleapi.ServerResponse{
14128			Header:         res.Header,
14129			HTTPStatusCode: res.StatusCode,
14130		},
14131	}
14132	target := &ret
14133	if err := gensupport.DecodeResponse(target, res); err != nil {
14134		return nil, err
14135	}
14136	return ret, nil
14137	// {
14138	//   "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.",
14139	//   "flatPath": "v2/{v2Id}/{v2Id1}/sinks/{sinksId}",
14140	//   "httpMethod": "PUT",
14141	//   "id": "logging.sinks.update",
14142	//   "parameterOrder": [
14143	//     "sinkName"
14144	//   ],
14145	//   "parameters": {
14146	//     "sinkName": {
14147	//       "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
14148	//       "location": "path",
14149	//       "pattern": "^[^/]+/[^/]+/sinks/[^/]+$",
14150	//       "required": true,
14151	//       "type": "string"
14152	//     },
14153	//     "uniqueWriterIdentity": {
14154	//       "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:\nIf 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.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.",
14155	//       "location": "query",
14156	//       "type": "boolean"
14157	//     },
14158	//     "updateMask": {
14159	//       "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,includeChildren At 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.FieldMaskExample: updateMask=filter.",
14160	//       "format": "google-fieldmask",
14161	//       "location": "query",
14162	//       "type": "string"
14163	//     }
14164	//   },
14165	//   "path": "v2/{+sinkName}",
14166	//   "request": {
14167	//     "$ref": "LogSink"
14168	//   },
14169	//   "response": {
14170	//     "$ref": "LogSink"
14171	//   },
14172	//   "scopes": [
14173	//     "https://www.googleapis.com/auth/cloud-platform",
14174	//     "https://www.googleapis.com/auth/logging.admin"
14175	//   ]
14176	// }
14177
14178}
14179