This repository has been archived by the owner on Jun 15, 2021. It is now read-only.
forked from distribution/distribution
-
Notifications
You must be signed in to change notification settings - Fork 2
/
logging-gen.go
4709 lines (4296 loc) · 159 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/v1beta3"
// ...
// loggingService, err := logging.New(oauthHttpClient)
package logging // import "google.golang.org/api/logging/v1beta3"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"golang.org/x/net/context"
"golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"google.golang.org/api/internal"
"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 _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = internal.MarshalJSON
var _ = context.Canceled
var _ = ctxhttp.Do
const apiId = "logging:v1beta3"
const apiName = "logging"
const apiVersion = "v1beta3"
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.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
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.LogServices = NewProjectsLogServicesService(s)
rs.Logs = NewProjectsLogsService(s)
rs.Metrics = NewProjectsMetricsService(s)
rs.Sinks = NewProjectsSinksService(s)
return rs
}
type ProjectsService struct {
s *Service
LogServices *ProjectsLogServicesService
Logs *ProjectsLogsService
Metrics *ProjectsMetricsService
Sinks *ProjectsSinksService
}
func NewProjectsLogServicesService(s *Service) *ProjectsLogServicesService {
rs := &ProjectsLogServicesService{s: s}
rs.Indexes = NewProjectsLogServicesIndexesService(s)
rs.Sinks = NewProjectsLogServicesSinksService(s)
return rs
}
type ProjectsLogServicesService struct {
s *Service
Indexes *ProjectsLogServicesIndexesService
Sinks *ProjectsLogServicesSinksService
}
func NewProjectsLogServicesIndexesService(s *Service) *ProjectsLogServicesIndexesService {
rs := &ProjectsLogServicesIndexesService{s: s}
return rs
}
type ProjectsLogServicesIndexesService struct {
s *Service
}
func NewProjectsLogServicesSinksService(s *Service) *ProjectsLogServicesSinksService {
rs := &ProjectsLogServicesSinksService{s: s}
return rs
}
type ProjectsLogServicesSinksService struct {
s *Service
}
func NewProjectsLogsService(s *Service) *ProjectsLogsService {
rs := &ProjectsLogsService{s: s}
rs.Entries = NewProjectsLogsEntriesService(s)
rs.Sinks = NewProjectsLogsSinksService(s)
return rs
}
type ProjectsLogsService struct {
s *Service
Entries *ProjectsLogsEntriesService
Sinks *ProjectsLogsSinksService
}
func NewProjectsLogsEntriesService(s *Service) *ProjectsLogsEntriesService {
rs := &ProjectsLogsEntriesService{s: s}
return rs
}
type ProjectsLogsEntriesService struct {
s *Service
}
func NewProjectsLogsSinksService(s *Service) *ProjectsLogsSinksService {
rs := &ProjectsLogsSinksService{s: s}
return rs
}
type ProjectsLogsSinksService 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 {
// CacheHit: Whether or not an entity was served from cache (with or
// without validation).
CacheHit bool `json:"cacheHit,omitempty"`
// Referer: Referer (a.k.a. referrer) URL of request, as defined in
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html.
Referer string `json:"referer,omitempty"`
// RemoteIp: IP address of the client who issues the HTTP request. Could
// be either IPv4 or IPv6.
RemoteIp string `json:"remoteIp,omitempty"`
// RequestMethod: Request method, such as `GET`, `HEAD`, `PUT` or
// `POST`.
RequestMethod string `json:"requestMethod,omitempty"`
// RequestSize: Size of the HTTP request message in bytes, including
// request headers and the request body.
RequestSize int64 `json:"requestSize,omitempty,string"`
// RequestUrl: Contains the scheme (http|https), the host name, the path
// and the query portion of the URL that was requested.
RequestUrl string `json:"requestUrl,omitempty"`
// ResponseSize: Size of the HTTP response message in bytes sent back to
// the client, including response headers and response body.
ResponseSize int64 `json:"responseSize,omitempty,string"`
// Status: A response code indicates the status of response, e.g., 200.
Status int64 `json:"status,omitempty"`
// UserAgent: User agent sent by the client, e.g., "Mozilla/4.0
// (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".
UserAgent string `json:"userAgent,omitempty"`
// ValidatedWithOriginServer: 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.
ValidatedWithOriginServer bool `json:"validatedWithOriginServer,omitempty"`
// ForceSendFields is a list of field names (e.g. "CacheHit") 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 internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListLogMetricsResponse: Result returned from ListLogMetrics.
type ListLogMetricsResponse struct {
// Metrics: The list of metrics that was requested.
Metrics []*LogMetric `json:"metrics,omitempty"`
// NextPageToken: If there are more results, then `nextPageToken` is
// returned in the response. To get the next batch of entries, use the
// value of `nextPageToken` as `pageToken` in the next call of
// `ListLogMetrics`. If `nextPageToken` is empty, then there are no more
// results.
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 internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListLogServiceIndexesResponse: Result returned from
// ListLogServiceIndexesRequest.
type ListLogServiceIndexesResponse struct {
// NextPageToken: If there are more results, then `nextPageToken` is
// returned in the response. To get the next batch of indexes, use the
// value of `nextPageToken` as `pageToken` in the next call of
// `ListLogServiceIndexes`. If `nextPageToken` is empty, then there are
// no more results.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServiceIndexPrefixes: A list of log service index values. Each index
// value has the form "/value1/value2/...", where `value1` is a value
// in the primary index, `value2` is a value in the secondary index, and
// so forth.
ServiceIndexPrefixes []string `json:"serviceIndexPrefixes,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 *ListLogServiceIndexesResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLogServiceIndexesResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListLogServiceSinksResponse: Result returned from
// `ListLogServiceSinks`.
type ListLogServiceSinksResponse struct {
// Sinks: The requested log service sinks. If a returned `LogSink`
// object has an empty `destination` field, the client can retrieve the
// complete `LogSink` object by calling `logServices.sinks.get`.
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. "Sinks") 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 *ListLogServiceSinksResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLogServiceSinksResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListLogServicesResponse: Result returned from
// `ListLogServicesRequest`.
type ListLogServicesResponse struct {
// LogServices: A list of log services.
LogServices []*LogService `json:"logServices,omitempty"`
// NextPageToken: If there are more results, then `nextPageToken` is
// returned in the response. To get the next batch of services, use the
// value of `nextPageToken` as `pageToken` in the next call of
// `ListLogServices`. If `nextPageToken` is empty, then there are no
// more results.
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. "LogServices") 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 *ListLogServicesResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLogServicesResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListLogSinksResponse: Result returned from `ListLogSinks`.
type ListLogSinksResponse struct {
// Sinks: The requested log sinks. If a returned `LogSink` object has an
// empty `destination` field, the client can retrieve the complete
// `LogSink` object by calling `log.sinks.get`.
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. "Sinks") 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 *ListLogSinksResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLogSinksResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListLogsResponse: Result returned from ListLogs.
type ListLogsResponse struct {
// Logs: A list of log descriptions matching the criteria.
Logs []*Log `json:"logs,omitempty"`
// NextPageToken: If there are more results, then `nextPageToken` is
// returned in the response. To get the next batch of logs, use the
// value of `nextPageToken` as `pageToken` in the next call of
// `ListLogs`. If `nextPageToken` is empty, then there are no more
// results.
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. "Logs") 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 *ListLogsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLogsResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListSinksResponse: Result returned from `ListSinks`.
type ListSinksResponse struct {
// Sinks: The requested sinks. If a returned `LogSink` object has an
// empty `destination` field, the client can retrieve the complete
// `LogSink` object by calling `projects.sinks.get`.
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. "Sinks") 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 internal.MarshalJSON(raw, s.ForceSendFields)
}
// Log: _Output only._ Describes a log, which is a named stream of log
// entries.
type Log struct {
// DisplayName: _Optional._ The common name of the log. Example:
// "request_log".
DisplayName string `json:"displayName,omitempty"`
// Name: The resource name of the log. Example:
// "/projects/my-gcp-project-id/logs/LOG_NAME", where `LOG_NAME` is
// the URL-encoded given name of the log. The log includes those log
// entries whose `LogEntry.log` field contains this given name. To avoid
// name collisions, it is a best practice to prefix the given log name
// with the service name, but this is not required. Examples of log
// given names: "appengine.googleapis.com/request_log",
// "apache-access".
Name string `json:"name,omitempty"`
// PayloadType: _Optional_. A URI representing the expected payload type
// for log entries.
PayloadType string `json:"payloadType,omitempty"`
// ForceSendFields is a list of field names (e.g. "DisplayName") 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 *Log) MarshalJSON() ([]byte, error) {
type noMethod Log
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// LogEntry: An individual entry in a log.
type LogEntry struct {
// HttpRequest: Information about the HTTP request associated with this
// log entry, if applicable.
HttpRequest *HttpRequest `json:"httpRequest,omitempty"`
// InsertId: 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.
InsertId string `json:"insertId,omitempty"`
// Log: The log to which this entry belongs. When a log entry is
// ingested, the value of this field is set by the logging system.
Log string `json:"log,omitempty"`
// Metadata: Information about the log entry.
Metadata *LogEntryMetadata `json:"metadata,omitempty"`
// ProtoPayload: The log entry payload, represented as a protocol buffer
// that is expressed as a JSON object. You can only pass `protoPayload`
// values that belong to a set of approved types.
ProtoPayload LogEntryProtoPayload `json:"protoPayload,omitempty"`
// StructPayload: The log entry payload, represented as a structure that
// is expressed as a JSON object.
StructPayload LogEntryStructPayload `json:"structPayload,omitempty"`
// TextPayload: The log entry payload, represented as a text string.
TextPayload string `json:"textPayload,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 internal.MarshalJSON(raw, s.ForceSendFields)
}
type LogEntryProtoPayload interface{}
type LogEntryStructPayload interface{}
// LogEntryMetadata: Additional data that is associated with a log
// entry, set by the service creating the log entry.
type LogEntryMetadata struct {
// Labels: A set of (key, value) data that provides additional
// information about the log entry. If the log entry is from one of the
// Google Cloud Platform sources listed below, the indicated (key,
// value) information must be provided: Google App Engine, service_name
// `appengine.googleapis.com`: "appengine.googleapis.com/module_id",
// "appengine.googleapis.com/version_id", and one of:
// "appengine.googleapis.com/replica_index",
// "appengine.googleapis.com/clone_id", or else provide the following
// Compute Engine labels: Google Compute Engine, service_name
// `compute.googleapis.com`: "compute.googleapis.com/resource_type",
// "instance" "compute.googleapis.com/resource_id",
Labels map[string]string `json:"labels,omitempty"`
// ProjectId: The project ID of the Google Cloud Platform service that
// created the log entry.
ProjectId string `json:"projectId,omitempty"`
// Region: The region name of the Google Cloud Platform service that
// created the log entry. For example, "us-central1".
Region string `json:"region,omitempty"`
// ServiceName: The API name of the Google Cloud Platform service that
// created the log entry. For example, "compute.googleapis.com".
ServiceName string `json:"serviceName,omitempty"`
// Severity: The severity of the log entry.
//
// Possible values:
// "DEFAULT"
// "DEBUG"
// "INFO"
// "NOTICE"
// "WARNING"
// "ERROR"
// "CRITICAL"
// "ALERT"
// "EMERGENCY"
Severity string `json:"severity,omitempty"`
// Timestamp: The time the event described by the log entry occurred.
// Timestamps must be later than January 1, 1970.
Timestamp string `json:"timestamp,omitempty"`
// UserId: The fully-qualified email address of the authenticated user
// that performed or requested the action represented by the log entry.
// If the log entry does not apply to an action taken by an
// authenticated user, then the field should be empty.
UserId string `json:"userId,omitempty"`
// Zone: The zone of the Google Cloud Platform service that created the
// log entry. For example, "us-central1-a".
Zone string `json:"zone,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 *LogEntryMetadata) MarshalJSON() ([]byte, error) {
type noMethod LogEntryMetadata
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// LogError: Describes a problem with a logging resource or operation.
type LogError struct {
// Resource: A resource name associated with this error. For example,
// the name of a Cloud Storage bucket that has insufficient permissions
// to be a destination for log entries.
Resource string `json:"resource,omitempty"`
// Status: The error description, including a classification code, an
// error message, and other details.
Status *Status `json:"status,omitempty"`
// TimeNanos: The time the error was observed, in nanoseconds since the
// Unix epoch.
TimeNanos int64 `json:"timeNanos,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Resource") 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 *LogError) MarshalJSON() ([]byte, error) {
type noMethod LogError
raw := noMethod(*s)
return internal.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 log.
//
// Possible values:
// "DEFAULT"
// "DEBUG"
// "INFO"
// "NOTICE"
// "WARNING"
// "ERROR"
// "CRITICAL"
// "ALERT"
// "EMERGENCY"
Severity string `json:"severity,omitempty"`
// SourceLocation: Line of code that generated this log message.
SourceLocation *SourceLocation `json:"sourceLocation,omitempty"`
// Time: Time when log entry was made. May be inaccurate.
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 internal.MarshalJSON(raw, s.ForceSendFields)
}
// LogMetric: Describes a collected, logs-based metric. The value of the
// metric is the number of log entries in the project that match the
// advanced logs filter in the `filter` field.
type LogMetric struct {
// Description: A description of this metric.
Description string `json:"description,omitempty"`
// Filter: An [advanced logs
// filter](/logging/docs/view/advanced_filters). Example: "log:syslog
// AND metadata.severity>=ERROR".
Filter string `json:"filter,omitempty"`
// Name: The client-assigned name for this metric, such as
// "severe_errors". Metric names are limited to 1000 characters and
// can include only the following characters: `-A-Za-z0-9_.,+!*',()%/\`.
// The slash character `/` implies a hierarchy of name pieces, and
// 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 internal.MarshalJSON(raw, s.ForceSendFields)
}
// LogService: _Output only._ Describes a service that writes log
// entries.
type LogService struct {
// IndexKeys: A list of the names of the keys used to index and label
// individual log entries from this service. The first two keys are used
// as the primary and secondary index, respectively. Additional keys may
// be used to label the entries. For example, App Engine indexes its
// entries by module and by version, so its `indexKeys` field is the
// following: [ "appengine.googleapis.com/module_id",
// "appengine.googleapis.com/version_id" ]
IndexKeys []string `json:"indexKeys,omitempty"`
// Name: The service's name. Example: "appengine.googleapis.com". Log
// names beginning with this string are reserved for this service. This
// value can appear in the `LogEntry.metadata.serviceName` field of log
// entries associated with this log service.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "IndexKeys") 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 *LogService) MarshalJSON() ([]byte, error) {
type noMethod LogService
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// LogSink: Describes where log entries are written outside of Cloud
// Logging.
type LogSink struct {
// Destination: The resource name of the destination. Cloud Logging
// writes designated log entries to this destination. For example,
// "storage.googleapis.com/my-output-bucket".
Destination string `json:"destination,omitempty"`
// Errors: _Output only._ If any errors occur when invoking a sink
// method, then this field contains descriptions of the errors.
Errors []*LogError `json:"errors,omitempty"`
// Filter: An advanced logs filter. If present, only log entries
// matching the filter are written. Only project sinks use this field;
// log sinks and log service sinks must not include a filter.
Filter string `json:"filter,omitempty"`
// Name: The client-assigned name of this sink. For example,
// "my-syslog-sink". The name must be unique among the sinks of a
// similar kind in the project.
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. "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 internal.MarshalJSON(raw, s.ForceSendFields)
}
// RequestLog: Complete log information about a single request to an
// application.
type RequestLog struct {
// AppEngineRelease: App Engine release version string.
AppEngineRelease string `json:"appEngineRelease,omitempty"`
// AppId: Identifies the 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 at which request was known to end processing.
EndTime string `json:"endTime,omitempty"`
// Finished: If true, represents a finished request. Otherwise, the
// request is active.
Finished bool `json:"finished,omitempty"`
// Host: The Internet host and port number of the resource being
// requested.
Host string `json:"host,omitempty"`
// HttpVersion: HTTP version of request.
HttpVersion string `json:"httpVersion,omitempty"`
// InstanceId: An opaque identifier for the instance that handled the
// request.
InstanceId string `json:"instanceId,omitempty"`
// InstanceIndex: If the instance that processed this request was
// individually addressable (i.e. belongs to a manually scaled module),
// this is the index of the instance.
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: List of log lines emitted by the application while serving this
// request, if requested.
Line []*LogLine `json:"line,omitempty"`
// MegaCycles: Number of CPU megacycles used to process request.
MegaCycles int64 `json:"megaCycles,omitempty,string"`
// Method: Request method, such as `GET`, `HEAD`, `PUT`, `POST`, or
// `DELETE`.
Method string `json:"method,omitempty"`
// ModuleId: Identifies the module of the application that handled this
// request.
ModuleId string `json:"moduleId,omitempty"`
// Nickname: A string that identifies a logged-in user who made this
// request, or empty if the user is not logged in. 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 may have a similar name. This information is also available to
// the application via 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, if
// it was pending at all.
PendingTime string `json:"pendingTime,omitempty"`
// Referrer: Referrer URL of request.
Referrer string `json:"referrer,omitempty"`
// RequestId: Globally unique identifier for a request, based on request
// start time. Request IDs for requests which started later will compare
// greater as binary 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". Any trailing fragment (separated by a '#' character)
// will not be 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 at which request was known to have begun processing.
StartTime string `json:"startTime,omitempty"`
// Status: Response status of request.
Status int64 `json:"status,omitempty"`
// TaskName: Task name of the request (for an offline request).
TaskName string `json:"taskName,omitempty"`
// TaskQueueName: Queue name of the request (for an offline request).
TaskQueueName string `json:"taskQueueName,omitempty"`
// TraceId: Cloud Trace identifier of the trace for this request.
TraceId string `json:"traceId,omitempty"`
// UrlMapEntry: File or class within URL mapping used for request.
// Useful for tracking down the source code which was responsible for
// managing request. Especially for multiply mapped handlers.
UrlMapEntry string `json:"urlMapEntry,omitempty"`
// UserAgent: User agent used for making request.
UserAgent string `json:"userAgent,omitempty"`
// VersionId: Version of the application that handled this request.
VersionId string `json:"versionId,omitempty"`
// WasLoadingRequest: Was this request a loading request for this
// 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 internal.MarshalJSON(raw, s.ForceSendFields)
}
// SourceLocation: Specifies a location in a source file.
type SourceLocation struct {
// File: Source file name. May or may not be a fully qualified name,
// depending on the runtime environment.
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, for
// use in contexts such as the logs viewer where file:line number is
// less meaningful. This may vary by language, for example: in Java:
// qual.if.ied.Class.method in Go: dir/package.func in Python: function
// ...
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 internal.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:"-"`
}