diff --git a/go.mod b/go.mod index 909c5baed2..27db9fe740 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.24.3 require ( cloud.google.com/go/compute/metadata v0.8.0 - cloud.google.com/go/logging v1.13.0 + cloud.google.com/go/logging v1.13.1 code.cloudfoundry.org/clock v1.37.0 dario.cat/mergo v1.0.2 github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 diff --git a/go.sum b/go.sum index df93c9f4a8..d6c4c04c20 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,8 @@ cloud.google.com/go/compute/metadata v0.8.0 h1:HxMRIbao8w17ZX6wBnjhcDkW6lTFpgcao cloud.google.com/go/compute/metadata v0.8.0/go.mod h1:sYOGTp851OV9bOFJ9CH7elVvyzopvWQFNNghtDQ/Biw= cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8= cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE= -cloud.google.com/go/logging v1.13.0 h1:7j0HgAp0B94o1YRDqiqm26w4q1rDMH7XNRU34lJXHYc= -cloud.google.com/go/logging v1.13.0/go.mod h1:36CoKh6KA/M0PbhPKMq6/qety2DCAErbhXT62TuXALA= +cloud.google.com/go/logging v1.13.1 h1:O7LvmO0kGLaHY/gq8cV7T0dyp6zJhYAOtZPX4TF3QtY= +cloud.google.com/go/logging v1.13.1/go.mod h1:XAQkfkMBxQRjQek96WLPNze7vsOmay9H5PqfsNYDqvw= cloud.google.com/go/longrunning v0.6.7 h1:IGtfDWHhQCgCjwQjV9iiLnUta9LBCo8R9QmAFsS/PrE= cloud.google.com/go/longrunning v0.6.7/go.mod h1:EAFV3IZAKmM56TyiE6VAP3VoTzhZzySwI/YI1s/nRsY= code.cloudfoundry.org/clock v1.37.0 h1:7e/FmrQ8f3cJW1aR4jhKWaEimBp5Ub39dOeNXQHq8HM= diff --git a/vendor/cloud.google.com/go/logging/CHANGES.md b/vendor/cloud.google.com/go/logging/CHANGES.md index cb66918a03..afb0af3227 100644 --- a/vendor/cloud.google.com/go/logging/CHANGES.md +++ b/vendor/cloud.google.com/go/logging/CHANGES.md @@ -1,5 +1,13 @@ # Changes +## [1.13.1](https://github.com/googleapis/google-cloud-go/compare/logging/v1.13.0...logging/v1.13.1) (2025-10-28) + + +### Bug Fixes + +* **logging:** Upgrade gRPC service registration func ([486bd40](https://github.com/googleapis/google-cloud-go/commit/486bd406336fe91eae7c9040f2496ebfc8aee342)) +* **logging:** Upgrade gRPC service registration func ([#13139](https://github.com/googleapis/google-cloud-go/issues/13139)) ([39af2f9](https://github.com/googleapis/google-cloud-go/commit/39af2f9683b76ab290cc66b009ddc366fe63986b)) + ## [1.13.0](https://github.com/googleapis/google-cloud-go/compare/logging/v1.12.0...logging/v1.13.0) (2025-01-02) diff --git a/vendor/cloud.google.com/go/logging/apiv2/auxiliary.go b/vendor/cloud.google.com/go/logging/apiv2/auxiliary.go index 84a6c67c8e..90048dc86c 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/auxiliary.go +++ b/vendor/cloud.google.com/go/logging/apiv2/auxiliary.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/cloud.google.com/go/logging/apiv2/auxiliary_go123.go b/vendor/cloud.google.com/go/logging/apiv2/auxiliary_go123.go index 191431fee9..6ef1549743 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/auxiliary_go123.go +++ b/vendor/cloud.google.com/go/logging/apiv2/auxiliary_go123.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/cloud.google.com/go/logging/apiv2/config_client.go b/vendor/cloud.google.com/go/logging/apiv2/config_client.go index 285395173a..af0f743432 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/config_client.go +++ b/vendor/cloud.google.com/go/logging/apiv2/config_client.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -828,7 +828,7 @@ func (c *configGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *configGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } @@ -911,7 +911,7 @@ func defaultConfigRESTClientOptions() []option.ClientOption { // use by Google-written clients. func (c *configRESTClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/logging/apiv2/doc.go b/vendor/cloud.google.com/go/logging/apiv2/doc.go index c0a5db639c..de64c8ac3d 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/doc.go +++ b/vendor/cloud.google.com/go/logging/apiv2/doc.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/cloud.google.com/go/logging/apiv2/helpers.go b/vendor/cloud.google.com/go/logging/apiv2/helpers.go index 8a1a768d7c..97cc7ed2ac 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/helpers.go +++ b/vendor/cloud.google.com/go/logging/apiv2/helpers.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package logging import ( "context" + "fmt" "io" "log/slog" "net/http" @@ -28,10 +29,13 @@ import ( "google.golang.org/api/option" "google.golang.org/grpc" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoimpl" ) const serviceName = "logging.googleapis.com" +var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -69,7 +73,7 @@ func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, re return nil, nil, err } logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, buf)) - if err = googleapi.CheckResponse(resp); err != nil { + if err = googleapi.CheckResponseWithBody(resp, buf); err != nil { return nil, nil, err } return buf, resp, nil diff --git a/vendor/cloud.google.com/go/logging/apiv2/logging_client.go b/vendor/cloud.google.com/go/logging/apiv2/logging_client.go index 5c5b8c0442..2d13ca8a88 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/logging_client.go +++ b/vendor/cloud.google.com/go/logging/apiv2/logging_client.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -429,7 +429,7 @@ func (c *gRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } @@ -497,7 +497,7 @@ func defaultRESTClientOptions() []option.ClientOption { // use by Google-written clients. func (c *restClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/log_entry.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/log_entry.pb.go index 2287420491..1f71c29a8a 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/log_entry.pb.go +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/log_entry.pb.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,15 +15,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/logging/v2/log_entry.proto package loggingpb import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" _type "google.golang.org/genproto/googleapis/logging/type" @@ -32,6 +29,8 @@ import ( anypb "google.golang.org/protobuf/types/known/anypb" structpb "google.golang.org/protobuf/types/known/structpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging.pb.go index 7cedbb294e..e851788abf 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging.pb.go +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging.pb.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,26 +15,21 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/logging/v2/logging.proto package loggingpb import ( - context "context" - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" status "google.golang.org/genproto/googleapis/rpc/status" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status1 "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" ) const ( @@ -1445,336 +1440,3 @@ func file_google_logging_v2_logging_proto_init() { file_google_logging_v2_logging_proto_goTypes = nil file_google_logging_v2_logging_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// LoggingServiceV2Client is the client API for LoggingServiceV2 service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type LoggingServiceV2Client interface { - // Deletes all the log entries in a log for the _Default Log Bucket. The log - // reappears if it receives new entries. Log entries written shortly before - // the delete operation might not be deleted. Entries received after the - // delete operation with a timestamp before the operation will be deleted. - DeleteLog(ctx context.Context, in *DeleteLogRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Writes log entries to Logging. This API method is the - // only way to send log entries to Logging. This method - // is used, directly or indirectly, by the Logging agent - // (fluentd) and all logging libraries configured to use Logging. - // A single request may contain log entries for a maximum of 1000 - // different resources (projects, organizations, billing accounts or - // folders) - WriteLogEntries(ctx context.Context, in *WriteLogEntriesRequest, opts ...grpc.CallOption) (*WriteLogEntriesResponse, error) - // Lists log entries. Use this method to retrieve log entries that originated - // from a project/folder/organization/billing account. For ways to export log - // entries, see [Exporting - // Logs](https://cloud.google.com/logging/docs/export). - ListLogEntries(ctx context.Context, in *ListLogEntriesRequest, opts ...grpc.CallOption) (*ListLogEntriesResponse, error) - // Lists the descriptors for monitored resource types used by Logging. - ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) - // Lists the logs in projects, organizations, folders, or billing accounts. - // Only logs that have entries are listed. - ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error) - // Streaming read of log entries as they are ingested. Until the stream is - // terminated, it will continue reading logs. - TailLogEntries(ctx context.Context, opts ...grpc.CallOption) (LoggingServiceV2_TailLogEntriesClient, error) -} - -type loggingServiceV2Client struct { - cc grpc.ClientConnInterface -} - -func NewLoggingServiceV2Client(cc grpc.ClientConnInterface) LoggingServiceV2Client { - return &loggingServiceV2Client{cc} -} - -func (c *loggingServiceV2Client) DeleteLog(ctx context.Context, in *DeleteLogRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/DeleteLog", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *loggingServiceV2Client) WriteLogEntries(ctx context.Context, in *WriteLogEntriesRequest, opts ...grpc.CallOption) (*WriteLogEntriesResponse, error) { - out := new(WriteLogEntriesResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/WriteLogEntries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *loggingServiceV2Client) ListLogEntries(ctx context.Context, in *ListLogEntriesRequest, opts ...grpc.CallOption) (*ListLogEntriesResponse, error) { - out := new(ListLogEntriesResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/ListLogEntries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *loggingServiceV2Client) ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) { - out := new(ListMonitoredResourceDescriptorsResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *loggingServiceV2Client) ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error) { - out := new(ListLogsResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/ListLogs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *loggingServiceV2Client) TailLogEntries(ctx context.Context, opts ...grpc.CallOption) (LoggingServiceV2_TailLogEntriesClient, error) { - stream, err := c.cc.NewStream(ctx, &_LoggingServiceV2_serviceDesc.Streams[0], "/google.logging.v2.LoggingServiceV2/TailLogEntries", opts...) - if err != nil { - return nil, err - } - x := &loggingServiceV2TailLogEntriesClient{stream} - return x, nil -} - -type LoggingServiceV2_TailLogEntriesClient interface { - Send(*TailLogEntriesRequest) error - Recv() (*TailLogEntriesResponse, error) - grpc.ClientStream -} - -type loggingServiceV2TailLogEntriesClient struct { - grpc.ClientStream -} - -func (x *loggingServiceV2TailLogEntriesClient) Send(m *TailLogEntriesRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *loggingServiceV2TailLogEntriesClient) Recv() (*TailLogEntriesResponse, error) { - m := new(TailLogEntriesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// LoggingServiceV2Server is the server API for LoggingServiceV2 service. -type LoggingServiceV2Server interface { - // Deletes all the log entries in a log for the _Default Log Bucket. The log - // reappears if it receives new entries. Log entries written shortly before - // the delete operation might not be deleted. Entries received after the - // delete operation with a timestamp before the operation will be deleted. - DeleteLog(context.Context, *DeleteLogRequest) (*emptypb.Empty, error) - // Writes log entries to Logging. This API method is the - // only way to send log entries to Logging. This method - // is used, directly or indirectly, by the Logging agent - // (fluentd) and all logging libraries configured to use Logging. - // A single request may contain log entries for a maximum of 1000 - // different resources (projects, organizations, billing accounts or - // folders) - WriteLogEntries(context.Context, *WriteLogEntriesRequest) (*WriteLogEntriesResponse, error) - // Lists log entries. Use this method to retrieve log entries that originated - // from a project/folder/organization/billing account. For ways to export log - // entries, see [Exporting - // Logs](https://cloud.google.com/logging/docs/export). - ListLogEntries(context.Context, *ListLogEntriesRequest) (*ListLogEntriesResponse, error) - // Lists the descriptors for monitored resource types used by Logging. - ListMonitoredResourceDescriptors(context.Context, *ListMonitoredResourceDescriptorsRequest) (*ListMonitoredResourceDescriptorsResponse, error) - // Lists the logs in projects, organizations, folders, or billing accounts. - // Only logs that have entries are listed. - ListLogs(context.Context, *ListLogsRequest) (*ListLogsResponse, error) - // Streaming read of log entries as they are ingested. Until the stream is - // terminated, it will continue reading logs. - TailLogEntries(LoggingServiceV2_TailLogEntriesServer) error -} - -// UnimplementedLoggingServiceV2Server can be embedded to have forward compatible implementations. -type UnimplementedLoggingServiceV2Server struct { -} - -func (*UnimplementedLoggingServiceV2Server) DeleteLog(context.Context, *DeleteLogRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method DeleteLog not implemented") -} -func (*UnimplementedLoggingServiceV2Server) WriteLogEntries(context.Context, *WriteLogEntriesRequest) (*WriteLogEntriesResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method WriteLogEntries not implemented") -} -func (*UnimplementedLoggingServiceV2Server) ListLogEntries(context.Context, *ListLogEntriesRequest) (*ListLogEntriesResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListLogEntries not implemented") -} -func (*UnimplementedLoggingServiceV2Server) ListMonitoredResourceDescriptors(context.Context, *ListMonitoredResourceDescriptorsRequest) (*ListMonitoredResourceDescriptorsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListMonitoredResourceDescriptors not implemented") -} -func (*UnimplementedLoggingServiceV2Server) ListLogs(context.Context, *ListLogsRequest) (*ListLogsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListLogs not implemented") -} -func (*UnimplementedLoggingServiceV2Server) TailLogEntries(LoggingServiceV2_TailLogEntriesServer) error { - return status1.Errorf(codes.Unimplemented, "method TailLogEntries not implemented") -} - -func RegisterLoggingServiceV2Server(s *grpc.Server, srv LoggingServiceV2Server) { - s.RegisterService(&_LoggingServiceV2_serviceDesc, srv) -} - -func _LoggingServiceV2_DeleteLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteLogRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggingServiceV2Server).DeleteLog(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.LoggingServiceV2/DeleteLog", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggingServiceV2Server).DeleteLog(ctx, req.(*DeleteLogRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LoggingServiceV2_WriteLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WriteLogEntriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggingServiceV2Server).WriteLogEntries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.LoggingServiceV2/WriteLogEntries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggingServiceV2Server).WriteLogEntries(ctx, req.(*WriteLogEntriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LoggingServiceV2_ListLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListLogEntriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggingServiceV2Server).ListLogEntries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.LoggingServiceV2/ListLogEntries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggingServiceV2Server).ListLogEntries(ctx, req.(*ListLogEntriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LoggingServiceV2_ListMonitoredResourceDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListMonitoredResourceDescriptorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggingServiceV2Server).ListMonitoredResourceDescriptors(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggingServiceV2Server).ListMonitoredResourceDescriptors(ctx, req.(*ListMonitoredResourceDescriptorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LoggingServiceV2_ListLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListLogsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggingServiceV2Server).ListLogs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.LoggingServiceV2/ListLogs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggingServiceV2Server).ListLogs(ctx, req.(*ListLogsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LoggingServiceV2_TailLogEntries_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(LoggingServiceV2Server).TailLogEntries(&loggingServiceV2TailLogEntriesServer{stream}) -} - -type LoggingServiceV2_TailLogEntriesServer interface { - Send(*TailLogEntriesResponse) error - Recv() (*TailLogEntriesRequest, error) - grpc.ServerStream -} - -type loggingServiceV2TailLogEntriesServer struct { - grpc.ServerStream -} - -func (x *loggingServiceV2TailLogEntriesServer) Send(m *TailLogEntriesResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *loggingServiceV2TailLogEntriesServer) Recv() (*TailLogEntriesRequest, error) { - m := new(TailLogEntriesRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _LoggingServiceV2_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.logging.v2.LoggingServiceV2", - HandlerType: (*LoggingServiceV2Server)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DeleteLog", - Handler: _LoggingServiceV2_DeleteLog_Handler, - }, - { - MethodName: "WriteLogEntries", - Handler: _LoggingServiceV2_WriteLogEntries_Handler, - }, - { - MethodName: "ListLogEntries", - Handler: _LoggingServiceV2_ListLogEntries_Handler, - }, - { - MethodName: "ListMonitoredResourceDescriptors", - Handler: _LoggingServiceV2_ListMonitoredResourceDescriptors_Handler, - }, - { - MethodName: "ListLogs", - Handler: _LoggingServiceV2_ListLogs_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "TailLogEntries", - Handler: _LoggingServiceV2_TailLogEntries_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "google/logging/v2/logging.proto", -} diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config.pb.go index e880e5e7e9..63177baffd 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config.pb.go +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config.pb.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,26 +15,21 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/logging/v2/logging_config.proto package loggingpb import ( - context "context" - reflect "reflect" - sync "sync" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -5970,1437 +5965,3 @@ func file_google_logging_v2_logging_config_proto_init() { file_google_logging_v2_logging_config_proto_goTypes = nil file_google_logging_v2_logging_config_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ConfigServiceV2Client is the client API for ConfigServiceV2 service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ConfigServiceV2Client interface { - // Lists log buckets. - ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) - // Gets a log bucket. - GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) - // Creates a log bucket asynchronously that can be used to store log entries. - // - // After a bucket has been created, the bucket's location cannot be changed. - CreateBucketAsync(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Updates a log bucket asynchronously. - // - // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then - // `FAILED_PRECONDITION` will be returned. - // - // After a bucket has been created, the bucket's location cannot be changed. - UpdateBucketAsync(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Creates a log bucket that can be used to store log entries. After a bucket - // has been created, the bucket's location cannot be changed. - CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) - // Updates a log bucket. - // - // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then - // `FAILED_PRECONDITION` will be returned. - // - // After a bucket has been created, the bucket's location cannot be changed. - UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) - // Deletes a log bucket. - // - // Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. - // After 7 days, the bucket will be purged and all log entries in the bucket - // will be permanently deleted. - DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Undeletes a log bucket. A bucket that has been deleted can be undeleted - // within the grace period of 7 days. - UndeleteBucket(ctx context.Context, in *UndeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Lists views on a log bucket. - ListViews(ctx context.Context, in *ListViewsRequest, opts ...grpc.CallOption) (*ListViewsResponse, error) - // Gets a view on a log bucket.. - GetView(ctx context.Context, in *GetViewRequest, opts ...grpc.CallOption) (*LogView, error) - // Creates a view over log entries in a log bucket. A bucket may contain a - // maximum of 30 views. - CreateView(ctx context.Context, in *CreateViewRequest, opts ...grpc.CallOption) (*LogView, error) - // Updates a view on a log bucket. This method replaces the following fields - // in the existing view with values from the new view: `filter`. - // If an `UNAVAILABLE` error is returned, this indicates that system is not in - // a state where it can update the view. If this occurs, please try again in a - // few minutes. - UpdateView(ctx context.Context, in *UpdateViewRequest, opts ...grpc.CallOption) (*LogView, error) - // Deletes a view on a log bucket. - // If an `UNAVAILABLE` error is returned, this indicates that system is not in - // a state where it can delete the view. If this occurs, please try again in a - // few minutes. - DeleteView(ctx context.Context, in *DeleteViewRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Lists sinks. - ListSinks(ctx context.Context, in *ListSinksRequest, opts ...grpc.CallOption) (*ListSinksResponse, error) - // Gets a sink. - GetSink(ctx context.Context, in *GetSinkRequest, opts ...grpc.CallOption) (*LogSink, error) - // Creates a sink that exports specified log entries to a destination. The - // export of newly-ingested log entries begins immediately, unless the sink's - // `writer_identity` is not permitted to write to the destination. A sink can - // export log entries only from the resource owning the sink. - CreateSink(ctx context.Context, in *CreateSinkRequest, opts ...grpc.CallOption) (*LogSink, error) - // Updates a sink. This method replaces the following fields in the existing - // sink with values from the new sink: `destination`, and `filter`. - // - // The updated sink might also have a new `writer_identity`; see the - // `unique_writer_identity` field. - UpdateSink(ctx context.Context, in *UpdateSinkRequest, opts ...grpc.CallOption) (*LogSink, error) - // Deletes a sink. If the sink has a unique `writer_identity`, then that - // service account is also deleted. - DeleteSink(ctx context.Context, in *DeleteSinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Asynchronously creates a linked dataset in BigQuery which makes it possible - // to use BigQuery to read the logs stored in the log bucket. A log bucket may - // currently only contain one link. - CreateLink(ctx context.Context, in *CreateLinkRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Deletes a link. This will also delete the corresponding BigQuery linked - // dataset. - DeleteLink(ctx context.Context, in *DeleteLinkRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Lists links. - ListLinks(ctx context.Context, in *ListLinksRequest, opts ...grpc.CallOption) (*ListLinksResponse, error) - // Gets a link. - GetLink(ctx context.Context, in *GetLinkRequest, opts ...grpc.CallOption) (*Link, error) - // Lists all the exclusions on the _Default sink in a parent resource. - ListExclusions(ctx context.Context, in *ListExclusionsRequest, opts ...grpc.CallOption) (*ListExclusionsResponse, error) - // Gets the description of an exclusion in the _Default sink. - GetExclusion(ctx context.Context, in *GetExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) - // Creates a new exclusion in the _Default sink in a specified parent - // resource. Only log entries belonging to that resource can be excluded. You - // can have up to 10 exclusions in a resource. - CreateExclusion(ctx context.Context, in *CreateExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) - // Changes one or more properties of an existing exclusion in the _Default - // sink. - UpdateExclusion(ctx context.Context, in *UpdateExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) - // Deletes an exclusion in the _Default sink. - DeleteExclusion(ctx context.Context, in *DeleteExclusionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Gets the Logging CMEK settings for the given resource. - // - // Note: CMEK for the Log Router can be configured for Google Cloud projects, - // folders, organizations and billing accounts. Once configured for an - // organization, it applies to all projects and folders in the Google Cloud - // organization. - // - // See [Enabling CMEK for Log - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - // for more information. - GetCmekSettings(ctx context.Context, in *GetCmekSettingsRequest, opts ...grpc.CallOption) (*CmekSettings, error) - // Updates the Log Router CMEK settings for the given resource. - // - // Note: CMEK for the Log Router can currently only be configured for Google - // Cloud organizations. Once configured, it applies to all projects and - // folders in the Google Cloud organization. - // - // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - // will fail if 1) `kms_key_name` is invalid, or 2) the associated service - // account does not have the required - // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - // 3) access to the key is disabled. - // - // See [Enabling CMEK for Log - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - // for more information. - UpdateCmekSettings(ctx context.Context, in *UpdateCmekSettingsRequest, opts ...grpc.CallOption) (*CmekSettings, error) - // Gets the Log Router settings for the given resource. - // - // Note: Settings for the Log Router can be get for Google Cloud projects, - // folders, organizations and billing accounts. Currently it can only be - // configured for organizations. Once configured for an organization, it - // applies to all projects and folders in the Google Cloud organization. - // - // See [Enabling CMEK for Log - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - // for more information. - GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*Settings, error) - // Updates the Log Router settings for the given resource. - // - // Note: Settings for the Log Router can currently only be configured for - // Google Cloud organizations. Once configured, it applies to all projects and - // folders in the Google Cloud organization. - // - // [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - // will fail if 1) `kms_key_name` is invalid, or 2) the associated service - // account does not have the required - // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - // 3) access to the key is disabled. 4) `location_id` is not supported by - // Logging. 5) `location_id` violate OrgPolicy. - // - // See [Enabling CMEK for Log - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - // for more information. - UpdateSettings(ctx context.Context, in *UpdateSettingsRequest, opts ...grpc.CallOption) (*Settings, error) - // Copies a set of log entries from a log bucket to a Cloud Storage bucket. - CopyLogEntries(ctx context.Context, in *CopyLogEntriesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) -} - -type configServiceV2Client struct { - cc grpc.ClientConnInterface -} - -func NewConfigServiceV2Client(cc grpc.ClientConnInterface) ConfigServiceV2Client { - return &configServiceV2Client{cc} -} - -func (c *configServiceV2Client) ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) { - out := new(ListBucketsResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/ListBuckets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) { - out := new(LogBucket) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/GetBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) CreateBucketAsync(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/CreateBucketAsync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) UpdateBucketAsync(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/UpdateBucketAsync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) { - out := new(LogBucket) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/CreateBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) { - out := new(LogBucket) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/UpdateBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/DeleteBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) UndeleteBucket(ctx context.Context, in *UndeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/UndeleteBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) ListViews(ctx context.Context, in *ListViewsRequest, opts ...grpc.CallOption) (*ListViewsResponse, error) { - out := new(ListViewsResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/ListViews", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) GetView(ctx context.Context, in *GetViewRequest, opts ...grpc.CallOption) (*LogView, error) { - out := new(LogView) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/GetView", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) CreateView(ctx context.Context, in *CreateViewRequest, opts ...grpc.CallOption) (*LogView, error) { - out := new(LogView) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/CreateView", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) UpdateView(ctx context.Context, in *UpdateViewRequest, opts ...grpc.CallOption) (*LogView, error) { - out := new(LogView) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/UpdateView", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) DeleteView(ctx context.Context, in *DeleteViewRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/DeleteView", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) ListSinks(ctx context.Context, in *ListSinksRequest, opts ...grpc.CallOption) (*ListSinksResponse, error) { - out := new(ListSinksResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/ListSinks", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) GetSink(ctx context.Context, in *GetSinkRequest, opts ...grpc.CallOption) (*LogSink, error) { - out := new(LogSink) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/GetSink", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) CreateSink(ctx context.Context, in *CreateSinkRequest, opts ...grpc.CallOption) (*LogSink, error) { - out := new(LogSink) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/CreateSink", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) UpdateSink(ctx context.Context, in *UpdateSinkRequest, opts ...grpc.CallOption) (*LogSink, error) { - out := new(LogSink) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/UpdateSink", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) DeleteSink(ctx context.Context, in *DeleteSinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/DeleteSink", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) CreateLink(ctx context.Context, in *CreateLinkRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/CreateLink", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) DeleteLink(ctx context.Context, in *DeleteLinkRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/DeleteLink", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) ListLinks(ctx context.Context, in *ListLinksRequest, opts ...grpc.CallOption) (*ListLinksResponse, error) { - out := new(ListLinksResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/ListLinks", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) GetLink(ctx context.Context, in *GetLinkRequest, opts ...grpc.CallOption) (*Link, error) { - out := new(Link) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/GetLink", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) ListExclusions(ctx context.Context, in *ListExclusionsRequest, opts ...grpc.CallOption) (*ListExclusionsResponse, error) { - out := new(ListExclusionsResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/ListExclusions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) GetExclusion(ctx context.Context, in *GetExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) { - out := new(LogExclusion) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/GetExclusion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) CreateExclusion(ctx context.Context, in *CreateExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) { - out := new(LogExclusion) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/CreateExclusion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) UpdateExclusion(ctx context.Context, in *UpdateExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) { - out := new(LogExclusion) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/UpdateExclusion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) DeleteExclusion(ctx context.Context, in *DeleteExclusionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/DeleteExclusion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) GetCmekSettings(ctx context.Context, in *GetCmekSettingsRequest, opts ...grpc.CallOption) (*CmekSettings, error) { - out := new(CmekSettings) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/GetCmekSettings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) UpdateCmekSettings(ctx context.Context, in *UpdateCmekSettingsRequest, opts ...grpc.CallOption) (*CmekSettings, error) { - out := new(CmekSettings) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/UpdateCmekSettings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*Settings, error) { - out := new(Settings) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/GetSettings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) UpdateSettings(ctx context.Context, in *UpdateSettingsRequest, opts ...grpc.CallOption) (*Settings, error) { - out := new(Settings) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/UpdateSettings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceV2Client) CopyLogEntries(ctx context.Context, in *CopyLogEntriesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, "/google.logging.v2.ConfigServiceV2/CopyLogEntries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ConfigServiceV2Server is the server API for ConfigServiceV2 service. -type ConfigServiceV2Server interface { - // Lists log buckets. - ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) - // Gets a log bucket. - GetBucket(context.Context, *GetBucketRequest) (*LogBucket, error) - // Creates a log bucket asynchronously that can be used to store log entries. - // - // After a bucket has been created, the bucket's location cannot be changed. - CreateBucketAsync(context.Context, *CreateBucketRequest) (*longrunningpb.Operation, error) - // Updates a log bucket asynchronously. - // - // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then - // `FAILED_PRECONDITION` will be returned. - // - // After a bucket has been created, the bucket's location cannot be changed. - UpdateBucketAsync(context.Context, *UpdateBucketRequest) (*longrunningpb.Operation, error) - // Creates a log bucket that can be used to store log entries. After a bucket - // has been created, the bucket's location cannot be changed. - CreateBucket(context.Context, *CreateBucketRequest) (*LogBucket, error) - // Updates a log bucket. - // - // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then - // `FAILED_PRECONDITION` will be returned. - // - // After a bucket has been created, the bucket's location cannot be changed. - UpdateBucket(context.Context, *UpdateBucketRequest) (*LogBucket, error) - // Deletes a log bucket. - // - // Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. - // After 7 days, the bucket will be purged and all log entries in the bucket - // will be permanently deleted. - DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error) - // Undeletes a log bucket. A bucket that has been deleted can be undeleted - // within the grace period of 7 days. - UndeleteBucket(context.Context, *UndeleteBucketRequest) (*emptypb.Empty, error) - // Lists views on a log bucket. - ListViews(context.Context, *ListViewsRequest) (*ListViewsResponse, error) - // Gets a view on a log bucket.. - GetView(context.Context, *GetViewRequest) (*LogView, error) - // Creates a view over log entries in a log bucket. A bucket may contain a - // maximum of 30 views. - CreateView(context.Context, *CreateViewRequest) (*LogView, error) - // Updates a view on a log bucket. This method replaces the following fields - // in the existing view with values from the new view: `filter`. - // If an `UNAVAILABLE` error is returned, this indicates that system is not in - // a state where it can update the view. If this occurs, please try again in a - // few minutes. - UpdateView(context.Context, *UpdateViewRequest) (*LogView, error) - // Deletes a view on a log bucket. - // If an `UNAVAILABLE` error is returned, this indicates that system is not in - // a state where it can delete the view. If this occurs, please try again in a - // few minutes. - DeleteView(context.Context, *DeleteViewRequest) (*emptypb.Empty, error) - // Lists sinks. - ListSinks(context.Context, *ListSinksRequest) (*ListSinksResponse, error) - // Gets a sink. - GetSink(context.Context, *GetSinkRequest) (*LogSink, error) - // Creates a sink that exports specified log entries to a destination. The - // export of newly-ingested log entries begins immediately, unless the sink's - // `writer_identity` is not permitted to write to the destination. A sink can - // export log entries only from the resource owning the sink. - CreateSink(context.Context, *CreateSinkRequest) (*LogSink, error) - // Updates a sink. This method replaces the following fields in the existing - // sink with values from the new sink: `destination`, and `filter`. - // - // The updated sink might also have a new `writer_identity`; see the - // `unique_writer_identity` field. - UpdateSink(context.Context, *UpdateSinkRequest) (*LogSink, error) - // Deletes a sink. If the sink has a unique `writer_identity`, then that - // service account is also deleted. - DeleteSink(context.Context, *DeleteSinkRequest) (*emptypb.Empty, error) - // Asynchronously creates a linked dataset in BigQuery which makes it possible - // to use BigQuery to read the logs stored in the log bucket. A log bucket may - // currently only contain one link. - CreateLink(context.Context, *CreateLinkRequest) (*longrunningpb.Operation, error) - // Deletes a link. This will also delete the corresponding BigQuery linked - // dataset. - DeleteLink(context.Context, *DeleteLinkRequest) (*longrunningpb.Operation, error) - // Lists links. - ListLinks(context.Context, *ListLinksRequest) (*ListLinksResponse, error) - // Gets a link. - GetLink(context.Context, *GetLinkRequest) (*Link, error) - // Lists all the exclusions on the _Default sink in a parent resource. - ListExclusions(context.Context, *ListExclusionsRequest) (*ListExclusionsResponse, error) - // Gets the description of an exclusion in the _Default sink. - GetExclusion(context.Context, *GetExclusionRequest) (*LogExclusion, error) - // Creates a new exclusion in the _Default sink in a specified parent - // resource. Only log entries belonging to that resource can be excluded. You - // can have up to 10 exclusions in a resource. - CreateExclusion(context.Context, *CreateExclusionRequest) (*LogExclusion, error) - // Changes one or more properties of an existing exclusion in the _Default - // sink. - UpdateExclusion(context.Context, *UpdateExclusionRequest) (*LogExclusion, error) - // Deletes an exclusion in the _Default sink. - DeleteExclusion(context.Context, *DeleteExclusionRequest) (*emptypb.Empty, error) - // Gets the Logging CMEK settings for the given resource. - // - // Note: CMEK for the Log Router can be configured for Google Cloud projects, - // folders, organizations and billing accounts. Once configured for an - // organization, it applies to all projects and folders in the Google Cloud - // organization. - // - // See [Enabling CMEK for Log - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - // for more information. - GetCmekSettings(context.Context, *GetCmekSettingsRequest) (*CmekSettings, error) - // Updates the Log Router CMEK settings for the given resource. - // - // Note: CMEK for the Log Router can currently only be configured for Google - // Cloud organizations. Once configured, it applies to all projects and - // folders in the Google Cloud organization. - // - // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - // will fail if 1) `kms_key_name` is invalid, or 2) the associated service - // account does not have the required - // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - // 3) access to the key is disabled. - // - // See [Enabling CMEK for Log - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - // for more information. - UpdateCmekSettings(context.Context, *UpdateCmekSettingsRequest) (*CmekSettings, error) - // Gets the Log Router settings for the given resource. - // - // Note: Settings for the Log Router can be get for Google Cloud projects, - // folders, organizations and billing accounts. Currently it can only be - // configured for organizations. Once configured for an organization, it - // applies to all projects and folders in the Google Cloud organization. - // - // See [Enabling CMEK for Log - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - // for more information. - GetSettings(context.Context, *GetSettingsRequest) (*Settings, error) - // Updates the Log Router settings for the given resource. - // - // Note: Settings for the Log Router can currently only be configured for - // Google Cloud organizations. Once configured, it applies to all projects and - // folders in the Google Cloud organization. - // - // [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - // will fail if 1) `kms_key_name` is invalid, or 2) the associated service - // account does not have the required - // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - // 3) access to the key is disabled. 4) `location_id` is not supported by - // Logging. 5) `location_id` violate OrgPolicy. - // - // See [Enabling CMEK for Log - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - // for more information. - UpdateSettings(context.Context, *UpdateSettingsRequest) (*Settings, error) - // Copies a set of log entries from a log bucket to a Cloud Storage bucket. - CopyLogEntries(context.Context, *CopyLogEntriesRequest) (*longrunningpb.Operation, error) -} - -// UnimplementedConfigServiceV2Server can be embedded to have forward compatible implementations. -type UnimplementedConfigServiceV2Server struct { -} - -func (*UnimplementedConfigServiceV2Server) ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListBuckets not implemented") -} -func (*UnimplementedConfigServiceV2Server) GetBucket(context.Context, *GetBucketRequest) (*LogBucket, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBucket not implemented") -} -func (*UnimplementedConfigServiceV2Server) CreateBucketAsync(context.Context, *CreateBucketRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateBucketAsync not implemented") -} -func (*UnimplementedConfigServiceV2Server) UpdateBucketAsync(context.Context, *UpdateBucketRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateBucketAsync not implemented") -} -func (*UnimplementedConfigServiceV2Server) CreateBucket(context.Context, *CreateBucketRequest) (*LogBucket, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateBucket not implemented") -} -func (*UnimplementedConfigServiceV2Server) UpdateBucket(context.Context, *UpdateBucketRequest) (*LogBucket, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateBucket not implemented") -} -func (*UnimplementedConfigServiceV2Server) DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteBucket not implemented") -} -func (*UnimplementedConfigServiceV2Server) UndeleteBucket(context.Context, *UndeleteBucketRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UndeleteBucket not implemented") -} -func (*UnimplementedConfigServiceV2Server) ListViews(context.Context, *ListViewsRequest) (*ListViewsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListViews not implemented") -} -func (*UnimplementedConfigServiceV2Server) GetView(context.Context, *GetViewRequest) (*LogView, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetView not implemented") -} -func (*UnimplementedConfigServiceV2Server) CreateView(context.Context, *CreateViewRequest) (*LogView, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateView not implemented") -} -func (*UnimplementedConfigServiceV2Server) UpdateView(context.Context, *UpdateViewRequest) (*LogView, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateView not implemented") -} -func (*UnimplementedConfigServiceV2Server) DeleteView(context.Context, *DeleteViewRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteView not implemented") -} -func (*UnimplementedConfigServiceV2Server) ListSinks(context.Context, *ListSinksRequest) (*ListSinksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSinks not implemented") -} -func (*UnimplementedConfigServiceV2Server) GetSink(context.Context, *GetSinkRequest) (*LogSink, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSink not implemented") -} -func (*UnimplementedConfigServiceV2Server) CreateSink(context.Context, *CreateSinkRequest) (*LogSink, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateSink not implemented") -} -func (*UnimplementedConfigServiceV2Server) UpdateSink(context.Context, *UpdateSinkRequest) (*LogSink, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSink not implemented") -} -func (*UnimplementedConfigServiceV2Server) DeleteSink(context.Context, *DeleteSinkRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteSink not implemented") -} -func (*UnimplementedConfigServiceV2Server) CreateLink(context.Context, *CreateLinkRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateLink not implemented") -} -func (*UnimplementedConfigServiceV2Server) DeleteLink(context.Context, *DeleteLinkRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteLink not implemented") -} -func (*UnimplementedConfigServiceV2Server) ListLinks(context.Context, *ListLinksRequest) (*ListLinksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListLinks not implemented") -} -func (*UnimplementedConfigServiceV2Server) GetLink(context.Context, *GetLinkRequest) (*Link, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLink not implemented") -} -func (*UnimplementedConfigServiceV2Server) ListExclusions(context.Context, *ListExclusionsRequest) (*ListExclusionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListExclusions not implemented") -} -func (*UnimplementedConfigServiceV2Server) GetExclusion(context.Context, *GetExclusionRequest) (*LogExclusion, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExclusion not implemented") -} -func (*UnimplementedConfigServiceV2Server) CreateExclusion(context.Context, *CreateExclusionRequest) (*LogExclusion, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateExclusion not implemented") -} -func (*UnimplementedConfigServiceV2Server) UpdateExclusion(context.Context, *UpdateExclusionRequest) (*LogExclusion, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateExclusion not implemented") -} -func (*UnimplementedConfigServiceV2Server) DeleteExclusion(context.Context, *DeleteExclusionRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteExclusion not implemented") -} -func (*UnimplementedConfigServiceV2Server) GetCmekSettings(context.Context, *GetCmekSettingsRequest) (*CmekSettings, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCmekSettings not implemented") -} -func (*UnimplementedConfigServiceV2Server) UpdateCmekSettings(context.Context, *UpdateCmekSettingsRequest) (*CmekSettings, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateCmekSettings not implemented") -} -func (*UnimplementedConfigServiceV2Server) GetSettings(context.Context, *GetSettingsRequest) (*Settings, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") -} -func (*UnimplementedConfigServiceV2Server) UpdateSettings(context.Context, *UpdateSettingsRequest) (*Settings, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSettings not implemented") -} -func (*UnimplementedConfigServiceV2Server) CopyLogEntries(context.Context, *CopyLogEntriesRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CopyLogEntries not implemented") -} - -func RegisterConfigServiceV2Server(s *grpc.Server, srv ConfigServiceV2Server) { - s.RegisterService(&_ConfigServiceV2_serviceDesc, srv) -} - -func _ConfigServiceV2_ListBuckets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListBucketsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).ListBuckets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/ListBuckets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).ListBuckets(ctx, req.(*ListBucketsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_GetBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).GetBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/GetBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).GetBucket(ctx, req.(*GetBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_CreateBucketAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).CreateBucketAsync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/CreateBucketAsync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).CreateBucketAsync(ctx, req.(*CreateBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_UpdateBucketAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).UpdateBucketAsync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/UpdateBucketAsync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).UpdateBucketAsync(ctx, req.(*UpdateBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_CreateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).CreateBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/CreateBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).CreateBucket(ctx, req.(*CreateBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_UpdateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).UpdateBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/UpdateBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).UpdateBucket(ctx, req.(*UpdateBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_DeleteBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).DeleteBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/DeleteBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).DeleteBucket(ctx, req.(*DeleteBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_UndeleteBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UndeleteBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).UndeleteBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/UndeleteBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).UndeleteBucket(ctx, req.(*UndeleteBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_ListViews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListViewsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).ListViews(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/ListViews", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).ListViews(ctx, req.(*ListViewsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_GetView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetViewRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).GetView(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/GetView", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).GetView(ctx, req.(*GetViewRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_CreateView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateViewRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).CreateView(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/CreateView", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).CreateView(ctx, req.(*CreateViewRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_UpdateView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateViewRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).UpdateView(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/UpdateView", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).UpdateView(ctx, req.(*UpdateViewRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_DeleteView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteViewRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).DeleteView(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/DeleteView", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).DeleteView(ctx, req.(*DeleteViewRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_ListSinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListSinksRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).ListSinks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/ListSinks", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).ListSinks(ctx, req.(*ListSinksRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_GetSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).GetSink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/GetSink", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).GetSink(ctx, req.(*GetSinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_CreateSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).CreateSink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/CreateSink", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).CreateSink(ctx, req.(*CreateSinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_UpdateSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateSinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).UpdateSink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/UpdateSink", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).UpdateSink(ctx, req.(*UpdateSinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_DeleteSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteSinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).DeleteSink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/DeleteSink", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).DeleteSink(ctx, req.(*DeleteSinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_CreateLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateLinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).CreateLink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/CreateLink", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).CreateLink(ctx, req.(*CreateLinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_DeleteLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteLinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).DeleteLink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/DeleteLink", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).DeleteLink(ctx, req.(*DeleteLinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_ListLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListLinksRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).ListLinks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/ListLinks", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).ListLinks(ctx, req.(*ListLinksRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_GetLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).GetLink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/GetLink", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).GetLink(ctx, req.(*GetLinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_ListExclusions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListExclusionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).ListExclusions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/ListExclusions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).ListExclusions(ctx, req.(*ListExclusionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_GetExclusion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetExclusionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).GetExclusion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/GetExclusion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).GetExclusion(ctx, req.(*GetExclusionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_CreateExclusion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateExclusionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).CreateExclusion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/CreateExclusion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).CreateExclusion(ctx, req.(*CreateExclusionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_UpdateExclusion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateExclusionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).UpdateExclusion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/UpdateExclusion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).UpdateExclusion(ctx, req.(*UpdateExclusionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_DeleteExclusion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteExclusionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).DeleteExclusion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/DeleteExclusion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).DeleteExclusion(ctx, req.(*DeleteExclusionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_GetCmekSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCmekSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).GetCmekSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/GetCmekSettings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).GetCmekSettings(ctx, req.(*GetCmekSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_UpdateCmekSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateCmekSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).UpdateCmekSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/UpdateCmekSettings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).UpdateCmekSettings(ctx, req.(*UpdateCmekSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).GetSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/GetSettings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).GetSettings(ctx, req.(*GetSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_UpdateSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).UpdateSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/UpdateSettings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).UpdateSettings(ctx, req.(*UpdateSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigServiceV2_CopyLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CopyLogEntriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceV2Server).CopyLogEntries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.ConfigServiceV2/CopyLogEntries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceV2Server).CopyLogEntries(ctx, req.(*CopyLogEntriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ConfigServiceV2_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.logging.v2.ConfigServiceV2", - HandlerType: (*ConfigServiceV2Server)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListBuckets", - Handler: _ConfigServiceV2_ListBuckets_Handler, - }, - { - MethodName: "GetBucket", - Handler: _ConfigServiceV2_GetBucket_Handler, - }, - { - MethodName: "CreateBucketAsync", - Handler: _ConfigServiceV2_CreateBucketAsync_Handler, - }, - { - MethodName: "UpdateBucketAsync", - Handler: _ConfigServiceV2_UpdateBucketAsync_Handler, - }, - { - MethodName: "CreateBucket", - Handler: _ConfigServiceV2_CreateBucket_Handler, - }, - { - MethodName: "UpdateBucket", - Handler: _ConfigServiceV2_UpdateBucket_Handler, - }, - { - MethodName: "DeleteBucket", - Handler: _ConfigServiceV2_DeleteBucket_Handler, - }, - { - MethodName: "UndeleteBucket", - Handler: _ConfigServiceV2_UndeleteBucket_Handler, - }, - { - MethodName: "ListViews", - Handler: _ConfigServiceV2_ListViews_Handler, - }, - { - MethodName: "GetView", - Handler: _ConfigServiceV2_GetView_Handler, - }, - { - MethodName: "CreateView", - Handler: _ConfigServiceV2_CreateView_Handler, - }, - { - MethodName: "UpdateView", - Handler: _ConfigServiceV2_UpdateView_Handler, - }, - { - MethodName: "DeleteView", - Handler: _ConfigServiceV2_DeleteView_Handler, - }, - { - MethodName: "ListSinks", - Handler: _ConfigServiceV2_ListSinks_Handler, - }, - { - MethodName: "GetSink", - Handler: _ConfigServiceV2_GetSink_Handler, - }, - { - MethodName: "CreateSink", - Handler: _ConfigServiceV2_CreateSink_Handler, - }, - { - MethodName: "UpdateSink", - Handler: _ConfigServiceV2_UpdateSink_Handler, - }, - { - MethodName: "DeleteSink", - Handler: _ConfigServiceV2_DeleteSink_Handler, - }, - { - MethodName: "CreateLink", - Handler: _ConfigServiceV2_CreateLink_Handler, - }, - { - MethodName: "DeleteLink", - Handler: _ConfigServiceV2_DeleteLink_Handler, - }, - { - MethodName: "ListLinks", - Handler: _ConfigServiceV2_ListLinks_Handler, - }, - { - MethodName: "GetLink", - Handler: _ConfigServiceV2_GetLink_Handler, - }, - { - MethodName: "ListExclusions", - Handler: _ConfigServiceV2_ListExclusions_Handler, - }, - { - MethodName: "GetExclusion", - Handler: _ConfigServiceV2_GetExclusion_Handler, - }, - { - MethodName: "CreateExclusion", - Handler: _ConfigServiceV2_CreateExclusion_Handler, - }, - { - MethodName: "UpdateExclusion", - Handler: _ConfigServiceV2_UpdateExclusion_Handler, - }, - { - MethodName: "DeleteExclusion", - Handler: _ConfigServiceV2_DeleteExclusion_Handler, - }, - { - MethodName: "GetCmekSettings", - Handler: _ConfigServiceV2_GetCmekSettings_Handler, - }, - { - MethodName: "UpdateCmekSettings", - Handler: _ConfigServiceV2_UpdateCmekSettings_Handler, - }, - { - MethodName: "GetSettings", - Handler: _ConfigServiceV2_GetSettings_Handler, - }, - { - MethodName: "UpdateSettings", - Handler: _ConfigServiceV2_UpdateSettings_Handler, - }, - { - MethodName: "CopyLogEntries", - Handler: _ConfigServiceV2_CopyLogEntries_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/logging/v2/logging_config.proto", -} diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config_grpc.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config_grpc.pb.go new file mode 100644 index 0000000000..00565cde19 --- /dev/null +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_config_grpc.pb.go @@ -0,0 +1,1508 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/logging/v2/logging_config.proto + +package loggingpb + +import ( + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ConfigServiceV2_ListBuckets_FullMethodName = "/google.logging.v2.ConfigServiceV2/ListBuckets" + ConfigServiceV2_GetBucket_FullMethodName = "/google.logging.v2.ConfigServiceV2/GetBucket" + ConfigServiceV2_CreateBucketAsync_FullMethodName = "/google.logging.v2.ConfigServiceV2/CreateBucketAsync" + ConfigServiceV2_UpdateBucketAsync_FullMethodName = "/google.logging.v2.ConfigServiceV2/UpdateBucketAsync" + ConfigServiceV2_CreateBucket_FullMethodName = "/google.logging.v2.ConfigServiceV2/CreateBucket" + ConfigServiceV2_UpdateBucket_FullMethodName = "/google.logging.v2.ConfigServiceV2/UpdateBucket" + ConfigServiceV2_DeleteBucket_FullMethodName = "/google.logging.v2.ConfigServiceV2/DeleteBucket" + ConfigServiceV2_UndeleteBucket_FullMethodName = "/google.logging.v2.ConfigServiceV2/UndeleteBucket" + ConfigServiceV2_ListViews_FullMethodName = "/google.logging.v2.ConfigServiceV2/ListViews" + ConfigServiceV2_GetView_FullMethodName = "/google.logging.v2.ConfigServiceV2/GetView" + ConfigServiceV2_CreateView_FullMethodName = "/google.logging.v2.ConfigServiceV2/CreateView" + ConfigServiceV2_UpdateView_FullMethodName = "/google.logging.v2.ConfigServiceV2/UpdateView" + ConfigServiceV2_DeleteView_FullMethodName = "/google.logging.v2.ConfigServiceV2/DeleteView" + ConfigServiceV2_ListSinks_FullMethodName = "/google.logging.v2.ConfigServiceV2/ListSinks" + ConfigServiceV2_GetSink_FullMethodName = "/google.logging.v2.ConfigServiceV2/GetSink" + ConfigServiceV2_CreateSink_FullMethodName = "/google.logging.v2.ConfigServiceV2/CreateSink" + ConfigServiceV2_UpdateSink_FullMethodName = "/google.logging.v2.ConfigServiceV2/UpdateSink" + ConfigServiceV2_DeleteSink_FullMethodName = "/google.logging.v2.ConfigServiceV2/DeleteSink" + ConfigServiceV2_CreateLink_FullMethodName = "/google.logging.v2.ConfigServiceV2/CreateLink" + ConfigServiceV2_DeleteLink_FullMethodName = "/google.logging.v2.ConfigServiceV2/DeleteLink" + ConfigServiceV2_ListLinks_FullMethodName = "/google.logging.v2.ConfigServiceV2/ListLinks" + ConfigServiceV2_GetLink_FullMethodName = "/google.logging.v2.ConfigServiceV2/GetLink" + ConfigServiceV2_ListExclusions_FullMethodName = "/google.logging.v2.ConfigServiceV2/ListExclusions" + ConfigServiceV2_GetExclusion_FullMethodName = "/google.logging.v2.ConfigServiceV2/GetExclusion" + ConfigServiceV2_CreateExclusion_FullMethodName = "/google.logging.v2.ConfigServiceV2/CreateExclusion" + ConfigServiceV2_UpdateExclusion_FullMethodName = "/google.logging.v2.ConfigServiceV2/UpdateExclusion" + ConfigServiceV2_DeleteExclusion_FullMethodName = "/google.logging.v2.ConfigServiceV2/DeleteExclusion" + ConfigServiceV2_GetCmekSettings_FullMethodName = "/google.logging.v2.ConfigServiceV2/GetCmekSettings" + ConfigServiceV2_UpdateCmekSettings_FullMethodName = "/google.logging.v2.ConfigServiceV2/UpdateCmekSettings" + ConfigServiceV2_GetSettings_FullMethodName = "/google.logging.v2.ConfigServiceV2/GetSettings" + ConfigServiceV2_UpdateSettings_FullMethodName = "/google.logging.v2.ConfigServiceV2/UpdateSettings" + ConfigServiceV2_CopyLogEntries_FullMethodName = "/google.logging.v2.ConfigServiceV2/CopyLogEntries" +) + +// ConfigServiceV2Client is the client API for ConfigServiceV2 service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ConfigServiceV2Client interface { + // Lists log buckets. + ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) + // Gets a log bucket. + GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) + // Creates a log bucket asynchronously that can be used to store log entries. + // + // After a bucket has been created, the bucket's location cannot be changed. + CreateBucketAsync(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Updates a log bucket asynchronously. + // + // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + // `FAILED_PRECONDITION` will be returned. + // + // After a bucket has been created, the bucket's location cannot be changed. + UpdateBucketAsync(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Creates a log bucket that can be used to store log entries. After a bucket + // has been created, the bucket's location cannot be changed. + CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) + // Updates a log bucket. + // + // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + // `FAILED_PRECONDITION` will be returned. + // + // After a bucket has been created, the bucket's location cannot be changed. + UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) + // Deletes a log bucket. + // + // Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. + // After 7 days, the bucket will be purged and all log entries in the bucket + // will be permanently deleted. + DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Undeletes a log bucket. A bucket that has been deleted can be undeleted + // within the grace period of 7 days. + UndeleteBucket(ctx context.Context, in *UndeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lists views on a log bucket. + ListViews(ctx context.Context, in *ListViewsRequest, opts ...grpc.CallOption) (*ListViewsResponse, error) + // Gets a view on a log bucket.. + GetView(ctx context.Context, in *GetViewRequest, opts ...grpc.CallOption) (*LogView, error) + // Creates a view over log entries in a log bucket. A bucket may contain a + // maximum of 30 views. + CreateView(ctx context.Context, in *CreateViewRequest, opts ...grpc.CallOption) (*LogView, error) + // Updates a view on a log bucket. This method replaces the following fields + // in the existing view with values from the new view: `filter`. + // If an `UNAVAILABLE` error is returned, this indicates that system is not in + // a state where it can update the view. If this occurs, please try again in a + // few minutes. + UpdateView(ctx context.Context, in *UpdateViewRequest, opts ...grpc.CallOption) (*LogView, error) + // Deletes a view on a log bucket. + // If an `UNAVAILABLE` error is returned, this indicates that system is not in + // a state where it can delete the view. If this occurs, please try again in a + // few minutes. + DeleteView(ctx context.Context, in *DeleteViewRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lists sinks. + ListSinks(ctx context.Context, in *ListSinksRequest, opts ...grpc.CallOption) (*ListSinksResponse, error) + // Gets a sink. + GetSink(ctx context.Context, in *GetSinkRequest, opts ...grpc.CallOption) (*LogSink, error) + // Creates a sink that exports specified log entries to a destination. The + // export of newly-ingested log entries begins immediately, unless the sink's + // `writer_identity` is not permitted to write to the destination. A sink can + // export log entries only from the resource owning the sink. + CreateSink(ctx context.Context, in *CreateSinkRequest, opts ...grpc.CallOption) (*LogSink, error) + // Updates a sink. This method replaces the following fields in the existing + // sink with values from the new sink: `destination`, and `filter`. + // + // The updated sink might also have a new `writer_identity`; see the + // `unique_writer_identity` field. + UpdateSink(ctx context.Context, in *UpdateSinkRequest, opts ...grpc.CallOption) (*LogSink, error) + // Deletes a sink. If the sink has a unique `writer_identity`, then that + // service account is also deleted. + DeleteSink(ctx context.Context, in *DeleteSinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Asynchronously creates a linked dataset in BigQuery which makes it possible + // to use BigQuery to read the logs stored in the log bucket. A log bucket may + // currently only contain one link. + CreateLink(ctx context.Context, in *CreateLinkRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Deletes a link. This will also delete the corresponding BigQuery linked + // dataset. + DeleteLink(ctx context.Context, in *DeleteLinkRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Lists links. + ListLinks(ctx context.Context, in *ListLinksRequest, opts ...grpc.CallOption) (*ListLinksResponse, error) + // Gets a link. + GetLink(ctx context.Context, in *GetLinkRequest, opts ...grpc.CallOption) (*Link, error) + // Lists all the exclusions on the _Default sink in a parent resource. + ListExclusions(ctx context.Context, in *ListExclusionsRequest, opts ...grpc.CallOption) (*ListExclusionsResponse, error) + // Gets the description of an exclusion in the _Default sink. + GetExclusion(ctx context.Context, in *GetExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) + // Creates a new exclusion in the _Default sink in a specified parent + // resource. Only log entries belonging to that resource can be excluded. You + // can have up to 10 exclusions in a resource. + CreateExclusion(ctx context.Context, in *CreateExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) + // Changes one or more properties of an existing exclusion in the _Default + // sink. + UpdateExclusion(ctx context.Context, in *UpdateExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) + // Deletes an exclusion in the _Default sink. + DeleteExclusion(ctx context.Context, in *DeleteExclusionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Gets the Logging CMEK settings for the given resource. + // + // Note: CMEK for the Log Router can be configured for Google Cloud projects, + // folders, organizations and billing accounts. Once configured for an + // organization, it applies to all projects and folders in the Google Cloud + // organization. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + GetCmekSettings(ctx context.Context, in *GetCmekSettingsRequest, opts ...grpc.CallOption) (*CmekSettings, error) + // Updates the Log Router CMEK settings for the given resource. + // + // Note: CMEK for the Log Router can currently only be configured for Google + // Cloud organizations. Once configured, it applies to all projects and + // folders in the Google Cloud organization. + // + // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] + // will fail if 1) `kms_key_name` is invalid, or 2) the associated service + // account does not have the required + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + // 3) access to the key is disabled. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + UpdateCmekSettings(ctx context.Context, in *UpdateCmekSettingsRequest, opts ...grpc.CallOption) (*CmekSettings, error) + // Gets the Log Router settings for the given resource. + // + // Note: Settings for the Log Router can be get for Google Cloud projects, + // folders, organizations and billing accounts. Currently it can only be + // configured for organizations. Once configured for an organization, it + // applies to all projects and folders in the Google Cloud organization. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*Settings, error) + // Updates the Log Router settings for the given resource. + // + // Note: Settings for the Log Router can currently only be configured for + // Google Cloud organizations. Once configured, it applies to all projects and + // folders in the Google Cloud organization. + // + // [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] + // will fail if 1) `kms_key_name` is invalid, or 2) the associated service + // account does not have the required + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + // 3) access to the key is disabled. 4) `location_id` is not supported by + // Logging. 5) `location_id` violate OrgPolicy. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + UpdateSettings(ctx context.Context, in *UpdateSettingsRequest, opts ...grpc.CallOption) (*Settings, error) + // Copies a set of log entries from a log bucket to a Cloud Storage bucket. + CopyLogEntries(ctx context.Context, in *CopyLogEntriesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) +} + +type configServiceV2Client struct { + cc grpc.ClientConnInterface +} + +func NewConfigServiceV2Client(cc grpc.ClientConnInterface) ConfigServiceV2Client { + return &configServiceV2Client{cc} +} + +func (c *configServiceV2Client) ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) { + out := new(ListBucketsResponse) + err := c.cc.Invoke(ctx, ConfigServiceV2_ListBuckets_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) { + out := new(LogBucket) + err := c.cc.Invoke(ctx, ConfigServiceV2_GetBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) CreateBucketAsync(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, ConfigServiceV2_CreateBucketAsync_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) UpdateBucketAsync(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, ConfigServiceV2_UpdateBucketAsync_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) { + out := new(LogBucket) + err := c.cc.Invoke(ctx, ConfigServiceV2_CreateBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*LogBucket, error) { + out := new(LogBucket) + err := c.cc.Invoke(ctx, ConfigServiceV2_UpdateBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ConfigServiceV2_DeleteBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) UndeleteBucket(ctx context.Context, in *UndeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ConfigServiceV2_UndeleteBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) ListViews(ctx context.Context, in *ListViewsRequest, opts ...grpc.CallOption) (*ListViewsResponse, error) { + out := new(ListViewsResponse) + err := c.cc.Invoke(ctx, ConfigServiceV2_ListViews_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) GetView(ctx context.Context, in *GetViewRequest, opts ...grpc.CallOption) (*LogView, error) { + out := new(LogView) + err := c.cc.Invoke(ctx, ConfigServiceV2_GetView_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) CreateView(ctx context.Context, in *CreateViewRequest, opts ...grpc.CallOption) (*LogView, error) { + out := new(LogView) + err := c.cc.Invoke(ctx, ConfigServiceV2_CreateView_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) UpdateView(ctx context.Context, in *UpdateViewRequest, opts ...grpc.CallOption) (*LogView, error) { + out := new(LogView) + err := c.cc.Invoke(ctx, ConfigServiceV2_UpdateView_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) DeleteView(ctx context.Context, in *DeleteViewRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ConfigServiceV2_DeleteView_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) ListSinks(ctx context.Context, in *ListSinksRequest, opts ...grpc.CallOption) (*ListSinksResponse, error) { + out := new(ListSinksResponse) + err := c.cc.Invoke(ctx, ConfigServiceV2_ListSinks_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) GetSink(ctx context.Context, in *GetSinkRequest, opts ...grpc.CallOption) (*LogSink, error) { + out := new(LogSink) + err := c.cc.Invoke(ctx, ConfigServiceV2_GetSink_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) CreateSink(ctx context.Context, in *CreateSinkRequest, opts ...grpc.CallOption) (*LogSink, error) { + out := new(LogSink) + err := c.cc.Invoke(ctx, ConfigServiceV2_CreateSink_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) UpdateSink(ctx context.Context, in *UpdateSinkRequest, opts ...grpc.CallOption) (*LogSink, error) { + out := new(LogSink) + err := c.cc.Invoke(ctx, ConfigServiceV2_UpdateSink_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) DeleteSink(ctx context.Context, in *DeleteSinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ConfigServiceV2_DeleteSink_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) CreateLink(ctx context.Context, in *CreateLinkRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, ConfigServiceV2_CreateLink_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) DeleteLink(ctx context.Context, in *DeleteLinkRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, ConfigServiceV2_DeleteLink_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) ListLinks(ctx context.Context, in *ListLinksRequest, opts ...grpc.CallOption) (*ListLinksResponse, error) { + out := new(ListLinksResponse) + err := c.cc.Invoke(ctx, ConfigServiceV2_ListLinks_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) GetLink(ctx context.Context, in *GetLinkRequest, opts ...grpc.CallOption) (*Link, error) { + out := new(Link) + err := c.cc.Invoke(ctx, ConfigServiceV2_GetLink_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) ListExclusions(ctx context.Context, in *ListExclusionsRequest, opts ...grpc.CallOption) (*ListExclusionsResponse, error) { + out := new(ListExclusionsResponse) + err := c.cc.Invoke(ctx, ConfigServiceV2_ListExclusions_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) GetExclusion(ctx context.Context, in *GetExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) { + out := new(LogExclusion) + err := c.cc.Invoke(ctx, ConfigServiceV2_GetExclusion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) CreateExclusion(ctx context.Context, in *CreateExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) { + out := new(LogExclusion) + err := c.cc.Invoke(ctx, ConfigServiceV2_CreateExclusion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) UpdateExclusion(ctx context.Context, in *UpdateExclusionRequest, opts ...grpc.CallOption) (*LogExclusion, error) { + out := new(LogExclusion) + err := c.cc.Invoke(ctx, ConfigServiceV2_UpdateExclusion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) DeleteExclusion(ctx context.Context, in *DeleteExclusionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ConfigServiceV2_DeleteExclusion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) GetCmekSettings(ctx context.Context, in *GetCmekSettingsRequest, opts ...grpc.CallOption) (*CmekSettings, error) { + out := new(CmekSettings) + err := c.cc.Invoke(ctx, ConfigServiceV2_GetCmekSettings_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) UpdateCmekSettings(ctx context.Context, in *UpdateCmekSettingsRequest, opts ...grpc.CallOption) (*CmekSettings, error) { + out := new(CmekSettings) + err := c.cc.Invoke(ctx, ConfigServiceV2_UpdateCmekSettings_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*Settings, error) { + out := new(Settings) + err := c.cc.Invoke(ctx, ConfigServiceV2_GetSettings_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) UpdateSettings(ctx context.Context, in *UpdateSettingsRequest, opts ...grpc.CallOption) (*Settings, error) { + out := new(Settings) + err := c.cc.Invoke(ctx, ConfigServiceV2_UpdateSettings_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configServiceV2Client) CopyLogEntries(ctx context.Context, in *CopyLogEntriesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, ConfigServiceV2_CopyLogEntries_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ConfigServiceV2Server is the server API for ConfigServiceV2 service. +// All implementations should embed UnimplementedConfigServiceV2Server +// for forward compatibility +type ConfigServiceV2Server interface { + // Lists log buckets. + ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) + // Gets a log bucket. + GetBucket(context.Context, *GetBucketRequest) (*LogBucket, error) + // Creates a log bucket asynchronously that can be used to store log entries. + // + // After a bucket has been created, the bucket's location cannot be changed. + CreateBucketAsync(context.Context, *CreateBucketRequest) (*longrunningpb.Operation, error) + // Updates a log bucket asynchronously. + // + // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + // `FAILED_PRECONDITION` will be returned. + // + // After a bucket has been created, the bucket's location cannot be changed. + UpdateBucketAsync(context.Context, *UpdateBucketRequest) (*longrunningpb.Operation, error) + // Creates a log bucket that can be used to store log entries. After a bucket + // has been created, the bucket's location cannot be changed. + CreateBucket(context.Context, *CreateBucketRequest) (*LogBucket, error) + // Updates a log bucket. + // + // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + // `FAILED_PRECONDITION` will be returned. + // + // After a bucket has been created, the bucket's location cannot be changed. + UpdateBucket(context.Context, *UpdateBucketRequest) (*LogBucket, error) + // Deletes a log bucket. + // + // Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. + // After 7 days, the bucket will be purged and all log entries in the bucket + // will be permanently deleted. + DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error) + // Undeletes a log bucket. A bucket that has been deleted can be undeleted + // within the grace period of 7 days. + UndeleteBucket(context.Context, *UndeleteBucketRequest) (*emptypb.Empty, error) + // Lists views on a log bucket. + ListViews(context.Context, *ListViewsRequest) (*ListViewsResponse, error) + // Gets a view on a log bucket.. + GetView(context.Context, *GetViewRequest) (*LogView, error) + // Creates a view over log entries in a log bucket. A bucket may contain a + // maximum of 30 views. + CreateView(context.Context, *CreateViewRequest) (*LogView, error) + // Updates a view on a log bucket. This method replaces the following fields + // in the existing view with values from the new view: `filter`. + // If an `UNAVAILABLE` error is returned, this indicates that system is not in + // a state where it can update the view. If this occurs, please try again in a + // few minutes. + UpdateView(context.Context, *UpdateViewRequest) (*LogView, error) + // Deletes a view on a log bucket. + // If an `UNAVAILABLE` error is returned, this indicates that system is not in + // a state where it can delete the view. If this occurs, please try again in a + // few minutes. + DeleteView(context.Context, *DeleteViewRequest) (*emptypb.Empty, error) + // Lists sinks. + ListSinks(context.Context, *ListSinksRequest) (*ListSinksResponse, error) + // Gets a sink. + GetSink(context.Context, *GetSinkRequest) (*LogSink, error) + // Creates a sink that exports specified log entries to a destination. The + // export of newly-ingested log entries begins immediately, unless the sink's + // `writer_identity` is not permitted to write to the destination. A sink can + // export log entries only from the resource owning the sink. + CreateSink(context.Context, *CreateSinkRequest) (*LogSink, error) + // Updates a sink. This method replaces the following fields in the existing + // sink with values from the new sink: `destination`, and `filter`. + // + // The updated sink might also have a new `writer_identity`; see the + // `unique_writer_identity` field. + UpdateSink(context.Context, *UpdateSinkRequest) (*LogSink, error) + // Deletes a sink. If the sink has a unique `writer_identity`, then that + // service account is also deleted. + DeleteSink(context.Context, *DeleteSinkRequest) (*emptypb.Empty, error) + // Asynchronously creates a linked dataset in BigQuery which makes it possible + // to use BigQuery to read the logs stored in the log bucket. A log bucket may + // currently only contain one link. + CreateLink(context.Context, *CreateLinkRequest) (*longrunningpb.Operation, error) + // Deletes a link. This will also delete the corresponding BigQuery linked + // dataset. + DeleteLink(context.Context, *DeleteLinkRequest) (*longrunningpb.Operation, error) + // Lists links. + ListLinks(context.Context, *ListLinksRequest) (*ListLinksResponse, error) + // Gets a link. + GetLink(context.Context, *GetLinkRequest) (*Link, error) + // Lists all the exclusions on the _Default sink in a parent resource. + ListExclusions(context.Context, *ListExclusionsRequest) (*ListExclusionsResponse, error) + // Gets the description of an exclusion in the _Default sink. + GetExclusion(context.Context, *GetExclusionRequest) (*LogExclusion, error) + // Creates a new exclusion in the _Default sink in a specified parent + // resource. Only log entries belonging to that resource can be excluded. You + // can have up to 10 exclusions in a resource. + CreateExclusion(context.Context, *CreateExclusionRequest) (*LogExclusion, error) + // Changes one or more properties of an existing exclusion in the _Default + // sink. + UpdateExclusion(context.Context, *UpdateExclusionRequest) (*LogExclusion, error) + // Deletes an exclusion in the _Default sink. + DeleteExclusion(context.Context, *DeleteExclusionRequest) (*emptypb.Empty, error) + // Gets the Logging CMEK settings for the given resource. + // + // Note: CMEK for the Log Router can be configured for Google Cloud projects, + // folders, organizations and billing accounts. Once configured for an + // organization, it applies to all projects and folders in the Google Cloud + // organization. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + GetCmekSettings(context.Context, *GetCmekSettingsRequest) (*CmekSettings, error) + // Updates the Log Router CMEK settings for the given resource. + // + // Note: CMEK for the Log Router can currently only be configured for Google + // Cloud organizations. Once configured, it applies to all projects and + // folders in the Google Cloud organization. + // + // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] + // will fail if 1) `kms_key_name` is invalid, or 2) the associated service + // account does not have the required + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + // 3) access to the key is disabled. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + UpdateCmekSettings(context.Context, *UpdateCmekSettingsRequest) (*CmekSettings, error) + // Gets the Log Router settings for the given resource. + // + // Note: Settings for the Log Router can be get for Google Cloud projects, + // folders, organizations and billing accounts. Currently it can only be + // configured for organizations. Once configured for an organization, it + // applies to all projects and folders in the Google Cloud organization. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + GetSettings(context.Context, *GetSettingsRequest) (*Settings, error) + // Updates the Log Router settings for the given resource. + // + // Note: Settings for the Log Router can currently only be configured for + // Google Cloud organizations. Once configured, it applies to all projects and + // folders in the Google Cloud organization. + // + // [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] + // will fail if 1) `kms_key_name` is invalid, or 2) the associated service + // account does not have the required + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + // 3) access to the key is disabled. 4) `location_id` is not supported by + // Logging. 5) `location_id` violate OrgPolicy. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + UpdateSettings(context.Context, *UpdateSettingsRequest) (*Settings, error) + // Copies a set of log entries from a log bucket to a Cloud Storage bucket. + CopyLogEntries(context.Context, *CopyLogEntriesRequest) (*longrunningpb.Operation, error) +} + +// UnimplementedConfigServiceV2Server should be embedded to have forward compatible implementations. +type UnimplementedConfigServiceV2Server struct { +} + +func (UnimplementedConfigServiceV2Server) ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListBuckets not implemented") +} +func (UnimplementedConfigServiceV2Server) GetBucket(context.Context, *GetBucketRequest) (*LogBucket, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBucket not implemented") +} +func (UnimplementedConfigServiceV2Server) CreateBucketAsync(context.Context, *CreateBucketRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBucketAsync not implemented") +} +func (UnimplementedConfigServiceV2Server) UpdateBucketAsync(context.Context, *UpdateBucketRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBucketAsync not implemented") +} +func (UnimplementedConfigServiceV2Server) CreateBucket(context.Context, *CreateBucketRequest) (*LogBucket, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBucket not implemented") +} +func (UnimplementedConfigServiceV2Server) UpdateBucket(context.Context, *UpdateBucketRequest) (*LogBucket, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBucket not implemented") +} +func (UnimplementedConfigServiceV2Server) DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteBucket not implemented") +} +func (UnimplementedConfigServiceV2Server) UndeleteBucket(context.Context, *UndeleteBucketRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UndeleteBucket not implemented") +} +func (UnimplementedConfigServiceV2Server) ListViews(context.Context, *ListViewsRequest) (*ListViewsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListViews not implemented") +} +func (UnimplementedConfigServiceV2Server) GetView(context.Context, *GetViewRequest) (*LogView, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetView not implemented") +} +func (UnimplementedConfigServiceV2Server) CreateView(context.Context, *CreateViewRequest) (*LogView, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateView not implemented") +} +func (UnimplementedConfigServiceV2Server) UpdateView(context.Context, *UpdateViewRequest) (*LogView, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateView not implemented") +} +func (UnimplementedConfigServiceV2Server) DeleteView(context.Context, *DeleteViewRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteView not implemented") +} +func (UnimplementedConfigServiceV2Server) ListSinks(context.Context, *ListSinksRequest) (*ListSinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSinks not implemented") +} +func (UnimplementedConfigServiceV2Server) GetSink(context.Context, *GetSinkRequest) (*LogSink, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSink not implemented") +} +func (UnimplementedConfigServiceV2Server) CreateSink(context.Context, *CreateSinkRequest) (*LogSink, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSink not implemented") +} +func (UnimplementedConfigServiceV2Server) UpdateSink(context.Context, *UpdateSinkRequest) (*LogSink, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSink not implemented") +} +func (UnimplementedConfigServiceV2Server) DeleteSink(context.Context, *DeleteSinkRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSink not implemented") +} +func (UnimplementedConfigServiceV2Server) CreateLink(context.Context, *CreateLinkRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateLink not implemented") +} +func (UnimplementedConfigServiceV2Server) DeleteLink(context.Context, *DeleteLinkRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteLink not implemented") +} +func (UnimplementedConfigServiceV2Server) ListLinks(context.Context, *ListLinksRequest) (*ListLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListLinks not implemented") +} +func (UnimplementedConfigServiceV2Server) GetLink(context.Context, *GetLinkRequest) (*Link, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLink not implemented") +} +func (UnimplementedConfigServiceV2Server) ListExclusions(context.Context, *ListExclusionsRequest) (*ListExclusionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExclusions not implemented") +} +func (UnimplementedConfigServiceV2Server) GetExclusion(context.Context, *GetExclusionRequest) (*LogExclusion, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExclusion not implemented") +} +func (UnimplementedConfigServiceV2Server) CreateExclusion(context.Context, *CreateExclusionRequest) (*LogExclusion, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateExclusion not implemented") +} +func (UnimplementedConfigServiceV2Server) UpdateExclusion(context.Context, *UpdateExclusionRequest) (*LogExclusion, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateExclusion not implemented") +} +func (UnimplementedConfigServiceV2Server) DeleteExclusion(context.Context, *DeleteExclusionRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteExclusion not implemented") +} +func (UnimplementedConfigServiceV2Server) GetCmekSettings(context.Context, *GetCmekSettingsRequest) (*CmekSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCmekSettings not implemented") +} +func (UnimplementedConfigServiceV2Server) UpdateCmekSettings(context.Context, *UpdateCmekSettingsRequest) (*CmekSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCmekSettings not implemented") +} +func (UnimplementedConfigServiceV2Server) GetSettings(context.Context, *GetSettingsRequest) (*Settings, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") +} +func (UnimplementedConfigServiceV2Server) UpdateSettings(context.Context, *UpdateSettingsRequest) (*Settings, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSettings not implemented") +} +func (UnimplementedConfigServiceV2Server) CopyLogEntries(context.Context, *CopyLogEntriesRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CopyLogEntries not implemented") +} + +// UnsafeConfigServiceV2Server may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ConfigServiceV2Server will +// result in compilation errors. +type UnsafeConfigServiceV2Server interface { + mustEmbedUnimplementedConfigServiceV2Server() +} + +func RegisterConfigServiceV2Server(s grpc.ServiceRegistrar, srv ConfigServiceV2Server) { + s.RegisterService(&ConfigServiceV2_ServiceDesc, srv) +} + +func _ConfigServiceV2_ListBuckets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBucketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).ListBuckets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_ListBuckets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).ListBuckets(ctx, req.(*ListBucketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_GetBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).GetBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_GetBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).GetBucket(ctx, req.(*GetBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_CreateBucketAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).CreateBucketAsync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_CreateBucketAsync_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).CreateBucketAsync(ctx, req.(*CreateBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_UpdateBucketAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).UpdateBucketAsync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_UpdateBucketAsync_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).UpdateBucketAsync(ctx, req.(*UpdateBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_CreateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).CreateBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_CreateBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).CreateBucket(ctx, req.(*CreateBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_UpdateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).UpdateBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_UpdateBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).UpdateBucket(ctx, req.(*UpdateBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_DeleteBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).DeleteBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_DeleteBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).DeleteBucket(ctx, req.(*DeleteBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_UndeleteBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UndeleteBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).UndeleteBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_UndeleteBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).UndeleteBucket(ctx, req.(*UndeleteBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_ListViews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListViewsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).ListViews(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_ListViews_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).ListViews(ctx, req.(*ListViewsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_GetView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetViewRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).GetView(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_GetView_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).GetView(ctx, req.(*GetViewRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_CreateView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateViewRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).CreateView(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_CreateView_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).CreateView(ctx, req.(*CreateViewRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_UpdateView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateViewRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).UpdateView(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_UpdateView_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).UpdateView(ctx, req.(*UpdateViewRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_DeleteView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteViewRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).DeleteView(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_DeleteView_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).DeleteView(ctx, req.(*DeleteViewRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_ListSinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).ListSinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_ListSinks_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).ListSinks(ctx, req.(*ListSinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_GetSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).GetSink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_GetSink_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).GetSink(ctx, req.(*GetSinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_CreateSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).CreateSink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_CreateSink_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).CreateSink(ctx, req.(*CreateSinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_UpdateSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).UpdateSink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_UpdateSink_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).UpdateSink(ctx, req.(*UpdateSinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_DeleteSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteSinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).DeleteSink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_DeleteSink_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).DeleteSink(ctx, req.(*DeleteSinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_CreateLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).CreateLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_CreateLink_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).CreateLink(ctx, req.(*CreateLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_DeleteLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).DeleteLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_DeleteLink_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).DeleteLink(ctx, req.(*DeleteLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_ListLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListLinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).ListLinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_ListLinks_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).ListLinks(ctx, req.(*ListLinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_GetLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).GetLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_GetLink_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).GetLink(ctx, req.(*GetLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_ListExclusions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExclusionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).ListExclusions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_ListExclusions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).ListExclusions(ctx, req.(*ListExclusionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_GetExclusion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExclusionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).GetExclusion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_GetExclusion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).GetExclusion(ctx, req.(*GetExclusionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_CreateExclusion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateExclusionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).CreateExclusion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_CreateExclusion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).CreateExclusion(ctx, req.(*CreateExclusionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_UpdateExclusion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateExclusionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).UpdateExclusion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_UpdateExclusion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).UpdateExclusion(ctx, req.(*UpdateExclusionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_DeleteExclusion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteExclusionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).DeleteExclusion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_DeleteExclusion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).DeleteExclusion(ctx, req.(*DeleteExclusionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_GetCmekSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCmekSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).GetCmekSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_GetCmekSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).GetCmekSettings(ctx, req.(*GetCmekSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_UpdateCmekSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateCmekSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).UpdateCmekSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_UpdateCmekSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).UpdateCmekSettings(ctx, req.(*UpdateCmekSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).GetSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_GetSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).GetSettings(ctx, req.(*GetSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_UpdateSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).UpdateSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_UpdateSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).UpdateSettings(ctx, req.(*UpdateSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConfigServiceV2_CopyLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CopyLogEntriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceV2Server).CopyLogEntries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigServiceV2_CopyLogEntries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceV2Server).CopyLogEntries(ctx, req.(*CopyLogEntriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ConfigServiceV2_ServiceDesc is the grpc.ServiceDesc for ConfigServiceV2 service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ConfigServiceV2_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.logging.v2.ConfigServiceV2", + HandlerType: (*ConfigServiceV2Server)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListBuckets", + Handler: _ConfigServiceV2_ListBuckets_Handler, + }, + { + MethodName: "GetBucket", + Handler: _ConfigServiceV2_GetBucket_Handler, + }, + { + MethodName: "CreateBucketAsync", + Handler: _ConfigServiceV2_CreateBucketAsync_Handler, + }, + { + MethodName: "UpdateBucketAsync", + Handler: _ConfigServiceV2_UpdateBucketAsync_Handler, + }, + { + MethodName: "CreateBucket", + Handler: _ConfigServiceV2_CreateBucket_Handler, + }, + { + MethodName: "UpdateBucket", + Handler: _ConfigServiceV2_UpdateBucket_Handler, + }, + { + MethodName: "DeleteBucket", + Handler: _ConfigServiceV2_DeleteBucket_Handler, + }, + { + MethodName: "UndeleteBucket", + Handler: _ConfigServiceV2_UndeleteBucket_Handler, + }, + { + MethodName: "ListViews", + Handler: _ConfigServiceV2_ListViews_Handler, + }, + { + MethodName: "GetView", + Handler: _ConfigServiceV2_GetView_Handler, + }, + { + MethodName: "CreateView", + Handler: _ConfigServiceV2_CreateView_Handler, + }, + { + MethodName: "UpdateView", + Handler: _ConfigServiceV2_UpdateView_Handler, + }, + { + MethodName: "DeleteView", + Handler: _ConfigServiceV2_DeleteView_Handler, + }, + { + MethodName: "ListSinks", + Handler: _ConfigServiceV2_ListSinks_Handler, + }, + { + MethodName: "GetSink", + Handler: _ConfigServiceV2_GetSink_Handler, + }, + { + MethodName: "CreateSink", + Handler: _ConfigServiceV2_CreateSink_Handler, + }, + { + MethodName: "UpdateSink", + Handler: _ConfigServiceV2_UpdateSink_Handler, + }, + { + MethodName: "DeleteSink", + Handler: _ConfigServiceV2_DeleteSink_Handler, + }, + { + MethodName: "CreateLink", + Handler: _ConfigServiceV2_CreateLink_Handler, + }, + { + MethodName: "DeleteLink", + Handler: _ConfigServiceV2_DeleteLink_Handler, + }, + { + MethodName: "ListLinks", + Handler: _ConfigServiceV2_ListLinks_Handler, + }, + { + MethodName: "GetLink", + Handler: _ConfigServiceV2_GetLink_Handler, + }, + { + MethodName: "ListExclusions", + Handler: _ConfigServiceV2_ListExclusions_Handler, + }, + { + MethodName: "GetExclusion", + Handler: _ConfigServiceV2_GetExclusion_Handler, + }, + { + MethodName: "CreateExclusion", + Handler: _ConfigServiceV2_CreateExclusion_Handler, + }, + { + MethodName: "UpdateExclusion", + Handler: _ConfigServiceV2_UpdateExclusion_Handler, + }, + { + MethodName: "DeleteExclusion", + Handler: _ConfigServiceV2_DeleteExclusion_Handler, + }, + { + MethodName: "GetCmekSettings", + Handler: _ConfigServiceV2_GetCmekSettings_Handler, + }, + { + MethodName: "UpdateCmekSettings", + Handler: _ConfigServiceV2_UpdateCmekSettings_Handler, + }, + { + MethodName: "GetSettings", + Handler: _ConfigServiceV2_GetSettings_Handler, + }, + { + MethodName: "UpdateSettings", + Handler: _ConfigServiceV2_UpdateSettings_Handler, + }, + { + MethodName: "CopyLogEntries", + Handler: _ConfigServiceV2_CopyLogEntries_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/logging/v2/logging_config.proto", +} diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_grpc.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_grpc.pb.go new file mode 100644 index 0000000000..bfbbb0bed6 --- /dev/null +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_grpc.pb.go @@ -0,0 +1,380 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/logging/v2/logging.proto + +package loggingpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + LoggingServiceV2_DeleteLog_FullMethodName = "/google.logging.v2.LoggingServiceV2/DeleteLog" + LoggingServiceV2_WriteLogEntries_FullMethodName = "/google.logging.v2.LoggingServiceV2/WriteLogEntries" + LoggingServiceV2_ListLogEntries_FullMethodName = "/google.logging.v2.LoggingServiceV2/ListLogEntries" + LoggingServiceV2_ListMonitoredResourceDescriptors_FullMethodName = "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors" + LoggingServiceV2_ListLogs_FullMethodName = "/google.logging.v2.LoggingServiceV2/ListLogs" + LoggingServiceV2_TailLogEntries_FullMethodName = "/google.logging.v2.LoggingServiceV2/TailLogEntries" +) + +// LoggingServiceV2Client is the client API for LoggingServiceV2 service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type LoggingServiceV2Client interface { + // Deletes all the log entries in a log for the _Default Log Bucket. The log + // reappears if it receives new entries. Log entries written shortly before + // the delete operation might not be deleted. Entries received after the + // delete operation with a timestamp before the operation will be deleted. + DeleteLog(ctx context.Context, in *DeleteLogRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Writes log entries to Logging. This API method is the + // only way to send log entries to Logging. This method + // is used, directly or indirectly, by the Logging agent + // (fluentd) and all logging libraries configured to use Logging. + // A single request may contain log entries for a maximum of 1000 + // different resources (projects, organizations, billing accounts or + // folders) + WriteLogEntries(ctx context.Context, in *WriteLogEntriesRequest, opts ...grpc.CallOption) (*WriteLogEntriesResponse, error) + // Lists log entries. Use this method to retrieve log entries that originated + // from a project/folder/organization/billing account. For ways to export log + // entries, see [Exporting + // Logs](https://cloud.google.com/logging/docs/export). + ListLogEntries(ctx context.Context, in *ListLogEntriesRequest, opts ...grpc.CallOption) (*ListLogEntriesResponse, error) + // Lists the descriptors for monitored resource types used by Logging. + ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) + // Lists the logs in projects, organizations, folders, or billing accounts. + // Only logs that have entries are listed. + ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error) + // Streaming read of log entries as they are ingested. Until the stream is + // terminated, it will continue reading logs. + TailLogEntries(ctx context.Context, opts ...grpc.CallOption) (LoggingServiceV2_TailLogEntriesClient, error) +} + +type loggingServiceV2Client struct { + cc grpc.ClientConnInterface +} + +func NewLoggingServiceV2Client(cc grpc.ClientConnInterface) LoggingServiceV2Client { + return &loggingServiceV2Client{cc} +} + +func (c *loggingServiceV2Client) DeleteLog(ctx context.Context, in *DeleteLogRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, LoggingServiceV2_DeleteLog_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *loggingServiceV2Client) WriteLogEntries(ctx context.Context, in *WriteLogEntriesRequest, opts ...grpc.CallOption) (*WriteLogEntriesResponse, error) { + out := new(WriteLogEntriesResponse) + err := c.cc.Invoke(ctx, LoggingServiceV2_WriteLogEntries_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *loggingServiceV2Client) ListLogEntries(ctx context.Context, in *ListLogEntriesRequest, opts ...grpc.CallOption) (*ListLogEntriesResponse, error) { + out := new(ListLogEntriesResponse) + err := c.cc.Invoke(ctx, LoggingServiceV2_ListLogEntries_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *loggingServiceV2Client) ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) { + out := new(ListMonitoredResourceDescriptorsResponse) + err := c.cc.Invoke(ctx, LoggingServiceV2_ListMonitoredResourceDescriptors_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *loggingServiceV2Client) ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error) { + out := new(ListLogsResponse) + err := c.cc.Invoke(ctx, LoggingServiceV2_ListLogs_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *loggingServiceV2Client) TailLogEntries(ctx context.Context, opts ...grpc.CallOption) (LoggingServiceV2_TailLogEntriesClient, error) { + stream, err := c.cc.NewStream(ctx, &LoggingServiceV2_ServiceDesc.Streams[0], LoggingServiceV2_TailLogEntries_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &loggingServiceV2TailLogEntriesClient{stream} + return x, nil +} + +type LoggingServiceV2_TailLogEntriesClient interface { + Send(*TailLogEntriesRequest) error + Recv() (*TailLogEntriesResponse, error) + grpc.ClientStream +} + +type loggingServiceV2TailLogEntriesClient struct { + grpc.ClientStream +} + +func (x *loggingServiceV2TailLogEntriesClient) Send(m *TailLogEntriesRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *loggingServiceV2TailLogEntriesClient) Recv() (*TailLogEntriesResponse, error) { + m := new(TailLogEntriesResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// LoggingServiceV2Server is the server API for LoggingServiceV2 service. +// All implementations should embed UnimplementedLoggingServiceV2Server +// for forward compatibility +type LoggingServiceV2Server interface { + // Deletes all the log entries in a log for the _Default Log Bucket. The log + // reappears if it receives new entries. Log entries written shortly before + // the delete operation might not be deleted. Entries received after the + // delete operation with a timestamp before the operation will be deleted. + DeleteLog(context.Context, *DeleteLogRequest) (*emptypb.Empty, error) + // Writes log entries to Logging. This API method is the + // only way to send log entries to Logging. This method + // is used, directly or indirectly, by the Logging agent + // (fluentd) and all logging libraries configured to use Logging. + // A single request may contain log entries for a maximum of 1000 + // different resources (projects, organizations, billing accounts or + // folders) + WriteLogEntries(context.Context, *WriteLogEntriesRequest) (*WriteLogEntriesResponse, error) + // Lists log entries. Use this method to retrieve log entries that originated + // from a project/folder/organization/billing account. For ways to export log + // entries, see [Exporting + // Logs](https://cloud.google.com/logging/docs/export). + ListLogEntries(context.Context, *ListLogEntriesRequest) (*ListLogEntriesResponse, error) + // Lists the descriptors for monitored resource types used by Logging. + ListMonitoredResourceDescriptors(context.Context, *ListMonitoredResourceDescriptorsRequest) (*ListMonitoredResourceDescriptorsResponse, error) + // Lists the logs in projects, organizations, folders, or billing accounts. + // Only logs that have entries are listed. + ListLogs(context.Context, *ListLogsRequest) (*ListLogsResponse, error) + // Streaming read of log entries as they are ingested. Until the stream is + // terminated, it will continue reading logs. + TailLogEntries(LoggingServiceV2_TailLogEntriesServer) error +} + +// UnimplementedLoggingServiceV2Server should be embedded to have forward compatible implementations. +type UnimplementedLoggingServiceV2Server struct { +} + +func (UnimplementedLoggingServiceV2Server) DeleteLog(context.Context, *DeleteLogRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteLog not implemented") +} +func (UnimplementedLoggingServiceV2Server) WriteLogEntries(context.Context, *WriteLogEntriesRequest) (*WriteLogEntriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteLogEntries not implemented") +} +func (UnimplementedLoggingServiceV2Server) ListLogEntries(context.Context, *ListLogEntriesRequest) (*ListLogEntriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListLogEntries not implemented") +} +func (UnimplementedLoggingServiceV2Server) ListMonitoredResourceDescriptors(context.Context, *ListMonitoredResourceDescriptorsRequest) (*ListMonitoredResourceDescriptorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListMonitoredResourceDescriptors not implemented") +} +func (UnimplementedLoggingServiceV2Server) ListLogs(context.Context, *ListLogsRequest) (*ListLogsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListLogs not implemented") +} +func (UnimplementedLoggingServiceV2Server) TailLogEntries(LoggingServiceV2_TailLogEntriesServer) error { + return status.Errorf(codes.Unimplemented, "method TailLogEntries not implemented") +} + +// UnsafeLoggingServiceV2Server may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to LoggingServiceV2Server will +// result in compilation errors. +type UnsafeLoggingServiceV2Server interface { + mustEmbedUnimplementedLoggingServiceV2Server() +} + +func RegisterLoggingServiceV2Server(s grpc.ServiceRegistrar, srv LoggingServiceV2Server) { + s.RegisterService(&LoggingServiceV2_ServiceDesc, srv) +} + +func _LoggingServiceV2_DeleteLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteLogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LoggingServiceV2Server).DeleteLog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LoggingServiceV2_DeleteLog_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LoggingServiceV2Server).DeleteLog(ctx, req.(*DeleteLogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LoggingServiceV2_WriteLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteLogEntriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LoggingServiceV2Server).WriteLogEntries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LoggingServiceV2_WriteLogEntries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LoggingServiceV2Server).WriteLogEntries(ctx, req.(*WriteLogEntriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LoggingServiceV2_ListLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListLogEntriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LoggingServiceV2Server).ListLogEntries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LoggingServiceV2_ListLogEntries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LoggingServiceV2Server).ListLogEntries(ctx, req.(*ListLogEntriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LoggingServiceV2_ListMonitoredResourceDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMonitoredResourceDescriptorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LoggingServiceV2Server).ListMonitoredResourceDescriptors(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LoggingServiceV2_ListMonitoredResourceDescriptors_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LoggingServiceV2Server).ListMonitoredResourceDescriptors(ctx, req.(*ListMonitoredResourceDescriptorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LoggingServiceV2_ListLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListLogsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LoggingServiceV2Server).ListLogs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LoggingServiceV2_ListLogs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LoggingServiceV2Server).ListLogs(ctx, req.(*ListLogsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LoggingServiceV2_TailLogEntries_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(LoggingServiceV2Server).TailLogEntries(&loggingServiceV2TailLogEntriesServer{stream}) +} + +type LoggingServiceV2_TailLogEntriesServer interface { + Send(*TailLogEntriesResponse) error + Recv() (*TailLogEntriesRequest, error) + grpc.ServerStream +} + +type loggingServiceV2TailLogEntriesServer struct { + grpc.ServerStream +} + +func (x *loggingServiceV2TailLogEntriesServer) Send(m *TailLogEntriesResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *loggingServiceV2TailLogEntriesServer) Recv() (*TailLogEntriesRequest, error) { + m := new(TailLogEntriesRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// LoggingServiceV2_ServiceDesc is the grpc.ServiceDesc for LoggingServiceV2 service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var LoggingServiceV2_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.logging.v2.LoggingServiceV2", + HandlerType: (*LoggingServiceV2Server)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeleteLog", + Handler: _LoggingServiceV2_DeleteLog_Handler, + }, + { + MethodName: "WriteLogEntries", + Handler: _LoggingServiceV2_WriteLogEntries_Handler, + }, + { + MethodName: "ListLogEntries", + Handler: _LoggingServiceV2_ListLogEntries_Handler, + }, + { + MethodName: "ListMonitoredResourceDescriptors", + Handler: _LoggingServiceV2_ListMonitoredResourceDescriptors_Handler, + }, + { + MethodName: "ListLogs", + Handler: _LoggingServiceV2_ListLogs_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "TailLogEntries", + Handler: _LoggingServiceV2_TailLogEntries_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "google/logging/v2/logging.proto", +} diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics.pb.go index c190599cfd..cc4cfaeca6 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics.pb.go +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics.pb.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,26 +15,21 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/logging/v2/logging_metrics.proto package loggingpb import ( - context "context" - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" distribution "google.golang.org/genproto/googleapis/api/distribution" metric "google.golang.org/genproto/googleapis/api/metric" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -975,237 +970,3 @@ func file_google_logging_v2_logging_metrics_proto_init() { file_google_logging_v2_logging_metrics_proto_goTypes = nil file_google_logging_v2_logging_metrics_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// MetricsServiceV2Client is the client API for MetricsServiceV2 service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MetricsServiceV2Client interface { - // Lists logs-based metrics. - ListLogMetrics(ctx context.Context, in *ListLogMetricsRequest, opts ...grpc.CallOption) (*ListLogMetricsResponse, error) - // Gets a logs-based metric. - GetLogMetric(ctx context.Context, in *GetLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) - // Creates a logs-based metric. - CreateLogMetric(ctx context.Context, in *CreateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) - // Creates or updates a logs-based metric. - UpdateLogMetric(ctx context.Context, in *UpdateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) - // Deletes a logs-based metric. - DeleteLogMetric(ctx context.Context, in *DeleteLogMetricRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type metricsServiceV2Client struct { - cc grpc.ClientConnInterface -} - -func NewMetricsServiceV2Client(cc grpc.ClientConnInterface) MetricsServiceV2Client { - return &metricsServiceV2Client{cc} -} - -func (c *metricsServiceV2Client) ListLogMetrics(ctx context.Context, in *ListLogMetricsRequest, opts ...grpc.CallOption) (*ListLogMetricsResponse, error) { - out := new(ListLogMetricsResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.MetricsServiceV2/ListLogMetrics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricsServiceV2Client) GetLogMetric(ctx context.Context, in *GetLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) { - out := new(LogMetric) - err := c.cc.Invoke(ctx, "/google.logging.v2.MetricsServiceV2/GetLogMetric", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricsServiceV2Client) CreateLogMetric(ctx context.Context, in *CreateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) { - out := new(LogMetric) - err := c.cc.Invoke(ctx, "/google.logging.v2.MetricsServiceV2/CreateLogMetric", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricsServiceV2Client) UpdateLogMetric(ctx context.Context, in *UpdateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) { - out := new(LogMetric) - err := c.cc.Invoke(ctx, "/google.logging.v2.MetricsServiceV2/UpdateLogMetric", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricsServiceV2Client) DeleteLogMetric(ctx context.Context, in *DeleteLogMetricRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.logging.v2.MetricsServiceV2/DeleteLogMetric", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MetricsServiceV2Server is the server API for MetricsServiceV2 service. -type MetricsServiceV2Server interface { - // Lists logs-based metrics. - ListLogMetrics(context.Context, *ListLogMetricsRequest) (*ListLogMetricsResponse, error) - // Gets a logs-based metric. - GetLogMetric(context.Context, *GetLogMetricRequest) (*LogMetric, error) - // Creates a logs-based metric. - CreateLogMetric(context.Context, *CreateLogMetricRequest) (*LogMetric, error) - // Creates or updates a logs-based metric. - UpdateLogMetric(context.Context, *UpdateLogMetricRequest) (*LogMetric, error) - // Deletes a logs-based metric. - DeleteLogMetric(context.Context, *DeleteLogMetricRequest) (*emptypb.Empty, error) -} - -// UnimplementedMetricsServiceV2Server can be embedded to have forward compatible implementations. -type UnimplementedMetricsServiceV2Server struct { -} - -func (*UnimplementedMetricsServiceV2Server) ListLogMetrics(context.Context, *ListLogMetricsRequest) (*ListLogMetricsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListLogMetrics not implemented") -} -func (*UnimplementedMetricsServiceV2Server) GetLogMetric(context.Context, *GetLogMetricRequest) (*LogMetric, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLogMetric not implemented") -} -func (*UnimplementedMetricsServiceV2Server) CreateLogMetric(context.Context, *CreateLogMetricRequest) (*LogMetric, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateLogMetric not implemented") -} -func (*UnimplementedMetricsServiceV2Server) UpdateLogMetric(context.Context, *UpdateLogMetricRequest) (*LogMetric, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateLogMetric not implemented") -} -func (*UnimplementedMetricsServiceV2Server) DeleteLogMetric(context.Context, *DeleteLogMetricRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteLogMetric not implemented") -} - -func RegisterMetricsServiceV2Server(s *grpc.Server, srv MetricsServiceV2Server) { - s.RegisterService(&_MetricsServiceV2_serviceDesc, srv) -} - -func _MetricsServiceV2_ListLogMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListLogMetricsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceV2Server).ListLogMetrics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.MetricsServiceV2/ListLogMetrics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceV2Server).ListLogMetrics(ctx, req.(*ListLogMetricsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricsServiceV2_GetLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLogMetricRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceV2Server).GetLogMetric(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.MetricsServiceV2/GetLogMetric", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceV2Server).GetLogMetric(ctx, req.(*GetLogMetricRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricsServiceV2_CreateLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateLogMetricRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceV2Server).CreateLogMetric(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.MetricsServiceV2/CreateLogMetric", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceV2Server).CreateLogMetric(ctx, req.(*CreateLogMetricRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricsServiceV2_UpdateLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateLogMetricRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceV2Server).UpdateLogMetric(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.MetricsServiceV2/UpdateLogMetric", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceV2Server).UpdateLogMetric(ctx, req.(*UpdateLogMetricRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricsServiceV2_DeleteLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteLogMetricRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceV2Server).DeleteLogMetric(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.MetricsServiceV2/DeleteLogMetric", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceV2Server).DeleteLogMetric(ctx, req.(*DeleteLogMetricRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _MetricsServiceV2_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.logging.v2.MetricsServiceV2", - HandlerType: (*MetricsServiceV2Server)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListLogMetrics", - Handler: _MetricsServiceV2_ListLogMetrics_Handler, - }, - { - MethodName: "GetLogMetric", - Handler: _MetricsServiceV2_GetLogMetric_Handler, - }, - { - MethodName: "CreateLogMetric", - Handler: _MetricsServiceV2_CreateLogMetric_Handler, - }, - { - MethodName: "UpdateLogMetric", - Handler: _MetricsServiceV2_UpdateLogMetric_Handler, - }, - { - MethodName: "DeleteLogMetric", - Handler: _MetricsServiceV2_DeleteLogMetric_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/logging/v2/logging_metrics.proto", -} diff --git a/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics_grpc.pb.go b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics_grpc.pb.go new file mode 100644 index 0000000000..8db1345fa2 --- /dev/null +++ b/vendor/cloud.google.com/go/logging/apiv2/loggingpb/logging_metrics_grpc.pb.go @@ -0,0 +1,280 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/logging/v2/logging_metrics.proto + +package loggingpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + MetricsServiceV2_ListLogMetrics_FullMethodName = "/google.logging.v2.MetricsServiceV2/ListLogMetrics" + MetricsServiceV2_GetLogMetric_FullMethodName = "/google.logging.v2.MetricsServiceV2/GetLogMetric" + MetricsServiceV2_CreateLogMetric_FullMethodName = "/google.logging.v2.MetricsServiceV2/CreateLogMetric" + MetricsServiceV2_UpdateLogMetric_FullMethodName = "/google.logging.v2.MetricsServiceV2/UpdateLogMetric" + MetricsServiceV2_DeleteLogMetric_FullMethodName = "/google.logging.v2.MetricsServiceV2/DeleteLogMetric" +) + +// MetricsServiceV2Client is the client API for MetricsServiceV2 service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MetricsServiceV2Client interface { + // Lists logs-based metrics. + ListLogMetrics(ctx context.Context, in *ListLogMetricsRequest, opts ...grpc.CallOption) (*ListLogMetricsResponse, error) + // Gets a logs-based metric. + GetLogMetric(ctx context.Context, in *GetLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) + // Creates a logs-based metric. + CreateLogMetric(ctx context.Context, in *CreateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) + // Creates or updates a logs-based metric. + UpdateLogMetric(ctx context.Context, in *UpdateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) + // Deletes a logs-based metric. + DeleteLogMetric(ctx context.Context, in *DeleteLogMetricRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type metricsServiceV2Client struct { + cc grpc.ClientConnInterface +} + +func NewMetricsServiceV2Client(cc grpc.ClientConnInterface) MetricsServiceV2Client { + return &metricsServiceV2Client{cc} +} + +func (c *metricsServiceV2Client) ListLogMetrics(ctx context.Context, in *ListLogMetricsRequest, opts ...grpc.CallOption) (*ListLogMetricsResponse, error) { + out := new(ListLogMetricsResponse) + err := c.cc.Invoke(ctx, MetricsServiceV2_ListLogMetrics_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricsServiceV2Client) GetLogMetric(ctx context.Context, in *GetLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) { + out := new(LogMetric) + err := c.cc.Invoke(ctx, MetricsServiceV2_GetLogMetric_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricsServiceV2Client) CreateLogMetric(ctx context.Context, in *CreateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) { + out := new(LogMetric) + err := c.cc.Invoke(ctx, MetricsServiceV2_CreateLogMetric_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricsServiceV2Client) UpdateLogMetric(ctx context.Context, in *UpdateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) { + out := new(LogMetric) + err := c.cc.Invoke(ctx, MetricsServiceV2_UpdateLogMetric_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricsServiceV2Client) DeleteLogMetric(ctx context.Context, in *DeleteLogMetricRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, MetricsServiceV2_DeleteLogMetric_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MetricsServiceV2Server is the server API for MetricsServiceV2 service. +// All implementations should embed UnimplementedMetricsServiceV2Server +// for forward compatibility +type MetricsServiceV2Server interface { + // Lists logs-based metrics. + ListLogMetrics(context.Context, *ListLogMetricsRequest) (*ListLogMetricsResponse, error) + // Gets a logs-based metric. + GetLogMetric(context.Context, *GetLogMetricRequest) (*LogMetric, error) + // Creates a logs-based metric. + CreateLogMetric(context.Context, *CreateLogMetricRequest) (*LogMetric, error) + // Creates or updates a logs-based metric. + UpdateLogMetric(context.Context, *UpdateLogMetricRequest) (*LogMetric, error) + // Deletes a logs-based metric. + DeleteLogMetric(context.Context, *DeleteLogMetricRequest) (*emptypb.Empty, error) +} + +// UnimplementedMetricsServiceV2Server should be embedded to have forward compatible implementations. +type UnimplementedMetricsServiceV2Server struct { +} + +func (UnimplementedMetricsServiceV2Server) ListLogMetrics(context.Context, *ListLogMetricsRequest) (*ListLogMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListLogMetrics not implemented") +} +func (UnimplementedMetricsServiceV2Server) GetLogMetric(context.Context, *GetLogMetricRequest) (*LogMetric, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLogMetric not implemented") +} +func (UnimplementedMetricsServiceV2Server) CreateLogMetric(context.Context, *CreateLogMetricRequest) (*LogMetric, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateLogMetric not implemented") +} +func (UnimplementedMetricsServiceV2Server) UpdateLogMetric(context.Context, *UpdateLogMetricRequest) (*LogMetric, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateLogMetric not implemented") +} +func (UnimplementedMetricsServiceV2Server) DeleteLogMetric(context.Context, *DeleteLogMetricRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteLogMetric not implemented") +} + +// UnsafeMetricsServiceV2Server may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MetricsServiceV2Server will +// result in compilation errors. +type UnsafeMetricsServiceV2Server interface { + mustEmbedUnimplementedMetricsServiceV2Server() +} + +func RegisterMetricsServiceV2Server(s grpc.ServiceRegistrar, srv MetricsServiceV2Server) { + s.RegisterService(&MetricsServiceV2_ServiceDesc, srv) +} + +func _MetricsServiceV2_ListLogMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListLogMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsServiceV2Server).ListLogMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricsServiceV2_ListLogMetrics_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServiceV2Server).ListLogMetrics(ctx, req.(*ListLogMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricsServiceV2_GetLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLogMetricRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsServiceV2Server).GetLogMetric(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricsServiceV2_GetLogMetric_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServiceV2Server).GetLogMetric(ctx, req.(*GetLogMetricRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricsServiceV2_CreateLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateLogMetricRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsServiceV2Server).CreateLogMetric(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricsServiceV2_CreateLogMetric_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServiceV2Server).CreateLogMetric(ctx, req.(*CreateLogMetricRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricsServiceV2_UpdateLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateLogMetricRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsServiceV2Server).UpdateLogMetric(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricsServiceV2_UpdateLogMetric_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServiceV2Server).UpdateLogMetric(ctx, req.(*UpdateLogMetricRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricsServiceV2_DeleteLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteLogMetricRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsServiceV2Server).DeleteLogMetric(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricsServiceV2_DeleteLogMetric_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServiceV2Server).DeleteLogMetric(ctx, req.(*DeleteLogMetricRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MetricsServiceV2_ServiceDesc is the grpc.ServiceDesc for MetricsServiceV2 service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MetricsServiceV2_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.logging.v2.MetricsServiceV2", + HandlerType: (*MetricsServiceV2Server)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListLogMetrics", + Handler: _MetricsServiceV2_ListLogMetrics_Handler, + }, + { + MethodName: "GetLogMetric", + Handler: _MetricsServiceV2_GetLogMetric_Handler, + }, + { + MethodName: "CreateLogMetric", + Handler: _MetricsServiceV2_CreateLogMetric_Handler, + }, + { + MethodName: "UpdateLogMetric", + Handler: _MetricsServiceV2_UpdateLogMetric_Handler, + }, + { + MethodName: "DeleteLogMetric", + Handler: _MetricsServiceV2_DeleteLogMetric_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/logging/v2/logging_metrics.proto", +} diff --git a/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go b/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go index 150ce86539..b5a6062d78 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go +++ b/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -357,7 +357,7 @@ func (c *metricsGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *metricsGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } @@ -425,7 +425,7 @@ func defaultMetricsRESTClientOptions() []option.ClientOption { // use by Google-written clients. func (c *metricsRESTClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/logging/internal/version.go b/vendor/cloud.google.com/go/logging/internal/version.go index efedadbea2..507f6903ef 100644 --- a/vendor/cloud.google.com/go/logging/internal/version.go +++ b/vendor/cloud.google.com/go/logging/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.13.0" +const Version = "1.13.1" diff --git a/vendor/modules.txt b/vendor/modules.txt index b489583c97..03738f0829 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -24,8 +24,8 @@ cloud.google.com/go/auth/oauth2adapt # cloud.google.com/go/compute/metadata v0.8.0 ## explicit; go 1.23.0 cloud.google.com/go/compute/metadata -# cloud.google.com/go/logging v1.13.0 -## explicit; go 1.21 +# cloud.google.com/go/logging v1.13.1 +## explicit; go 1.24.0 cloud.google.com/go/logging cloud.google.com/go/logging/apiv2 cloud.google.com/go/logging/apiv2/loggingpb