logging_config.pb.go 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. // Code generated by protoc-gen-go.
  2. // source: google/logging/v2/logging_config.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_protobuf5 "github.com/golang/protobuf/ptypes/empty"
  10. import google_protobuf4 "github.com/golang/protobuf/ptypes/timestamp"
  11. import (
  12. context "golang.org/x/net/context"
  13. grpc "google.golang.org/grpc"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // Available log entry formats. Log entries can be written to Stackdriver
  20. // Logging in either format and can be exported in either format.
  21. // Version 2 is the preferred format.
  22. type LogSink_VersionFormat int32
  23. const (
  24. // An unspecified format version that will default to V2.
  25. LogSink_VERSION_FORMAT_UNSPECIFIED LogSink_VersionFormat = 0
  26. // `LogEntry` version 2 format.
  27. LogSink_V2 LogSink_VersionFormat = 1
  28. // `LogEntry` version 1 format.
  29. LogSink_V1 LogSink_VersionFormat = 2
  30. )
  31. var LogSink_VersionFormat_name = map[int32]string{
  32. 0: "VERSION_FORMAT_UNSPECIFIED",
  33. 1: "V2",
  34. 2: "V1",
  35. }
  36. var LogSink_VersionFormat_value = map[string]int32{
  37. "VERSION_FORMAT_UNSPECIFIED": 0,
  38. "V2": 1,
  39. "V1": 2,
  40. }
  41. func (x LogSink_VersionFormat) String() string {
  42. return proto.EnumName(LogSink_VersionFormat_name, int32(x))
  43. }
  44. func (LogSink_VersionFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} }
  45. // Describes a sink used to export log entries to one of the following
  46. // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
  47. // Cloud Pub/Sub topic. A logs filter controls which log entries are
  48. // exported. The sink must be created within a project or organization.
  49. type LogSink struct {
  50. // Required. The client-assigned sink identifier, unique within the
  51. // project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
  52. // limited to 100 characters and can include only the following characters:
  53. // upper and lower-case alphanumeric characters, underscores, hyphens, and
  54. // periods.
  55. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  56. // Required. The export destination:
  57. //
  58. // "storage.googleapis.com/[GCS_BUCKET]"
  59. // "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
  60. // "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
  61. //
  62. // The sink's `writer_identity`, set when the sink is created, must
  63. // have permission to write to the destination or else the log
  64. // entries are not exported. For more information, see
  65. // [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs).
  66. Destination string `protobuf:"bytes,3,opt,name=destination" json:"destination,omitempty"`
  67. // Optional.
  68. // An [advanced logs filter](/logging/docs/view/advanced_filters). The only
  69. // exported log entries are those that are in the resource owning the sink and
  70. // that match the filter. The filter must use the log entry format specified
  71. // by the `output_version_format` parameter. For example, in the v2 format:
  72. //
  73. // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
  74. Filter string `protobuf:"bytes,5,opt,name=filter" json:"filter,omitempty"`
  75. // Optional. The log entry format to use for this sink's exported log
  76. // entries. The v2 format is used by default.
  77. // **The v1 format is deprecated** and should be used only as part of a
  78. // migration effort to v2.
  79. // See [Migration to the v2 API](/logging/docs/api/v2/migration-to-v2).
  80. OutputVersionFormat LogSink_VersionFormat `protobuf:"varint,6,opt,name=output_version_format,json=outputVersionFormat,enum=google.logging.v2.LogSink_VersionFormat" json:"output_version_format,omitempty"`
  81. // Output only. An IAM identity—a service account or group—under
  82. // which Stackdriver Logging writes the exported log entries to the sink's
  83. // destination. This field is set by
  84. // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create)
  85. // and
  86. // [sinks.update](/logging/docs/api/reference/rest/v2/projects.sinks/update),
  87. // based on the setting of `unique_writer_identity` in those methods.
  88. //
  89. // Until you grant this identity write-access to the destination, log entry
  90. // exports from this sink will fail. For more information,
  91. // see [Granting access for a
  92. // resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
  93. // Consult the destination service's documentation to determine the
  94. // appropriate IAM roles to assign to the identity.
  95. WriterIdentity string `protobuf:"bytes,8,opt,name=writer_identity,json=writerIdentity" json:"writer_identity,omitempty"`
  96. // Optional. The time at which this sink will begin exporting log entries.
  97. // Log entries are exported only if their timestamp is not earlier than the
  98. // start time. The default value of this field is the time the sink is
  99. // created or updated.
  100. StartTime *google_protobuf4.Timestamp `protobuf:"bytes,10,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
  101. // Optional. The time at which this sink will stop exporting log entries. Log
  102. // entries are exported only if their timestamp is earlier than the end time.
  103. // If this field is not supplied, there is no end time. If both a start time
  104. // and an end time are provided, then the end time must be later than the
  105. // start time.
  106. EndTime *google_protobuf4.Timestamp `protobuf:"bytes,11,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
  107. }
  108. func (m *LogSink) Reset() { *m = LogSink{} }
  109. func (m *LogSink) String() string { return proto.CompactTextString(m) }
  110. func (*LogSink) ProtoMessage() {}
  111. func (*LogSink) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
  112. func (m *LogSink) GetName() string {
  113. if m != nil {
  114. return m.Name
  115. }
  116. return ""
  117. }
  118. func (m *LogSink) GetDestination() string {
  119. if m != nil {
  120. return m.Destination
  121. }
  122. return ""
  123. }
  124. func (m *LogSink) GetFilter() string {
  125. if m != nil {
  126. return m.Filter
  127. }
  128. return ""
  129. }
  130. func (m *LogSink) GetOutputVersionFormat() LogSink_VersionFormat {
  131. if m != nil {
  132. return m.OutputVersionFormat
  133. }
  134. return LogSink_VERSION_FORMAT_UNSPECIFIED
  135. }
  136. func (m *LogSink) GetWriterIdentity() string {
  137. if m != nil {
  138. return m.WriterIdentity
  139. }
  140. return ""
  141. }
  142. func (m *LogSink) GetStartTime() *google_protobuf4.Timestamp {
  143. if m != nil {
  144. return m.StartTime
  145. }
  146. return nil
  147. }
  148. func (m *LogSink) GetEndTime() *google_protobuf4.Timestamp {
  149. if m != nil {
  150. return m.EndTime
  151. }
  152. return nil
  153. }
  154. // The parameters to `ListSinks`.
  155. type ListSinksRequest struct {
  156. // Required. The parent resource whose sinks are to be listed.
  157. // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
  158. Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
  159. // Optional. If present, then retrieve the next batch of results from the
  160. // preceding call to this method. `pageToken` must be the value of
  161. // `nextPageToken` from the previous response. The values of other method
  162. // parameters should be identical to those in the previous call.
  163. PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken" json:"page_token,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,3,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
  168. }
  169. func (m *ListSinksRequest) Reset() { *m = ListSinksRequest{} }
  170. func (m *ListSinksRequest) String() string { return proto.CompactTextString(m) }
  171. func (*ListSinksRequest) ProtoMessage() {}
  172. func (*ListSinksRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
  173. func (m *ListSinksRequest) GetParent() string {
  174. if m != nil {
  175. return m.Parent
  176. }
  177. return ""
  178. }
  179. func (m *ListSinksRequest) GetPageToken() string {
  180. if m != nil {
  181. return m.PageToken
  182. }
  183. return ""
  184. }
  185. func (m *ListSinksRequest) GetPageSize() int32 {
  186. if m != nil {
  187. return m.PageSize
  188. }
  189. return 0
  190. }
  191. // Result returned from `ListSinks`.
  192. type ListSinksResponse struct {
  193. // A list of sinks.
  194. Sinks []*LogSink `protobuf:"bytes,1,rep,name=sinks" json:"sinks,omitempty"`
  195. // If there might be more results than appear in this response, then
  196. // `nextPageToken` is included. To get the next set of results, call the same
  197. // method again using the value of `nextPageToken` as `pageToken`.
  198. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
  199. }
  200. func (m *ListSinksResponse) Reset() { *m = ListSinksResponse{} }
  201. func (m *ListSinksResponse) String() string { return proto.CompactTextString(m) }
  202. func (*ListSinksResponse) ProtoMessage() {}
  203. func (*ListSinksResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
  204. func (m *ListSinksResponse) GetSinks() []*LogSink {
  205. if m != nil {
  206. return m.Sinks
  207. }
  208. return nil
  209. }
  210. func (m *ListSinksResponse) GetNextPageToken() string {
  211. if m != nil {
  212. return m.NextPageToken
  213. }
  214. return ""
  215. }
  216. // The parameters to `GetSink`.
  217. type GetSinkRequest struct {
  218. // Required. The parent resource name of the sink:
  219. //
  220. // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  221. // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  222. //
  223. // Example: `"projects/my-project-id/sinks/my-sink-id"`.
  224. SinkName string `protobuf:"bytes,1,opt,name=sink_name,json=sinkName" json:"sink_name,omitempty"`
  225. }
  226. func (m *GetSinkRequest) Reset() { *m = GetSinkRequest{} }
  227. func (m *GetSinkRequest) String() string { return proto.CompactTextString(m) }
  228. func (*GetSinkRequest) ProtoMessage() {}
  229. func (*GetSinkRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
  230. func (m *GetSinkRequest) GetSinkName() string {
  231. if m != nil {
  232. return m.SinkName
  233. }
  234. return ""
  235. }
  236. // The parameters to `CreateSink`.
  237. type CreateSinkRequest struct {
  238. // Required. The resource in which to create the sink:
  239. //
  240. // "projects/[PROJECT_ID]"
  241. // "organizations/[ORGANIZATION_ID]"
  242. //
  243. // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
  244. Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
  245. // Required. The new sink, whose `name` parameter is a sink identifier that
  246. // is not already in use.
  247. Sink *LogSink `protobuf:"bytes,2,opt,name=sink" json:"sink,omitempty"`
  248. // Optional. Determines the kind of IAM identity returned as `writer_identity`
  249. // in the new sink. If this value is omitted or set to false, and if the
  250. // sink's parent is a project, then the value returned as `writer_identity` is
  251. // `cloud-logs@google.com`, the same identity used before the addition of
  252. // writer identities to this API. The sink's destination must be in the same
  253. // project as the sink itself.
  254. //
  255. // If this field is set to true, or if the sink is owned by a non-project
  256. // resource such as an organization, then the value of `writer_identity` will
  257. // be a unique service account used only for exports from the new sink. For
  258. // more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink].
  259. UniqueWriterIdentity bool `protobuf:"varint,3,opt,name=unique_writer_identity,json=uniqueWriterIdentity" json:"unique_writer_identity,omitempty"`
  260. }
  261. func (m *CreateSinkRequest) Reset() { *m = CreateSinkRequest{} }
  262. func (m *CreateSinkRequest) String() string { return proto.CompactTextString(m) }
  263. func (*CreateSinkRequest) ProtoMessage() {}
  264. func (*CreateSinkRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} }
  265. func (m *CreateSinkRequest) GetParent() string {
  266. if m != nil {
  267. return m.Parent
  268. }
  269. return ""
  270. }
  271. func (m *CreateSinkRequest) GetSink() *LogSink {
  272. if m != nil {
  273. return m.Sink
  274. }
  275. return nil
  276. }
  277. func (m *CreateSinkRequest) GetUniqueWriterIdentity() bool {
  278. if m != nil {
  279. return m.UniqueWriterIdentity
  280. }
  281. return false
  282. }
  283. // The parameters to `UpdateSink`.
  284. type UpdateSinkRequest struct {
  285. // Required. The full resource name of the sink to update, including the
  286. // parent resource and the sink identifier:
  287. //
  288. // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  289. // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  290. //
  291. // Example: `"projects/my-project-id/sinks/my-sink-id"`.
  292. SinkName string `protobuf:"bytes,1,opt,name=sink_name,json=sinkName" json:"sink_name,omitempty"`
  293. // Required. The updated sink, whose name is the same identifier that appears
  294. // as part of `sink_name`. If `sink_name` does not exist, then
  295. // this method creates a new sink.
  296. Sink *LogSink `protobuf:"bytes,2,opt,name=sink" json:"sink,omitempty"`
  297. // Optional. See
  298. // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create)
  299. // for a description of this field. When updating a sink, the effect of this
  300. // field on the value of `writer_identity` in the updated sink depends on both
  301. // the old and new values of this field:
  302. //
  303. // + If the old and new values of this field are both false or both true,
  304. // then there is no change to the sink's `writer_identity`.
  305. // + If the old value was false and the new value is true, then
  306. // `writer_identity` is changed to a unique service account.
  307. // + It is an error if the old value was true and the new value is false.
  308. UniqueWriterIdentity bool `protobuf:"varint,3,opt,name=unique_writer_identity,json=uniqueWriterIdentity" json:"unique_writer_identity,omitempty"`
  309. }
  310. func (m *UpdateSinkRequest) Reset() { *m = UpdateSinkRequest{} }
  311. func (m *UpdateSinkRequest) String() string { return proto.CompactTextString(m) }
  312. func (*UpdateSinkRequest) ProtoMessage() {}
  313. func (*UpdateSinkRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} }
  314. func (m *UpdateSinkRequest) GetSinkName() string {
  315. if m != nil {
  316. return m.SinkName
  317. }
  318. return ""
  319. }
  320. func (m *UpdateSinkRequest) GetSink() *LogSink {
  321. if m != nil {
  322. return m.Sink
  323. }
  324. return nil
  325. }
  326. func (m *UpdateSinkRequest) GetUniqueWriterIdentity() bool {
  327. if m != nil {
  328. return m.UniqueWriterIdentity
  329. }
  330. return false
  331. }
  332. // The parameters to `DeleteSink`.
  333. type DeleteSinkRequest struct {
  334. // Required. The full resource name of the sink to delete, including the
  335. // parent resource and the sink identifier:
  336. //
  337. // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  338. // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  339. //
  340. // It is an error if the sink does not exist. Example:
  341. // `"projects/my-project-id/sinks/my-sink-id"`. It is an error if
  342. // the sink does not exist.
  343. SinkName string `protobuf:"bytes,1,opt,name=sink_name,json=sinkName" json:"sink_name,omitempty"`
  344. }
  345. func (m *DeleteSinkRequest) Reset() { *m = DeleteSinkRequest{} }
  346. func (m *DeleteSinkRequest) String() string { return proto.CompactTextString(m) }
  347. func (*DeleteSinkRequest) ProtoMessage() {}
  348. func (*DeleteSinkRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} }
  349. func (m *DeleteSinkRequest) GetSinkName() string {
  350. if m != nil {
  351. return m.SinkName
  352. }
  353. return ""
  354. }
  355. func init() {
  356. proto.RegisterType((*LogSink)(nil), "google.logging.v2.LogSink")
  357. proto.RegisterType((*ListSinksRequest)(nil), "google.logging.v2.ListSinksRequest")
  358. proto.RegisterType((*ListSinksResponse)(nil), "google.logging.v2.ListSinksResponse")
  359. proto.RegisterType((*GetSinkRequest)(nil), "google.logging.v2.GetSinkRequest")
  360. proto.RegisterType((*CreateSinkRequest)(nil), "google.logging.v2.CreateSinkRequest")
  361. proto.RegisterType((*UpdateSinkRequest)(nil), "google.logging.v2.UpdateSinkRequest")
  362. proto.RegisterType((*DeleteSinkRequest)(nil), "google.logging.v2.DeleteSinkRequest")
  363. proto.RegisterEnum("google.logging.v2.LogSink_VersionFormat", LogSink_VersionFormat_name, LogSink_VersionFormat_value)
  364. }
  365. // Reference imports to suppress errors if they are not otherwise used.
  366. var _ context.Context
  367. var _ grpc.ClientConn
  368. // This is a compile-time assertion to ensure that this generated file
  369. // is compatible with the grpc package it is being compiled against.
  370. const _ = grpc.SupportPackageIsVersion4
  371. // Client API for ConfigServiceV2 service
  372. type ConfigServiceV2Client interface {
  373. // Lists sinks.
  374. ListSinks(ctx context.Context, in *ListSinksRequest, opts ...grpc.CallOption) (*ListSinksResponse, error)
  375. // Gets a sink.
  376. GetSink(ctx context.Context, in *GetSinkRequest, opts ...grpc.CallOption) (*LogSink, error)
  377. // Creates a sink that exports specified log entries to a destination. The
  378. // export of newly-ingested log entries begins immediately, unless the current
  379. // time is outside the sink's start and end times or the sink's
  380. // `writer_identity` is not permitted to write to the destination. A sink can
  381. // export log entries only from the resource owning the sink.
  382. CreateSink(ctx context.Context, in *CreateSinkRequest, opts ...grpc.CallOption) (*LogSink, error)
  383. // Updates a sink. If the named sink doesn't exist, then this method is
  384. // identical to
  385. // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create).
  386. // If the named sink does exist, then this method replaces the following
  387. // fields in the existing sink with values from the new sink: `destination`,
  388. // `filter`, `output_version_format`, `start_time`, and `end_time`.
  389. // The updated filter might also have a new `writer_identity`; see the
  390. // `unique_writer_identity` field.
  391. UpdateSink(ctx context.Context, in *UpdateSinkRequest, opts ...grpc.CallOption) (*LogSink, error)
  392. // Deletes a sink. If the sink has a unique `writer_identity`, then that
  393. // service account is also deleted.
  394. DeleteSink(ctx context.Context, in *DeleteSinkRequest, opts ...grpc.CallOption) (*google_protobuf5.Empty, error)
  395. }
  396. type configServiceV2Client struct {
  397. cc *grpc.ClientConn
  398. }
  399. func NewConfigServiceV2Client(cc *grpc.ClientConn) ConfigServiceV2Client {
  400. return &configServiceV2Client{cc}
  401. }
  402. func (c *configServiceV2Client) ListSinks(ctx context.Context, in *ListSinksRequest, opts ...grpc.CallOption) (*ListSinksResponse, error) {
  403. out := new(ListSinksResponse)
  404. err := grpc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/ListSinks", in, out, c.cc, opts...)
  405. if err != nil {
  406. return nil, err
  407. }
  408. return out, nil
  409. }
  410. func (c *configServiceV2Client) GetSink(ctx context.Context, in *GetSinkRequest, opts ...grpc.CallOption) (*LogSink, error) {
  411. out := new(LogSink)
  412. err := grpc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/GetSink", in, out, c.cc, opts...)
  413. if err != nil {
  414. return nil, err
  415. }
  416. return out, nil
  417. }
  418. func (c *configServiceV2Client) CreateSink(ctx context.Context, in *CreateSinkRequest, opts ...grpc.CallOption) (*LogSink, error) {
  419. out := new(LogSink)
  420. err := grpc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/CreateSink", in, out, c.cc, opts...)
  421. if err != nil {
  422. return nil, err
  423. }
  424. return out, nil
  425. }
  426. func (c *configServiceV2Client) UpdateSink(ctx context.Context, in *UpdateSinkRequest, opts ...grpc.CallOption) (*LogSink, error) {
  427. out := new(LogSink)
  428. err := grpc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/UpdateSink", in, out, c.cc, opts...)
  429. if err != nil {
  430. return nil, err
  431. }
  432. return out, nil
  433. }
  434. func (c *configServiceV2Client) DeleteSink(ctx context.Context, in *DeleteSinkRequest, opts ...grpc.CallOption) (*google_protobuf5.Empty, error) {
  435. out := new(google_protobuf5.Empty)
  436. err := grpc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/DeleteSink", in, out, c.cc, opts...)
  437. if err != nil {
  438. return nil, err
  439. }
  440. return out, nil
  441. }
  442. // Server API for ConfigServiceV2 service
  443. type ConfigServiceV2Server interface {
  444. // Lists sinks.
  445. ListSinks(context.Context, *ListSinksRequest) (*ListSinksResponse, error)
  446. // Gets a sink.
  447. GetSink(context.Context, *GetSinkRequest) (*LogSink, error)
  448. // Creates a sink that exports specified log entries to a destination. The
  449. // export of newly-ingested log entries begins immediately, unless the current
  450. // time is outside the sink's start and end times or the sink's
  451. // `writer_identity` is not permitted to write to the destination. A sink can
  452. // export log entries only from the resource owning the sink.
  453. CreateSink(context.Context, *CreateSinkRequest) (*LogSink, error)
  454. // Updates a sink. If the named sink doesn't exist, then this method is
  455. // identical to
  456. // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create).
  457. // If the named sink does exist, then this method replaces the following
  458. // fields in the existing sink with values from the new sink: `destination`,
  459. // `filter`, `output_version_format`, `start_time`, and `end_time`.
  460. // The updated filter might also have a new `writer_identity`; see the
  461. // `unique_writer_identity` field.
  462. UpdateSink(context.Context, *UpdateSinkRequest) (*LogSink, error)
  463. // Deletes a sink. If the sink has a unique `writer_identity`, then that
  464. // service account is also deleted.
  465. DeleteSink(context.Context, *DeleteSinkRequest) (*google_protobuf5.Empty, error)
  466. }
  467. func RegisterConfigServiceV2Server(s *grpc.Server, srv ConfigServiceV2Server) {
  468. s.RegisterService(&_ConfigServiceV2_serviceDesc, srv)
  469. }
  470. func _ConfigServiceV2_ListSinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  471. in := new(ListSinksRequest)
  472. if err := dec(in); err != nil {
  473. return nil, err
  474. }
  475. if interceptor == nil {
  476. return srv.(ConfigServiceV2Server).ListSinks(ctx, in)
  477. }
  478. info := &grpc.UnaryServerInfo{
  479. Server: srv,
  480. FullMethod: "/google.logging.v2.ConfigServiceV2/ListSinks",
  481. }
  482. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  483. return srv.(ConfigServiceV2Server).ListSinks(ctx, req.(*ListSinksRequest))
  484. }
  485. return interceptor(ctx, in, info, handler)
  486. }
  487. func _ConfigServiceV2_GetSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  488. in := new(GetSinkRequest)
  489. if err := dec(in); err != nil {
  490. return nil, err
  491. }
  492. if interceptor == nil {
  493. return srv.(ConfigServiceV2Server).GetSink(ctx, in)
  494. }
  495. info := &grpc.UnaryServerInfo{
  496. Server: srv,
  497. FullMethod: "/google.logging.v2.ConfigServiceV2/GetSink",
  498. }
  499. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  500. return srv.(ConfigServiceV2Server).GetSink(ctx, req.(*GetSinkRequest))
  501. }
  502. return interceptor(ctx, in, info, handler)
  503. }
  504. func _ConfigServiceV2_CreateSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  505. in := new(CreateSinkRequest)
  506. if err := dec(in); err != nil {
  507. return nil, err
  508. }
  509. if interceptor == nil {
  510. return srv.(ConfigServiceV2Server).CreateSink(ctx, in)
  511. }
  512. info := &grpc.UnaryServerInfo{
  513. Server: srv,
  514. FullMethod: "/google.logging.v2.ConfigServiceV2/CreateSink",
  515. }
  516. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  517. return srv.(ConfigServiceV2Server).CreateSink(ctx, req.(*CreateSinkRequest))
  518. }
  519. return interceptor(ctx, in, info, handler)
  520. }
  521. func _ConfigServiceV2_UpdateSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  522. in := new(UpdateSinkRequest)
  523. if err := dec(in); err != nil {
  524. return nil, err
  525. }
  526. if interceptor == nil {
  527. return srv.(ConfigServiceV2Server).UpdateSink(ctx, in)
  528. }
  529. info := &grpc.UnaryServerInfo{
  530. Server: srv,
  531. FullMethod: "/google.logging.v2.ConfigServiceV2/UpdateSink",
  532. }
  533. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  534. return srv.(ConfigServiceV2Server).UpdateSink(ctx, req.(*UpdateSinkRequest))
  535. }
  536. return interceptor(ctx, in, info, handler)
  537. }
  538. func _ConfigServiceV2_DeleteSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  539. in := new(DeleteSinkRequest)
  540. if err := dec(in); err != nil {
  541. return nil, err
  542. }
  543. if interceptor == nil {
  544. return srv.(ConfigServiceV2Server).DeleteSink(ctx, in)
  545. }
  546. info := &grpc.UnaryServerInfo{
  547. Server: srv,
  548. FullMethod: "/google.logging.v2.ConfigServiceV2/DeleteSink",
  549. }
  550. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  551. return srv.(ConfigServiceV2Server).DeleteSink(ctx, req.(*DeleteSinkRequest))
  552. }
  553. return interceptor(ctx, in, info, handler)
  554. }
  555. var _ConfigServiceV2_serviceDesc = grpc.ServiceDesc{
  556. ServiceName: "google.logging.v2.ConfigServiceV2",
  557. HandlerType: (*ConfigServiceV2Server)(nil),
  558. Methods: []grpc.MethodDesc{
  559. {
  560. MethodName: "ListSinks",
  561. Handler: _ConfigServiceV2_ListSinks_Handler,
  562. },
  563. {
  564. MethodName: "GetSink",
  565. Handler: _ConfigServiceV2_GetSink_Handler,
  566. },
  567. {
  568. MethodName: "CreateSink",
  569. Handler: _ConfigServiceV2_CreateSink_Handler,
  570. },
  571. {
  572. MethodName: "UpdateSink",
  573. Handler: _ConfigServiceV2_UpdateSink_Handler,
  574. },
  575. {
  576. MethodName: "DeleteSink",
  577. Handler: _ConfigServiceV2_DeleteSink_Handler,
  578. },
  579. },
  580. Streams: []grpc.StreamDesc{},
  581. Metadata: "google/logging/v2/logging_config.proto",
  582. }
  583. func init() { proto.RegisterFile("google/logging/v2/logging_config.proto", fileDescriptor2) }
  584. var fileDescriptor2 = []byte{
  585. // 787 bytes of a gzipped FileDescriptorProto
  586. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xed, 0x4e, 0x33, 0x45,
  587. 0x14, 0x76, 0x0b, 0x94, 0xf6, 0x90, 0x17, 0xda, 0xd1, 0x17, 0x37, 0x8b, 0xaf, 0xd4, 0x15, 0xb0,
  588. 0xa9, 0x71, 0x17, 0x57, 0x4d, 0xfc, 0x88, 0x31, 0x52, 0x0a, 0x69, 0x82, 0xd0, 0x6c, 0xa1, 0x26,
  589. 0xc6, 0x64, 0xb3, 0xb4, 0xd3, 0xcd, 0x48, 0x77, 0x66, 0xd9, 0x9d, 0x56, 0x81, 0x90, 0xa8, 0x77,
  590. 0x40, 0x4c, 0xbc, 0x08, 0x6f, 0xc7, 0x5b, 0xf0, 0x3a, 0x8c, 0x99, 0x99, 0x2d, 0xb4, 0xdd, 0x5a,
  591. 0xf9, 0xe5, 0xaf, 0x9d, 0xf3, 0x35, 0xcf, 0x73, 0xce, 0x79, 0x32, 0x0b, 0x7b, 0x01, 0x63, 0xc1,
  592. 0x00, 0xdb, 0x03, 0x16, 0x04, 0x84, 0x06, 0xf6, 0xc8, 0x19, 0x1f, 0xbd, 0x2e, 0xa3, 0x7d, 0x12,
  593. 0x58, 0x51, 0xcc, 0x38, 0x43, 0x65, 0x95, 0x67, 0xa5, 0x41, 0x6b, 0xe4, 0x18, 0x6f, 0xa5, 0xa5,
  594. 0x7e, 0x44, 0x6c, 0x9f, 0x52, 0xc6, 0x7d, 0x4e, 0x18, 0x4d, 0x54, 0x81, 0xb1, 0x95, 0x46, 0xa5,
  595. 0x75, 0x39, 0xec, 0xdb, 0x38, 0x8c, 0xf8, 0x4d, 0x1a, 0xdc, 0x9e, 0x0d, 0x72, 0x12, 0xe2, 0x84,
  596. 0xfb, 0x61, 0xa4, 0x12, 0xcc, 0x87, 0x25, 0x58, 0x3d, 0x61, 0x41, 0x9b, 0xd0, 0x2b, 0x84, 0x60,
  597. 0x99, 0xfa, 0x21, 0xd6, 0xb5, 0x8a, 0x56, 0x2d, 0xba, 0xf2, 0x8c, 0x2a, 0xb0, 0xd6, 0xc3, 0x09,
  598. 0x27, 0x54, 0x62, 0xea, 0x4b, 0x32, 0x34, 0xe9, 0x42, 0x9b, 0x90, 0xef, 0x93, 0x01, 0xc7, 0xb1,
  599. 0xbe, 0x22, 0x83, 0xa9, 0x85, 0xbe, 0x87, 0x97, 0x6c, 0xc8, 0xa3, 0x21, 0xf7, 0x46, 0x38, 0x4e,
  600. 0x08, 0xa3, 0x5e, 0x9f, 0xc5, 0xa1, 0xcf, 0xf5, 0x7c, 0x45, 0xab, 0xae, 0x3b, 0x55, 0x2b, 0xd3,
  601. 0xa8, 0x95, 0x12, 0xb1, 0x3a, 0xaa, 0xe0, 0x48, 0xe6, 0xbb, 0xaf, 0xab, 0x6b, 0xa6, 0x9c, 0xe8,
  602. 0x3d, 0xd8, 0xf8, 0x31, 0x26, 0x1c, 0xc7, 0x1e, 0xe9, 0x61, 0xca, 0x09, 0xbf, 0xd1, 0x0b, 0x12,
  603. 0x7e, 0x5d, 0xb9, 0x9b, 0xa9, 0x17, 0x7d, 0x06, 0x90, 0x70, 0x3f, 0xe6, 0x9e, 0xe8, 0x5c, 0x87,
  604. 0x8a, 0x56, 0x5d, 0x73, 0x8c, 0x31, 0xf6, 0x78, 0x2c, 0xd6, 0xf9, 0x78, 0x2c, 0x6e, 0x51, 0x66,
  605. 0x0b, 0x1b, 0x7d, 0x02, 0x05, 0x4c, 0x7b, 0xaa, 0x70, 0xed, 0x3f, 0x0b, 0x57, 0x31, 0xed, 0x09,
  606. 0xcb, 0xfc, 0x0a, 0x5e, 0x4c, 0x73, 0x7d, 0x1b, 0x8c, 0x4e, 0xc3, 0x6d, 0x37, 0xcf, 0x4e, 0xbd,
  607. 0xa3, 0x33, 0xf7, 0x9b, 0xaf, 0xcf, 0xbd, 0x8b, 0xd3, 0x76, 0xab, 0x51, 0x6f, 0x1e, 0x35, 0x1b,
  608. 0x87, 0xa5, 0xd7, 0x50, 0x1e, 0x72, 0x1d, 0xa7, 0xa4, 0xc9, 0xef, 0x87, 0xa5, 0x9c, 0xd9, 0x87,
  609. 0xd2, 0x09, 0x49, 0xb8, 0x18, 0x45, 0xe2, 0xe2, 0xeb, 0x21, 0x4e, 0xb8, 0x98, 0x72, 0xe4, 0xc7,
  610. 0x98, 0xf2, 0x74, 0x3b, 0xa9, 0x85, 0x5e, 0x01, 0x44, 0x7e, 0x80, 0x3d, 0xce, 0xae, 0x30, 0xd5,
  611. 0x73, 0x32, 0x56, 0x14, 0x9e, 0x73, 0xe1, 0x40, 0x5b, 0x20, 0x0d, 0x2f, 0x21, 0xb7, 0x58, 0x2e,
  612. 0x6f, 0xc5, 0x2d, 0x08, 0x47, 0x9b, 0xdc, 0x62, 0x33, 0x84, 0xf2, 0x04, 0x4e, 0x12, 0x31, 0x9a,
  613. 0x60, 0xb4, 0x0f, 0x2b, 0x89, 0x70, 0xe8, 0x5a, 0x65, 0x69, 0xb2, 0xe3, 0xec, 0x9a, 0x5c, 0x95,
  614. 0x88, 0xf6, 0x60, 0x83, 0xe2, 0x9f, 0xb8, 0x97, 0xe1, 0xf1, 0x42, 0xb8, 0x5b, 0x63, 0x2e, 0xe6,
  615. 0x07, 0xb0, 0x7e, 0x8c, 0x25, 0xda, 0xb8, 0xa9, 0x2d, 0x28, 0x8a, 0x2b, 0xbc, 0x09, 0xd5, 0x15,
  616. 0x84, 0xe3, 0xd4, 0x0f, 0xb1, 0xf9, 0xa0, 0x41, 0xb9, 0x1e, 0x63, 0x9f, 0xe3, 0xc9, 0x92, 0x7f,
  617. 0x9b, 0x83, 0x05, 0xcb, 0xa2, 0x52, 0x22, 0x2f, 0x66, 0x2d, 0xf3, 0xd0, 0xc7, 0xb0, 0x39, 0xa4,
  618. 0xe4, 0x7a, 0x88, 0xbd, 0x59, 0x19, 0x89, 0x29, 0x15, 0xdc, 0x37, 0x54, 0xf4, 0xdb, 0x29, 0x31,
  619. 0x99, 0xbf, 0x6b, 0x50, 0xbe, 0x88, 0x7a, 0x33, 0x9c, 0x16, 0xb5, 0xf1, 0x3f, 0x11, 0xdb, 0x87,
  620. 0xf2, 0x21, 0x1e, 0xe0, 0xe7, 0xf3, 0x72, 0xfe, 0x5e, 0x86, 0x8d, 0xba, 0x7c, 0x78, 0xda, 0x38,
  621. 0x1e, 0x91, 0x2e, 0xee, 0x38, 0xe8, 0x1e, 0x8a, 0x8f, 0x82, 0x40, 0xef, 0xce, 0xa3, 0x3a, 0x23,
  622. 0x4b, 0x63, 0x67, 0x71, 0x92, 0xd2, 0x94, 0xb9, 0xfb, 0xeb, 0x9f, 0x7f, 0xfd, 0x96, 0xdb, 0x46,
  623. 0xaf, 0xc4, 0xab, 0x77, 0xa7, 0x36, 0xf6, 0x65, 0x14, 0xb3, 0x1f, 0x70, 0x97, 0x27, 0x76, 0xed,
  624. 0xde, 0x56, 0x42, 0xe2, 0xb0, 0x9a, 0x0a, 0x04, 0xbd, 0x33, 0xe7, 0xde, 0x69, 0xf1, 0x18, 0x0b,
  625. 0x46, 0x69, 0xd6, 0x24, 0xe0, 0x0e, 0x32, 0x25, 0xe0, 0xe3, 0x10, 0x26, 0x30, 0x15, 0xa4, 0x5d,
  626. 0xbb, 0x47, 0x77, 0x00, 0x4f, 0x32, 0x43, 0xf3, 0x1a, 0xca, 0xa8, 0x70, 0x21, 0xf6, 0xfb, 0x12,
  627. 0x7b, 0xd7, 0x5c, 0xdc, 0xec, 0xe7, 0x6a, 0xdb, 0x3f, 0x6b, 0x00, 0x4f, 0x82, 0x9a, 0x8b, 0x9e,
  628. 0xd1, 0xdb, 0x42, 0xf4, 0x7d, 0x89, 0x5e, 0x33, 0x9e, 0xd1, 0x79, 0x4a, 0x61, 0x04, 0xf0, 0x24,
  629. 0x9d, 0xb9, 0x0c, 0x32, 0xca, 0x32, 0x36, 0x33, 0xef, 0x60, 0x43, 0xfc, 0x74, 0xc6, 0x73, 0xaf,
  630. 0x3d, 0x03, 0xfd, 0xe0, 0x17, 0x0d, 0x5e, 0x76, 0x59, 0x98, 0xc5, 0x3b, 0x40, 0x27, 0xea, 0xac,
  631. 0xe4, 0xd9, 0x12, 0x10, 0x2d, 0xed, 0xbb, 0x4f, 0xd3, 0xc4, 0x80, 0x0d, 0x7c, 0x1a, 0x58, 0x2c,
  632. 0x0e, 0xec, 0x00, 0x53, 0x49, 0xc0, 0x56, 0x21, 0x3f, 0x22, 0xc9, 0xc4, 0xff, 0xf5, 0x8b, 0xf4,
  633. 0xf8, 0x47, 0xee, 0xcd, 0x63, 0x55, 0x5a, 0x1f, 0xb0, 0x61, 0xcf, 0x4a, 0x6f, 0xb7, 0x3a, 0xce,
  634. 0x65, 0x5e, 0x96, 0x7f, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x9e, 0xa5, 0xee, 0x9d,
  635. 0x07, 0x00, 0x00,
  636. }