forked from googleapis/google-api-go-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logging-gen.go
2939 lines (2627 loc) · 104 KB
/
logging-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Package logging provides access to the Google Cloud Logging API.
//
// See https://cloud.google.com/logging/docs/
//
// Usage example:
//
// import "google.golang.org/api/logging/v2beta1"
// ...
// loggingService, err := logging.New(oauthHttpClient)
package logging // import "google.golang.org/api/logging/v2beta1"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
context "golang.org/x/net/context"
ctxhttp "golang.org/x/net/context/ctxhttp"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = ctxhttp.Do
const apiId = "logging:v2beta1"
const apiName = "logging"
const apiVersion = "v2beta1"
const basePath = "https://logging.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
// View your data across Google Cloud Platform services
CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
// Administrate log data for your projects
LoggingAdminScope = "https://www.googleapis.com/auth/logging.admin"
// View log data for your projects
LoggingReadScope = "https://www.googleapis.com/auth/logging.read"
// Submit log data for your projects
LoggingWriteScope = "https://www.googleapis.com/auth/logging.write"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Entries = NewEntriesService(s)
s.MonitoredResourceDescriptors = NewMonitoredResourceDescriptorsService(s)
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Entries *EntriesService
MonitoredResourceDescriptors *MonitoredResourceDescriptorsService
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewEntriesService(s *Service) *EntriesService {
rs := &EntriesService{s: s}
return rs
}
type EntriesService struct {
s *Service
}
func NewMonitoredResourceDescriptorsService(s *Service) *MonitoredResourceDescriptorsService {
rs := &MonitoredResourceDescriptorsService{s: s}
return rs
}
type MonitoredResourceDescriptorsService struct {
s *Service
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Logs = NewProjectsLogsService(s)
rs.Metrics = NewProjectsMetricsService(s)
rs.Sinks = NewProjectsSinksService(s)
return rs
}
type ProjectsService struct {
s *Service
Logs *ProjectsLogsService
Metrics *ProjectsMetricsService
Sinks *ProjectsSinksService
}
func NewProjectsLogsService(s *Service) *ProjectsLogsService {
rs := &ProjectsLogsService{s: s}
return rs
}
type ProjectsLogsService struct {
s *Service
}
func NewProjectsMetricsService(s *Service) *ProjectsMetricsService {
rs := &ProjectsMetricsService{s: s}
return rs
}
type ProjectsMetricsService struct {
s *Service
}
func NewProjectsSinksService(s *Service) *ProjectsSinksService {
rs := &ProjectsSinksService{s: s}
return rs
}
type ProjectsSinksService struct {
s *Service
}
// Empty: A generic empty message that you can re-use to avoid defining
// duplicated empty messages in your APIs. A typical example is to use
// it as the request or the response type of an API method. For
// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
// (google.protobuf.Empty); } The JSON representation for `Empty` is
// empty JSON object `{}`.
type Empty struct {
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
}
// HttpRequest: A common proto for logging HTTP requests.
type HttpRequest struct {
// CacheFillBytes: The number of HTTP response bytes inserted into
// cache. Set only when a cache fill was attempted.
CacheFillBytes int64 `json:"cacheFillBytes,omitempty,string"`
// CacheHit: Whether or not an entity was served from cache (with or
// without validation).
CacheHit bool `json:"cacheHit,omitempty"`
// CacheLookup: Whether or not a cache lookup was attempted.
CacheLookup bool `json:"cacheLookup,omitempty"`
// CacheValidatedWithOriginServer: Whether or not the response was
// validated with the origin server before being served from cache. This
// field is only meaningful if `cache_hit` is True.
CacheValidatedWithOriginServer bool `json:"cacheValidatedWithOriginServer,omitempty"`
// Referer: The referer URL of the request, as defined in [HTTP/1.1
// Header Field
// Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
Referer string `json:"referer,omitempty"`
// RemoteIp: The IP address (IPv4 or IPv6) of the client that issued the
// HTTP request. Examples: "192.168.1.1",
// "FE80::0202:B3FF:FE1E:8329".
RemoteIp string `json:"remoteIp,omitempty"`
// RequestMethod: The request method. Examples: "GET", "HEAD",
// "PUT", "POST".
RequestMethod string `json:"requestMethod,omitempty"`
// RequestSize: The size of the HTTP request message in bytes, including
// the request headers and the request body.
RequestSize int64 `json:"requestSize,omitempty,string"`
// RequestUrl: The scheme (http, https), the host name, the path and the
// query portion of the URL that was requested. Example:
// "http://example.com/some/info?color=red".
RequestUrl string `json:"requestUrl,omitempty"`
// ResponseSize: The size of the HTTP response message sent back to the
// client, in bytes, including the response headers and the response
// body.
ResponseSize int64 `json:"responseSize,omitempty,string"`
// Status: The response code indicating the status of response.
// Examples: 200, 404.
Status int64 `json:"status,omitempty"`
// UserAgent: The user agent sent by the client. Example: "Mozilla/4.0
// (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".
UserAgent string `json:"userAgent,omitempty"`
// ForceSendFields is a list of field names (e.g. "CacheFillBytes") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *HttpRequest) MarshalJSON() ([]byte, error) {
type noMethod HttpRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// LabelDescriptor: A description of a label.
type LabelDescriptor struct {
// Description: A human-readable description for the label.
Description string `json:"description,omitempty"`
// Key: The label key.
Key string `json:"key,omitempty"`
// ValueType: The type of data that can be assigned to the label.
//
// Possible values:
// "STRING"
// "BOOL"
// "INT64"
ValueType string `json:"valueType,omitempty"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *LabelDescriptor) MarshalJSON() ([]byte, error) {
type noMethod LabelDescriptor
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// ListLogEntriesRequest: The parameters to `ListLogEntries`.
type ListLogEntriesRequest struct {
// Filter: Optional. An [advanced logs
// filter](/logging/docs/view/advanced_filters). The filter is compared
// against all log entries in the projects specified by `projectIds`.
// Only entries that match the filter are retrieved. An empty filter
// matches all log entries.
Filter string `json:"filter,omitempty"`
// OrderBy: Optional. How the results should be sorted. Presently, the
// only permitted values are "timestamp asc" (default) and "timestamp
// desc". The first option returns entries in order of increasing
// values of `LogEntry.timestamp` (oldest first), and the second option
// returns entries in order of decreasing timestamps (newest first).
// Entries with equal timestamps are returned in order of
// `LogEntry.insertId`.
OrderBy string `json:"orderBy,omitempty"`
// PageSize: Optional. The maximum number of results to return from this
// request. You must check for presence of `nextPageToken` to determine
// if additional results are available, which you can retrieve by
// passing the `nextPageToken` value as the `pageToken` parameter in the
// next request.
PageSize int64 `json:"pageSize,omitempty"`
// PageToken: Optional. If the `pageToken` parameter is supplied, then
// the next page of results is retrieved. The `pageToken` parameter must
// be set to the value of the `nextPageToken` from the previous
// response. The values of `projectIds`, `filter`, and `orderBy` must be
// the same as in the previous request.
PageToken string `json:"pageToken,omitempty"`
// PartialSuccess: Optional. If true, read access to all projects is not
// required and results will be returned for the subset of projects for
// which read access is permitted (empty subset is permitted).
PartialSuccess bool `json:"partialSuccess,omitempty"`
// ProjectIds: Required. One or more project IDs or project numbers from
// which to retrieve log entries. Examples of a project ID:
// "my-project-1A", "1234567890".
ProjectIds []string `json:"projectIds,omitempty"`
// ForceSendFields is a list of field names (e.g. "Filter") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ListLogEntriesRequest) MarshalJSON() ([]byte, error) {
type noMethod ListLogEntriesRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// ListLogEntriesResponse: Result returned from `ListLogEntries`.
type ListLogEntriesResponse struct {
// Entries: A list of log entries.
Entries []*LogEntry `json:"entries,omitempty"`
// NextPageToken: If there are more results than were returned, then
// `nextPageToken` is included in the response. To get the next set of
// results, call this method again using the value of `nextPageToken` as
// `pageToken`.
NextPageToken string `json:"nextPageToken,omitempty"`
// ProjectIdErrors: If partial_success is true, contains the project ids
// that had errors and the associated errors.
ProjectIdErrors map[string]Status `json:"projectIdErrors,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Entries") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ListLogEntriesResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLogEntriesResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// ListLogMetricsResponse: Result returned from ListLogMetrics.
type ListLogMetricsResponse struct {
// Metrics: A list of logs-based metrics.
Metrics []*LogMetric `json:"metrics,omitempty"`
// NextPageToken: If there are more results than were returned, then
// `nextPageToken` is included in the response. To get the next set of
// results, call this method again using the value of `nextPageToken` as
// `pageToken`.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Metrics") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ListLogMetricsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLogMetricsResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// ListMonitoredResourceDescriptorsResponse: Result returned from
// ListMonitoredResourceDescriptors.
type ListMonitoredResourceDescriptorsResponse struct {
// NextPageToken: If there are more results than were returned, then
// `nextPageToken` is included in the response. To get the next set of
// results, call this method again using the value of `nextPageToken` as
// `pageToken`.
NextPageToken string `json:"nextPageToken,omitempty"`
// ResourceDescriptors: A list of resource descriptors.
ResourceDescriptors []*MonitoredResourceDescriptor `json:"resourceDescriptors,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ListMonitoredResourceDescriptorsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListMonitoredResourceDescriptorsResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// ListSinksResponse: Result returned from `ListSinks`.
type ListSinksResponse struct {
// NextPageToken: If there are more results than were returned, then
// `nextPageToken` is included in the response. To get the next set of
// results, call this method again using the value of `nextPageToken` as
// `pageToken`.
NextPageToken string `json:"nextPageToken,omitempty"`
// Sinks: A list of sinks.
Sinks []*LogSink `json:"sinks,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ListSinksResponse) MarshalJSON() ([]byte, error) {
type noMethod ListSinksResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// LogEntry: An individual entry in a log.
type LogEntry struct {
// HttpRequest: Optional. Information about the HTTP request associated
// with this log entry, if applicable.
HttpRequest *HttpRequest `json:"httpRequest,omitempty"`
// InsertId: Optional. A unique ID for the log entry. If you provide
// this field, the logging service considers other log entries in the
// same log with the same ID as duplicates which can be removed. If
// omitted, Cloud Logging will generate a unique ID for this log entry.
InsertId string `json:"insertId,omitempty"`
// JsonPayload: The log entry payload, represented as a structure that
// is expressed as a JSON object.
JsonPayload LogEntryJsonPayload `json:"jsonPayload,omitempty"`
// Labels: Optional. A set of user-defined (key, value) data that
// provides additional information about the log entry.
Labels map[string]string `json:"labels,omitempty"`
// LogName: Required. The resource name of the log to which this log
// entry belongs. The format of the name is "projects/
// /logs/". Examples: "projects/my-projectid/logs/syslog",
// "projects/1234567890/logs/library.googleapis.com%2Fbook_log". The
// log ID part of resource name must be less than 512 characters long
// and can only include the following characters: upper and lower case
// alphanumeric characters: [A-Za-z0-9]; and punctuation characters:
// forward-slash, underscore, hyphen, and period. Forward-slash (`/`)
// characters in the log ID must be URL-encoded.
LogName string `json:"logName,omitempty"`
// Operation: Optional. Information about an operation associated with
// the log entry, if applicable.
Operation *LogEntryOperation `json:"operation,omitempty"`
// ProtoPayload: The log entry payload, represented as a protocol
// buffer. You can only use `protoPayload` values that belong to a set
// of approved types.
ProtoPayload LogEntryProtoPayload `json:"protoPayload,omitempty"`
// Resource: Required. The monitored resource associated with this log
// entry. Example: a log entry that reports a database error would be
// associated with the monitored resource designating the particular
// database that reported the error.
Resource *MonitoredResource `json:"resource,omitempty"`
// Severity: Optional. The severity of the log entry. The default value
// is `LogSeverity.DEFAULT`.
//
// Possible values:
// "DEFAULT"
// "DEBUG"
// "INFO"
// "NOTICE"
// "WARNING"
// "ERROR"
// "CRITICAL"
// "ALERT"
// "EMERGENCY"
Severity string `json:"severity,omitempty"`
// TextPayload: The log entry payload, represented as a Unicode string
// (UTF-8).
TextPayload string `json:"textPayload,omitempty"`
// Timestamp: Optional. The time the event described by the log entry
// occurred. If omitted, Cloud Logging will use the time the log entry
// is written.
Timestamp string `json:"timestamp,omitempty"`
// ForceSendFields is a list of field names (e.g. "HttpRequest") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *LogEntry) MarshalJSON() ([]byte, error) {
type noMethod LogEntry
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
type LogEntryJsonPayload interface{}
type LogEntryProtoPayload interface{}
// LogEntryOperation: Additional information about a potentially
// long-running operation with which a log entry is associated.
type LogEntryOperation struct {
// First: Optional. Set this to True if this is the first log entry in
// the operation.
First bool `json:"first,omitempty"`
// Id: Required. An arbitrary operation identifier. Log entries with the
// same identifier are assumed to be part of the same operation.
Id string `json:"id,omitempty"`
// Last: Optional. Set this to True if this is the last log entry in the
// operation.
Last bool `json:"last,omitempty"`
// Producer: Required. An arbitrary producer identifier. The combination
// of `id` and `producer` must be globally unique. Examples for
// `producer`: "MyDivision.MyBigCompany.com",
// "github.com/MyProject/MyApplication".
Producer string `json:"producer,omitempty"`
// ForceSendFields is a list of field names (e.g. "First") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *LogEntryOperation) MarshalJSON() ([]byte, error) {
type noMethod LogEntryOperation
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// LogLine: Application log line emitted while processing a request.
type LogLine struct {
// LogMessage: App-provided log message.
LogMessage string `json:"logMessage,omitempty"`
// Severity: Severity of this log entry.
//
// Possible values:
// "DEFAULT"
// "DEBUG"
// "INFO"
// "NOTICE"
// "WARNING"
// "ERROR"
// "CRITICAL"
// "ALERT"
// "EMERGENCY"
Severity string `json:"severity,omitempty"`
// SourceLocation: Where in the source code this log message was
// written.
SourceLocation *SourceLocation `json:"sourceLocation,omitempty"`
// Time: Approximate time when this log entry was made.
Time string `json:"time,omitempty"`
// ForceSendFields is a list of field names (e.g. "LogMessage") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *LogLine) MarshalJSON() ([]byte, error) {
type noMethod LogLine
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// LogMetric: Describes a logs-based metric. The value of the metric is
// the number of log entries that match a logs filter.
type LogMetric struct {
// Description: A description of this metric, which is used in
// documentation.
Description string `json:"description,omitempty"`
// Filter: An [advanced logs
// filter](/logging/docs/view/advanced_filters). Example:
// "logName:syslog AND severity>=ERROR".
Filter string `json:"filter,omitempty"`
// Name: Required. The client-assigned metric identifier. Example:
// "severe_errors". Metric identifiers are limited to 1000 characters
// and can include only the following characters: `A-Z`, `a-z`, `0-9`,
// and the special characters `_-.,+!*',()%/\`. The forward-slash
// character (`/`) denotes a hierarchy of name pieces, and it cannot be
// the first character of the name.
Name string `json:"name,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *LogMetric) MarshalJSON() ([]byte, error) {
type noMethod LogMetric
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// LogSink: Describes a sink used to export log entries outside Cloud
// Logging.
type LogSink struct {
// Destination: The export destination. See [Exporting Logs With
// Sinks](/logging/docs/api/tasks/exporting-logs). Examples:
// "storage.googleapis.com/a-bucket",
// "bigquery.googleapis.com/projects/a-project-id/datasets/a-dataset".
Destination string `json:"destination,omitempty"`
// Filter: An [advanced logs
// filter](/logging/docs/view/advanced_filters). Only log entries
// matching that filter are exported. The filter must be consistent with
// the log entry format specified by the `outputVersionFormat`
// parameter, regardless of the format of the log entry that was
// originally written to Cloud Logging. Example (V2 format):
// "logName=projects/my-projectid/logs/syslog AND severity>=ERROR".
Filter string `json:"filter,omitempty"`
// Name: Required. The client-assigned sink identifier. Example:
// "my-severe-errors-to-pubsub". Sink identifiers are limited to 1000
// characters and can include only the following characters: `A-Z`,
// `a-z`, `0-9`, and the special characters `_-.`.
Name string `json:"name,omitempty"`
// OutputVersionFormat: The log entry version to use for this sink's
// exported log entries. This version does not have to correspond to the
// version of the log entry when it was written to Cloud Logging.
//
// Possible values:
// "VERSION_FORMAT_UNSPECIFIED"
// "V2"
// "V1"
OutputVersionFormat string `json:"outputVersionFormat,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Destination") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *LogSink) MarshalJSON() ([]byte, error) {
type noMethod LogSink
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// MonitoredResource: An object representing a resource that can be used
// for monitoring, logging, billing, or other purposes. Examples include
// virtual machine instances, databases, and storage devices such as
// disks. The `type` field identifies a MonitoredResourceDescriptor
// object that describes the resource's schema. Information in the
// `labels` field identifies the actual resource and its attributes
// according to the schema. For example, a particular Compute Engine VM
// instance could be represented by the following object, because the
// MonitoredResourceDescriptor for "gce_instance" has labels
// "instance_id" and "zone": { "type": "gce_instance", "labels": {
// "instance_id": "my-instance", "zone": "us-central1-a" }}
type MonitoredResource struct {
// Labels: Required. Values for all of the labels listed in the
// associated monitored resource descriptor. For example, Cloud SQL
// databases use the labels "database_id" and "zone".
Labels map[string]string `json:"labels,omitempty"`
// Type: Required. The monitored resource type. This field must match
// the `type` field of a MonitoredResourceDescriptor object. For
// example, the type of a Cloud SQL database is "cloudsql_database".
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Labels") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *MonitoredResource) MarshalJSON() ([]byte, error) {
type noMethod MonitoredResource
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// MonitoredResourceDescriptor: An object that describes the schema of a
// MonitoredResource object using a type name and a set of labels. For
// example, the monitored resource descriptor for Google Compute Engine
// VM instances has a type of "gce_instance" and specifies the use of
// the labels "instance_id" and "zone" to identify particular VM
// instances. Different APIs can support different monitored resource
// types. APIs generally provide a `list` method that returns the
// monitored resource descriptors used by the API.
type MonitoredResourceDescriptor struct {
// Description: Optional. A detailed description of the monitored
// resource type that might be used in documentation.
Description string `json:"description,omitempty"`
// DisplayName: Optional. A concise name for the monitored resource type
// that might be displayed in user interfaces. For example, "Google
// Cloud SQL Database".
DisplayName string `json:"displayName,omitempty"`
// Labels: Required. A set of labels used to describe instances of this
// monitored resource type. For example, an individual Google Cloud SQL
// database is identified by values for the labels "database_id" and
// "zone".
Labels []*LabelDescriptor `json:"labels,omitempty"`
// Name: Optional. The resource name of the monitored resource
// descriptor:
// "projects/{project_id}/monitoredResourceDescriptors/{type}" where
// {type} is the value of the `type` field in this object and
// {project_id} is a project ID that provides API-specific context for
// accessing the type. APIs that do not use project information can use
// the resource name format "monitoredResourceDescriptors/{type}".
Name string `json:"name,omitempty"`
// Type: Required. The monitored resource type. For example, the type
// "cloudsql_database" represents databases in Google Cloud SQL.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
type noMethod MonitoredResourceDescriptor
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// RequestLog: Complete log information about a single HTTP request to
// an App Engine application.
type RequestLog struct {
// AppEngineRelease: App Engine release version.
AppEngineRelease string `json:"appEngineRelease,omitempty"`
// AppId: Application that handled this request.
AppId string `json:"appId,omitempty"`
// Cost: An indication of the relative cost of serving this request.
Cost float64 `json:"cost,omitempty"`
// EndTime: Time when the request finished.
EndTime string `json:"endTime,omitempty"`
// Finished: Whether this request is finished or active.
Finished bool `json:"finished,omitempty"`
// First: Whether this is the first RequestLog entry for this request.
// If an active request has several RequestLog entries written to Cloud
// Logging, this field will be set for one of them.
First bool `json:"first,omitempty"`
// Host: Internet host and port number of the resource being requested.
Host string `json:"host,omitempty"`
// HttpVersion: HTTP version of request. Example: "HTTP/1.1".
HttpVersion string `json:"httpVersion,omitempty"`
// InstanceId: An identifier for the instance that handled the request.
InstanceId string `json:"instanceId,omitempty"`
// InstanceIndex: If the instance processing this request belongs to a
// manually scaled module, then this is the 0-based index of the
// instance. Otherwise, this value is -1.
InstanceIndex int64 `json:"instanceIndex,omitempty"`
// Ip: Origin IP address.
Ip string `json:"ip,omitempty"`
// Latency: Latency of the request.
Latency string `json:"latency,omitempty"`
// Line: A list of log lines emitted by the application while serving
// this request.
Line []*LogLine `json:"line,omitempty"`
// MegaCycles: Number of CPU megacycles used to process request.
MegaCycles int64 `json:"megaCycles,omitempty,string"`
// Method: Request method. Example: "GET", "HEAD", "PUT",
// "POST", "DELETE".
Method string `json:"method,omitempty"`
// ModuleId: Module of the application that handled this request.
ModuleId string `json:"moduleId,omitempty"`
// Nickname: The logged-in user who made the request. Most likely, this
// is the part of the user's email before the `@` sign. The field value
// is the same for different requests from the same user, but different
// users can have similar names. This information is also available to
// the application via the App Engine Users API. This field will be
// populated starting with App Engine 1.9.21.
Nickname string `json:"nickname,omitempty"`
// PendingTime: Time this request spent in the pending request queue.
PendingTime string `json:"pendingTime,omitempty"`
// Referrer: Referrer URL of request.
Referrer string `json:"referrer,omitempty"`
// RequestId: Globally unique identifier for a request, which is based
// on the request start time. Request IDs for requests which started
// later will compare greater as strings than those for requests which
// started earlier.
RequestId string `json:"requestId,omitempty"`
// Resource: Contains the path and query portion of the URL that was
// requested. For example, if the URL was
// "http://example.com/app?name=val", the resource would be
// "/app?name=val". The fragment identifier, which is identified by the
// `#` character, is not included.
Resource string `json:"resource,omitempty"`
// ResponseSize: Size in bytes sent back to client by request.
ResponseSize int64 `json:"responseSize,omitempty,string"`
// SourceReference: Source code for the application that handled this
// request. There can be more than one source reference per deployed
// application if source code is distributed among multiple
// repositories.
SourceReference []*SourceReference `json:"sourceReference,omitempty"`
// StartTime: Time when the request started.
StartTime string `json:"startTime,omitempty"`
// Status: HTTP response status code. Example: 200, 404.
Status int64 `json:"status,omitempty"`
// TaskName: Task name of the request, in the case of an offline
// request.
TaskName string `json:"taskName,omitempty"`
// TaskQueueName: Queue name of the request, in the case of an offline
// request.
TaskQueueName string `json:"taskQueueName,omitempty"`
// TraceId: Cloud Trace identifier for this request.
TraceId string `json:"traceId,omitempty"`
// UrlMapEntry: File or class that handled the request.
UrlMapEntry string `json:"urlMapEntry,omitempty"`
// UserAgent: User agent that made the request.
UserAgent string `json:"userAgent,omitempty"`
// VersionId: Version of the application that handled this request.
VersionId string `json:"versionId,omitempty"`
// WasLoadingRequest: Whether this was a loading request for the
// instance.
WasLoadingRequest bool `json:"wasLoadingRequest,omitempty"`
// ForceSendFields is a list of field names (e.g. "AppEngineRelease") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *RequestLog) MarshalJSON() ([]byte, error) {
type noMethod RequestLog
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// SourceLocation: Specifies a location in a source code file.
type SourceLocation struct {
// File: Source file name. Depending on the runtime environment, this
// might be a simple name or a fully-qualified name.
File string `json:"file,omitempty"`
// FunctionName: Human-readable name of the function or method being
// invoked, with optional context such as the class or package name.
// This information is used in contexts such as the logs viewer, where a
// file and line number are less meaningful. The format can vary by
// language. For example: `qual.if.ied.Class.method` (Java),
// `dir/package.func` (Go), `function` (Python).
FunctionName string `json:"functionName,omitempty"`
// Line: Line within the source file.
Line int64 `json:"line,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "File") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *SourceLocation) MarshalJSON() ([]byte, error) {
type noMethod SourceLocation
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// SourceReference: A reference to a particular snapshot of the source
// tree used to build and deploy an application.
type SourceReference struct {
// Repository: Optional. A URI string identifying the repository.
// Example: "https://github.com/GoogleCloudPlatform/kubernetes.git"
Repository string `json:"repository,omitempty"`
// RevisionId: The canonical and persistent identifier of the deployed
// revision. Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b"
RevisionId string `json:"revisionId,omitempty"`
// ForceSendFields is a list of field names (e.g. "Repository") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *SourceReference) MarshalJSON() ([]byte, error) {
type noMethod SourceReference
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Status: The `Status` type defines a logical error model that is
// suitable for different programming environments, including REST APIs
// and RPC APIs. It is used by [gRPC](https://github.com/grpc). The
// error model is designed to be: - Simple to use and understand for
// most users - Flexible enough to meet unexpected needs # Overview The