logging.pb.go 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. // Code generated by protoc-gen-go.
  2. // source: google/logging/v2/logging.proto
  3. // DO NOT EDIT!
  4. package logging
  5. import proto "github.com/golang/protobuf/proto"
  6. import fmt "fmt"
  7. import math "math"
  8. import _ "google.golang.org/genproto/googleapis/api/annotations"
  9. import google_api3 "google.golang.org/genproto/googleapis/api/monitoredres"
  10. import _ "github.com/golang/protobuf/ptypes/duration"
  11. import google_protobuf5 "github.com/golang/protobuf/ptypes/empty"
  12. import _ "github.com/golang/protobuf/ptypes/timestamp"
  13. import _ "google.golang.org/genproto/googleapis/rpc/status"
  14. import (
  15. context "golang.org/x/net/context"
  16. grpc "google.golang.org/grpc"
  17. )
  18. // Reference imports to suppress errors if they are not otherwise used.
  19. var _ = proto.Marshal
  20. var _ = fmt.Errorf
  21. var _ = math.Inf
  22. // The parameters to DeleteLog.
  23. type DeleteLogRequest struct {
  24. // Required. The resource name of the log to delete:
  25. //
  26. // "projects/[PROJECT_ID]/logs/[LOG_ID]"
  27. // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
  28. //
  29. // `[LOG_ID]` must be URL-encoded. For example,
  30. // `"projects/my-project-id/logs/syslog"`,
  31. // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
  32. // For more information about log names, see
  33. // [LogEntry][google.logging.v2.LogEntry].
  34. LogName string `protobuf:"bytes,1,opt,name=log_name,json=logName" json:"log_name,omitempty"`
  35. }
  36. func (m *DeleteLogRequest) Reset() { *m = DeleteLogRequest{} }
  37. func (m *DeleteLogRequest) String() string { return proto.CompactTextString(m) }
  38. func (*DeleteLogRequest) ProtoMessage() {}
  39. func (*DeleteLogRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
  40. func (m *DeleteLogRequest) GetLogName() string {
  41. if m != nil {
  42. return m.LogName
  43. }
  44. return ""
  45. }
  46. // The parameters to WriteLogEntries.
  47. type WriteLogEntriesRequest struct {
  48. // Optional. A default log resource name that is assigned to all log entries
  49. // in `entries` that do not specify a value for `log_name`:
  50. //
  51. // "projects/[PROJECT_ID]/logs/[LOG_ID]"
  52. // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
  53. //
  54. // `[LOG_ID]` must be URL-encoded. For example,
  55. // `"projects/my-project-id/logs/syslog"` or
  56. // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
  57. // For more information about log names, see
  58. // [LogEntry][google.logging.v2.LogEntry].
  59. LogName string `protobuf:"bytes,1,opt,name=log_name,json=logName" json:"log_name,omitempty"`
  60. // Optional. A default monitored resource object that is assigned to all log
  61. // entries in `entries` that do not specify a value for `resource`. Example:
  62. //
  63. // { "type": "gce_instance",
  64. // "labels": {
  65. // "zone": "us-central1-a", "instance_id": "00000000000000000000" }}
  66. //
  67. // See [LogEntry][google.logging.v2.LogEntry].
  68. Resource *google_api3.MonitoredResource `protobuf:"bytes,2,opt,name=resource" json:"resource,omitempty"`
  69. // Optional. Default labels that are added to the `labels` field of all log
  70. // entries in `entries`. If a log entry already has a label with the same key
  71. // as a label in this parameter, then the log entry's label is not changed.
  72. // See [LogEntry][google.logging.v2.LogEntry].
  73. Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  74. // Required. The log entries to write. Values supplied for the fields
  75. // `log_name`, `resource`, and `labels` in this `entries.write` request are
  76. // added to those log entries that do not provide their own values for the
  77. // fields.
  78. //
  79. // To improve throughput and to avoid exceeding the
  80. // [quota limit](/logging/quota-policy) for calls to `entries.write`,
  81. // you should write multiple log entries at once rather than
  82. // calling this method for each individual log entry.
  83. Entries []*LogEntry `protobuf:"bytes,4,rep,name=entries" json:"entries,omitempty"`
  84. // Optional. Whether valid entries should be written even if some other
  85. // entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
  86. // entry is not written, the response status will be the error associated
  87. // with one of the failed entries and include error details in the form of
  88. // WriteLogEntriesPartialErrors.
  89. PartialSuccess bool `protobuf:"varint,5,opt,name=partial_success,json=partialSuccess" json:"partial_success,omitempty"`
  90. }
  91. func (m *WriteLogEntriesRequest) Reset() { *m = WriteLogEntriesRequest{} }
  92. func (m *WriteLogEntriesRequest) String() string { return proto.CompactTextString(m) }
  93. func (*WriteLogEntriesRequest) ProtoMessage() {}
  94. func (*WriteLogEntriesRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
  95. func (m *WriteLogEntriesRequest) GetLogName() string {
  96. if m != nil {
  97. return m.LogName
  98. }
  99. return ""
  100. }
  101. func (m *WriteLogEntriesRequest) GetResource() *google_api3.MonitoredResource {
  102. if m != nil {
  103. return m.Resource
  104. }
  105. return nil
  106. }
  107. func (m *WriteLogEntriesRequest) GetLabels() map[string]string {
  108. if m != nil {
  109. return m.Labels
  110. }
  111. return nil
  112. }
  113. func (m *WriteLogEntriesRequest) GetEntries() []*LogEntry {
  114. if m != nil {
  115. return m.Entries
  116. }
  117. return nil
  118. }
  119. func (m *WriteLogEntriesRequest) GetPartialSuccess() bool {
  120. if m != nil {
  121. return m.PartialSuccess
  122. }
  123. return false
  124. }
  125. // Result returned from WriteLogEntries.
  126. // empty
  127. type WriteLogEntriesResponse struct {
  128. }
  129. func (m *WriteLogEntriesResponse) Reset() { *m = WriteLogEntriesResponse{} }
  130. func (m *WriteLogEntriesResponse) String() string { return proto.CompactTextString(m) }
  131. func (*WriteLogEntriesResponse) ProtoMessage() {}
  132. func (*WriteLogEntriesResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
  133. // The parameters to `ListLogEntries`.
  134. type ListLogEntriesRequest struct {
  135. // Deprecated. Use `resource_names` instead. One or more project identifiers
  136. // or project numbers from which to retrieve log entries. Example:
  137. // `"my-project-1A"`. If present, these project identifiers are converted to
  138. // resource name format and added to the list of resources in
  139. // `resource_names`.
  140. ProjectIds []string `protobuf:"bytes,1,rep,name=project_ids,json=projectIds" json:"project_ids,omitempty"`
  141. // Required. Names of one or more resources from which to retrieve log
  142. // entries:
  143. //
  144. // "projects/[PROJECT_ID]"
  145. // "organizations/[ORGANIZATION_ID]"
  146. //
  147. // Projects listed in the `project_ids` field are added to this list.
  148. ResourceNames []string `protobuf:"bytes,8,rep,name=resource_names,json=resourceNames" json:"resource_names,omitempty"`
  149. // Optional. A filter that chooses which log entries to return. See [Advanced
  150. // Logs Filters](/logging/docs/view/advanced_filters). Only log entries that
  151. // match the filter are returned. An empty filter matches all log entries in
  152. // the resources listed in `resource_names`. Referencing a parent resource
  153. // that is not listed in `resource_names` will cause the filter to return no
  154. // results.
  155. // The maximum length of the filter is 20000 characters.
  156. Filter string `protobuf:"bytes,2,opt,name=filter" json:"filter,omitempty"`
  157. // Optional. How the results should be sorted. Presently, the only permitted
  158. // values are `"timestamp asc"` (default) and `"timestamp desc"`. The first
  159. // option returns entries in order of increasing values of
  160. // `LogEntry.timestamp` (oldest first), and the second option returns entries
  161. // in order of decreasing timestamps (newest first). Entries with equal
  162. // timestamps are returned in order of `LogEntry.insertId`.
  163. OrderBy string `protobuf:"bytes,3,opt,name=order_by,json=orderBy" json:"order_by,omitempty"`
  164. // Optional. The maximum number of results to return from this request.
  165. // Non-positive values are ignored. The presence of `nextPageToken` in the
  166. // response indicates that more results might be available.
  167. PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
  168. // Optional. If present, then retrieve the next batch of results from the
  169. // preceding call to this method. `pageToken` must be the value of
  170. // `nextPageToken` from the previous response. The values of other method
  171. // parameters should be identical to those in the previous call.
  172. PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
  173. }
  174. func (m *ListLogEntriesRequest) Reset() { *m = ListLogEntriesRequest{} }
  175. func (m *ListLogEntriesRequest) String() string { return proto.CompactTextString(m) }
  176. func (*ListLogEntriesRequest) ProtoMessage() {}
  177. func (*ListLogEntriesRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
  178. func (m *ListLogEntriesRequest) GetProjectIds() []string {
  179. if m != nil {
  180. return m.ProjectIds
  181. }
  182. return nil
  183. }
  184. func (m *ListLogEntriesRequest) GetResourceNames() []string {
  185. if m != nil {
  186. return m.ResourceNames
  187. }
  188. return nil
  189. }
  190. func (m *ListLogEntriesRequest) GetFilter() string {
  191. if m != nil {
  192. return m.Filter
  193. }
  194. return ""
  195. }
  196. func (m *ListLogEntriesRequest) GetOrderBy() string {
  197. if m != nil {
  198. return m.OrderBy
  199. }
  200. return ""
  201. }
  202. func (m *ListLogEntriesRequest) GetPageSize() int32 {
  203. if m != nil {
  204. return m.PageSize
  205. }
  206. return 0
  207. }
  208. func (m *ListLogEntriesRequest) GetPageToken() string {
  209. if m != nil {
  210. return m.PageToken
  211. }
  212. return ""
  213. }
  214. // Result returned from `ListLogEntries`.
  215. type ListLogEntriesResponse struct {
  216. // A list of log entries.
  217. Entries []*LogEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
  218. // If there might be more results than those appearing in this response, then
  219. // `nextPageToken` is included. To get the next set of results, call this
  220. // method again using the value of `nextPageToken` as `pageToken`.
  221. //
  222. // If a value for `next_page_token` appears and the `entries` field is empty,
  223. // it means that the search found no log entries so far but it did not have
  224. // time to search all the possible log entries. Retry the method with this
  225. // value for `page_token` to continue the search. Alternatively, consider
  226. // speeding up the search by changing your filter to specify a single log name
  227. // or resource type, or to narrow the time range of the search.
  228. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
  229. }
  230. func (m *ListLogEntriesResponse) Reset() { *m = ListLogEntriesResponse{} }
  231. func (m *ListLogEntriesResponse) String() string { return proto.CompactTextString(m) }
  232. func (*ListLogEntriesResponse) ProtoMessage() {}
  233. func (*ListLogEntriesResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
  234. func (m *ListLogEntriesResponse) GetEntries() []*LogEntry {
  235. if m != nil {
  236. return m.Entries
  237. }
  238. return nil
  239. }
  240. func (m *ListLogEntriesResponse) GetNextPageToken() string {
  241. if m != nil {
  242. return m.NextPageToken
  243. }
  244. return ""
  245. }
  246. // The parameters to ListMonitoredResourceDescriptors
  247. type ListMonitoredResourceDescriptorsRequest struct {
  248. // Optional. The maximum number of results to return from this request.
  249. // Non-positive values are ignored. The presence of `nextPageToken` in the
  250. // response indicates that more results might be available.
  251. PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
  252. // Optional. If present, then retrieve the next batch of results from the
  253. // preceding call to this method. `pageToken` must be the value of
  254. // `nextPageToken` from the previous response. The values of other method
  255. // parameters should be identical to those in the previous call.
  256. PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
  257. }
  258. func (m *ListMonitoredResourceDescriptorsRequest) Reset() {
  259. *m = ListMonitoredResourceDescriptorsRequest{}
  260. }
  261. func (m *ListMonitoredResourceDescriptorsRequest) String() string { return proto.CompactTextString(m) }
  262. func (*ListMonitoredResourceDescriptorsRequest) ProtoMessage() {}
  263. func (*ListMonitoredResourceDescriptorsRequest) Descriptor() ([]byte, []int) {
  264. return fileDescriptor1, []int{5}
  265. }
  266. func (m *ListMonitoredResourceDescriptorsRequest) GetPageSize() int32 {
  267. if m != nil {
  268. return m.PageSize
  269. }
  270. return 0
  271. }
  272. func (m *ListMonitoredResourceDescriptorsRequest) GetPageToken() string {
  273. if m != nil {
  274. return m.PageToken
  275. }
  276. return ""
  277. }
  278. // Result returned from ListMonitoredResourceDescriptors.
  279. type ListMonitoredResourceDescriptorsResponse struct {
  280. // A list of resource descriptors.
  281. ResourceDescriptors []*google_api3.MonitoredResourceDescriptor `protobuf:"bytes,1,rep,name=resource_descriptors,json=resourceDescriptors" json:"resource_descriptors,omitempty"`
  282. // If there might be more results than those appearing in this response, then
  283. // `nextPageToken` is included. To get the next set of results, call this
  284. // method again using the value of `nextPageToken` as `pageToken`.
  285. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
  286. }
  287. func (m *ListMonitoredResourceDescriptorsResponse) Reset() {
  288. *m = ListMonitoredResourceDescriptorsResponse{}
  289. }
  290. func (m *ListMonitoredResourceDescriptorsResponse) String() string { return proto.CompactTextString(m) }
  291. func (*ListMonitoredResourceDescriptorsResponse) ProtoMessage() {}
  292. func (*ListMonitoredResourceDescriptorsResponse) Descriptor() ([]byte, []int) {
  293. return fileDescriptor1, []int{6}
  294. }
  295. func (m *ListMonitoredResourceDescriptorsResponse) GetResourceDescriptors() []*google_api3.MonitoredResourceDescriptor {
  296. if m != nil {
  297. return m.ResourceDescriptors
  298. }
  299. return nil
  300. }
  301. func (m *ListMonitoredResourceDescriptorsResponse) GetNextPageToken() string {
  302. if m != nil {
  303. return m.NextPageToken
  304. }
  305. return ""
  306. }
  307. // The parameters to ListLogs.
  308. type ListLogsRequest struct {
  309. // Required. The resource name that owns the logs:
  310. //
  311. // "projects/[PROJECT_ID]"
  312. // "organizations/[ORGANIZATION_ID]"
  313. Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
  314. // Optional. The maximum number of results to return from this request.
  315. // Non-positive values are ignored. The presence of `nextPageToken` in the
  316. // response indicates that more results might be available.
  317. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
  318. // Optional. If present, then retrieve the next batch of results from the
  319. // preceding call to this method. `pageToken` must be the value of
  320. // `nextPageToken` from the previous response. The values of other method
  321. // parameters should be identical to those in the previous call.
  322. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
  323. }
  324. func (m *ListLogsRequest) Reset() { *m = ListLogsRequest{} }
  325. func (m *ListLogsRequest) String() string { return proto.CompactTextString(m) }
  326. func (*ListLogsRequest) ProtoMessage() {}
  327. func (*ListLogsRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
  328. func (m *ListLogsRequest) GetParent() string {
  329. if m != nil {
  330. return m.Parent
  331. }
  332. return ""
  333. }
  334. func (m *ListLogsRequest) GetPageSize() int32 {
  335. if m != nil {
  336. return m.PageSize
  337. }
  338. return 0
  339. }
  340. func (m *ListLogsRequest) GetPageToken() string {
  341. if m != nil {
  342. return m.PageToken
  343. }
  344. return ""
  345. }
  346. // Result returned from ListLogs.
  347. type ListLogsResponse struct {
  348. // A list of log names. For example,
  349. // `"projects/my-project/syslog"` or
  350. // `"organizations/123/cloudresourcemanager.googleapis.com%2Factivity"`.
  351. LogNames []string `protobuf:"bytes,3,rep,name=log_names,json=logNames" json:"log_names,omitempty"`
  352. // If there might be more results than those appearing in this response, then
  353. // `nextPageToken` is included. To get the next set of results, call this
  354. // method again using the value of `nextPageToken` as `pageToken`.
  355. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
  356. }
  357. func (m *ListLogsResponse) Reset() { *m = ListLogsResponse{} }
  358. func (m *ListLogsResponse) String() string { return proto.CompactTextString(m) }
  359. func (*ListLogsResponse) ProtoMessage() {}
  360. func (*ListLogsResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} }
  361. func (m *ListLogsResponse) GetLogNames() []string {
  362. if m != nil {
  363. return m.LogNames
  364. }
  365. return nil
  366. }
  367. func (m *ListLogsResponse) GetNextPageToken() string {
  368. if m != nil {
  369. return m.NextPageToken
  370. }
  371. return ""
  372. }
  373. func init() {
  374. proto.RegisterType((*DeleteLogRequest)(nil), "google.logging.v2.DeleteLogRequest")
  375. proto.RegisterType((*WriteLogEntriesRequest)(nil), "google.logging.v2.WriteLogEntriesRequest")
  376. proto.RegisterType((*WriteLogEntriesResponse)(nil), "google.logging.v2.WriteLogEntriesResponse")
  377. proto.RegisterType((*ListLogEntriesRequest)(nil), "google.logging.v2.ListLogEntriesRequest")
  378. proto.RegisterType((*ListLogEntriesResponse)(nil), "google.logging.v2.ListLogEntriesResponse")
  379. proto.RegisterType((*ListMonitoredResourceDescriptorsRequest)(nil), "google.logging.v2.ListMonitoredResourceDescriptorsRequest")
  380. proto.RegisterType((*ListMonitoredResourceDescriptorsResponse)(nil), "google.logging.v2.ListMonitoredResourceDescriptorsResponse")
  381. proto.RegisterType((*ListLogsRequest)(nil), "google.logging.v2.ListLogsRequest")
  382. proto.RegisterType((*ListLogsResponse)(nil), "google.logging.v2.ListLogsResponse")
  383. }
  384. // Reference imports to suppress errors if they are not otherwise used.
  385. var _ context.Context
  386. var _ grpc.ClientConn
  387. // This is a compile-time assertion to ensure that this generated file
  388. // is compatible with the grpc package it is being compiled against.
  389. const _ = grpc.SupportPackageIsVersion4
  390. // Client API for LoggingServiceV2 service
  391. type LoggingServiceV2Client interface {
  392. // Deletes all the log entries in a log.
  393. // The log reappears if it receives new entries.
  394. DeleteLog(ctx context.Context, in *DeleteLogRequest, opts ...grpc.CallOption) (*google_protobuf5.Empty, error)
  395. // Writes log entries to Stackdriver Logging. All log entries are
  396. // written by this method.
  397. WriteLogEntries(ctx context.Context, in *WriteLogEntriesRequest, opts ...grpc.CallOption) (*WriteLogEntriesResponse, error)
  398. // Lists log entries. Use this method to retrieve log entries from
  399. // Stackdriver Logging. For ways to export log entries, see
  400. // [Exporting Logs](/logging/docs/export).
  401. ListLogEntries(ctx context.Context, in *ListLogEntriesRequest, opts ...grpc.CallOption) (*ListLogEntriesResponse, error)
  402. // Lists the descriptors for monitored resource types used by Stackdriver
  403. // Logging.
  404. ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error)
  405. // Lists the logs in projects or organizations.
  406. // Only logs that have entries are listed.
  407. ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error)
  408. }
  409. type loggingServiceV2Client struct {
  410. cc *grpc.ClientConn
  411. }
  412. func NewLoggingServiceV2Client(cc *grpc.ClientConn) LoggingServiceV2Client {
  413. return &loggingServiceV2Client{cc}
  414. }
  415. func (c *loggingServiceV2Client) DeleteLog(ctx context.Context, in *DeleteLogRequest, opts ...grpc.CallOption) (*google_protobuf5.Empty, error) {
  416. out := new(google_protobuf5.Empty)
  417. err := grpc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/DeleteLog", in, out, c.cc, opts...)
  418. if err != nil {
  419. return nil, err
  420. }
  421. return out, nil
  422. }
  423. func (c *loggingServiceV2Client) WriteLogEntries(ctx context.Context, in *WriteLogEntriesRequest, opts ...grpc.CallOption) (*WriteLogEntriesResponse, error) {
  424. out := new(WriteLogEntriesResponse)
  425. err := grpc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/WriteLogEntries", in, out, c.cc, opts...)
  426. if err != nil {
  427. return nil, err
  428. }
  429. return out, nil
  430. }
  431. func (c *loggingServiceV2Client) ListLogEntries(ctx context.Context, in *ListLogEntriesRequest, opts ...grpc.CallOption) (*ListLogEntriesResponse, error) {
  432. out := new(ListLogEntriesResponse)
  433. err := grpc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/ListLogEntries", in, out, c.cc, opts...)
  434. if err != nil {
  435. return nil, err
  436. }
  437. return out, nil
  438. }
  439. func (c *loggingServiceV2Client) ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) {
  440. out := new(ListMonitoredResourceDescriptorsResponse)
  441. err := grpc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", in, out, c.cc, opts...)
  442. if err != nil {
  443. return nil, err
  444. }
  445. return out, nil
  446. }
  447. func (c *loggingServiceV2Client) ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error) {
  448. out := new(ListLogsResponse)
  449. err := grpc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/ListLogs", in, out, c.cc, opts...)
  450. if err != nil {
  451. return nil, err
  452. }
  453. return out, nil
  454. }
  455. // Server API for LoggingServiceV2 service
  456. type LoggingServiceV2Server interface {
  457. // Deletes all the log entries in a log.
  458. // The log reappears if it receives new entries.
  459. DeleteLog(context.Context, *DeleteLogRequest) (*google_protobuf5.Empty, error)
  460. // Writes log entries to Stackdriver Logging. All log entries are
  461. // written by this method.
  462. WriteLogEntries(context.Context, *WriteLogEntriesRequest) (*WriteLogEntriesResponse, error)
  463. // Lists log entries. Use this method to retrieve log entries from
  464. // Stackdriver Logging. For ways to export log entries, see
  465. // [Exporting Logs](/logging/docs/export).
  466. ListLogEntries(context.Context, *ListLogEntriesRequest) (*ListLogEntriesResponse, error)
  467. // Lists the descriptors for monitored resource types used by Stackdriver
  468. // Logging.
  469. ListMonitoredResourceDescriptors(context.Context, *ListMonitoredResourceDescriptorsRequest) (*ListMonitoredResourceDescriptorsResponse, error)
  470. // Lists the logs in projects or organizations.
  471. // Only logs that have entries are listed.
  472. ListLogs(context.Context, *ListLogsRequest) (*ListLogsResponse, error)
  473. }
  474. func RegisterLoggingServiceV2Server(s *grpc.Server, srv LoggingServiceV2Server) {
  475. s.RegisterService(&_LoggingServiceV2_serviceDesc, srv)
  476. }
  477. func _LoggingServiceV2_DeleteLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  478. in := new(DeleteLogRequest)
  479. if err := dec(in); err != nil {
  480. return nil, err
  481. }
  482. if interceptor == nil {
  483. return srv.(LoggingServiceV2Server).DeleteLog(ctx, in)
  484. }
  485. info := &grpc.UnaryServerInfo{
  486. Server: srv,
  487. FullMethod: "/google.logging.v2.LoggingServiceV2/DeleteLog",
  488. }
  489. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  490. return srv.(LoggingServiceV2Server).DeleteLog(ctx, req.(*DeleteLogRequest))
  491. }
  492. return interceptor(ctx, in, info, handler)
  493. }
  494. func _LoggingServiceV2_WriteLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  495. in := new(WriteLogEntriesRequest)
  496. if err := dec(in); err != nil {
  497. return nil, err
  498. }
  499. if interceptor == nil {
  500. return srv.(LoggingServiceV2Server).WriteLogEntries(ctx, in)
  501. }
  502. info := &grpc.UnaryServerInfo{
  503. Server: srv,
  504. FullMethod: "/google.logging.v2.LoggingServiceV2/WriteLogEntries",
  505. }
  506. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  507. return srv.(LoggingServiceV2Server).WriteLogEntries(ctx, req.(*WriteLogEntriesRequest))
  508. }
  509. return interceptor(ctx, in, info, handler)
  510. }
  511. func _LoggingServiceV2_ListLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  512. in := new(ListLogEntriesRequest)
  513. if err := dec(in); err != nil {
  514. return nil, err
  515. }
  516. if interceptor == nil {
  517. return srv.(LoggingServiceV2Server).ListLogEntries(ctx, in)
  518. }
  519. info := &grpc.UnaryServerInfo{
  520. Server: srv,
  521. FullMethod: "/google.logging.v2.LoggingServiceV2/ListLogEntries",
  522. }
  523. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  524. return srv.(LoggingServiceV2Server).ListLogEntries(ctx, req.(*ListLogEntriesRequest))
  525. }
  526. return interceptor(ctx, in, info, handler)
  527. }
  528. func _LoggingServiceV2_ListMonitoredResourceDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  529. in := new(ListMonitoredResourceDescriptorsRequest)
  530. if err := dec(in); err != nil {
  531. return nil, err
  532. }
  533. if interceptor == nil {
  534. return srv.(LoggingServiceV2Server).ListMonitoredResourceDescriptors(ctx, in)
  535. }
  536. info := &grpc.UnaryServerInfo{
  537. Server: srv,
  538. FullMethod: "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors",
  539. }
  540. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  541. return srv.(LoggingServiceV2Server).ListMonitoredResourceDescriptors(ctx, req.(*ListMonitoredResourceDescriptorsRequest))
  542. }
  543. return interceptor(ctx, in, info, handler)
  544. }
  545. func _LoggingServiceV2_ListLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  546. in := new(ListLogsRequest)
  547. if err := dec(in); err != nil {
  548. return nil, err
  549. }
  550. if interceptor == nil {
  551. return srv.(LoggingServiceV2Server).ListLogs(ctx, in)
  552. }
  553. info := &grpc.UnaryServerInfo{
  554. Server: srv,
  555. FullMethod: "/google.logging.v2.LoggingServiceV2/ListLogs",
  556. }
  557. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  558. return srv.(LoggingServiceV2Server).ListLogs(ctx, req.(*ListLogsRequest))
  559. }
  560. return interceptor(ctx, in, info, handler)
  561. }
  562. var _LoggingServiceV2_serviceDesc = grpc.ServiceDesc{
  563. ServiceName: "google.logging.v2.LoggingServiceV2",
  564. HandlerType: (*LoggingServiceV2Server)(nil),
  565. Methods: []grpc.MethodDesc{
  566. {
  567. MethodName: "DeleteLog",
  568. Handler: _LoggingServiceV2_DeleteLog_Handler,
  569. },
  570. {
  571. MethodName: "WriteLogEntries",
  572. Handler: _LoggingServiceV2_WriteLogEntries_Handler,
  573. },
  574. {
  575. MethodName: "ListLogEntries",
  576. Handler: _LoggingServiceV2_ListLogEntries_Handler,
  577. },
  578. {
  579. MethodName: "ListMonitoredResourceDescriptors",
  580. Handler: _LoggingServiceV2_ListMonitoredResourceDescriptors_Handler,
  581. },
  582. {
  583. MethodName: "ListLogs",
  584. Handler: _LoggingServiceV2_ListLogs_Handler,
  585. },
  586. },
  587. Streams: []grpc.StreamDesc{},
  588. Metadata: "google/logging/v2/logging.proto",
  589. }
  590. func init() { proto.RegisterFile("google/logging/v2/logging.proto", fileDescriptor1) }
  591. var fileDescriptor1 = []byte{
  592. // 912 bytes of a gzipped FileDescriptorProto
  593. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
  594. 0x14, 0xd7, 0xd8, 0x4d, 0x6a, 0xbf, 0xd0, 0xc4, 0x1d, 0x1a, 0xc7, 0xb5, 0xd3, 0xc6, 0x6c, 0x28,
  595. 0xd9, 0x5a, 0xea, 0xae, 0x30, 0xaa, 0xd4, 0xa6, 0xe2, 0x12, 0x5a, 0x21, 0xa4, 0x14, 0x45, 0x1b,
  596. 0xd4, 0x4a, 0xbd, 0x58, 0x6b, 0xfb, 0x75, 0x35, 0x74, 0xbd, 0xb3, 0xcc, 0x8c, 0x1d, 0xdc, 0xaa,
  597. 0x1c, 0x7a, 0xe0, 0x0b, 0xf0, 0x2d, 0x38, 0xf0, 0x2d, 0xb8, 0x72, 0xe1, 0xc2, 0x81, 0x23, 0x1f,
  598. 0x82, 0x23, 0x9a, 0xd9, 0x59, 0xc7, 0xb1, 0x5d, 0xc7, 0xe5, 0xb6, 0xf3, 0xe6, 0x37, 0xef, 0xfd,
  599. 0xde, 0xef, 0xfd, 0xb1, 0x61, 0x2f, 0xe2, 0x3c, 0x8a, 0xd1, 0x8f, 0x79, 0x14, 0xb1, 0x24, 0xf2,
  600. 0x47, 0xed, 0xfc, 0xd3, 0x4b, 0x05, 0x57, 0x9c, 0x5e, 0xcf, 0x00, 0x5e, 0x6e, 0x1d, 0xb5, 0xeb,
  601. 0xbb, 0xf6, 0x4d, 0x98, 0x32, 0x3f, 0x4c, 0x12, 0xae, 0x42, 0xc5, 0x78, 0x22, 0xb3, 0x07, 0xf5,
  602. 0xfd, 0xa9, 0xdb, 0x01, 0x4f, 0x98, 0xe2, 0x02, 0xfb, 0x1d, 0x81, 0x92, 0x0f, 0x45, 0x0f, 0x2d,
  603. 0xe8, 0x93, 0x85, 0x61, 0x3b, 0x98, 0x28, 0x31, 0xb6, 0x90, 0xdb, 0x16, 0x62, 0x4e, 0xdd, 0xe1,
  604. 0x4b, 0xbf, 0x3f, 0x14, 0x26, 0x90, 0xbd, 0x6f, 0xcc, 0xde, 0xe3, 0x20, 0x55, 0xf9, 0xe3, 0xbd,
  605. 0xd9, 0x4b, 0xc5, 0x06, 0x28, 0x55, 0x38, 0x48, 0x2d, 0x60, 0xc7, 0x02, 0x44, 0xda, 0xf3, 0xa5,
  606. 0x0a, 0xd5, 0xd0, 0xd2, 0x77, 0xee, 0x41, 0xe5, 0x31, 0xc6, 0xa8, 0xf0, 0x98, 0x47, 0x01, 0xfe,
  607. 0x30, 0x44, 0xa9, 0xe8, 0x4d, 0x28, 0x69, 0x76, 0x49, 0x38, 0xc0, 0x1a, 0x69, 0x12, 0xb7, 0x1c,
  608. 0x5c, 0x8d, 0x79, 0xf4, 0x6d, 0x38, 0x40, 0xe7, 0xaf, 0x02, 0x54, 0x9f, 0x0b, 0x66, 0xe0, 0x4f,
  609. 0x12, 0x25, 0x18, 0xca, 0xcb, 0x5f, 0xd1, 0x87, 0x50, 0xca, 0x05, 0xa9, 0x15, 0x9a, 0xc4, 0xdd,
  610. 0x68, 0xdf, 0xf2, 0xac, 0xce, 0x61, 0xca, 0xbc, 0xa7, 0xb9, 0x6c, 0x81, 0x05, 0x05, 0x13, 0x38,
  611. 0x7d, 0x0a, 0xeb, 0x71, 0xd8, 0xc5, 0x58, 0xd6, 0x8a, 0xcd, 0xa2, 0xbb, 0xd1, 0xbe, 0xef, 0xcd,
  612. 0x15, 0xc8, 0x5b, 0x4c, 0xc8, 0x3b, 0x36, 0xef, 0xb4, 0x71, 0x1c, 0x58, 0x27, 0xf4, 0x3e, 0x5c,
  613. 0xc5, 0x0c, 0x55, 0xbb, 0x62, 0xfc, 0x35, 0x16, 0xf8, 0xb3, 0xae, 0xc6, 0x41, 0x8e, 0xa5, 0x07,
  614. 0xb0, 0x95, 0x86, 0x42, 0xb1, 0x30, 0xee, 0xc8, 0x61, 0xaf, 0x87, 0x52, 0xd6, 0xd6, 0x9a, 0xc4,
  615. 0x2d, 0x05, 0x9b, 0xd6, 0x7c, 0x9a, 0x59, 0xeb, 0x0f, 0x61, 0x63, 0x2a, 0x2c, 0xad, 0x40, 0xf1,
  616. 0x15, 0x8e, 0xad, 0x1c, 0xfa, 0x93, 0xde, 0x80, 0xb5, 0x51, 0x18, 0x0f, 0x33, 0x1d, 0xca, 0x41,
  617. 0x76, 0x38, 0x2c, 0x3c, 0x20, 0xce, 0x4d, 0xd8, 0x99, 0x4b, 0x44, 0xa6, 0x3c, 0x91, 0xe8, 0xfc,
  618. 0x41, 0x60, 0xfb, 0x98, 0x49, 0x35, 0x2f, 0xfa, 0x1e, 0x6c, 0xa4, 0x82, 0x7f, 0x8f, 0x3d, 0xd5,
  619. 0x61, 0x7d, 0x59, 0x23, 0xcd, 0xa2, 0x5b, 0x0e, 0xc0, 0x9a, 0xbe, 0xe9, 0x4b, 0x7a, 0x07, 0x36,
  620. 0x73, 0x2d, 0x4d, 0x69, 0x64, 0xad, 0x64, 0x30, 0xd7, 0x72, 0xab, 0x2e, 0x90, 0xa4, 0x55, 0x58,
  621. 0x7f, 0xc9, 0x62, 0x85, 0xc2, 0xf2, 0xb2, 0x27, 0x5d, 0x54, 0x2e, 0xfa, 0x28, 0x3a, 0xdd, 0x71,
  622. 0xad, 0x98, 0x15, 0xd5, 0x9c, 0x8f, 0xc6, 0xb4, 0x01, 0xe5, 0x34, 0x8c, 0xb0, 0x23, 0xd9, 0x6b,
  623. 0xac, 0x5d, 0x69, 0x12, 0x77, 0x2d, 0x28, 0x69, 0xc3, 0x29, 0x7b, 0x8d, 0xf4, 0x16, 0x80, 0xb9,
  624. 0x54, 0xfc, 0x15, 0x26, 0x46, 0xab, 0x72, 0x60, 0xe0, 0xdf, 0x69, 0x83, 0x73, 0x06, 0xd5, 0xd9,
  625. 0x7c, 0xb2, 0x54, 0xa7, 0x0b, 0x44, 0x3e, 0xa0, 0x40, 0x9f, 0xc1, 0x56, 0x82, 0x3f, 0xaa, 0xce,
  626. 0x54, 0xd0, 0x2c, 0x91, 0x6b, 0xda, 0x7c, 0x32, 0x09, 0x8c, 0x70, 0xa0, 0x03, 0xcf, 0x75, 0xdc,
  627. 0x63, 0x94, 0x3d, 0xc1, 0x52, 0xc5, 0xc5, 0x44, 0xda, 0x0b, 0xf9, 0x91, 0xa5, 0xf9, 0x15, 0x66,
  628. 0xf3, 0xfb, 0x8d, 0x80, 0x7b, 0x79, 0x1c, 0x9b, 0xf2, 0x0b, 0xb8, 0x31, 0x29, 0x51, 0xff, 0xfc,
  629. 0xde, 0xe6, 0x7f, 0xb0, 0x74, 0x52, 0xce, 0xfd, 0x05, 0x1f, 0x8b, 0xf9, 0x18, 0x1f, 0xa0, 0xcb,
  630. 0x96, 0x2d, 0xc8, 0x24, 0xff, 0x2a, 0xac, 0xa7, 0xa1, 0xc0, 0x44, 0xd9, 0xf6, 0xb5, 0xa7, 0x8b,
  631. 0xba, 0x14, 0x96, 0xea, 0x52, 0x9c, 0xd5, 0xe5, 0x39, 0x54, 0xce, 0xc3, 0xd8, 0xf4, 0x1b, 0x50,
  632. 0xce, 0xf7, 0x46, 0x36, 0xe4, 0xe5, 0xa0, 0x64, 0x17, 0xc7, 0xca, 0xfc, 0xdb, 0x7f, 0xaf, 0x41,
  633. 0xe5, 0x38, 0x6b, 0x90, 0x53, 0x14, 0x23, 0xd6, 0xc3, 0x67, 0x6d, 0x7a, 0x06, 0xe5, 0xc9, 0x6e,
  634. 0xa3, 0xfb, 0x0b, 0xfa, 0x68, 0x76, 0xf3, 0xd5, 0xab, 0x39, 0x28, 0x5f, 0xa4, 0xde, 0x13, 0xbd,
  635. 0x65, 0x9d, 0x7b, 0xef, 0xfe, 0xfc, 0xe7, 0x97, 0xc2, 0x41, 0xeb, 0x8e, 0x3f, 0x6a, 0x77, 0x51,
  636. 0x85, 0x9f, 0xfb, 0x6f, 0x72, 0xce, 0x5f, 0xda, 0x61, 0x93, 0x7e, 0x4b, 0xef, 0x74, 0xe9, 0xb7,
  637. 0xde, 0xd2, 0x9f, 0x09, 0x6c, 0xcd, 0xcc, 0x32, 0xbd, 0xbb, 0xf2, 0xe2, 0xaa, 0xb7, 0x56, 0x81,
  638. 0xda, 0xd5, 0xb0, 0x6b, 0x98, 0x55, 0x9d, 0xeb, 0xfa, 0x37, 0xc5, 0x4e, 0xc3, 0xe1, 0x99, 0x06,
  639. 0x1f, 0x92, 0x16, 0x7d, 0x47, 0x60, 0xf3, 0xe2, 0xa0, 0x51, 0x77, 0xd1, 0x3c, 0x2d, 0xda, 0x2d,
  640. 0xf5, 0xbb, 0x2b, 0x20, 0x2d, 0x8b, 0x86, 0x61, 0xb1, 0xed, 0x54, 0xa6, 0x59, 0xc4, 0x4c, 0x2a,
  641. 0x4d, 0xe2, 0x77, 0x02, 0xcd, 0xcb, 0x86, 0x81, 0x1e, 0xbe, 0x27, 0xd8, 0x0a, 0x93, 0x5a, 0x7f,
  642. 0xf4, 0xbf, 0xde, 0x5a, 0xea, 0xae, 0xa1, 0xee, 0xd0, 0xa6, 0xa6, 0x3e, 0x58, 0x46, 0x71, 0x0c,
  643. 0xa5, 0xbc, 0x79, 0xa9, 0xf3, 0x7e, 0x6d, 0x26, 0xb4, 0xf6, 0x97, 0x62, 0x6c, 0xf8, 0x4f, 0x4d,
  644. 0xf8, 0xdb, 0x74, 0x57, 0x87, 0x7f, 0x93, 0x8d, 0xd8, 0x54, 0x4b, 0xbd, 0x35, 0x3d, 0x75, 0xf4,
  645. 0x13, 0x6c, 0xf7, 0xf8, 0x60, 0xde, 0xdf, 0xd1, 0x47, 0xb6, 0xe9, 0x4f, 0x74, 0xbf, 0x9e, 0x90,
  646. 0x17, 0x0f, 0x2c, 0x24, 0xe2, 0x71, 0x98, 0x44, 0x1e, 0x17, 0x91, 0x1f, 0x61, 0x62, 0xba, 0xd9,
  647. 0xcf, 0xae, 0xc2, 0x94, 0xc9, 0xa9, 0xff, 0x21, 0x8f, 0xec, 0xe7, 0xbf, 0x84, 0xfc, 0x5a, 0xd8,
  648. 0xf9, 0x3a, 0x7b, 0xfd, 0x55, 0xcc, 0x87, 0x7d, 0xcf, 0xba, 0xf6, 0x9e, 0xb5, 0xbb, 0xeb, 0xc6,
  649. 0xc3, 0x17, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x9a, 0x9f, 0x7c, 0xe8, 0x3f, 0x09, 0x00, 0x00,
  650. }